BookItem#
Fully qualified class name of the UML model LIB 1.0: LibraryDomainModel::Classes::BookItem
Book item in the library.
Diagram#
Diagram
Inheritance#
Inheritance
Attributes#
Attributes
Name |
Inherited from |
Description |
Data Type |
Multiplicity |
Default value |
|---|---|---|---|---|---|
barcode |
- own class - |
String |
0..1 |
||
borrowed |
- own class - |
Integer |
1..1 |
||
format |
- own class - |
1..1 |
|||
isbn |
ISBN |
String |
0..1 |
||
language |
1..1 |
||||
publicationYear |
Year of publication |
Integer |
1..1 |
||
publisher |
String |
1..1 |
|||
subject |
Book subjects |
String |
1..1 |
||
title |
Book title |
String |
1..1 |
Associations#
Associations
Direction |
Association |
Description |
Multiplicity of BookItem |
Package of Other Class |
Other Class |
Multiplicity of other class |
Aggregation Kind |
Inherited from |
|---|---|---|---|---|---|---|---|---|
to |
Author wrote Book |
1..* |
- own package - |
1..* |
none |
|||
to |
Account borrowed BookItem |
0..12 |
- own package - |
1..1 |
none |
own class |
||
to |
Catalog records BookItem |
1..* |
- own package - |
1..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 BookItem (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-BookItem"
5 xmi:uuid="http://example.org/LIB/1.0/XMI/#BookItem"
6 xmi:type="uml:Class">
7 <ownedComment xmi:id="LibraryDomainModel-Classes-BookItem-ownedComment"
8 xmi:uuid="http://example.org/LIB/1.0/XMI/#BookItem-ownedComment"
9 xmi:type="uml:Comment">
10 <annotatedElement xmi:idref="LibraryDomainModel-Classes-BookItem"/>
11 <body>Book item in the library.</body>
12 </ownedComment>
13 <name>BookItem</name>
14 <generalization xmi:id="LibraryDomainModel-Classes-BookItem-generalization"
15 xmi:uuid="http://example.org/LIB/1.0/XMI/#BookItem-generalization"
16 xmi:type="uml:Generalization">
17 <general xmi:idref="LibraryDomainModel-Classes-Book"/>
18 </generalization>
19 <ownedAttribute xmi:id="LibraryDomainModel-Classes-BookItem-barcode"
20 xmi:uuid="http://example.org/LIB/1.0/XMI/#BookItem-barcode"
21 xmi:type="uml:Property">
22 <lowerValue xmi:id="LibraryDomainModel-Classes-BookItem-barcode-lowerValue"
23 xmi:uuid="http://example.org/LIB/1.0/XMI/#BookItem-barcode-lowerValue"
24 xmi:type="uml:LiteralInteger"/>
25 <upperValue xmi:id="LibraryDomainModel-Classes-BookItem-barcode-upperValue"
26 xmi:uuid="http://example.org/LIB/1.0/XMI/#BookItem-barcode-upperValue"
27 xmi:type="uml:LiteralUnlimitedNatural">
28 <value>1</value>
29 </upperValue>
30 <name>barcode</name>
31 <isID>true</isID>
32 <type href="http://www.omg.org/spec/UML/20131001/PrimitiveTypes.xmi#String"
33 xmi:type="uml:PrimitiveType"/>
34 </ownedAttribute>
35 <ownedAttribute xmi:id="LibraryDomainModel-Classes-BookItem-borrowed"
36 xmi:uuid="http://example.org/LIB/1.0/XMI/#BookItem-borrowed"
37 xmi:type="uml:Property">
38 <lowerValue xmi:id="LibraryDomainModel-Classes-BookItem-borrowed-lowerValue"
39 xmi:uuid="http://example.org/LIB/1.0/XMI/#BookItem-borrowed-lowerValue"
40 xmi:type="uml:LiteralInteger">
41 <value>1</value>
42 </lowerValue>
43 <upperValue xmi:id="LibraryDomainModel-Classes-BookItem-borrowed-upperValue"
44 xmi:uuid="http://example.org/LIB/1.0/XMI/#BookItem-borrowed-upperValue"
45 xmi:type="uml:LiteralUnlimitedNatural">
46 <value>1</value>
47 </upperValue>
48 <name>borrowed</name>
49 <type href="http://www.omg.org/spec/UML/20131001/PrimitiveTypes.xmi#Integer"
50 xmi:type="uml:PrimitiveType"/>
51 </ownedAttribute>
52 <ownedAttribute xmi:id="LibraryDomainModel-Classes-BookItem-format"
53 xmi:uuid="http://example.org/LIB/1.0/XMI/#BookItem-format"
54 xmi:type="uml:Property">
55 <lowerValue xmi:id="LibraryDomainModel-Classes-BookItem-format-lowerValue"
56 xmi:uuid="http://example.org/LIB/1.0/XMI/#BookItem-format-lowerValue"
57 xmi:type="uml:LiteralInteger">
58 <value>1</value>
59 </lowerValue>
60 <upperValue xmi:id="LibraryDomainModel-Classes-BookItem-format-upperValue"
61 xmi:uuid="http://example.org/LIB/1.0/XMI/#BookItem-format-upperValue"
62 xmi:type="uml:LiteralUnlimitedNatural">
63 <value>1</value>
64 </upperValue>
65 <name>format</name>
66 <type xmi:idref="LibraryDomainModel-DataTypes-Enumerations-Format"/>
67 </ownedAttribute>
68</packagedElement>
Fragment for the class BookItem (entire XML Schema)
1<xs:element name="BookItem"
2 type="BookItemXsdType"
3 xml:id="BookItem">
4 <!-- based on the UML class LibraryDomainModel::Classes::BookItem -->
5 <xs:annotation>
6 <xs:documentation>Book item in the library.</xs:documentation>
7 </xs:annotation>
8</xs:element>
9<xs:complexType name="BookItemXsdType"
10 xml:id="BookItemXsdType">
11 <xs:annotation>
12 <xs:documentation>Book item in the library.</xs:documentation>
13 </xs:annotation>
14 <xs:complexContent>
15 <xs:extension base="BookXsdType">
16 <xs:sequence>
17 <xs:element name="barcode"
18 type="xs:string"
19 minOccurs="0"
20 maxOccurs="1"
21 xml:id="BookItem-barcode">
22 <xs:annotation>
23 <xs:documentation></xs:documentation>
24 </xs:annotation>
25 </xs:element>
26 <xs:element name="borrowed"
27 type="xs:integer"
28 minOccurs="1"
29 maxOccurs="1"
30 xml:id="BookItem-borrowed">
31 <xs:annotation>
32 <xs:documentation></xs:documentation>
33 </xs:annotation>
34 </xs:element>
35 <xs:element name="format"
36 type="FormatXsdType"
37 minOccurs="1"
38 maxOccurs="1"
39 xml:id="BookItem-format">
40 <xs:annotation>
41 <xs:documentation></xs:documentation>
42 </xs:annotation>
43 </xs:element>
44 </xs:sequence>
45 </xs:extension>
46 </xs:complexContent>
47</xs:complexType>
Fragment for the class BookItem (entire JSON Schema)
1"cls-BookItem": {
2 "description": "http://library/RDF/BookItem",
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": "BookItem"
14 },
15 "barcode": {
16 "$comment": "cardinality 0..1 – from lib:BookItem",
17 "$ref": "#/defs/xsd:string"
18 },
19 "borrowed": {
20 "$comment": "cardinality 1..1 – from lib:BookItem",
21 "$ref": "#/defs/xsd:integer"
22 },
23 "format": {
24 "$comment": "cardinality 1..1 – from lib:BookItem",
25 "$ref": "#/defs/enum-Format"
26 },
27 "isbn": {
28 "$comment": "cardinality 0..1 – from lib:Book",
29 "$ref": "#/defs/xsd:string"
30 },
31 "language": {
32 "$comment": "cardinality 1..1 – from lib:Book",
33 "$ref": "#/defs/enum-Language"
34 },
35 "publicationYear": {
36 "$comment": "cardinality 1..1 – from lib:Book",
37 "$ref": "#/defs/xsd:integer"
38 },
39 "publisher": {
40 "$comment": "cardinality 1..1 – from lib:Book",
41 "$ref": "#/defs/xsd:string"
42 },
43 "subject": {
44 "$comment": "cardinality 1..1 – from lib:Book",
45 "$ref": "#/defs/xsd:string"
46 },
47 "title": {
48 "$comment": "cardinality 1..1 – from lib:Book",
49 "$ref": "#/defs/xsd:string"
50 },
51
52 "borrowed_BookItem_OF_Account": {
53 "description": "Account_borrowed_BookItem",
54 "$comment": "cardinality 1..1",
55 "$ref": "#/defs/target-Account"
56 },
57 "records_BookItem_OF_Catalog": {
58 "description": "Catalog_records_BookItem",
59 "$comment": "cardinality 1..1",
60 "$ref": "#/defs/target-Catalog"
61 },
62 "wrote_Book_OF_Author": {
63 "description": "Author_wrote_Book",
64 "$comment": "cardinality 1..-1",
65 "anyOf": [
66 {
67 "$ref": "#/defs/target-Author"
68 },
69 {
70 "type": "array",
71 "items": {
72 "$ref": "#/defs/target-Author"
73 }
74 }
75 ]
76 },
77 "sameAs": {
78 "$ref": "#/defs/owl:sameAs"
79 }
80 },
81 "required": ["borrowed","format","language","publicationYear","publisher","subject","title","@type"],
82 "additionalProperties": false
83},
84"target-BookItem": {
85 "description": "all subclasses of http://library/RDF/BookItem",
86 "anyOf": [
87 { "$ref": "#/defs/cls-BookItem" },
88 { "type": "string", "format": "iri-reference" }
89 ]
90},
Fragment for the class BookItem (main ontology)
1# class BookItem
2# based on the UML class LibraryDomainModel::Classes::BookItem
3lib:BookItem
4 a rdfs:Class, owl:Class, ucmis:Class;
5 rdfs:label "BookItem";
6 rdfs:comment "Book item in the library."@en;
7 rdfs:subClassOf lib:Book;
8.
9
10lib:BookItem-barcode
11 a rdf:Property, owl:DatatypeProperty, ucmis:Attribute;
12 rdfs:label "barcode";
13
14 rdfs:domain lib:BookItem;
15 rdfs:range xsd:string;
16.
17
18lib:BookItem-borrowed
19 a rdf:Property, owl:DatatypeProperty, ucmis:Attribute;
20 rdfs:label "borrowed";
21
22 rdfs:domain lib:BookItem;
23 rdfs:range xsd:integer;
24.
25
26lib:BookItem-format
27 a rdf:Property, owl:ObjectProperty, ucmis:Attribute;
28 rdfs:label "format";
29
30 rdfs:domain lib:BookItem;
31 rdfs:range lib:Format;
32.
Fragment for the class BookItem (entire JSON-LD)
1{
2 "@context": [
3 "Book.jsonld",
4 {
5 "lib": "http://library/RDF/",
6 "xsd": "http://www.w3.org/2001/XMLSchema#",
7
8 "barcode": {
9 "@id": "lib:BookItem-barcode",
10 "@type": "xsd:string"
11 },
12 "borrowed": {
13 "@id": "lib:BookItem-borrowed",
14 "@type": "xsd:integer"
15 },
16 "format": {
17 "@id": "lib:BookItem-format",
18 "@type": "@vocab",
19 "@context": {
20 "Audiobook": "lib:Audiobook"
21 , "AudioCD": "lib:AudioCD"
22 , "Hardcover": "lib:Hardcover"
23 , "MP3CD": "lib:MP3CD"
24 , "Paperback": "lib:Paperback"
25 , "PDF": "lib:PDF"
26 }
27 },
28
29 "borrowed_BookItem_OF_Account": {
30 "@reverse": "lib:Account_borrowed_BookItem",
31 "@type": "@id",
32 "@context": "Account.jsonld"
33 },
34 "records_BookItem_OF_Catalog": {
35 "@reverse": "lib:Catalog_records_BookItem",
36 "@type": "@id",
37 "@context": "Catalog.jsonld"
38 },
39 " comment ": "tag:json-should-support-trailing-commas"
40 }
41 ],
42 "generatedBy": "This code was generated by the Eclipse Acceleo project UCMIS M2T on 2025-08-29 14:33:36.",
43 "basedOn": "based on the UML data type LibraryDomainModel::Classes::BookItem"
44}
Fragment for the class BookItem (entire SHACL - Shapes Constraint Language)
1# class BookItem
2# based on the UML class LibraryDomainModel::Classes::BookItem
3<#BookItem> a sh:NodeShape;
4 sh:targetClass lib:BookItem;
5 sh:message "See http://library/RDF/BookItem";
6 sh:closed true;
7 sh:ignoredProperties ( owl:sameAs );
8 sh:property [
9 sh:path rdf:type;
10 sh:in ( lib:BookItem
11 ) ;
12 ];
13 # attributes
14 sh:property <#BookItem-barcode>;
15 sh:property <#BookItem-borrowed>;
16 sh:property <#BookItem-format>;
17 # associations from BookItem
18 # associations to BookItem
19 sh:property <#rev_Account_borrowed_BookItem>;
20 sh:property <#rev_Catalog_records_BookItem>;
21
22 # ---- superclass: Book
23 # attributes
24 sh:property <#Book-isbn>;
25 sh:property <#Book-language>;
26 sh:property <#Book-publicationYear>;
27 sh:property <#Book-publisher>;
28 sh:property <#Book-subject>;
29 sh:property <#Book-title>;
30 # associations from Book
31 # associations to Book
32 sh:property <#rev_Author_wrote_Book>;
33
34
35
36
37
38.
39
40<#BookItem-barcode> a sh:PropertyShape ;
41 sh:path lib:BookItem-barcode;
42 sh:datatype xsd:string;
43 sh:maxCount 1;
44.
45<#BookItem-borrowed> a sh:PropertyShape ;
46 sh:path lib:BookItem-borrowed;
47 sh:datatype xsd:integer;
48 sh:minCount 1;
49 sh:maxCount 1;
50.
51<#BookItem-format> a sh:PropertyShape ;
52 sh:path lib:BookItem-format;
53 sh:node <#Format>
54 ;
55 sh:minCount 1;
56 sh:maxCount 1;
57.
Fragment for the class BookItem (entire ShEx - Shape Expressions)
1# class BookItem
2# based on the UML class LibraryDomainModel::Classes::BookItem
3lib:BookItemShape CLOSED {
4 a [lib:BookItem];
5 lib:BookItem-barcode xsd:string?;
6 lib:BookItem-borrowed xsd:integer;
7 lib:BookItem-format @lib:FormatShape;
8 ^lib:Account_borrowed_BookItem @lib:AccountShape ;
9 ^lib:Catalog_records_BookItem @lib:CatalogShape ;
10 &lib:BookProperties;
11 }