blob: fbdd20aa497be33b5ef8fc8d91834fd9f3299cbc [file] [log] [blame]
@namespace(uri="library", prefix="")
package library;
class Library {
val Writer[*] writers;
val Book[*] books;
}
class Writer {
attr String name;
ref Book[*]#author books;
}
class Book {
attr String title;
attr int pages = 100;
attr BookCategory category;
ref Writer[1]#books author;
}
enum BookCategory {
Mystery = 0;
ScienceFiction = 1;
Biography = 2;
}