Skip to content
Snippets Groups Projects
Commit 2d82a80a authored by ankraft's avatar ankraft
Browse files

Added support for semanticURI attribute

parent 11793741
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ Domain = ...@@ -12,6 +12,7 @@ Domain =
element Domain { element Domain {
attribute xml:base { xsd:anyURI }?, attribute xml:base { xsd:anyURI }?,
attribute id { xsd:Name }, attribute id { xsd:Name },
attribute semanticURI { xsd:anyURI }?,
DocDef, DocDef,
element Imports { Domain+ }?, element Imports { Domain+ }?,
element DataTypes { DataTypeDef+ }?, element DataTypes { DataTypeDef+ }?,
...@@ -19,12 +20,14 @@ Domain = ...@@ -19,12 +20,14 @@ Domain =
element DeviceClasses { element DeviceClasses {
element DeviceClass { element DeviceClass {
attribute id { xsd:Name }, attribute id { xsd:Name },
attribute semanticURI { xsd:anyURI }?,
DocDef, DocDef,
PropertiesDef?, PropertiesDef?,
ModuleClasses?, ModuleClasses?,
element SubDevices { element SubDevices {
element SubDevice { element SubDevice {
attribute id { xsd:Name }, attribute id { xsd:Name },
attribute semanticURI { xsd:anyURI }?,
DocDef, DocDef,
PropertiesDef?, PropertiesDef?,
ModuleClasses? ModuleClasses?
...@@ -39,6 +42,7 @@ PropertiesDef = ...@@ -39,6 +42,7 @@ PropertiesDef =
attribute name { text }, attribute name { text },
attribute optional { xsd:boolean }?, attribute optional { xsd:boolean }?,
attribute value { text }?, attribute value { text }?,
attribute semanticURI { xsd:anyURI }?,
DocDef, DocDef,
SimpleType SimpleType
}+ }+
...@@ -47,6 +51,7 @@ DataTypeDef = ...@@ -47,6 +51,7 @@ DataTypeDef =
element DataType { element DataType {
attribute name { text }?, attribute name { text }?,
attribute unitOfMeasure { text }?, attribute unitOfMeasure { text }?,
attribute semanticURI { xsd:anyURI }?,
DocDef, DocDef,
(ExtendsDef | (StructType | ArrayType | SimpleType | EnumType)), (ExtendsDef | (StructType | ArrayType | SimpleType | EnumType)),
ConstraintsDef? ConstraintsDef?
...@@ -76,6 +81,7 @@ EnumValueDef = ...@@ -76,6 +81,7 @@ EnumValueDef =
attribute name { text }, attribute name { text },
attribute value { text }, attribute value { text },
attribute type { BasicType }?, attribute type { BasicType }?,
attribute semanticURI { xsd:anyURI }?,
DocDef DocDef
} }
ConstraintsDef = ConstraintsDef =
...@@ -84,6 +90,7 @@ ConstraintsDef = ...@@ -84,6 +90,7 @@ ConstraintsDef =
attribute name { text }, attribute name { text },
attribute type { BasicType }?, attribute type { BasicType }?,
attribute value { text }?, attribute value { text }?,
attribute semanticURI { xsd:anyURI }?,
DocDef DocDef
}+ }+
} }
...@@ -107,6 +114,7 @@ ModuleClasses = ...@@ -107,6 +114,7 @@ ModuleClasses =
element ModuleClass { element ModuleClass {
attribute name { text }, attribute name { text },
attribute optional { xsd:boolean }?, attribute optional { xsd:boolean }?,
attribute semanticURI { xsd:anyURI }?,
DocDef, DocDef,
ExtendsDef, ExtendsDef,
# TODO: singular # TODO: singular
...@@ -121,6 +129,7 @@ Actions = ...@@ -121,6 +129,7 @@ Actions =
element Action { element Action {
attribute name { text }, attribute name { text },
attribute optional { xsd:boolean }?, attribute optional { xsd:boolean }?,
attribute semanticURI { xsd:anyURI }?,
DocDef, DocDef,
DataTypeDef?, DataTypeDef?,
ArgDef? ArgDef?
...@@ -130,6 +139,7 @@ ArgDef = ...@@ -130,6 +139,7 @@ ArgDef =
element Args { element Args {
element Arg { element Arg {
attribute name { text }, attribute name { text },
attribute semanticURI { xsd:anyURI }?,
DocDef, DocDef,
DataTypeDef DataTypeDef
}+ }+
...@@ -142,6 +152,7 @@ Data = ...@@ -142,6 +152,7 @@ Data =
attribute writable { xsd:boolean }?, attribute writable { xsd:boolean }?,
attribute readable { xsd:boolean }?, attribute readable { xsd:boolean }?,
attribute eventable { xsd:boolean }?, attribute eventable { xsd:boolean }?,
attribute semanticURI { xsd:anyURI }?,
DocDef, DocDef,
DataTypeDef DataTypeDef
}+ }+
...@@ -151,6 +162,7 @@ Events = ...@@ -151,6 +162,7 @@ Events =
element Event { element Event {
attribute name { text }, attribute name { text },
attribute optional { xsd:boolean }?, attribute optional { xsd:boolean }?,
attribute semanticURI { xsd:anyURI }?,
DocDef, DocDef,
Data? Data?
}+ }+
......
...@@ -28,6 +28,11 @@ ...@@ -28,6 +28,11 @@
<attribute name="id"> <attribute name="id">
<data type="Name"/> <data type="Name"/>
</attribute> </attribute>
<optional>
<attribute name="semanticURI">
<data type="anyURI"/>
</attribute>
</optional>
<ref name="DocDef"/> <ref name="DocDef"/>
<optional> <optional>
<element name="Imports"> <element name="Imports">
...@@ -53,6 +58,11 @@ ...@@ -53,6 +58,11 @@
<attribute name="id"> <attribute name="id">
<data type="Name"/> <data type="Name"/>
</attribute> </attribute>
<optional>
<attribute name="semanticURI">
<data type="anyURI"/>
</attribute>
</optional>
<ref name="DocDef"/> <ref name="DocDef"/>
<optional> <optional>
<ref name="PropertiesDef"/> <ref name="PropertiesDef"/>
...@@ -67,6 +77,11 @@ ...@@ -67,6 +77,11 @@
<attribute name="id"> <attribute name="id">
<data type="Name"/> <data type="Name"/>
</attribute> </attribute>
<optional>
<attribute name="semanticURI">
<data type="anyURI"/>
</attribute>
</optional>
<ref name="DocDef"/> <ref name="DocDef"/>
<optional> <optional>
<ref name="PropertiesDef"/> <ref name="PropertiesDef"/>
...@@ -103,6 +118,11 @@ ...@@ -103,6 +118,11 @@
<text/> <text/>
</attribute> </attribute>
</optional> </optional>
<optional>
<attribute name="semanticURI">
<data type="anyURI"/>
</attribute>
</optional>
<ref name="DocDef"/> <ref name="DocDef"/>
<ref name="SimpleType" /> <ref name="SimpleType" />
</element> </element>
...@@ -123,6 +143,11 @@ ...@@ -123,6 +143,11 @@
<text/> <text/>
</attribute> </attribute>
</optional> </optional>
<optional>
<attribute name="semanticURI">
<data type="anyURI"/>
</attribute>
</optional>
<ref name="DocDef"/> <ref name="DocDef"/>
<choice> <choice>
<ref name="ExtendsDef" /> <ref name="ExtendsDef" />
...@@ -205,10 +230,16 @@ ...@@ -205,10 +230,16 @@
<ref name="BasicType"/> <ref name="BasicType"/>
</attribute> </attribute>
</optional> </optional>
<optional>
<attribute name="semanticURI">
<data type="anyURI"/>
</attribute>
</optional>
<ref name="DocDef"/> <ref name="DocDef"/>
</element> </element>
</define> </define>
<define name="ConstraintsDef"> <define name="ConstraintsDef">
<element name="Constraints"> <element name="Constraints">
<oneOrMore> <oneOrMore>
...@@ -226,6 +257,11 @@ ...@@ -226,6 +257,11 @@
<text/> <text/>
</attribute> </attribute>
</optional> </optional>
<optional>
<attribute name="semanticURI">
<data type="anyURI"/>
</attribute>
</optional>
<ref name="DocDef"/> <ref name="DocDef"/>
</element> </element>
</oneOrMore> </oneOrMore>
...@@ -288,6 +324,11 @@ ...@@ -288,6 +324,11 @@
<data type="boolean"/> <data type="boolean"/>
</attribute> </attribute>
</optional> </optional>
<optional>
<attribute name="semanticURI">
<data type="anyURI"/>
</attribute>
</optional>
<ref name="DocDef"/> <ref name="DocDef"/>
<ref name="ExtendsDef" /> <!-- TODO: singular --> <ref name="ExtendsDef" /> <!-- TODO: singular -->
<optional> <optional>
...@@ -320,6 +361,11 @@ ...@@ -320,6 +361,11 @@
<data type="boolean"/> <data type="boolean"/>
</attribute> </attribute>
</optional> </optional>
<optional>
<attribute name="semanticURI">
<data type="anyURI"/>
</attribute>
</optional>
<ref name="DocDef"/> <ref name="DocDef"/>
<optional> <optional>
<ref name="DataTypeDef"/> <ref name="DataTypeDef"/>
...@@ -338,6 +384,11 @@ ...@@ -338,6 +384,11 @@
<oneOrMore> <oneOrMore>
<element name="Arg"> <element name="Arg">
<attribute name="name"/> <attribute name="name"/>
<optional>
<attribute name="semanticURI">
<data type="anyURI"/>
</attribute>
</optional>
<ref name="DocDef"/> <ref name="DocDef"/>
<ref name="DataTypeDef"/> <ref name="DataTypeDef"/>
</element> </element>
...@@ -373,6 +424,11 @@ ...@@ -373,6 +424,11 @@
<data type="boolean"/> <data type="boolean"/>
</attribute> </attribute>
</optional> </optional>
<optional>
<attribute name="semanticURI">
<data type="anyURI"/>
</attribute>
</optional>
<ref name="DocDef"/> <ref name="DocDef"/>
<ref name="DataTypeDef"/> <ref name="DataTypeDef"/>
</element> </element>
...@@ -393,6 +449,11 @@ ...@@ -393,6 +449,11 @@
<data type="boolean"/> <data type="boolean"/>
</attribute> </attribute>
</optional> </optional>
<optional>
<attribute name="semanticURI">
<data type="anyURI"/>
</attribute>
</optional>
<ref name="DocDef"/> <ref name="DocDef"/>
<optional> <optional>
<ref name="Data" /> <ref name="Data" />
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
</xs:sequence> </xs:sequence>
<xs:attribute ref="xml:base"/> <xs:attribute ref="xml:base"/>
<xs:attribute name="id" use="required" type="xs:Name"/> <xs:attribute name="id" use="required" type="xs:Name"/>
<xs:attribute name="semanticURI" type="xs:anyURI"/>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
...@@ -62,6 +63,7 @@ ...@@ -62,6 +63,7 @@
<xs:element minOccurs="0" ref="SubDevices"/> <xs:element minOccurs="0" ref="SubDevices"/>
</xs:sequence> </xs:sequence>
<xs:attribute name="id" use="required" type="xs:Name"/> <xs:attribute name="id" use="required" type="xs:Name"/>
<xs:attribute name="semanticURI" type="xs:anyURI"/>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
...@@ -82,6 +84,7 @@ ...@@ -82,6 +84,7 @@
<xs:element minOccurs="0" ref="ModuleClasses"/> <xs:element minOccurs="0" ref="ModuleClasses"/>
</xs:sequence> </xs:sequence>
<xs:attribute name="id" use="required" type="xs:Name"/> <xs:attribute name="id" use="required" type="xs:Name"/>
<xs:attribute name="semanticURI" type="xs:anyURI"/>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
...@@ -103,6 +106,7 @@ ...@@ -103,6 +106,7 @@
<xs:attribute name="name" use="required"/> <xs:attribute name="name" use="required"/>
<xs:attribute name="optional" type="xs:boolean"/> <xs:attribute name="optional" type="xs:boolean"/>
<xs:attribute name="value"/> <xs:attribute name="value"/>
<xs:attribute name="semanticURI" type="xs:anyURI"/>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
...@@ -125,6 +129,7 @@ ...@@ -125,6 +129,7 @@
</xs:sequence> </xs:sequence>
<xs:attribute name="name"/> <xs:attribute name="name"/>
<xs:attribute name="unitOfMeasure"/> <xs:attribute name="unitOfMeasure"/>
<xs:attribute name="semanticURI" type="xs:anyURI"/>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
...@@ -178,6 +183,7 @@ ...@@ -178,6 +183,7 @@
<xs:attribute name="name" use="required"/> <xs:attribute name="name" use="required"/>
<xs:attribute name="value" use="required"/> <xs:attribute name="value" use="required"/>
<xs:attribute name="type" type="BasicType"/> <xs:attribute name="type" type="BasicType"/>
<xs:attribute name="semanticURI" type="xs:anyURI"/>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
...@@ -196,6 +202,7 @@ ...@@ -196,6 +202,7 @@
<xs:attribute name="name" use="required"/> <xs:attribute name="name" use="required"/>
<xs:attribute name="type" type="BasicType"/> <xs:attribute name="type" type="BasicType"/>
<xs:attribute name="value"/> <xs:attribute name="value"/>
<xs:attribute name="semanticURI" type="xs:anyURI"/>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
...@@ -263,6 +270,7 @@ ...@@ -263,6 +270,7 @@
</xs:sequence> </xs:sequence>
<xs:attribute name="name" use="required"/> <xs:attribute name="name" use="required"/>
<xs:attribute name="optional" type="xs:boolean"/> <xs:attribute name="optional" type="xs:boolean"/>
<xs:attribute name="semanticURI" type="xs:anyURI"/>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
...@@ -284,6 +292,7 @@ ...@@ -284,6 +292,7 @@
</xs:sequence> </xs:sequence>
<xs:attribute name="name" use="required"/> <xs:attribute name="name" use="required"/>
<xs:attribute name="optional" type="xs:boolean"/> <xs:attribute name="optional" type="xs:boolean"/>
<xs:attribute name="semanticURI" type="xs:anyURI"/>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
...@@ -303,6 +312,7 @@ ...@@ -303,6 +312,7 @@
<xs:element ref="DataType"/> <xs:element ref="DataType"/>
</xs:sequence> </xs:sequence>
<xs:attribute name="name" use="required"/> <xs:attribute name="name" use="required"/>
<xs:attribute name="semanticURI" type="xs:anyURI"/>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
...@@ -326,6 +336,7 @@ ...@@ -326,6 +336,7 @@
<xs:attribute name="writable" type="xs:boolean"/> <xs:attribute name="writable" type="xs:boolean"/>
<xs:attribute name="readable" type="xs:boolean"/> <xs:attribute name="readable" type="xs:boolean"/>
<xs:attribute name="eventable" type="xs:boolean"/> <xs:attribute name="eventable" type="xs:boolean"/>
<xs:attribute name="semanticURI" type="xs:anyURI"/>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
...@@ -346,6 +357,7 @@ ...@@ -346,6 +357,7 @@
</xs:sequence> </xs:sequence>
<xs:attribute name="name" use="required"/> <xs:attribute name="name" use="required"/>
<xs:attribute name="optional" type="xs:boolean"/> <xs:attribute name="optional" type="xs:boolean"/>
<xs:attribute name="semanticURI" type="xs:anyURI"/>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
......
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Test the data types references -->
<Domain id="semanticURI-test" xmlns="http://homegatewayinitiative.org/xml/dal/4.0" xmlns:xi="http://www.w3.org/2001/XInclude" semanticURI="http://example.com/semanticURI-test.rdf">
<DataTypes>
<DataType name="temperatureType" unitOfMeasure="C" semanticURI="http://example.com/temperatureType.rdf">
<SimpleType type="float"/>
</DataType>
<DataType name="anEnumType" semanticURI="http://example.com/anEnumType.rdf">
<EnumType>
<EnumValue name="red" type="integer" value="1" semanticURI="http://example.com/anEnumType-red.rdf"/>
<EnumValue name="green" value="2" semanticURI="http://example.com/anEnumType-green.rdf"/>
<EnumValue name="blue" value="3" semanticURI="http://example.com/anEnumType-blue.rdf"/>
</EnumType>
</DataType>
</DataTypes>
<ModuleClasses>
<ModuleClass name="TestDataTypes" semanticURI="http://example.com/TestDataTypes.rdf">
<Data>
<DataPoint name="TestDataPoint" writable="true" semanticURI="http://example.com/TestDataPoint.rdf">
<DataType>
<extends domain="datatypes-test" class="temperatureType" />
</DataType>
</DataPoint>
</Data>
</ModuleClass>
</ModuleClasses>
</Domain>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment