From 9e5a9adffe72980be2cfc6fea109a1901b075653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Euzenat?= <Jerome.Euzenat@inria.fr> Date: Thu, 25 Mar 2010 13:54:20 +0000 Subject: [PATCH] - added getEntityAnnotations with languages - added more accurate descriptions in comments --- .../exmo/ontowrap/LoadedOntology.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/fr/inrialpes/exmo/ontowrap/LoadedOntology.java b/src/fr/inrialpes/exmo/ontowrap/LoadedOntology.java index 107329b0..9b566096 100644 --- a/src/fr/inrialpes/exmo/ontowrap/LoadedOntology.java +++ b/src/fr/inrialpes/exmo/ontowrap/LoadedOntology.java @@ -31,10 +31,13 @@ public interface LoadedOntology<O> extends Ontology<O> { /** * returns the default name of an entity if specified. - * otherwise, returns one of its names (e.g., "rdfs:label" property values) + * otherwise, returns one of its names (e.g., "rdfs:label" property values). + * Which name is returned is unspecified. * In case no such official name is given to the entity it is possible to * use the entity URI to return its fragment identifier (after the '#') or * last fragment (after the last "/" or just before) in this order. + * Because of its low definiteness, it is not advised to use this primitive + * and it is better to use other ones (getNames, getComments, getAnnotations). * @param o the entity * @return a label * @throws OntowrapException @@ -44,8 +47,11 @@ public interface LoadedOntology<O> extends Ontology<O> { /** * returns the default name of an entity in a language (attribute xml:lang) * if specified. + * Which name is returned is unspecified. * otherwise, returns one of its names (e.g., "rdfs:label" property values) * otherwise returns the default name (getEntityName) + * Because of its low definiteness, it is not advised to use this primitive + * and it is better to use other ones (getNames, getComments, getAnnotations). * @param o the entity * @return a label * @throws OntowrapException @@ -96,6 +102,17 @@ public interface LoadedOntology<O> extends Ontology<O> { */ public Set<String> getEntityAnnotations( Object o ) throws OntowrapException; + /** + * Returns all the values of the "owl:AnnotationProperty" property for a given entity expressed in the required language. + * These annotations are those predefined in owl (owl:versionInfo, rdfs:label, rdfs:comment, rdfs:seeAlso and rdfs:isDefinedBy) + * but also all other defined annotation properties which are subClass of "owl:AnnotationProperty" + * @param o the entity + * @param lang the code of the language ("en", "fr", "es", etc.) + * @return the set of annotation values + * @throws OntowrapException + */ + public Set<String> getEntityAnnotations( Object o, String lang ) throws OntowrapException; + public boolean isEntity( Object o ); public boolean isClass( Object o ); public boolean isProperty( Object o ); -- GitLab