Changeset 3806 for CMDI-Interoperability


Ignore:
Timestamp:
10/18/13 15:16:27 (11 years ago)
Author:
mwindhouwer
Message:

M data/general.ttl

  • added the Attribute class and made changes to existing properties to include it
  • finetuned has(Element|Attribute)Value and has(Element|Attribute)Entity
  • renamed Value to Entity as entities are classes, literals can't be

M xsl/CMDRecord2RDF.xsl
M xsl/Component2RDF.xsl

  • use Entity
Location:
CMDI-Interoperability/CMD2RDF/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CMDI-Interoperability/CMD2RDF/trunk/data/general.ttl

    r3797 r3806  
    1818:Element rdf:type rdfs:Class .
    1919
     20###  http://www.clarin.eu/cmd/general.rdf#Attribute
     21:Attribute rdf:type rdfs:Class .
     22#CHECK: is Attribute a sub class of Element?
     23
    2024:contains rdf:type rdf:Property;
    21            rdfs:domain :Component;
    22            rdfs:range :Component, :Element.
     25           rdfs:domain :Component, :Element;
     26           rdfs:range :Component, :Element, :Attribute.
    2327
    24 :Value a rdfs:Literal.
     28:Entity a rdfs:Class.
    2529
    2630###  http://www.clarin.eu/cmd/general.rdf#hasElementValue
    2731:hasElementValue rdf:type rdf:Property;
    28               rdfs:domain :Element;
    29               rdfs:range :Value.
    30 
    31 ###  http://www.clarin.eu/cmd/general.rdf#hasAttribute
    32 :hasAttribute rdf:type rdf:Property;
    33               rdfs:domain :Component, :Element;
    34               rdfs:range :Value.
    35 
     32              rdfs:domain :Element.
     33#CHECK: can you specify that the range can be any XS literal?
    3634
    3735# add a parallel separate property for the resolved entities
    3836:hasElementEntity rdf:type rdf:Property;
    3937              rdfs:domain :Element.
    40 #              rdfs:range ???.
    41            
     38              rdfs:range :Entity.
     39
     40###  http://www.clarin.eu/cmd/general.rdf#hasAttribute
     41:hasAttributeValue rdf:type rdf:Property;
     42              rdfs:domain :Attribute.
     43#CHECK: can you specify that the range can be any XS literal?
     44
    4245# And then consequently also for attribute
    4346:hasAttributeEntity rdf:type rdf:Property.
     47              rdfs:domain :Component, :Element;
     48              rdfs:range :Entity.
  • CMDI-Interoperability/CMD2RDF/trunk/xsl/CMDRecord2RDF.xsl

    r3801 r3806  
    44    <!ENTITY rdfs 'http://www.w3.org/TR/WD-rdf-schema#'>
    55    <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#'>
    6     <!ENTITY cmdm 'http://www.clarin.eu/cmd/general.ttl#'>
     6    <!ENTITY cmdm 'http://www.clarin.eu/cmd/general.rdf#'>
    77]>
    88<xsl:stylesheet
     
    1212    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    1313    xmlns:cmd="http://www.clarin.eu/cmd/"
    14     xmlns:cmdm="http://www.clarin.eu/cmd/general.ttl"
     14    xmlns:cmdm="http://www.clarin.eu/cmd/general.rdf"
    1515>
    1616   
  • CMDI-Interoperability/CMD2RDF/trunk/xsl/Component2RDF.xsl

    r3801 r3806  
    44    <!ENTITY rdfs 'http://www.w3.org/TR/WD-rdf-schema#'>
    55    <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#'>
    6     <!ENTITY cmdm 'http://www.clarin.eu/cmd/general.ttl#'>
     6    <!ENTITY cmdm 'http://www.clarin.eu/cmd/general.rdf#'>
    77]>
    88<xsl:stylesheet
     
    1212    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    1313    xmlns:cmd="http://www.clarin.eu/cmd/"
    14     xmlns:cmdm="http://www.clarin.eu/cmd/general.ttl"
     14    xmlns:cmdm="http://www.clarin.eu/cmd/general.rdf"
    1515>
    1616   
     
    109109        <!-- if there is an value enumeration also have a hasElementEntity property -->
    110110        <if test="exists(ValueScheme/enumeration)">
     111            <rdf:Class rdf:about="{$id}Entity">
     112                <rdf:subClassOf rdf:resource="&cmdm;Entity"/>
     113            </rdf:Class>
    111114            <rdf:Property rdf:about="{$has}ElementEntity">
    112115                <rdfs:subPropertyOf rdf:resource="&cmdm;hasElementEntity"/>
     
    114117                <rdfs:domain rdf:resource="{$id}"/>
    115118                <!-- the range consists of a superclass for the specific value classes -->
    116                 <rdfs:range rdf:resource="{$id}Value"/>
     119                <rdfs:range rdf:resource="{$id}Entity"/>
    117120            </rdf:Property>
    118121        </if>
     
    132135        <!-- a value in a value scheme becomes a subclass of that scheme -->
    133136        <rdf:Class rdf:about="{$context}Value{$STEP}{$id}">
    134             <rdf:subClassOf rdf:resource="{$context}Value"/>
     137            <rdf:subClassOf rdf:resource="{$context}Entity"/>
    135138            <xsl:call-template name="generic"/>
    136139            <rdfs:label>
     
    173176        <!-- if there is an value enumeration also have a hasAttributeEntity property -->
    174177        <xsl:if test="exists(ValueScheme/enumeration)">
     178            <rdf:Class rdf:about="{$id}Entity">
     179                <rdf:subClassOf rdf:resource="&cmdm;Entity"/>
     180            </rdf:Class>
    175181            <rdf:Property rdf:about="{$has}Entity">
    176182                <rdfs:subPropertyOf rdf:resource="&cmdm;hasAttributeEntity"/>
     
    178184                <rdfs:domain rdf:resource="{id}"/>
    179185                <!-- the range consists of a superclass for the specific value classes -->
    180                 <rdfs:range rdf:resource="{$id}Value"/>
     186                <rdfs:range rdf:resource="{$id}Entity"/>
    181187            </rdf:Property>
    182188        </xsl:if>
Note: See TracChangeset for help on using the changeset viewer.