From: Ignazio P. <ipa...@gm...> - 2012-01-18 17:29:30
|
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 > |