public class SKOSThesaurus extends BasicOntology<org.semanticweb.skos.SKOSDataset> implements HeavyLoadedOntology<org.semanticweb.skos.SKOSDataset>
Modifier and Type | Field and Description |
---|---|
(package private) org.semanticweb.skos.SKOSDataFactory |
factory |
(package private) static org.slf4j.Logger |
logger |
private static java.util.HashSet<java.lang.Object> |
NullSet
The empty set, returned by many methods.
|
file, formalism, formalismURI, onto, uri
Constructor and Description |
---|
SKOSThesaurus() |
Modifier and Type | Method and Description |
---|---|
boolean |
getCapabilities(int Direct,
int Asserted,
int Named)
THESE ARE HEAVY LOADED PRIMITIVES
|
java.util.Set<?> |
getClasses() |
java.util.Set<java.lang.Object> |
getClasses(java.lang.Object i,
int local,
int asserted,
int named) |
java.util.Set<?> |
getDataProperties() |
java.util.Set<java.lang.Object> |
getDataProperties(java.lang.Object c,
int local,
int asserted,
int named) |
private void |
getDataValues(org.semanticweb.skos.SKOSConcept o,
org.semanticweb.skos.SKOSDataProperty p,
java.util.Set<java.lang.String> result)
Returns one of the prefLabel property values for a given SKOS concept.
|
private void |
getDataValues(org.semanticweb.skos.SKOSConcept o,
org.semanticweb.skos.SKOSDataProperty p,
java.util.Set<java.lang.String> result,
java.lang.String lang) |
java.util.Set<java.lang.Object> |
getDomain(java.lang.Object p,
int asserted) |
java.util.Set<?> |
getEntities()
Returns all named entities having URI beginning with the ontology URI
|
java.lang.Object |
getEntity(java.net.URI u)
returns the entity corresponding to the given URI
If no such entity exists, may return null or raise an exception
|
java.util.Set<java.lang.String> |
getEntityAnnotations(java.lang.Object o)
Returns all the values of the "owl:AnnotationProperty" property for a given entity.
|
java.util.Set<java.lang.String> |
getEntityAnnotations(java.lang.Object o,
java.lang.String lang)
There is no languages on annotations in SKOS API
Hence we return all of them
|
java.util.Set<Annotation> |
getEntityAnnotationsL(java.lang.Object o) |
java.util.Set<java.lang.String> |
getEntityComments(java.lang.Object o)
Returns all the values of the "rdfs:comment" property for a given entity
|
java.util.Set<java.lang.String> |
getEntityComments(java.lang.Object o,
java.lang.String lang)
Returns the values of the "rdfs:comment" property for a given entity and for a given natural language (attribute xml:lang).
|
java.lang.String |
getEntityName(java.lang.Object o)
Returns one of the prefLabel property values for a given SKOS concept.
|
java.lang.String |
getEntityName(java.lang.Object o,
java.lang.String lang)
Returns one of the prefLabel property values for a given SKOS concept in a given language.
|
java.util.Set<java.lang.String> |
getEntityNames(java.lang.Object o)
Returns the values of the prefLabel, hiddenLabel and altLabel properties.
|
java.util.Set<java.lang.String> |
getEntityNames(java.lang.Object o,
java.lang.String lang)
Returns the values of the prefLabel, hiddenLabel and altLabel properties in a given language.
|
java.net.URI |
getEntityURI(java.lang.Object o)
returns the URI of an entity in the ontology
|
java.util.Set<?> |
getIndividuals() |
java.util.Set<java.lang.Object> |
getInstances(java.lang.Object c,
int local,
int asserted,
int named) |
java.util.Set<?> |
getObjectProperties() |
java.util.Set<java.lang.Object> |
getObjectProperties(java.lang.Object c,
int local,
int asserted,
int named) |
java.util.Set<?> |
getProperties() |
java.util.Set<java.lang.Object> |
getProperties(java.lang.Object c,
int local,
int asserted,
int named) |
java.util.Set<java.lang.Object> |
getRange(java.lang.Object p,
int asserted) |
java.util.Set<java.lang.Object> |
getSubClasses(java.lang.Object c,
int local,
int asserted,
int named) |
java.util.Set<java.lang.Object> |
getSubProperties(java.lang.Object p,
int local,
int asserted,
int named) |
java.util.Set<java.lang.Object> |
getSuperClasses(java.lang.Object c,
int local,
int asserted,
int named) |
java.util.Set<java.lang.Object> |
getSuperProperties(java.lang.Object p,
int local,
int asserted,
int named) |
boolean |
isClass(java.lang.Object o) |
boolean |
isDataProperty(java.lang.Object o) |
boolean |
isEntity(java.lang.Object o) |
boolean |
isIndividual(java.lang.Object o) |
boolean |
isObjectProperty(java.lang.Object o) |
boolean |
isProperty(java.lang.Object o) |
int |
nbClasses() |
int |
nbDataProperties() |
int |
nbEntities() |
int |
nbIndividuals() |
int |
nbObjectProperties() |
int |
nbProperties() |
void |
setFactory(org.semanticweb.skos.SKOSDataFactory df) |
void |
unload() |
getFile, getFormalism, getFormURI, getFragmentAsLabel, getOntology, getURI, load, setFile, setFormalism, setFormURI, setOntology, setURI
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFile, getFormalism, getFormURI, getOntology, getURI, setFile, setFormalism, setFormURI, setOntology, setURI
static final org.slf4j.Logger logger
org.semanticweb.skos.SKOSDataFactory factory
private static final java.util.HashSet<java.lang.Object> NullSet
public void setFactory(org.semanticweb.skos.SKOSDataFactory df)
private void getDataValues(org.semanticweb.skos.SKOSConcept o, org.semanticweb.skos.SKOSDataProperty p, java.util.Set<java.lang.String> result)
o:
- the concept whose property value is soughtp:
- the sought propertyresult:
- a set of strings containing the resultprivate void getDataValues(org.semanticweb.skos.SKOSConcept o, org.semanticweb.skos.SKOSDataProperty p, java.util.Set<java.lang.String> result, java.lang.String lang)
public java.lang.String getEntityName(java.lang.Object o) throws OntowrapException
getEntityName
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
o:
- the entity whose name is soughtOntowrapException
- when something goes wrong
JE: This is not satisfying because in case of several PrefLabels it will return the first one...public java.lang.String getEntityName(java.lang.Object o, java.lang.String lang) throws OntowrapException
getEntityName
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
o:
- the entity whose prefered label is soughtlang:
- the code of the language ("en", "fr", "es", etc.)OntowrapException
- when something goes wrong
JE: This is not satisfying because in case of several PrefLabels it will return the first one...public java.util.Set<java.lang.String> getEntityNames(java.lang.Object o, java.lang.String lang) throws OntowrapException
getEntityNames
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
o:
- the entity whose preferred labels are soughtlang:
- the code of the language ("en", "fr", "es", etc.)OntowrapException
- when something goes wrongpublic java.util.Set<java.lang.String> getEntityNames(java.lang.Object o) throws OntowrapException
getEntityNames
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
o:
- the conceptOntowrapException
- when something goes wrongpublic java.util.Set<java.lang.String> getEntityComments(java.lang.Object o, java.lang.String lang) throws OntowrapException
getEntityComments
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
o:
- the concept the comments on which are soughtlang:
- the code of the language ("en", "fr", "es", etc.)OntowrapException
- when something goes wrongpublic java.util.Set<Annotation> getEntityAnnotationsL(java.lang.Object o) throws OntowrapException
getEntityAnnotationsL
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
OntowrapException
public java.util.Set<java.lang.String> getEntityComments(java.lang.Object o) throws OntowrapException
getEntityComments
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
o:
- the concept the comments on which are soughtOntowrapException
- when something goes wrongpublic java.util.Set<java.lang.String> getEntityAnnotations(java.lang.Object o) throws OntowrapException
getEntityAnnotations
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
o:
- the concept the annotations on which are soughtOntowrapException
- when something goes wrongpublic java.util.Set<java.lang.String> getEntityAnnotations(java.lang.Object o, java.lang.String lang) throws OntowrapException
getEntityAnnotations
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
o:
- the concept the annotations on which are soughtlang:
- the code of the language ("en", "fr", "es", etc.)OntowrapException
- when something goes wrongpublic java.lang.Object getEntity(java.net.URI u) throws OntowrapException
LoadedOntology
getEntity
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
OntowrapException
- when an exception has been caughtpublic java.net.URI getEntityURI(java.lang.Object o) throws OntowrapException
LoadedOntology
getEntityURI
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
OntowrapException
- when an exception has been caughtpublic java.util.Set<?> getClasses()
getClasses
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public java.util.Set<?> getDataProperties()
getDataProperties
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public java.util.Set<?> getEntities()
LoadedOntology
getEntities
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public java.util.Set<?> getIndividuals()
getIndividuals
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public java.util.Set<?> getObjectProperties()
getObjectProperties
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public java.util.Set<?> getProperties()
getProperties
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public boolean isClass(java.lang.Object o)
isClass
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public boolean isDataProperty(java.lang.Object o)
isDataProperty
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public boolean isEntity(java.lang.Object o)
isEntity
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public boolean isIndividual(java.lang.Object o)
isIndividual
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public boolean isObjectProperty(java.lang.Object o)
isObjectProperty
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public boolean isProperty(java.lang.Object o)
isProperty
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public int nbEntities()
nbEntities
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public int nbClasses()
nbClasses
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public int nbDataProperties()
nbDataProperties
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public int nbIndividuals()
nbIndividuals
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public int nbObjectProperties()
nbObjectProperties
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public int nbProperties()
nbProperties
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public void unload()
unload
in interface LoadedOntology<org.semanticweb.skos.SKOSDataset>
public boolean getCapabilities(int Direct, int Asserted, int Named)
getCapabilities
in interface HeavyLoadedOntology<org.semanticweb.skos.SKOSDataset>
public java.util.Set<java.lang.Object> getSubClasses(java.lang.Object c, int local, int asserted, int named)
getSubClasses
in interface HeavyLoadedOntology<org.semanticweb.skos.SKOSDataset>
public java.util.Set<java.lang.Object> getSuperClasses(java.lang.Object c, int local, int asserted, int named)
getSuperClasses
in interface HeavyLoadedOntology<org.semanticweb.skos.SKOSDataset>
public java.util.Set<java.lang.Object> getProperties(java.lang.Object c, int local, int asserted, int named)
getProperties
in interface HeavyLoadedOntology<org.semanticweb.skos.SKOSDataset>
public java.util.Set<java.lang.Object> getDataProperties(java.lang.Object c, int local, int asserted, int named)
getDataProperties
in interface HeavyLoadedOntology<org.semanticweb.skos.SKOSDataset>
public java.util.Set<java.lang.Object> getObjectProperties(java.lang.Object c, int local, int asserted, int named)
getObjectProperties
in interface HeavyLoadedOntology<org.semanticweb.skos.SKOSDataset>
public java.util.Set<java.lang.Object> getInstances(java.lang.Object c, int local, int asserted, int named)
getInstances
in interface HeavyLoadedOntology<org.semanticweb.skos.SKOSDataset>
public java.util.Set<java.lang.Object> getSubProperties(java.lang.Object p, int local, int asserted, int named)
getSubProperties
in interface HeavyLoadedOntology<org.semanticweb.skos.SKOSDataset>
public java.util.Set<java.lang.Object> getSuperProperties(java.lang.Object p, int local, int asserted, int named)
getSuperProperties
in interface HeavyLoadedOntology<org.semanticweb.skos.SKOSDataset>
public java.util.Set<java.lang.Object> getRange(java.lang.Object p, int asserted)
getRange
in interface HeavyLoadedOntology<org.semanticweb.skos.SKOSDataset>
public java.util.Set<java.lang.Object> getDomain(java.lang.Object p, int asserted)
getDomain
in interface HeavyLoadedOntology<org.semanticweb.skos.SKOSDataset>
public java.util.Set<java.lang.Object> getClasses(java.lang.Object i, int local, int asserted, int named)
getClasses
in interface HeavyLoadedOntology<org.semanticweb.skos.SKOSDataset>
(C) INRIA & friends, 2003-2020