Skip to content

How to get a collection of classes from Bnode #2153

@cory1219

Description

@cory1219

Hello,

My owl file has a triple as below. When I import the file, the object of the triple becoems rdflib.term.bnode. How can I get the class names of the object in the collection, namely Entity & Resource? Thanks

<owl:ObjectProperty rdf:about="http://www.semanticweb.org/xxx/ontologies/2020/SimulationOntology#isPerformedOn">
        <rdfs:domain rdf:resource="http://www.semanticweb.org/xxx/ontologies/2020/SimulationOntology#Activity"/>
        <rdfs:range>
            <owl:Class>
                <owl:unionOf rdf:parseType="Collection">
                    <rdf:Description rdf:about="http://www.semanticweb.org/xxx/ontologies/2020/SimulationOntology#Entity"/>
                    <rdf:Description rdf:about="http://www.semanticweb.org/xxx/ontologies/2020/SimulationOntology#Resource"/>
                </owl:unionOf>
            </owl:Class>
        </rdfs:range>
    </owl:ObjectProperty>

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions