Book#

Fully qualified class name of the UML model LIB 1.0: LibraryDomainModel::Classes::Book

Description of a book.

Diagram#

Diagram

Inheritance#

Inheritance
Classes::Book

Attributes#

Attributes
Attributes#

Name

Inherited from

Description

Data Type

Multiplicity

Default value

isbn

- own class -

ISBN

String

0..1

language

- own class -

Language

1..1

publicationYear

- own class -

Year of publication

Integer

1..1

publisher

- own class -

String

1..1

subject

- own class -

Book subjects

String

1..1

title

- own class -

Book title

String

1..1

Associations#

Associations
Associations#

Direction

Association

Description

Multiplicity of Book

Package of Other Class

Other Class

Multiplicity of other class

Aggregation Kind

Inherited from

to

Author wrote Book

1..*

- own package -

Author

1..*

none

own class

Encodings#

Syntax representations / encodings

All syntax representations except the Canonical XMI are provided as reference points for specific implementations, or for use as defaults if sufficient in the form presented.

Fragment for the class Book (entire model as XMI)

  1<packagedElement xmlns:StandardProfile="http://www.omg.org/spec/UML/20131001/StandardProfile"
  2                  xmlns:uml="http://www.omg.org/spec/UML/20131001"
  3                  xmlns:xmi="http://www.omg.org/spec/XMI/20131001"
  4                  xmi:id="LibraryDomainModel-Classes-Book"
  5                  xmi:uuid="http://example.org/LIB/1.0/XMI/#Book"
  6                  xmi:type="uml:Class">
  7   <ownedComment xmi:id="LibraryDomainModel-Classes-Book-ownedComment"
  8                  xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-ownedComment"
  9                  xmi:type="uml:Comment">
 10      <annotatedElement xmi:idref="LibraryDomainModel-Classes-Book"/>
 11      <body>Description of a book.</body>
 12   </ownedComment>
 13   <name>Book</name>
 14   <ownedAttribute xmi:id="LibraryDomainModel-Classes-Book-isbn"
 15                    xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-isbn"
 16                    xmi:type="uml:Property">
 17      <ownedComment xmi:id="LibraryDomainModel-Classes-Book-isbn-ownedComment"
 18                     xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-isbn-ownedComment"
 19                     xmi:type="uml:Comment">
 20         <annotatedElement xmi:idref="LibraryDomainModel-Classes-Book-isbn"/>
 21         <body>ISBN</body>
 22      </ownedComment>
 23      <lowerValue xmi:id="LibraryDomainModel-Classes-Book-isbn-lowerValue"
 24                   xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-isbn-lowerValue"
 25                   xmi:type="uml:LiteralInteger"/>
 26      <upperValue xmi:id="LibraryDomainModel-Classes-Book-isbn-upperValue"
 27                   xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-isbn-upperValue"
 28                   xmi:type="uml:LiteralUnlimitedNatural">
 29         <value>1</value>
 30      </upperValue>
 31      <name>isbn</name>
 32      <isID>true</isID>
 33      <type href="http://www.omg.org/spec/UML/20131001/PrimitiveTypes.xmi#String"
 34             xmi:type="uml:PrimitiveType"/>
 35   </ownedAttribute>
 36   <ownedAttribute xmi:id="LibraryDomainModel-Classes-Book-language"
 37                    xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-language"
 38                    xmi:type="uml:Property">
 39      <lowerValue xmi:id="LibraryDomainModel-Classes-Book-language-lowerValue"
 40                   xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-language-lowerValue"
 41                   xmi:type="uml:LiteralInteger">
 42         <value>1</value>
 43      </lowerValue>
 44      <upperValue xmi:id="LibraryDomainModel-Classes-Book-language-upperValue"
 45                   xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-language-upperValue"
 46                   xmi:type="uml:LiteralUnlimitedNatural">
 47         <value>1</value>
 48      </upperValue>
 49      <name>language</name>
 50      <type xmi:idref="LibraryDomainModel-DataTypes-Enumerations-Language"/>
 51   </ownedAttribute>
 52   <ownedAttribute xmi:id="LibraryDomainModel-Classes-Book-publicationYear"
 53                    xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-publicationYear"
 54                    xmi:type="uml:Property">
 55      <ownedComment xmi:id="LibraryDomainModel-Classes-Book-publicationYear-ownedComment"
 56                     xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-publicationYear-ownedComment"
 57                     xmi:type="uml:Comment">
 58         <annotatedElement xmi:idref="LibraryDomainModel-Classes-Book-publicationYear"/>
 59         <body>Year of publication</body>
 60      </ownedComment>
 61      <lowerValue xmi:id="LibraryDomainModel-Classes-Book-publicationYear-lowerValue"
 62                   xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-publicationYear-lowerValue"
 63                   xmi:type="uml:LiteralInteger">
 64         <value>1</value>
 65      </lowerValue>
 66      <upperValue xmi:id="LibraryDomainModel-Classes-Book-publicationYear-upperValue"
 67                   xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-publicationYear-upperValue"
 68                   xmi:type="uml:LiteralUnlimitedNatural">
 69         <value>1</value>
 70      </upperValue>
 71      <name>publicationYear</name>
 72      <type href="http://www.omg.org/spec/UML/20131001/PrimitiveTypes.xmi#Integer"
 73             xmi:type="uml:PrimitiveType"/>
 74   </ownedAttribute>
 75   <ownedAttribute xmi:id="LibraryDomainModel-Classes-Book-publisher"
 76                    xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-publisher"
 77                    xmi:type="uml:Property">
 78      <lowerValue xmi:id="LibraryDomainModel-Classes-Book-publisher-lowerValue"
 79                   xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-publisher-lowerValue"
 80                   xmi:type="uml:LiteralInteger">
 81         <value>1</value>
 82      </lowerValue>
 83      <upperValue xmi:id="LibraryDomainModel-Classes-Book-publisher-upperValue"
 84                   xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-publisher-upperValue"
 85                   xmi:type="uml:LiteralUnlimitedNatural">
 86         <value>1</value>
 87      </upperValue>
 88      <name>publisher</name>
 89      <type href="http://www.omg.org/spec/UML/20131001/PrimitiveTypes.xmi#String"
 90             xmi:type="uml:PrimitiveType"/>
 91   </ownedAttribute>
 92   <ownedAttribute xmi:id="LibraryDomainModel-Classes-Book-subject"
 93                    xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-subject"
 94                    xmi:type="uml:Property">
 95      <ownedComment xmi:id="LibraryDomainModel-Classes-Book-subject-ownedComment"
 96                     xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-subject-ownedComment"
 97                     xmi:type="uml:Comment">
 98         <annotatedElement xmi:idref="LibraryDomainModel-Classes-Book-subject"/>
 99         <body>Book subjects</body>
100      </ownedComment>
101      <lowerValue xmi:id="LibraryDomainModel-Classes-Book-subject-lowerValue"
102                   xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-subject-lowerValue"
103                   xmi:type="uml:LiteralInteger">
104         <value>1</value>
105      </lowerValue>
106      <upperValue xmi:id="LibraryDomainModel-Classes-Book-subject-upperValue"
107                   xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-subject-upperValue"
108                   xmi:type="uml:LiteralUnlimitedNatural">
109         <value>1</value>
110      </upperValue>
111      <name>subject</name>
112      <type href="http://www.omg.org/spec/UML/20131001/PrimitiveTypes.xmi#String"
113             xmi:type="uml:PrimitiveType"/>
114   </ownedAttribute>
115   <ownedAttribute xmi:id="LibraryDomainModel-Classes-Book-title"
116                    xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-title"
117                    xmi:type="uml:Property">
118      <ownedComment xmi:id="LibraryDomainModel-Classes-Book-title-ownedComment"
119                     xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-title-ownedComment"
120                     xmi:type="uml:Comment">
121         <annotatedElement xmi:idref="LibraryDomainModel-Classes-Book-title"/>
122         <body>Book title</body>
123      </ownedComment>
124      <lowerValue xmi:id="LibraryDomainModel-Classes-Book-title-lowerValue"
125                   xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-title-lowerValue"
126                   xmi:type="uml:LiteralInteger">
127         <value>1</value>
128      </lowerValue>
129      <upperValue xmi:id="LibraryDomainModel-Classes-Book-title-upperValue"
130                   xmi:uuid="http://example.org/LIB/1.0/XMI/#Book-title-upperValue"
131                   xmi:type="uml:LiteralUnlimitedNatural">
132         <value>1</value>
133      </upperValue>
134      <name>title</name>
135      <type href="http://www.omg.org/spec/UML/20131001/PrimitiveTypes.xmi#String"
136             xmi:type="uml:PrimitiveType"/>
137   </ownedAttribute>
138</packagedElement>

Fragment for the class Book (entire XML Schema)

 1<xs:element name="Book"
 2            type="BookXsdType"
 3            xml:id="Book">
 4  <!-- based on the UML class LibraryDomainModel::Classes::Book -->
 5  <xs:annotation>
 6    <xs:documentation>Description of a book.</xs:documentation>
 7  </xs:annotation>
 8</xs:element>
 9<xs:complexType name="BookXsdType"
10                xml:id="BookXsdType">
11  <xs:annotation>
12    <xs:documentation>Description of a book.</xs:documentation>
13  </xs:annotation>
14  <xs:sequence>
15    <xs:element name="isbn"
16                type="xs:string"
17                minOccurs="0"
18                maxOccurs="1"
19                xml:id="Book-isbn">
20      <xs:annotation>
21        <xs:documentation>ISBN</xs:documentation>
22      </xs:annotation>
23    </xs:element>
24    <xs:element name="language"
25                type="LanguageXsdType"
26                minOccurs="1"
27                maxOccurs="1"
28                xml:id="Book-language">
29      <xs:annotation>
30        <xs:documentation></xs:documentation>
31      </xs:annotation>
32    </xs:element>
33    <xs:element name="publicationYear"
34                type="xs:integer"
35                minOccurs="1"
36                maxOccurs="1"
37                xml:id="Book-publicationYear">
38      <xs:annotation>
39        <xs:documentation>Year of publication</xs:documentation>
40      </xs:annotation>
41    </xs:element>
42    <xs:element name="publisher"
43                type="xs:string"
44                minOccurs="1"
45                maxOccurs="1"
46                xml:id="Book-publisher">
47      <xs:annotation>
48        <xs:documentation></xs:documentation>
49      </xs:annotation>
50    </xs:element>
51    <xs:element name="subject"
52                type="xs:string"
53                minOccurs="1"
54                maxOccurs="1"
55                xml:id="Book-subject">
56      <xs:annotation>
57        <xs:documentation>Book subjects</xs:documentation>
58      </xs:annotation>
59    </xs:element>
60    <xs:element name="title"
61                type="xs:string"
62                minOccurs="1"
63                maxOccurs="1"
64                xml:id="Book-title">
65      <xs:annotation>
66        <xs:documentation>Book title</xs:documentation>
67      </xs:annotation>
68    </xs:element>
69  </xs:sequence>
70</xs:complexType>

Fragment for the class Book (entire JSON Schema)

 1"cls-Book": {
 2  "description": "http://library/RDF/Book",
 3  "type": "object",
 4  "properties": {
 5    "@context": {
 6      "$ref": "#/defs/at-context"
 7    },
 8    "@id": {
 9      "type": "string",
10      "format": "iri-reference"
11    },
12    "@type": {
13      "const": "Book"
14    },
15    "isbn": {
16      "$comment": "cardinality 0..1 – from lib:Book",
17      "$ref": "#/defs/xsd:string"
18    },
19    "language": {
20      "$comment": "cardinality 1..1 – from lib:Book",
21      "$ref": "#/defs/enum-Language"
22    },
23    "publicationYear": {
24      "$comment": "cardinality 1..1 – from lib:Book",
25      "$ref": "#/defs/xsd:integer"
26    },
27    "publisher": {
28      "$comment": "cardinality 1..1 – from lib:Book",
29      "$ref": "#/defs/xsd:string"
30    },
31    "subject": {
32      "$comment": "cardinality 1..1 – from lib:Book",
33      "$ref": "#/defs/xsd:string"
34    },
35    "title": {
36      "$comment": "cardinality 1..1 – from lib:Book",
37      "$ref": "#/defs/xsd:string"
38    },
39    
40    "wrote_Book_OF_Author": {
41      "description": "Author_wrote_Book",
42      "$comment": "cardinality 1..-1",
43      "anyOf": [
44        {
45          "$ref": "#/defs/target-Author"
46        },
47        {
48          "type": "array",
49          "items": {
50            "$ref": "#/defs/target-Author"
51          }
52        }
53      ]
54    },
55    "sameAs": {
56      "$ref": "#/defs/owl:sameAs"
57    }
58  },
59  "required": ["language","publicationYear","publisher","subject","title","@type"],
60  "additionalProperties": false
61},
62"target-Book": {
63  "description": "all subclasses of http://library/RDF/Book",
64  "anyOf": [
65    { "$ref": "#/defs/cls-Book" },
66    { "$ref": "#/defs/cls-BookItem" },
67    { "type": "string", "format": "iri-reference" }
68  ]
69},

Fragment for the class Book (main ontology)

 1# class Book
 2# based on the UML class LibraryDomainModel::Classes::Book
 3lib:Book
 4  a rdfs:Class, owl:Class, ucmis:Class;
 5  rdfs:label "Book";
 6  rdfs:comment "Description of a book."@en;
 7  
 8.
 9
10lib:Book-isbn
11  a rdf:Property, owl:DatatypeProperty, ucmis:Attribute;
12  rdfs:label "isbn";
13  rdfs:comment "ISBN"@en;
14  rdfs:domain lib:Book;
15  rdfs:range xsd:string;
16.
17
18lib:Book-language
19  a rdf:Property, owl:ObjectProperty, ucmis:Attribute;
20  rdfs:label "language";
21  
22  rdfs:domain lib:Book;
23  rdfs:range lib:Language;
24.
25
26lib:Book-publicationYear
27  a rdf:Property, owl:DatatypeProperty, ucmis:Attribute;
28  rdfs:label "publicationYear";
29  rdfs:comment "Year of publication"@en;
30  rdfs:domain lib:Book;
31  rdfs:range xsd:integer;
32.
33
34lib:Book-publisher
35  a rdf:Property, owl:DatatypeProperty, ucmis:Attribute;
36  rdfs:label "publisher";
37  
38  rdfs:domain lib:Book;
39  rdfs:range xsd:string;
40.
41
42lib:Book-subject
43  a rdf:Property, owl:DatatypeProperty, ucmis:Attribute;
44  rdfs:label "subject";
45  rdfs:comment "Book subjects"@en;
46  rdfs:domain lib:Book;
47  rdfs:range xsd:string;
48.
49
50lib:Book-title
51  a rdf:Property, owl:DatatypeProperty, ucmis:Attribute;
52  rdfs:label "title";
53  rdfs:comment "Book title"@en;
54  rdfs:domain lib:Book;
55  rdfs:range xsd:string;
56.

Fragment for the class Book (entire JSON-LD)

 1{
 2  "@context": [
 3    {
 4      "lib": "http://library/RDF/",
 5      "xsd": "http://www.w3.org/2001/XMLSchema#",
 6
 7      "isbn": {
 8        "@id": "lib:Book-isbn",
 9        "@type": "xsd:string"
10      },
11      "language": {
12        "@id": "lib:Book-language",
13        "@type": "@vocab",
14        "@context": {
15          "English": "lib:English"
16      ,    "French": "lib:French"
17      ,    "German": "lib:German"
18      ,    "Italian": "lib:Italian"
19      ,    "Spanish": "lib:Spanish"
20        }
21      },
22      "publicationYear": {
23        "@id": "lib:Book-publicationYear",
24        "@type": "xsd:integer"
25      },
26      "publisher": {
27        "@id": "lib:Book-publisher",
28        "@type": "xsd:string"
29      },
30      "subject": {
31        "@id": "lib:Book-subject",
32        "@type": "xsd:string"
33      },
34      "title": {
35        "@id": "lib:Book-title",
36        "@type": "xsd:string"
37      },
38      
39      "wrote_Book_OF_Author": {
40        "@reverse": "lib:Author_wrote_Book",
41        "@type": "@id",
42        "@context": "Author.jsonld"
43      },
44      " comment ": "tag:json-should-support-trailing-commas"
45    }
46  ],
47  "generatedBy": "This code was generated by the Eclipse Acceleo project UCMIS M2T on 2025-08-29 14:33:36.",
48  "basedOn": "based on the UML data type LibraryDomainModel::Classes::Book"
49}

Fragment for the class Book (entire SHACL - Shapes Constraint Language)

 1# class Book
 2# based on the UML class LibraryDomainModel::Classes::Book
 3<#Book> a sh:NodeShape;
 4    sh:targetClass lib:Book;
 5	sh:message "See http://library/RDF/Book";
 6	sh:closed true;
 7	sh:ignoredProperties ( owl:sameAs );
 8    sh:property [
 9			sh:path rdf:type;
10			sh:in (   lib:Book
11			  lib:BookItem
12			 ) ;
13    ];
14    # attributes
15    sh:property <#Book-isbn>;
16    sh:property <#Book-language>;
17    sh:property <#Book-publicationYear>;
18    sh:property <#Book-publisher>;
19    sh:property <#Book-subject>;
20    sh:property <#Book-title>;
21    # associations from Book
22    # associations to Book
23    sh:property <#rev_Author_wrote_Book>;
24
25
26
27.
28
29<#Book-isbn> a sh:PropertyShape ;
30    sh:path lib:Book-isbn;
31    sh:datatype xsd:string;
32    sh:maxCount 1;
33.
34<#Book-language> a sh:PropertyShape ;
35    sh:path lib:Book-language;
36    sh:node <#Language>
37    ;
38    sh:minCount 1;
39    sh:maxCount 1;
40.
41<#Book-publicationYear> a sh:PropertyShape ;
42    sh:path lib:Book-publicationYear;
43    sh:datatype xsd:integer;
44    sh:minCount 1;
45    sh:maxCount 1;
46.
47<#Book-publisher> a sh:PropertyShape ;
48    sh:path lib:Book-publisher;
49    sh:datatype xsd:string;
50    sh:minCount 1;
51    sh:maxCount 1;
52.
53<#Book-subject> a sh:PropertyShape ;
54    sh:path lib:Book-subject;
55    sh:datatype xsd:string;
56    sh:minCount 1;
57    sh:maxCount 1;
58.
59<#Book-title> a sh:PropertyShape ;
60    sh:path lib:Book-title;
61    sh:datatype xsd:string;
62    sh:minCount 1;
63    sh:maxCount 1;
64.

Fragment for the class Book (entire ShEx - Shape Expressions)

 1# class Book
 2# based on the UML class LibraryDomainModel::Classes::Book
 3lib:BookShape CLOSED {
 4	a [lib:Book];
 5	$lib:BookProperties (
 6	lib:Book-isbn	xsd:string?;
 7	lib:Book-language	@lib:LanguageShape;
 8	lib:Book-publicationYear	xsd:integer;
 9	lib:Book-publisher	xsd:string;
10	lib:Book-subject	xsd:string;
11	lib:Book-title	xsd:string;
12	^lib:Author_wrote_Book @lib:AuthorShape +;
13		);
14}