From: Todd D. <det@u.washington.edu> - 2012-01-18 18:41:02
|
Absolutely, thanks for looking into this. My header looks like this (let me know if this isn't enough and I can give you a link to the whole ontology): <?xml version="1.0"?> <!DOCTYPE rdf:RDF [ <!ENTITY OCRe2 "http://purl.org/net/OCRe/"> <!ENTITY owl "http://www.w3.org/2002/07/owl#"> <!ENTITY obo "http://purl.obolibrary.org/obo/"> <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#"> <!ENTITY OCRe "http://purl.org/net/OCRe/OCRe.owl#"> <!ENTITY snap "http://www.ifomis.org/bfo/1.1/snap#"> <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#"> <!ENTITY OCRe_ext "http://purl.org/net/OCRe/OCRe_ext.owl#"> <!ENTITY HSDB_OCRe "http://purl.org/net/OCRe/HSDB_OCRe.owl#"> <!ENTITY study_protocol2 "http://purl.org/net/OCRe/study_protocol#"> <!ENTITY statistics "http://purl.org/net/OCRe/statistics.owl#"> <!ENTITY fma3 "http://sig.biostr.washington.edu/fma3.0#"> <!ENTITY study_design "http://purl.org/net/OCRe/study_design.owl#"> <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <!ENTITY study_protocol "http://purl.org/net/OCRe/study_protocol.owl#"> <!ENTITY oboInOwl "http://www.geneontology.org/formats/oboInOwl#"> <!ENTITY protege "http://protege.stanford.edu/plugins/owl/protege#"> <!ENTITY export_annotations_def "http://purl.org/net/OCRe/export_annotations_def.owl#"> ]> <rdf:RDF xmlns="&OCRe2;HSDB_OCRe.owl#" xml:base="&OCRe2;HSDB_OCRe.owl" xmlns:OCRe_ext="&OCRe2;OCRe_ext.owl#" xmlns:protege="http://protege.stanford.edu/plugins/owl/protege#" xmlns:OCRe2="http://purl.org/net/OCRe/" xmlns:fma3="http://sig.biostr.washington.edu/fma3.0#" xmlns:snap="http://www.ifomis.org/bfo/1.1/snap#" xmlns:OCRe="&OCRe2;OCRe.owl#" xmlns:study_protocol2="&OCRe2;study_protocol#" xmlns:HSDB_OCRe="&OCRe2;HSDB_OCRe.owl#" xmlns:statistics="&OCRe2;statistics.owl#" xmlns:study_design="&OCRe2;study_design.owl#" xmlns:obo="http://purl.obolibrary.org/obo/" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:export_annotations_def="&OCRe2;export_annotations_def.owl#" xmlns:study_protocol="&OCRe2;study_protocol.owl#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:oboInOwl="http://www.geneontology.org/formats/oboInOwl#"> <owl:Ontology rdf:about="&OCRe2;HSDB_OCRe.owl"> <rdfs:comment rdf:datatype="&xsd;string">An ontology for the planning, execution and analysis of clinical research including logitudinal studies and clinical trials. This is designed to be used in conjunction with domain specific models of diseases and measurements which conform to the shared ontology of clinical concepts to provide specific models of studies and trials.</rdfs:comment> <rdfs:comment rdf:datatype="&xsd;string">An ontology of objects and relationships in statistics that are useful for describing statistical analysis used in human studies. It is part of the Ontology for Clinical Research (OCRe).</rdfs:comment> <rdfs:comment rdf:datatype="&xsd;string">An ontology of study design descriptors and categorization of study design types in terms of their design descriptors.</rdfs:comment> <rdfs:comment rdf:datatype="&xsd;string">Concept imported from BRIDG that related to the defined activities and schedules of a study protocol.</rdfs:comment> <owl:versionInfo rdf:datatype="&xsd;string">Revision 191</owl:versionInfo> <owl:versionInfo rdf:datatype="&xsd;string">Revision 197</owl:versionInfo> <owl:versionInfo rdf:datatype="&xsd;string">Revision 212</owl:versionInfo> <protege:defaultLanguage rdf:datatype="&xsd;string">en</protege:defaultLanguage> <owl:versionInfo xml:lang="en">$Revision$</owl:versionInfo> <export_annotations_def:OCRE529769 rdf:resource="&OCRe2;OCRe_ext.owl#OCRE551759"/> </owl:Ontology> ... Thanks, Todd On 1/18/12 9:29 AM, Ignazio Palmisano wrote: > I'm having trouble replicating the issue because of undefined > entities; can you add the ontology header to it? > > I. > > On 18 January 2012 16:45, Todd Detwiler<det@u.washington.edu> wrote: >> To further elaborate, here is a snippet from our ontology which has >> annotations on annotations: >> >> <owl:Class rdf:about="&OCRe2;OCRe.owl#OCRE400076"> >> <rdfs:label rdf:datatype="&xsd;string">Person</rdfs:label> >> <rdfs:subClassOf rdf:resource="&OCRe2;OCRe.owl#OCRE400064"/> >> >> <rdfs:subClassOf rdf:resource="&OCRe2;OCRe_ext.owl#OCRE546280"/> >> <owl:disjointWith rdf:resource="&OCRe2;OCRe.owl#OCRE449000"/> >> <owl:disjointWith rdf:resource="&OCRe2;OCRe.owl#OCRE584000"/> >> <owl:disjointWith rdf:resource="&OCRe2;OCRe.owl#OCRE740000"/> >> <owl:disjointWith rdf:resource="&OCRe2;OCRe.owl#OCRE831288"/> >> <owl:disjointWith rdf:resource="&OCRe2;OCRe.owl#OCRE832477"/> >> <owl:disjointWith rdf:resource="&OCRe2;OCRe.owl#OCRE992000"/> >> <owl:disjointWith rdf:resource="&owl;Nothing"/> >> <obo:IAO_0000115 rdf:datatype="&xsd;string">A human >> being</obo:IAO_0000115> >> >> <export_annotations_def:OCRE520413 >> rdf:resource="&OCRe2;OCRe.owl#OCRE900064"/> >> <export_annotations_def:OCRE520413 >> rdf:resource="&OCRe2;OCRe.owl#OCRE900225"/> >> <export_annotations_def:OCRE520413 >> rdf:resource="&OCRe2;OCRe.owl#OCRE900226"/> >> <export_annotations_def:OCRE520413 >> rdf:resource="&OCRe2;OCRe.owl#OCRE901003"/> >> <export_annotations_def:OCRE520413 >> rdf:resource="&OCRe2;OCRe.owl#OCRE901005"/> >> </owl:Class> >> <owl:Axiom> >> <export_annotations_def:OCRE863610 >> rdf:datatype="&xsd;int">3</export_annotations_def:OCRE863610> >> >> <owl:annotatedSource rdf:resource="&OCRe2;OCRe.owl#OCRE400076"/> >> <owl:annotatedTarget rdf:resource="&OCRe2;OCRe.owl#OCRE901003"/> >> <owl:annotatedProperty >> rdf:resource="&OCRe2;export_annotations_def.owl#OCRE520413"/> >> </owl:Axiom> >> >> ... >> >> My code gets those annotations on the Person class >> (export_annotations_def:OCRE520413). But the code that I posted fails to get >> the annotations on those annotations (as per the axiom at the bottom of the >> above snippet). >> >> Cheers, >> Todd >> >> >> On 1/17/12 5:53 PM, Todd Detwiler wrote: >> >> OWL2 added support for annotations on other annotations. I have an ontology >> which incorporates such constructs, but I am having trouble accessing the >> values through the API. Here is a snippet of my code which is not working: >> >> private int getElementOrder(OWLAnnotation dataElemAnnot) >> { >> int order = -1; >> Set<OWLAnnotation> annotAxiomAnnots = >> dataElemAnnot.getAnnotations(); >> for(OWLAnnotation annotAxiomAnnot : annotAxiomAnnots) >> { >> OWLAnnotationProperty annotProp = annotAxiomAnnot.getProperty(); >> if(annotProp.equals(elemOrderProp)) >> { >> // this is the element order property, return its value. >> OWLAnnotationValue value = annotAxiomAnnot.getValue(); >> >> ... >> >> But in spite of the fact that I have annotated annotations, the above code >> never enters the body of the for loop. Can anyone spot any obvious issues? >> >> Thanks, >> Todd >> >> >> ------------------------------------------------------------------------------ >> Keep Your Developer Skills Current with LearnDevNow! >> The most comprehensive online learning library for Microsoft developers >> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, >> Metro Style Apps, more. Free future releases when you subscribe now! >> http://p.sf.net/sfu/learndevnow-d2d >> _______________________________________________ >> Owlapi-developer mailing list >> Owl...@li... >> https://lists.sourceforge.net/lists/listinfo/owlapi-developer >> > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer |