Alignment API and Server 4.2.${version.update}

fr.inrialpes.exmo.ontowrap.skoslite
Class SKOSLiteThesaurus

java.lang.Object
  extended by fr.inrialpes.exmo.ontowrap.skoslite.SKOSLiteThesaurus
All Implemented Interfaces:
HeavyLoadedOntology<com.hp.hpl.jena.rdf.model.Model>, LoadedOntology<com.hp.hpl.jena.rdf.model.Model>, Ontology<com.hp.hpl.jena.rdf.model.Model>

public class SKOSLiteThesaurus
extends Object
implements HeavyLoadedOntology<com.hp.hpl.jena.rdf.model.Model>


Field Summary
protected  URI file
           
protected  String formalism
           
protected  URI formUri
           
protected  com.hp.hpl.jena.rdf.model.Model onto
           
protected  com.hp.hpl.jena.rdf.model.InfModel ontoInf
           
protected static String SKOS_BROADERTRANSITIVE
           
protected static String SKOS_CONCEPT
           
protected static String SKOS_NARROWERTRANSITIVE
           
protected static String SKOS_NOTATION
           
protected static String SKOS_NOTE
           
protected static String SKOS_NS
           
protected static String SKOS_ONTO
           
protected static String SKOS_PREFLABEL
           
protected  URI uri
           
 
Constructor Summary
SKOSLiteThesaurus(com.hp.hpl.jena.rdf.model.Model onto)
           
SKOSLiteThesaurus(URI file)
           
 
Method Summary
 boolean getCapabilities(int Direct, int Asserted, int Named)
           
 Set<? extends Object> getClasses()
           
 Set<? extends Object> getClasses(Object i, int local, int asserted, int named)
          returns empty set
 Set<? extends Object> getDataProperties()
           
 Set<? extends Object> getDataProperties(Object c, int local, int asserted, int named)
          returns empty set
 Set<? extends Object> getDomain(Object p, int asserted)
          returns empty set
 Set<? extends Object> getEntities()
          Returns all named entities having URI beginning with the ontology URI
 Object getEntity(URI u)
           
 Set<String> getEntityAnnotations(Object o)
          Returns all the values of the "owl:AnnotationProperty" property for a given entity.
 Set<String> getEntityAnnotations(Object o, String lang)
          Returns all the values of the "owl:AnnotationProperty" property for a given entity expressed in the required language.
 Set<String> getEntityAnnotations(Object o, String lang, String[] types)
           
 Set<Annotation> getEntityAnnotationsL(Object o)
           
 Set<Annotation> getEntityAnnotationsL(Object o, String[] types)
           
 Set<String> getEntityComments(Object o)
          Returns all the values of textual properties (e.g., "rdfs:comment", rdfs:label in RDFS/OWL) for a given entity
 Set<String> getEntityComments(Object o, String lang)
          Returns the values ofof textual properties (e.g., "rdfs:comment", rdfs:label in RDFS/OWL) for a given entity and for a given natural language (attribute xml:lang).
 String getEntityName(Object o)
          returns one of the skos:prefLabel In skos there at most one prefLabel for a given language
 String getEntityName(Object o, String lang)
          returns the skos:prefLabel for the given language.
 Set<String> getEntityNames(Object o)
          returns all the labels, i.e.
 Set<String> getEntityNames(Object o, String lang)
          returns all the labels, i.e.
 URI getEntityURI(Object o)
           
 URI getFile()
           
 String getFormalism()
           
 URI getFormURI()
           
 Set<? extends Object> getIndividuals()
          No individuals for skos.
 Set<? extends Object> getInstances(Object c, int local, int asserted, int named)
          returns empty set
 Set<? extends Object> getObjectProperties()
          No object property for skos.
 Set<? extends Object> getObjectProperties(Object c, int local, int asserted, int named)
          returns empty set
 com.hp.hpl.jena.rdf.model.Model getOntology()
           
 Set<? extends Object> getProperties()
          No property for skos.
 Set<? extends Object> getProperties(Object c, int local, int asserted, int named)
          returns empty set
 Set<? extends Object> getRange(Object p, int asserted)
          returns empty set
<E> Set<E>
getSubClasses(E c, int local, int asserted, int named)
          returns all sub concepts of given object c.
 Set<? extends Object> getSubProperties(Object p, int local, int asserted, int named)
          returns empty set
 Set<? extends Object> getSuperClasses(Object c, int local, int asserted, int named)
           
 Set<? extends Object> getSuperProperties(Object p, int local, int asserted, int named)
          returns empty set
 URI getURI()
           
 boolean isClass(Object o)
          returns true if the given object is an instance of skos:Concept
 boolean isDataProperty(Object o)
          returns false
 boolean isEntity(Object o)
          returns false
 boolean isIndividual(Object o)
          returns false
 boolean isObjectProperty(Object o)
          returns false
 boolean isProperty(Object o)
          returns false
 int nbClasses()
          returns the number of skos:Concept in the thesaurus
 int nbDataProperties()
          returns 0
 int nbEntities()
          returns the same number than nbClasses()
 int nbIndividuals()
          returns 0
 int nbObjectProperties()
          returns 0
 int nbProperties()
          returns 0
 void setFile(URI file)
           
 void setFormalism(String name)
           
 void setFormURI(URI u)
           
 void setOntology(com.hp.hpl.jena.rdf.model.Model o)
           
 void setURI(URI uri)
           
 void unload()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SKOS_ONTO

protected static final String SKOS_ONTO

SKOS_NS

protected static final String SKOS_NS
See Also:
Constant Field Values

SKOS_CONCEPT

protected static final String SKOS_CONCEPT
See Also:
Constant Field Values

SKOS_PREFLABEL

protected static final String SKOS_PREFLABEL
See Also:
Constant Field Values

SKOS_NOTE

protected static final String SKOS_NOTE
See Also:
Constant Field Values

SKOS_NOTATION

protected static final String SKOS_NOTATION
See Also:
Constant Field Values

SKOS_BROADERTRANSITIVE

protected static final String SKOS_BROADERTRANSITIVE
See Also:
Constant Field Values

SKOS_NARROWERTRANSITIVE

protected static final String SKOS_NARROWERTRANSITIVE
See Also:
Constant Field Values

ontoInf

protected com.hp.hpl.jena.rdf.model.InfModel ontoInf

onto

protected com.hp.hpl.jena.rdf.model.Model onto

formalism

protected String formalism

formUri

protected URI formUri

file

protected URI file

uri

protected URI uri
Constructor Detail

SKOSLiteThesaurus

public SKOSLiteThesaurus(URI file)

SKOSLiteThesaurus

public SKOSLiteThesaurus(com.hp.hpl.jena.rdf.model.Model onto)
Method Detail

getCapabilities

public boolean getCapabilities(int Direct,
                               int Asserted,
                               int Named)
                        throws OntowrapException
Specified by:
getCapabilities in interface HeavyLoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getClasses

public Set<? extends Object> getClasses(Object i,
                                        int local,
                                        int asserted,
                                        int named)
                                 throws OntowrapException
returns empty set

Specified by:
getClasses in interface HeavyLoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getDataProperties

public Set<? extends Object> getDataProperties(Object c,
                                               int local,
                                               int asserted,
                                               int named)
                                        throws OntowrapException
returns empty set

Specified by:
getDataProperties in interface HeavyLoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getDomain

public Set<? extends Object> getDomain(Object p,
                                       int asserted)
                                throws OntowrapException
returns empty set

Specified by:
getDomain in interface HeavyLoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getInstances

public Set<? extends Object> getInstances(Object c,
                                          int local,
                                          int asserted,
                                          int named)
                                   throws OntowrapException
returns empty set

Specified by:
getInstances in interface HeavyLoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getObjectProperties

public Set<? extends Object> getObjectProperties(Object c,
                                                 int local,
                                                 int asserted,
                                                 int named)
                                          throws OntowrapException
returns empty set

Specified by:
getObjectProperties in interface HeavyLoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getProperties

public Set<? extends Object> getProperties(Object c,
                                           int local,
                                           int asserted,
                                           int named)
                                    throws OntowrapException
returns empty set

Specified by:
getProperties in interface HeavyLoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getRange

public Set<? extends Object> getRange(Object p,
                                      int asserted)
                               throws OntowrapException
returns empty set

Specified by:
getRange in interface HeavyLoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getSubProperties

public Set<? extends Object> getSubProperties(Object p,
                                              int local,
                                              int asserted,
                                              int named)
                                       throws OntowrapException
returns empty set

Specified by:
getSubProperties in interface HeavyLoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getSuperProperties

public Set<? extends Object> getSuperProperties(Object p,
                                                int local,
                                                int asserted,
                                                int named)
                                         throws OntowrapException
returns empty set

Specified by:
getSuperProperties in interface HeavyLoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getSubClasses

public <E> Set<E> getSubClasses(E c,
                                int local,
                                int asserted,
                                int named)
returns all sub concepts of given object c.

Specified by:
getSubClasses in interface HeavyLoadedOntology<com.hp.hpl.jena.rdf.model.Model>

getSuperClasses

public Set<? extends Object> getSuperClasses(Object c,
                                             int local,
                                             int asserted,
                                             int named)
                                      throws OntowrapException
Specified by:
getSuperClasses in interface HeavyLoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getClasses

public Set<? extends Object> getClasses()
                                 throws OntowrapException
Specified by:
getClasses in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getDataProperties

public Set<? extends Object> getDataProperties()
                                        throws OntowrapException
Specified by:
getDataProperties in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getEntities

public Set<? extends Object> getEntities()
                                  throws OntowrapException
Description copied from interface: LoadedOntology
Returns all named entities having URI beginning with the ontology URI

Specified by:
getEntities in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Returns:
the set of entities
Throws:
OntowrapException

getEntity

public Object getEntity(URI u)
                 throws OntowrapException
Specified by:
getEntity in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getEntityAnnotations

public Set<String> getEntityAnnotations(Object o,
                                        String lang,
                                        String[] types)
                                 throws OntowrapException
Throws:
OntowrapException

getEntityAnnotationsL

public Set<Annotation> getEntityAnnotationsL(Object o,
                                             String[] types)
                                      throws OntowrapException
Throws:
OntowrapException

getEntityAnnotationsL

public Set<Annotation> getEntityAnnotationsL(Object o)
                                      throws OntowrapException
Specified by:
getEntityAnnotationsL in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getEntityAnnotations

public Set<String> getEntityAnnotations(Object o)
                                 throws OntowrapException
Description copied from interface: LoadedOntology
Returns all the values of the "owl:AnnotationProperty" property for a given entity. 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"

Specified by:
getEntityAnnotations in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Parameters:
o - the entity
Returns:
the set of annotation values
Throws:
OntowrapException

getEntityAnnotations

public Set<String> getEntityAnnotations(Object o,
                                        String lang)
                                 throws OntowrapException
Description copied from interface: LoadedOntology
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"

Specified by:
getEntityAnnotations in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Parameters:
o - the entity
lang - the code of the language ("en", "fr", "es", etc.)
Returns:
the set of annotation values
Throws:
OntowrapException

getEntityComments

public Set<String> getEntityComments(Object o,
                                     String lang)
                              throws OntowrapException
Description copied from interface: LoadedOntology
Returns the values ofof textual properties (e.g., "rdfs:comment", rdfs:label in RDFS/OWL) for a given entity and for a given natural language (attribute xml:lang).

Specified by:
getEntityComments in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Parameters:
o - the entity
lang - the code of the language ("en", "fr", "es", etc.)
Returns:
the set of comments
Throws:
OntowrapException

getEntityComments

public Set<String> getEntityComments(Object o)
                              throws OntowrapException
Description copied from interface: LoadedOntology
Returns all the values of textual properties (e.g., "rdfs:comment", rdfs:label in RDFS/OWL) for a given entity

Specified by:
getEntityComments in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Parameters:
o - the entity
Returns:
the set of comments
Throws:
OntowrapException

getEntityName

public String getEntityName(Object o)
                     throws OntowrapException
returns one of the skos:prefLabel In skos there at most one prefLabel for a given language

Specified by:
getEntityName in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Parameters:
o - the entity
Returns:
a label
Throws:
OntowrapException

getEntityName

public String getEntityName(Object o,
                            String lang)
                     throws OntowrapException
returns the skos:prefLabel for the given language. In skos there at most one prefLabel for a given language

Specified by:
getEntityName in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Parameters:
o - the entity
Returns:
a label
Throws:
OntowrapException

getEntityNames

public Set<String> getEntityNames(Object o,
                                  String lang)
                           throws OntowrapException
returns all the labels, i.e. rdf:label subproperties for a given language In skos, the properties skos:prefLabel, skos:altLabel and skos:hiddenLabel are subproperties of rdf:label

Specified by:
getEntityNames in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Parameters:
o - the entity
lang - the code of the language ("en", "fr", "es", etc.)
Returns:
the default name
Throws:
OntowrapException

getEntityNames

public Set<String> getEntityNames(Object o)
                           throws OntowrapException
returns all the labels, i.e. rdf:label subproperties In skos, the properties skos:prefLabel, skos:altLabel and skos:hiddenLabel are subproperties of rdf:label

Specified by:
getEntityNames in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Parameters:
o - the entity
Returns:
the set of labels
Throws:
OntowrapException

getEntityURI

public URI getEntityURI(Object o)
                 throws OntowrapException
Specified by:
getEntityURI in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getIndividuals

public Set<? extends Object> getIndividuals()
                                     throws OntowrapException
No individuals for skos. returns empty set

Specified by:
getIndividuals in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getObjectProperties

public Set<? extends Object> getObjectProperties()
                                          throws OntowrapException
No object property for skos. returns empty set

Specified by:
getObjectProperties in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getProperties

public Set<? extends Object> getProperties()
                                    throws OntowrapException
No property for skos. returns empty set

Specified by:
getProperties in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

isClass

public boolean isClass(Object o)
                throws OntowrapException
returns true if the given object is an instance of skos:Concept

Specified by:
isClass in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

isDataProperty

public boolean isDataProperty(Object o)
                       throws OntowrapException
returns false

Specified by:
isDataProperty in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

isEntity

public boolean isEntity(Object o)
                 throws OntowrapException
returns false

Specified by:
isEntity in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

isIndividual

public boolean isIndividual(Object o)
                     throws OntowrapException
returns false

Specified by:
isIndividual in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

isObjectProperty

public boolean isObjectProperty(Object o)
                         throws OntowrapException
returns false

Specified by:
isObjectProperty in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

isProperty

public boolean isProperty(Object o)
                   throws OntowrapException
returns false

Specified by:
isProperty in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

nbClasses

public int nbClasses()
              throws OntowrapException
returns the number of skos:Concept in the thesaurus

Specified by:
nbClasses in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

nbDataProperties

public int nbDataProperties()
                     throws OntowrapException
returns 0

Specified by:
nbDataProperties in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

nbEntities

public int nbEntities()
               throws OntowrapException
returns the same number than nbClasses()

Specified by:
nbEntities in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

nbIndividuals

public int nbIndividuals()
                  throws OntowrapException
returns 0

Specified by:
nbIndividuals in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

nbObjectProperties

public int nbObjectProperties()
                       throws OntowrapException
returns 0

Specified by:
nbObjectProperties in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

nbProperties

public int nbProperties()
                 throws OntowrapException
returns 0

Specified by:
nbProperties in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

unload

public void unload()
            throws OntowrapException
Specified by:
unload in interface LoadedOntology<com.hp.hpl.jena.rdf.model.Model>
Throws:
OntowrapException

getFile

public URI getFile()
Specified by:
getFile in interface Ontology<com.hp.hpl.jena.rdf.model.Model>

getFormURI

public URI getFormURI()
Specified by:
getFormURI in interface Ontology<com.hp.hpl.jena.rdf.model.Model>

getFormalism

public String getFormalism()
Specified by:
getFormalism in interface Ontology<com.hp.hpl.jena.rdf.model.Model>

getOntology

public com.hp.hpl.jena.rdf.model.Model getOntology()
Specified by:
getOntology in interface Ontology<com.hp.hpl.jena.rdf.model.Model>

getURI

public URI getURI()
Specified by:
getURI in interface Ontology<com.hp.hpl.jena.rdf.model.Model>

setFile

public void setFile(URI file)
Specified by:
setFile in interface Ontology<com.hp.hpl.jena.rdf.model.Model>

setFormURI

public void setFormURI(URI u)
Specified by:
setFormURI in interface Ontology<com.hp.hpl.jena.rdf.model.Model>

setFormalism

public void setFormalism(String name)
Specified by:
setFormalism in interface Ontology<com.hp.hpl.jena.rdf.model.Model>

setOntology

public void setOntology(com.hp.hpl.jena.rdf.model.Model o)
Specified by:
setOntology in interface Ontology<com.hp.hpl.jena.rdf.model.Model>

setURI

public void setURI(URI uri)
Specified by:
setURI in interface Ontology<com.hp.hpl.jena.rdf.model.Model>

Alignment API and Server 4.2.${version.update}

(C) INRIA & friends, 2003-${curryear}