locked
Error: multiple rdfs:subClassOf triples are defined with same subject RRS feed

  • General discussion

  • when I create an assembly from an rdf file an error is thrown "multiple rdfs:subClassOf triples are defined with same subject".  I have seen the source code and there are this limit. I wanted to know why and if there are possibilities to work around this problem because I have a model that requires more subClassOf triples defined with the same subject
    Monday, June 6, 2011 10:30 AM

All replies

  • Hi Marco,

    Can you provide me a sample RDF file with the scenario in which you are using this file?

    Regards

    Tuesday, June 7, 2011 5:20 AM
  • Hi Kalnemi,

    below is a part of my model. This scenario covers the activities that are performed in an organization.
    These uses assets (resources giving value to the organization ie. human resources, documentation).
    In our case we use the concept Agent (from Foaf) to represent the people connected to an activity.
    The agent in question in addition to being sub-classes of assets are also subclasses of the Agent Rea

    <?xml version="1.0"?>
    
    <!DOCTYPE rdf:RDF [
    
     <!ENTITY sch "http://aristotele-ip.eu/km/0.1/" >
    
    ]>
    
    
    
    <rdf:RDF 
    
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    
    xmlns:dcterms="http://purl.org/dc/terms/"
    
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    
    xmlns:ar="http://aristotele-ip.eu/km/0.1/"
    
    xmlns:foaf="http://xmlns.com/foaf/0.1/"
    
    xmlns:rea="http://www.ecimf.org/rea#">
    
    
    
    <rdf:Description rdf:about="http://aristotele-ip.eu/km/0.1/Activity">
    
    <rdfs:label xml:lang="en-US">Activity</rdfs:label>
    
    <rdfs:comment xml:lang="en-US">An action allowing an agent to exploit assets and perform tasks.</rdfs:comment>
    
    <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
    
    </rdf:Description>
    
    
    
    <rdf:Description rdf:about="http://aristotele-ip.eu/km/0.1/Asset">
    
    <rdfs:label xml:lang="en-US">Asset</rdfs:label>
    
    <rdfs:comment xml:lang="en-US">Resources giving value to the organization. Typically: human resources, documentation, workprduct, services ...</rdfs:comment>
    
    <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
    
    </rdf:Description>
    
    
    
    <rdf:Description rdf:about="http://aristotele-ip.eu/km/0.1/relates">
    
    <rdfs:label xml:lang="en-US">Relates</rdfs:label>
    
    <rdfs:comment xml:lang="en-US">Expresses the relation among two resources.</rdfs:comment>
    
    <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Property"/>
    
    <rdfs:domain rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
    
    <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
    
    </rdf:Description>
    
    
    
    <rdf:Description rdf:about="http://aristotele-ip.eu/km/0.1/uses">
    
    <rdfs:label xml:lang="en-US">Uses</rdfs:label>
    
    <rdfs:comment xml:lang="en-US">Expresses that an activity requires to make use of an asset.</rdfs:comment>
    
    <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Property"/>
    
    <rdfs:subPropertyOf rdf:resource="http://aristotele-ip.eu/km/0.1/relates"/>
    
    <rdfs:domain rdf:resource="http://aristotele-ip.eu/km/0.1/Activity"/>
    
    <rdfs:range rdf:resource="http://aristotele-ip.eu/km/0.1/Asset"/>
    
    </rdf:Description>
    
    
    
    <!-- FOAF -->
    
    
    
    <rdf:Description rdf:about="http://xmlns.com/foaf/0.1/Agent">
    
    <rdfs:label xml:lang="en-US">Agent</rdfs:label>
    
    <rdfs:comment xml:lang="en-US">An agent (eg. person, group, software or physical artifact).</rdfs:comment>
    
    <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
    
    <owl:equivalentClass rdf:resource="http://purl.org/dc/terms/Agent"/>
    
    <rdfs:subClassOf rdf:resource="http://www.ecimf.org/rea#Agent"/>
    
    <rdfs:subClassOf rdf:resource="http://aristotele-ip.eu/km/0.1/Asset"/>
    
    </rdf:Description>
    
    
    
    <!-- REA -->
    
    
    
    <rdf:Description rdf:about="http://www.ecimf.org/rea#Agent">
    
    <rdfs:comment xml:lang="en-US">Economic Agents.</rdfs:comment>
    
    <rdfs:label xml:lang="en-US">Agent</rdfs:label>
    
    <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
    
    <rdfs:subClassOf rdf:resource="http://www.ecimf.org/rea#ExchangeElement"/>
    
    </rdf:Description>
    
    
    
    <rdf:Description rdf:about="http://www.ecimf.org/rea#ExchangeElement">
    
    <rdfs:comment xml:lang="en-US">The elements of Economic Exchanges</rdfs:comment>
    
    	 <rdfs:label xml:lang="en-US">ExchangeElement</rdfs:label>
    
    <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
    
    <rdfs:subClassOf rdf:resource="http://www.ecimf.org/rea#REAElement"/>
    
    </rdf:Description>
    
    
    
    <rdf:Description rdf:about="http://www.ecimf.org/rea#REAElement">
    
    	 <rdfs:label xml:lang="en-US">REAElement</rdfs:label>
    
    	<rdfs:comment>Resource-Event-Agent Enterprise Ontology, invented originally by William E. McCarthy. This version takes into account the extensions related to the REA Enterprise Script models.</rdfs:comment>
    
    	<rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>	
    
    <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
    
    </rdf:Description>
    
    
    
    <!-- Dublin Core -->
    
    <rdf:Description rdf:about="http://purl.org/dc/terms/Agent">
    
    <rdfs:label xml:lang="en-US">Agent</rdfs:label>
    
    <rdfs:comment xml:lang="en-US">A resource that acts or has the power to act.</rdfs:comment>
    
    <dcterms:description xml:lang="en-US">Examples of Agent include person, organization, and software agent.</dcterms:description>
    
    <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
    
    <rdf:type rdf:resource="http://purl.org/dc/terms/AgentClass"/>
    
    <owl:equivalentClass rdf:resource="http://xmlns.com/foaf/0.1/Agent"/>
    
    </rdf:Description>
    
    
    
    <rdf:Description rdf:about="http://purl.org/dc/terms/AgentClass">
    
    <rdfs:label xml:lang="en-US">Agent Class</rdfs:label>
    
    <rdfs:comment xml:lang="en-US">A group of agents.</rdfs:comment>
    
    <dcterms:description xml:lang="en-US">Examples of Agent Class include groups seen as classes, such as students, women, charities, lecturers.</dcterms:description>
    
    <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
    
    </rdf:Description>
    
    
    
    </rdf:RDF>
    
    
    
    

    When execute Create-ZentityDataModelClientSetup i found several errors:
    -Multiple ResourceType objects detected in the collection with same Name=Agent(the namespace does not differentiate the Agents)
    -Multiple rdfs:subClassOf triples are defined with same subject

    can Zentity manage my model? If so, how do I fix these errors?


    Tuesday, June 7, 2011 9:25 AM
  • Hi Marco,

    <<In our case we use the concept Agent (from Foaf) to represent the people connected to an activity.
    The agent in question in addition to being sub-classes of assets are also subclasses of the Agent Rea
    >>

    Zentity data model transforms each entity into a class. In .NET a class cannot be a part of more than one inheritance chain. In the above mentioned RDF, the Agent is a sub class of more than one parent Asset as well as Agent Rea which is not possible in .NET.

    Modifying the RDF file seems to be the only solution.

    -Regards
    Tuesday, June 7, 2011 10:34 AM