Search Mailing List Archives
[protege-discussion] RE : How to fetch all Annotations for DataProperty
Timothy Redmond
tredmond at stanford.edu
Mon Mar 25 04:49:33 PDT 2013
On 03/24/2013 11:33 PM, Prathyusha Baggiri wrote:
>
> Hello,
>
> I have defined some custom annotations for Data property in protégé.
> How can I fetch these custom annotations using OWL Api. Any
> suggestions would be grateful..
>
My question here is what you mean by this exactly. You could mean that
you have defined some custom annotations for a datatype property. In
this case, the datatype property is an owl entity and you can retrieve
the annotations with code such as the following:
private void getAnnotations(OWLOntology ontology, OWLEntity entity) {
for (OWLAnnotation annotation : entity.getAnnotations(ontology)) {
logger.info("Annotation with annotation property " + annotation.getProperty());
logger.info("\tAnnotation value = " + annotation.getValue());
}
}
But the most obvious interpretation is that you have attached
annotations to the /owl:DatatypeProperty/ resource. In this case the
first thing to be aware of is that you are now working in OWL full which
is not entirely supported by OWL 2 centric tools such as Protege 4 and
the OWL api. However, I believe that in this case, the OWL api will
interpret the owl:DatatypeProperty object as some sort of OWL entity and
you can treat this like any other annotation.
-Timothy
/
/
>
> Thank you.
>
> Regards,
>
> Prathyusha Reddy.
>
> **************** CAUTION - Disclaimer *****************
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
> for the use of the addressee(s). If you are not the intended recipient, please
> notify the sender by e-mail and delete the original message. Further, you are not
> to copy, disclose, or distribute this e-mail or its contents to any other person and
> any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
> every reasonable precaution to minimize this risk, but is not liable for any damage
> you may sustain as a result of any virus in this e-mail. You should carry out your
> own virus checks before opening the e-mail or attachment. Infosys reserves the
> right to monitor and review the content of all messages sent to or from this e-mail
> address. Messages sent to or from this e-mail address may be stored on the
> Infosys e-mail system.
> ***INFOSYS******** End of Disclaimer ********INFOSYS***
>
>
>
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20130325/bd61f47e/attachment.html>
More information about the protege-discussion
mailing list