[redland-dev] Parsing collections in OWL file

Adam Witney awitney at sghms.ac.uk
Wed May 26 16:11:51 BST 2004


Hi, I am fairly new to Redland. I have a perl script which will parse a DAML
file and generate triples ok. I am trying to convert it to parse the
equivalent file in OWL format, however I am having a little trouble with the
collections.

This piece of RDF

        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty
rdf:resource="http://mged.sourceforge.net/ontologies/MGEDOntology.daml#has_m
easurement_type"/>
                <owl:someValuesFrom>
                    <owl:Class>
                        <owl:oneOf parseType="owl:collection">
                            <owl:Thing
rdf:about="http://mged.sourceforge.net/ontologies/MGEDOntology.daml#absolute
"/>
                            <owl:Thing
rdf:about="http://mged.sourceforge.net/ontologies/MGEDOntology.daml#change_b
iomaterial_characteristics"/>
                            <owl:Thing
rdf:about="http://mged.sourceforge.net/ontologies/MGEDOntology.daml#relative
"/>
                        </owl:oneOf>
                    </owl:Class>
                </owl:someValuesFrom>
            </owl:Restriction>
        </rdfs:subClassOf>

Produces this set of triples:

Matching Statement: {(r1085582257r5), [http://www.w3.org/??/owl#oneOf], "
                            <owl:Thing xmlns:owl="http://www.w3.org/??/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
rdf:about="http://mged.sourceforge.net/ontologies/MGEDOntology.daml#absolute
"></owl:Thing>
                            <owl:Thing xmlns:owl="http://www.w3.org/??/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
rdf:about="http://mged.sourceforge.net/ontologies/MGEDOntology.daml#change_b
iomaterial_characteristics"></owl:Thing>
                            <owl:Thing xmlns:owl="http://www.w3.org/??/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
rdf:about="http://mged.sourceforge.net/ontologies/MGEDOntology.daml#relative
"></owl:Thing>
                        "}
  Subject string: (r1085582257r5)
  Predicate string: [http://www.w3.org/??/owl#oneOf]
  Object string: 
                            <owl:Thing xmlns:owl="http://www.w3.org/??/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
rdf:about="http://mged.sourceforge.net/ontologies/MGEDOntology.daml#absolute
"></owl:Thing>
                            <owl:Thing xmlns:owl="http://www.w3.org/??/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
rdf:about="http://mged.sourceforge.net/ontologies/MGEDOntology.daml#change_b
iomaterial_characteristics"></owl:Thing>
                            <owl:Thing xmlns:owl="http://www.w3.org/??/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
rdf:about="http://mged.sourceforge.net/ontologies/MGEDOntology.daml#relative
"></owl:Thing>


However I can't seem to get access to the nodes in the collection, all I can
get is the XML string as above.

Any pointers how to handle this would be greatly appreciated

Thanks

adam


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the redland-dev mailing list