public class OntologyModel
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ONTOLOGY_SEPARATOR |
static java.util.regex.Pattern |
ONTOLOGY_SEPARATOR_PATTERN |
Constructor and Description |
---|
OntologyModel(java.lang.String uriInLog,
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> instancesPerConcept)
Constructor for reading an existing ontology.
|
OntologyModel(java.lang.String namespace,
java.lang.String name)
Constructor for a new (empty) ontology.
|
Modifier and Type | Method and Description |
---|---|
ConceptModel |
addConcept(java.lang.String conceptShortName)
Adds a new concept with the given name to this ontology.
|
ConceptModel |
findConcept(java.lang.String conceptShortName)
Returns the concept with the given short name, or null if no such concept
exists in this ontology.
|
java.util.Collection<ConceptModel> |
getAllConcepts()
Returns a list of all concepts which are directly referenced in the log,
or which are superconcepts of any concept which is directly referenced in
the log.
|
java.util.Collection<ConceptModel> |
getAllDirectSubConcepts(ConceptModel concept)
Returns a collection of all direct subconcepts, including concepts which
are not directly referenced in the log.
|
java.util.Collection<ConceptModel> |
getAllDirectSuperConcepts(ConceptModel concept)
Returns a collection of all direct superconcepts, including concepts
which are not directly referenced in the log.
|
static java.lang.String |
getConceptPart(java.lang.String uri)
Returns the part of the URI after the "#" character.
|
java.util.Collection<ConceptModel> |
getConcepts()
Returns a list of all concepts which are directly referenced in the log.
|
java.lang.String |
getConceptURIInLog(ConceptModel c)
Returns the model reference of the given concept as it is used in the
log.
|
java.util.Collection<ConceptModel> |
getDirectSubConcepts(ConceptModel concept)
Returns a collection of the direct subconcepts which are directly
referenced in the log.
|
java.util.Collection<ConceptModel> |
getDirectSuperConcepts(ConceptModel concept)
Returns a collection of the direct superconcepts which are directly
referenced in the log.
|
java.lang.String |
getName()
Returns the full URI of the ontology.
|
static java.lang.String |
getOntologyPart(java.lang.String uri)
Returns the part of the URI before the "#" character.
|
java.lang.String |
getShortName()
Returns the name of the ontology without the full URI path.
|
java.util.Collection<ConceptModel> |
getSubConcepts(ConceptModel concept)
Returns a collection of all subconcepts of a given concept.
|
java.util.Collection<ConceptModel> |
getSuperConcepts(ConceptModel concept)
Returns a collection of all superconcepts of a given concept.
|
java.lang.String |
getUriInLog()
Returns the URI of the file in which the ontology is stored (can be a
file or an http URL for example).
|
boolean |
isChanged()
Returns true if the ontology model was changed (ie.
|
java.lang.String |
serialize() |
java.lang.String |
toString() |
public static final java.lang.String ONTOLOGY_SEPARATOR
public static final java.util.regex.Pattern ONTOLOGY_SEPARATOR_PATTERN
public OntologyModel(java.lang.String uriInLog, java.util.Map<java.lang.String,java.util.Set<java.lang.String>> instancesPerConcept) throws java.io.IOException, org.wsmo.wsml.ParserException, org.wsml.reasoner.api.inconsistency.InconsistencyException, org.wsmo.common.exception.InvalidModelException, org.wsmo.common.exception.InvalidModelException
uriInLog
- URI of ontology as it is used in a log file.instancesPerConcept
- Mapping from concept URIs in the log to a set of instance
labels.java.io.IOException
org.wsmo.wsml.ParserException
InvalidModelException
org.wsml.reasoner.api.inconsistency.InconsistencyException
InvalidModelException
org.processmining.plugins.ltlchecker.models.ontology.InvalidModelException
org.wsmo.common.exception.InvalidModelException
public OntologyModel(java.lang.String namespace, java.lang.String name) throws org.wsml.reasoner.api.inconsistency.InconsistencyException, org.wsmo.common.exception.InvalidModelException
uri
- The URI of the new ontology.name
- The name of the ontologyorg.wsml.reasoner.api.inconsistency.InconsistencyException
org.processmining.plugins.ltlchecker.models.ontology.InvalidModelException
org.wsmo.common.exception.InvalidModelException
public java.lang.String serialize()
public boolean isChanged()
public java.util.Collection<ConceptModel> getConcepts()
public java.util.Collection<ConceptModel> getAllConcepts()
public java.lang.String getName()
public java.lang.String getUriInLog()
public java.lang.String getShortName()
public java.util.Collection<ConceptModel> getSuperConcepts(ConceptModel concept)
public java.util.Collection<ConceptModel> getSubConcepts(ConceptModel concept)
public java.util.Collection<ConceptModel> getDirectSubConcepts(ConceptModel concept)
concept
- public java.util.Collection<ConceptModel> getAllDirectSubConcepts(ConceptModel concept)
concept
- public java.util.Collection<ConceptModel> getDirectSuperConcepts(ConceptModel concept)
concept
- public java.util.Collection<ConceptModel> getAllDirectSuperConcepts(ConceptModel concept)
concept
- public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String getOntologyPart(java.lang.String uri)
uri
- public static java.lang.String getConceptPart(java.lang.String uri)
uri
- public java.lang.String getConceptURIInLog(ConceptModel c)
c
- public ConceptModel findConcept(java.lang.String conceptShortName)
conceptShortName
- public ConceptModel addConcept(java.lang.String conceptShortName) throws org.wsmo.common.exception.InvalidModelException
conceptShortName
- The short name of the concept to createorg.processmining.plugins.ltlchecker.models.ontology.InvalidModelException
org.wsmo.common.exception.InvalidModelException