• DoctypeDeclaration{http://etl.sf.net/etl/doctype/0.2.1}:
    • systemId: "../grammars/EcoreJava.g.etl"
  • AnnotationSource{http://etl.sf.net/2006/samples/ecore/0.1}:
    • localName: ecore
    • uri: "http://eclipse.org/emf/ecore"
  • Package{http://etl.sf.net/2006/samples/ecore/0.1}:
    • annotations:
      • Annotation{http://etl.sf.net/2006/samples/ecore/0.1}:
        • source: ecore
        • details:
          • AnnotationDetail{http://etl.sf.net/2006/samples/ecore/0.1}:
            • key: basePackage
            • value: "org.eclipse.example"
          • AnnotationDetail{http://etl.sf.net/2006/samples/ecore/0.1}:
            • key: "nsUri"
            • value: "http://www.eclipse.org/emf/example/lib"
          • AnnotationDetail{http://etl.sf.net/2006/samples/ecore/0.1}:
            • key: nsPrefix
            • value: "lib"
    • name:
      • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
        • name: Library
    • contents:
      • DataType{http://etl.sf.net/2006/samples/ecore/0.1}:
        • name:
          • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
            • name: JavaDate
        • contents:
          • JavaClass{http://etl.sf.net/2006/samples/ecore/java/0.1}:
            • name:
              • java
              • util
              • Date
      • Class{http://etl.sf.net/2006/samples/ecore/0.1}:
        • name:
          • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
            • name: Library
        • contents:
          • Var{http://etl.sf.net/2006/samples/ecore/0.1}:
            • name:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: name
            • type:
              • PrimitiveType{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: String
          • Var{http://etl.sf.net/2006/samples/ecore/0.1}:
            • composite: composite
            • name:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: writers
            • type:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: Writer
            • lowBound: 0
            • uppperBound: *
          • Var{http://etl.sf.net/2006/samples/ecore/0.1}:
            • composite: composite
            • name:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: books
            • type:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: Book
            • lowBound: 0
            • uppperBound: *
      • Class{http://etl.sf.net/2006/samples/ecore/0.1}:
        • name:
          • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
            • name: Book
        • contents:
          • Var{http://etl.sf.net/2006/samples/ecore/0.1}:
            • name:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: title
            • type:
              • PrimitiveType{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: String
          • Var{http://etl.sf.net/2006/samples/ecore/0.1}:
            • name:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: pages
            • type:
              • PrimitiveType{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: int
            • initialValue:
              • IntegerLiteral{http://etl.sf.net/2006/samples/ecore/0.1}:
                • value: 100
          • Var{http://etl.sf.net/2006/samples/ecore/0.1}:
            • name:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: category
            • type:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: BookCategory
          • Var{http://etl.sf.net/2006/samples/ecore/0.1}:
            • name:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: author
            • type:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: Writer
            • inverseRole: books
          • Var{http://etl.sf.net/2006/samples/ecore/0.1}:
            • name:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: publicationDate
            • type:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: JavaDate
      • Class{http://etl.sf.net/2006/samples/ecore/0.1}:
        • name:
          • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
            • name: Writer
        • contents:
          • Var{http://etl.sf.net/2006/samples/ecore/0.1}:
            • name:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: name
            • type:
              • PrimitiveType{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: String
          • Var{http://etl.sf.net/2006/samples/ecore/0.1}:
            • name:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: books
            • type:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: Book
            • lowBound: 0
            • uppperBound: *
            • inverseRole: author
      • Enum{http://etl.sf.net/2006/samples/ecore/0.1}:
        • name:
          • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
            • name: BookCategory
        • contents:
          • EnumLiteral{http://etl.sf.net/2006/samples/ecore/0.1}:
            • name:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: Mystery
          • EnumLiteral{http://etl.sf.net/2006/samples/ecore/0.1}:
            • name:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: ScienceFiction
          • EnumLiteral{http://etl.sf.net/2006/samples/ecore/0.1}:
            • name:
              • Identifier{http://etl.sf.net/2006/samples/ecore/0.1}:
                • name: Biography
     1: doctype "../grammars/EcoreJava.g.etl";
     2: 
     3: annotation_source ecore = "http://eclipse.org/emf/ecore";
     4: 
     5: @[ecore(basePackage="org.eclipse.example",
     6:         "nsUri"="http://www.eclipse.org/emf/example/lib",
     7:         nsPrefix="lib")]
     8: package Library {
     9: 
    10: 	datatype JavaDate {
    11: 		java_class java.util.Date;
    12: 	};
    13: 	
    14: 	class Library {
    15: 		var name : String;
    16: 		var composite writers : Writer [ 0 .. * ];
    17: 		var composite books : Book [ 0 .. * ];
    18: 	};
    19: 	
    20: 	class Book {
    21: 		var title : String;
    22: 		var pages : int = 100;
    23: 		var category : BookCategory;
    24: 		var author : Writer inverseof books;
    25: 		var publicationDate : JavaDate;
    26: 	};
    27: 	
    28: 	class Writer {
    29: 		var name : String;
    30: 		var books : Book [ 0 .. * ] inverseof author;
    31: 	};
    32: 	
    33: 	enumeration BookCategory {
    34: 		literal Mystery;
    35: 		literal ScienceFiction;
    36: 		literal Biography;
    37: 	};
    38: };