|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A KnowledgeBase with a number of convenience methods to handle anonymous classes.
Field Summary |
Fields inherited from interface edu.stanford.smi.protege.model.KnowledgeBase |
MAXIMUM_CARDINALITY_UNBOUNDED, UNLIMITED_MATCHES |
Method Summary | |
void |
addClassListener(ClassListener listener)
Adds a ClassListener to receive events about any class in this OWLModel. |
void |
addModelListener(ModelListener listener)
Adds a ModelListener to receive notifications when resources have been created, renamed or deleted. |
void |
addPropertyListener(PropertyListener listener)
Adds a PropertyListener to receive events about any property in this OWLModel. |
void |
addPropertyValueListener(PropertyValueListener listener)
Adds a PropertyValueListener to receive events about any property value change in this OWLModel. |
void |
addResourceListener(ResourceListener listener)
Adds a ResourceListener to receive events about any RDFResource in this OWLModel. |
RDFObject |
asRDFObject(Object object)
Gets an RDFObject for a given value. |
RDFSLiteral |
asRDFSLiteral(Object value)
Gets an RDFSLiteral for a given value. |
List |
asRDFSLiterals(Collection values)
|
boolean |
beginTransaction(String name)
Tells the system that one or more edit actions will follow which should be handled as a unit for undo. |
OWLDatatypeProperty |
createAnnotationOWLDatatypeProperty(String name)
|
OWLObjectProperty |
createAnnotationOWLObjectProperty(String name)
|
String |
createNewResourceName(String partialLocalName)
Creates a unique name from a given local name prefix. |
OWLAllDifferent |
createOWLAllDifferent()
|
OWLAllValuesFrom |
createOWLAllValuesFrom()
|
OWLAllValuesFrom |
createOWLAllValuesFrom(RDFProperty property,
RDFResource filler)
|
OWLAllValuesFrom |
createOWLAllValuesFrom(RDFProperty property,
RDFSLiteral[] oneOfValues)
|
OWLCardinality |
createOWLCardinality()
|
OWLCardinality |
createOWLCardinality(RDFProperty property,
int value)
|
OWLCardinality |
createOWLCardinality(RDFProperty property,
int value,
RDFSClass qualifier)
|
OWLComplementClass |
createOWLComplementClass()
|
OWLComplementClass |
createOWLComplementClass(RDFSClass complement)
|
OWLDataRange |
createOWLDataRange()
Creates an empty owl:DataRange. |
OWLDataRange |
createOWLDataRange(RDFSLiteral[] values)
Creates a new owl:DataRange consisting of a given set of values. |
OWLDatatypeProperty |
createOWLDatatypeProperty(String name)
Creates a new OWLDatatypeProperty (with default settings, e.g. no range). |
OWLDatatypeProperty |
createOWLDatatypeProperty(String name,
OWLNamedClass metaclass)
Creates a new OWLDatatypeProperty with a given rdf:type as metaclass. |
OWLDatatypeProperty |
createOWLDatatypeProperty(String name,
RDFSDatatype datatype)
Creates a new OWLDatatypeProperty with a given RDFSDatatype as range. |
OWLDatatypeProperty |
createOWLDatatypeProperty(String name,
RDFSLiteral[] dataRangeLiterals)
|
OWLEnumeratedClass |
createOWLEnumeratedClass()
|
OWLEnumeratedClass |
createOWLEnumeratedClass(Collection instances)
|
OWLHasValue |
createOWLHasValue()
|
OWLHasValue |
createOWLHasValue(RDFProperty property,
Object value)
Creates a new OWLHasValue for a given Slot. |
OWLIntersectionClass |
createOWLIntersectionClass()
|
OWLIntersectionClass |
createOWLIntersectionClass(Collection clses)
|
OWLMaxCardinality |
createOWLMaxCardinality()
|
OWLMaxCardinality |
createOWLMaxCardinality(RDFProperty property,
int value)
|
OWLMaxCardinality |
createOWLMaxCardinality(RDFProperty property,
int value,
RDFSClass qualifier)
|
OWLMinCardinality |
createOWLMinCardinality()
|
OWLMinCardinality |
createOWLMinCardinality(RDFProperty property,
int value)
|
OWLMinCardinality |
createOWLMinCardinality(RDFProperty property,
int value,
RDFSClass qualifier)
|
OWLNamedClass |
createOWLNamedClass(String name)
|
OWLNamedClass |
createOWLNamedClass(String name,
boolean loadDefaults)
|
OWLNamedClass |
createOWLNamedClass(String name,
OWLNamedClass metaclass)
Creates a new named OWL class with a given metaclass, which must be a subclass of owl:Class. |
OWLNamedClass |
createOWLNamedSubclass(String name,
OWLNamedClass superclass)
|
OWLObjectProperty |
createOWLObjectProperty(String name)
Creates a new OWLObjectProperty. |
OWLObjectProperty |
createOWLObjectProperty(String name,
Collection allowedClasses)
|
OWLObjectProperty |
createOWLObjectProperty(String name,
OWLNamedClass metaclass)
|
OWLOntology |
createOWLOntology(String prefix)
Creates a new OWLOntology for a given prefix. |
OWLOntology |
createOWLOntology(String name,
String uri)
Deprecated. use the other createOWLOntology method instead |
OWLSomeValuesFrom |
createOWLSomeValuesFrom()
|
OWLSomeValuesFrom |
createOWLSomeValuesFrom(RDFProperty property,
RDFResource filler)
|
OWLSomeValuesFrom |
createOWLSomeValuesFrom(RDFProperty property,
RDFSLiteral[] oneOfValues)
|
OWLUnionClass |
createOWLUnionClass()
|
OWLUnionClass |
createOWLUnionClass(Collection operandClasses)
|
RDFExternalResource |
createRDFExternalResource(String uri)
Deprecated. use createRDFUntypedResource instead |
RDFList |
createRDFList()
Creates a new empty rdf:List |
RDFList |
createRDFList(Iterator values)
Creates a new rdf:List. |
RDFProperty |
createRDFProperty(String name)
|
RDFSClass |
createRDFSClassFromExpression(String parsableExpression)
Gets or creates an RDFSClass based on a parsable expression. |
RDFSDatatype |
createRDFSDatatype(String name)
|
RDFSLiteral |
createRDFSLiteral(Object value)
Creates a new RDFSLiteral with a default datatype derived from the value. |
RDFSLiteral |
createRDFSLiteral(String lexicalValue,
RDFSDatatype datatype)
Creates a new RDFSLiteral with a given datatype. |
RDFSLiteral |
createRDFSLiteral(String value,
String language)
Creates a new string-typed literal with a given language. |
Object |
createRDFSLiteralOrString(String value,
String language)
Creates a new string-typed literal with a given language. |
RDFSNamedClass |
createRDFSNamedClass(String name)
|
RDFSNamedClass |
createRDFSNamedClass(String name,
boolean loadDefaults)
|
RDFSNamedClass |
createRDFSNamedClass(String name,
Collection parents,
RDFSClass rdfType)
Creates an RDFSNamedClass (or perhaps an OWLNamedClass) with given name, superclasses and rdf:type. |
RDFSNamedClass |
createRDFSNamedSubclass(String name,
RDFSNamedClass superclass)
Creates a new named OWL class which has exactly a given superclass. |
RDFUntypedResource |
createRDFUntypedResource(String uri)
Creates an untyped rdf:Resource for a given URI. |
RDFSNamedClass |
createSubclass(String name,
Collection superclasses)
Creates a subclass of a number of superclasses. |
RDFSNamedClass |
createSubclass(String name,
RDFSNamedClass superclass)
Creates a subclass of a superclass. |
RDFProperty |
createSubproperty(String name,
RDFProperty superproperty)
Creates a new property as a subproperty of an existing property. |
Triple |
createTriple(RDFResource subject,
RDFProperty predicate,
Object object)
Creates a new Triple. |
boolean |
endTransaction()
Ends the recently opened transaction and commits the state. |
boolean |
endTransaction(boolean doCommit)
|
QueryResults |
executeSPARQLQuery(String partialQueryText)
Executes a SPARQL query on this OWLModel. |
Set |
getAllImports()
Gets all (transitive) imports in this OWLModel. |
edu.stanford.smi.protege.model.Cls |
getAnonymousRootCls()
Deprecated. internal Protege detail |
Collection |
getChangedInferredClasses()
Gets all named classes where the classification status is OWLNames.CLASSIFICATION_STATUS_CONSISTENT_AND_CHANGED, i.e. all classes that were identified to move by the most recent invokation of a classifier. |
RDFSNamedClass |
getCommonSuperclass(Collection classes)
Gets the most specific common superclass of a given collection of named classes. |
String |
getDefaultLanguage()
Gets the default language specified by the user through an annotation property at owl:Ontology. |
OWLOntology |
getDefaultOWLOntology()
|
boolean |
getDispatchEventsEnabled()
|
Collection |
getDomainlessProperties()
Gets all properties that have owl:Thing as their domain. |
Set |
getFloatDatatypes()
Gets all float XML Schema datatypes, including xsd:float etc. |
boolean |
getGenerateEventsEnabled()
|
Collection |
getInconsistentClasses()
Gets all classes which have been marked as inconsistent. |
Set |
getIntegerDatatypes()
Gets all integer XML Schema datatypes, including xsd:int etc. |
com.hp.hpl.jena.rdf.model.Model |
getJenaModel()
Gets a (read-only) Jena Model serving as a live view upon the Protege TripleStores. |
String |
getLocalNameForResourceName(String frameName)
|
String |
getLocalNameForURI(String uri)
Gets the local part of an URI, e.g. for http://www.aldi.de/ontologies#Hans
this will return the String Hans . |
Collection |
getMatchingResources(RDFProperty property,
String matchString,
int maxMatches)
Gets all RDFResources that have a matching value for a given property. |
String |
getNamespaceForResourceName(String resourceName)
|
String |
getNamespaceForURI(String uri)
Gets the namespace part of a given URI. |
NamespaceManager |
getNamespaceManager()
Gets the NamespaceManager used by this knowledge base. |
String |
getNextAnonymousResourceName()
Gets the next name that can be used to create an "anonymous" instance. |
RDFSNamedClass |
getOWLAllDifferentClass()
|
Collection |
getOWLAllDifferents()
Gets a collection of all OWLAllDifferents in the knowlegde base. |
Collection |
getOWLAnnotationProperties()
Gets all annotation properties. |
RDFSNamedClass |
getOWLAnnotationPropertyClass()
|
OWLClassDisplay |
getOWLClassDisplay()
Gets the currently used renderer for classes into display strings. |
OWLClassParser |
getOWLClassParser()
Gets the OWLClassParser for the current class expression syntax. |
RDFSNamedClass |
getOWLDataRangeClass()
Gets the class owl:DataRange, which is used to represent enumerations of datatype values. |
OWLDatatypeProperty |
getOWLDatatypeProperty(String name)
|
OWLNamedClass |
getOWLDatatypePropertyClass()
Gets the standard metaclass of all datatype slots/properties. |
RDFSNamedClass |
getOWLDeprecatedClassClass()
|
RDFProperty |
getOWLDifferentFromProperty()
|
RDFProperty |
getOWLDisjointWithProperty()
|
RDFProperty |
getOWLEquivalentClassProperty()
|
RDFProperty |
getOWLEquivalentPropertyProperty()
|
OWLFrameStore |
getOWLFrameStore()
Provides low level access to some internal Protege detail - normally not needed. |
RDFSNamedClass |
getOWLFunctionalPropertyClass()
|
OWLIndividual |
getOWLIndividual(String name)
|
Collection |
getOWLIndividuals()
Gets those Instances in the ontology that are instances of a OWLNamedClass. |
Collection |
getOWLIndividuals(boolean onlyVisibleClasses)
Gets those Instances in the ontology that are instances of a OWLNamedClass. |
RDFProperty |
getOWLIntersectionOfProperty()
|
RDFSNamedClass |
getOWLInverseFunctionalPropertyClass()
|
RDFProperty |
getOWLInverseOfProperty()
|
OWLJavaFactory |
getOWLJavaFactory()
Gets the OWLJavaFactory that is used to create the Java objects for ontology resources. |
OWLNamedClass |
getOWLNamedClass(String name)
A convenience method which includes the typecast after getCls() .
|
OWLNamedClass |
getOWLNamedClassClass()
Gets the standard metaclass of all named classes. |
OWLNamedClass |
getOWLNothing()
Gets the system class owl:Nothing , which represents the empty set
for reasoners. |
OWLObjectProperty |
getOWLObjectProperty(String name)
|
OWLNamedClass |
getOWLObjectPropertyClass()
Gets the standard metaclass of all object slots/properties. |
RDFProperty |
getOWLOneOfProperty()
Gets the owl:oneOf property. |
Collection |
getOWLOntologies()
Gets all OWLOntologies in the current model. |
OWLOntology |
getOWLOntologyByURI(String uri)
Gets the OWLOntology with a given URI. |
OWLNamedClass |
getOWLOntologyClass()
|
Collection |
getOWLOntologyProperties()
Gets the owl:OntologyProperties defined in OWL. |
OWLProject |
getOWLProject()
Gets the associated OWLProject, which can be used to store project-specific settings. |
OWLProperty |
getOWLProperty(String name)
A convenience method including typecast. |
RDFSNamedClass[] |
getOWLRestrictionMetaclasses()
Gets the metaclasses of the available OWLRestriction kinds. |
Collection |
getOWLRestrictionsOnProperty(RDFProperty property)
Gets a Collection of all Restrictions that are defined on a given property. |
RDFProperty |
getOWLSameAsProperty()
|
Collection |
getOWLSystemResources()
Gets a Collection of all system resources installed by the OWL Plugin. |
OWLNamedClass |
getOWLThingClass()
Gets the root class of the OWL class hierarchy (owl:Thing). |
RDFProperty |
getOWLUnionOfProperty()
|
RDFProperty |
getOWLValuesFromProperty()
Gets the owl:valuesFrom property (used for qualified cardinality restrictions. |
edu.stanford.smi.protege.model.ValueType |
getOWLValueType(String uri)
Gets the Protege ValueType that represents a given URI string. |
RDFProperty |
getOWLVersionInfoProperty()
|
String |
getPrefixForResourceName(String resourceName)
|
PropertyValueValidator |
getPropertyValueValidator()
Gets the currently used PropertyValueValidator. |
RDFProperty |
getProtegeAllowedParentProperty()
Gets the property protege:allowedParent (if it exists) |
RDFProperty |
getProtegeClassificationStatusProperty()
Gets the property that is used internally to store the classification status of a class. |
RDFProperty |
getProtegeInferredSubclassesProperty()
|
RDFProperty |
getProtegeInferredSuperclassesProperty()
|
OWLDatatypeProperty |
getProtegeReadOnlyProperty()
|
RDFProperty |
getProtegeSubclassesDisjointProperty()
|
RDFExternalResource |
getRDFExternalResource(String uri)
Deprecated. use getRDFUntypedResource instead |
RDFSClass |
getRDFExternalResourceClass()
Deprecated. use getRDFUntypedResourcesClass |
RDFProperty |
getRDFFirstProperty()
Gets the rdf:first property. |
RDFIndividual |
getRDFIndividual(String name)
|
Collection |
getRDFIndividuals()
Gets those Instances in the ontology that are instances of an RDFSNamedClass. |
Collection |
getRDFIndividuals(boolean onlyVisibleClasses)
Gets those Instances in the ontology that are instances of an RDFSNamedClass. |
RDFSNamedClass |
getRDFListClass()
Gets the rdf:List class. |
RDFList |
getRDFNil()
Gets the placeholder for empty rdf:Lists. |
Collection |
getRDFProperties()
Gets a collection of all RDFProperties (or subclasses thereof). |
RDFProperty |
getRDFProperty(String name)
A convenience method to access a slot as RDFProperty. |
RDFSNamedClass |
getRDFPropertyClass()
Gets the rdf:Property metaclass. |
RDFResource |
getRDFResource(String name)
Gets an RDFResource by its name. |
RDFResource |
getRDFResourceAs(String name,
Class javaInterface)
Combines the calls getRDFResource(name).as(javaInterface) .
|
RDFResource |
getRDFResourceByBrowserText(String text)
Gets the first resource that has a given browser text. |
RDFResource |
getRDFResourceByNameOrBrowserText(String text)
Gets the first instance that has a given name or browser text. |
int |
getRDFResourceCount()
Gets the number of all RDFResources in this model. |
Collection |
getRDFResources()
Gets a list of all RDFResources in this model. |
Collection |
getRDFResourcesWithPropertyValue(RDFProperty property,
Object value)
Gets all RDFResources that have a given value for a given property. |
RDFProperty |
getRDFRestProperty()
Gets the rdf:rest property, which is used to describe the rest of an rdf:List. |
int |
getRDFSClassCount()
Gets the number of rdfs:Classes (or owl:Classes) in this model, including anonymous classes and system classes. |
Collection |
getRDFSClasses()
Gets all rdfs:Classes (or owl:Classes) in this model, including anonymous classes and system classes. |
OWLDatatypeProperty |
getRDFSCommentProperty()
|
RDFSDatatype |
getRDFSDatatypeByName(String name)
Gets an XML Schema Datatype using the prefix notation (e.g. |
RDFSDatatype |
getRDFSDatatypeByURI(String uri)
Gets an XML Schema Datatype by its URI (e.g. |
RDFSDatatypeFactory |
getRDFSDatatypeFactory()
|
RDFSDatatype |
getRDFSDatatypeOfValue(Object valueOrRDFSLiteral)
Gets the RDFSDatatype of a given primitive value, which can be either a standard value (e.g. |
Collection |
getRDFSDatatypes()
Gets a Collection of the (named) RDF/XML Schema datatypes. |
RDFProperty |
getRDFSDomainProperty()
Gets the rdfs:domain property. |
RDFProperty |
getRDFSIsDefinedByProperty()
|
RDFProperty |
getRDFSLabelProperty()
|
RDFSNamedClass |
getRDFSNamedClass(String name)
|
RDFSNamedClass |
getRDFSNamedClassClass()
Gets the rdfs:Class metaclass |
RDFProperty |
getRDFSRangeProperty()
Gets the rdfs:range property. |
RDFProperty |
getRDFSSubClassOfProperty()
|
RDFProperty |
getRDFSSubPropertyOfProperty()
Gets the property rdfs:subPropertyOf |
RDFProperty |
getRDFTypeProperty()
Gets the rdf:type property. |
RDFUntypedResource |
getRDFUntypedResource(String uri,
boolean createOnDemand)
Gets an RDFUntypedResource for a given string. |
RDFSNamedClass |
getRDFUntypedResourcesClass()
Gets the internal type of all untyped resources. |
RDFSDatatype |
getRDFXMLLiteralType()
Gets the resource representing the datatype rdf:XMLLiteral. |
RepositoryManager |
getRepositoryManager()
|
String |
getResourceNameForURI(String uri)
Gets the name of a Frame by converting a URI. |
Collection |
getResourceNameMatches(String nameExpression,
int maxMatches)
Gets all RDFResources that have a matching name (possibly using wildcards). |
Collection |
getResourcesWithPrefix(String prefix)
Gets all resource in this that have a given prefix. |
Collection |
getSearchSynonymProperties()
Gets the slots that are used for matching when the user searches for a frame in the search fields. |
RDFProperty[] |
getSystemAnnotationProperties()
Gets the pre-defined system annotation slots such as rdfs:comment. |
TaskManager |
getTaskManager()
Gets the TaskManager
that can be used for executing tasks
that take a long time. |
String |
getTodoAnnotationPrefix()
Gets the prefix used to distinguish "to-do" list items from other values of the to-do list property. |
OWLDatatypeProperty |
getTodoAnnotationProperty()
Gets the (annotation) slot that is used to represent "to-do" list items in this knowledge base. |
TripleStoreModel |
getTripleStoreModel()
|
String |
getURIForResourceName(String resourceName)
|
URIResolver |
getURIResolver()
Deprecated. Replaced by RepositoryManager |
String[] |
getUsedLanguages()
Gets the list of language prefixes defined by the user in the owl:Ontology. |
Collection |
getUserDefinedOWLDatatypeProperties()
Gets a Collection of all user-defined OWLDatatypeProperties in this knowledge base. |
Collection |
getUserDefinedOWLNamedClasses()
Gets a Collection of all user-defined named OWL classes in this knowledge base. |
Collection |
getUserDefinedOWLObjectProperties()
Gets a Collection of all user-defined OWLObjectProperties in this knowledge base. |
Collection |
getUserDefinedOWLProperties()
Gets a Collection of all user-defined OWLProperties in this knowledge base. |
Collection |
getUserDefinedRDFIndividuals(boolean onlyVisibleClasses)
Gets all non-system individuals in this OWLModel. |
Collection |
getUserDefinedRDFProperties()
Gets all user-defined RDF properties in this OWLModel. |
Collection |
getUserDefinedRDFSNamedClasses()
Gets all user-defined RDFSClses including the OWLNamedClses. |
String |
getValueTypeURI(edu.stanford.smi.protege.model.ValueType valueType)
The inverse of getValueType . |
List |
getVisibleResources(Iterator iterator)
Gets a list of resources, only containing the visible entries of a given Iterator. |
Collection |
getVisibleUserDefinedOWLProperties()
Gets a Collection of all user-defined, visible OWLProperties in this knowledge base. |
Collection |
getVisibleUserDefinedRDFProperties()
Gets all visible, user-defined RDF properties in this knowledge base. |
RDFSDatatype |
getXSDanyURI()
Gets the default datatype for URI values. |
RDFSDatatype |
getXSDbase64Binary()
Gets the default datatype for byte[] values. |
RDFSDatatype |
getXSDboolean()
Gets the default datatype for boolean values. |
RDFSDatatype |
getXSDbyte()
Gets the default datatype for byte values. |
RDFSDatatype |
getXSDdate()
Gets the default datatype for date values. |
RDFSDatatype |
getXSDdateTime()
Gets the default datatype for timestamp values. |
RDFSDatatype |
getXSDdecimal()
Gets the default datatype for BigDecimal values. |
RDFSDatatype |
getXSDdouble()
Gets the default datatype for double values. |
RDFSDatatype |
getXSDduration()
Gets the datatype for duration values. |
RDFSDatatype |
getXSDfloat()
Gets the default datatype for float values. |
RDFSDatatype |
getXSDint()
Gets the default datatype for integer values. |
RDFSDatatype |
getXSDinteger()
Gets the default datatype for BigInteger values. |
RDFSDatatype |
getXSDlong()
Gets the default datatype for long values. |
RDFSDatatype |
getXSDshort()
Gets the default datatype for short values. |
RDFSDatatype |
getXSDstring()
Gets the default datatype for string values. |
RDFSDatatype |
getXSDtime()
Gets the default datatype for time values. |
boolean |
isAnonymousResource(RDFResource resource)
Deprecated. |
boolean |
isAnonymousResourceName(String name)
|
boolean |
isOWLSystemFrame(edu.stanford.smi.protege.model.Frame frame)
Deprecated. |
boolean |
isProtegeMetaOntologyImported()
|
boolean |
isValidPropertyValue(RDFResource subject,
RDFProperty predicate,
Object value)
Checks if a certain object would be a valid value for a given subject/property pair. |
boolean |
isValidResourceName(String name,
RDFResource resource)
Checks whether a given String would be a valid name for a given resource. |
Iterator |
listOWLAnonymousClasses()
Gets an Iterator of all OWLAnonymousClasses in the ontology. |
Iterator |
listOWLNamedClasses()
Gets an Iterator on all OWLNamedClasses in the ontology, including system classes. |
Iterator |
listRDFProperties()
Gets an Iterator on all RDFProperties in the model, including system properties. |
Iterator |
listRDFSNamedClasses()
Gets an Iterator on all RDFSNamedClasses in the ontology, including system classes. |
Iterator |
listReferences(Object object,
int maxResults)
Finds all references to a given object, i.e. all triples that have the given object as their object. |
Iterator |
listSubjects(RDFProperty property)
The the subjects of all triples where a given property has any value. |
void |
removeClassListener(ClassListener listener)
Removes a ClassListener that was previously added. |
void |
removeModelListener(ModelListener listener)
Removes a ModelListener that was previously added. |
void |
removePropertyListener(PropertyListener listener)
Removes a PropertyListener that was previously added. |
void |
removePropertyValueListener(PropertyValueListener listener)
Removes a PropertyValueListener previously added. |
void |
removeResourceListener(ResourceListener listener)
Removes a ResourceListener that was previously added. |
boolean |
setDispatchEventsEnabled(boolean enabled)
|
boolean |
setGenerateEventsEnabled(boolean enabled)
|
void |
setOWLClassDisplay(OWLClassDisplay display)
Sets the OWLClassDisplay to change the default display of classes. |
void |
setOWLJavaFactory(OWLJavaFactory factory)
Sets the OWLJavaFactory for this OWLModel. |
void |
setOWLProject(OWLProject owlProject)
Sets the associated OWLProject. |
void |
setPropertyValueValidator(PropertyValueValidator validator)
Sets the validator that shall be used in future calls of the validation methods. |
void |
setSearchSynonymProperties(Collection properties)
|
void |
setTaskManager(TaskManager taskManager)
Sets the TaskManager. |
void |
setURIResolver(URIResolver uriResolver)
Sets the URIResolver which is used in future calls of getURIResolver() . |
Methods inherited from interface edu.stanford.smi.protege.model.KnowledgeBase |
addJavaLoadPackage, addTransactionListener, changeFrameName, createInstance, createUniqueFrameName, flushCache, getBuildString, getClientInformation, getClsesWithMatchingBrowserText, getEventsEnabled, getKnowledgeBaseFactory, getReifedRelationFromSlot, getReifedRelationToSlot, getReifiedRelationCls, getSimpleInstance, hasChanged, isClosed, moveDirectOwnSlotValue, moveDirectType, removeTransactionListener, setClientInformation, setEventsEnabled, setModificationRecordUpdatingEnabled |
Methods inherited from interface edu.stanford.smi.protege.util.Disposable |
dispose |
Methods inherited from interface edu.stanford.smi.protegex.owl.testing.OWLTestManager |
addOWLTest, getOWLTests, isAutoRepairEnabled, isOWLTestGroupEnabled, removeOWLTest, setAutoRepairEnabled, setOWLTestGroupEnabled |
Method Detail |
public void addClassListener(ClassListener listener)
listener
- the ClassListener to add (currently must be a ClassAdapter)removeClassListener(edu.stanford.smi.protegex.owl.model.event.ClassListener)
public void addModelListener(ModelListener listener)
listener
- the ModelListener to add (currently must be a ModelAdapter)removeModelListener(edu.stanford.smi.protegex.owl.model.event.ModelListener)
public void addPropertyListener(PropertyListener listener)
listener
- the PropertyListener to add (currently must be a PropertyAdapter)removePropertyListener(edu.stanford.smi.protegex.owl.model.event.PropertyListener)
public void addPropertyValueListener(PropertyValueListener listener)
listener
- the PropertyValueListener to addremovePropertyValueListener(edu.stanford.smi.protegex.owl.model.event.PropertyValueListener)
public RDFSLiteral asRDFSLiteral(Object value)
value
- a primitive value or an RDFSLiteral
public RDFObject asRDFObject(Object object)
RDFObject
for a given value. If the value is already an RDFObject
then the method will simply return it. If the value is already an RDFSLiteral,
then the method will return it. If the value is a String, Float, Integer or Boolean, then
the method will wrap it up into a corresponding RDFSLiteral which will be returned as an
RDFObject. If the object is an RDFResourece then the method will return it. If the object
is null
the the method will return null
.
object
- the object to convert
public List asRDFSLiterals(Collection values)
public void addResourceListener(ResourceListener listener)
listener
- the ResourceListener to add (currently must be ResourceAdapter)removeResourceListener(edu.stanford.smi.protegex.owl.model.event.ResourceListener)
public boolean beginTransaction(String name)
beginTransaction() - endTransaction()
block.
beginTransaction
in interface edu.stanford.smi.protege.model.KnowledgeBase
name
- the human-readable name of the following transaction
endTransaction()
public OWLDatatypeProperty createAnnotationOWLDatatypeProperty(String name)
public OWLObjectProperty createAnnotationOWLObjectProperty(String name)
public String createNewResourceName(String partialLocalName)
partialLocalName
- the partial name
public OWLAllDifferent createOWLAllDifferent()
public OWLAllValuesFrom createOWLAllValuesFrom()
public OWLAllValuesFrom createOWLAllValuesFrom(RDFProperty property, RDFResource filler)
public OWLAllValuesFrom createOWLAllValuesFrom(RDFProperty property, RDFSLiteral[] oneOfValues)
public OWLCardinality createOWLCardinality()
public OWLCardinality createOWLCardinality(RDFProperty property, int value)
public OWLCardinality createOWLCardinality(RDFProperty property, int value, RDFSClass qualifier)
public OWLComplementClass createOWLComplementClass()
public OWLComplementClass createOWLComplementClass(RDFSClass complement)
public OWLDataRange createOWLDataRange()
public OWLDataRange createOWLDataRange(RDFSLiteral[] values)
values
- the values in the owl:oneOf list in the owl:DataRange
public OWLDatatypeProperty createOWLDatatypeProperty(String name)
name
- the name of the new property
public OWLDatatypeProperty createOWLDatatypeProperty(String name, OWLNamedClass metaclass)
name
- the name of the new propertymetaclass
- the rdf:type of the property
public OWLDatatypeProperty createOWLDatatypeProperty(String name, RDFSDatatype datatype)
name
- the name of the new propertydatatype
- the (initial) range (e.g. getXSDint()
public OWLDatatypeProperty createOWLDatatypeProperty(String name, RDFSLiteral[] dataRangeLiterals)
public OWLEnumeratedClass createOWLEnumeratedClass()
public OWLEnumeratedClass createOWLEnumeratedClass(Collection instances)
public OWLHasValue createOWLHasValue()
public OWLHasValue createOWLHasValue(RDFProperty property, Object value)
property
- the restricted Slotvalue
- an Instance, Boolean, Integer, Double, or String
public OWLIntersectionClass createOWLIntersectionClass()
public OWLIntersectionClass createOWLIntersectionClass(Collection clses)
public OWLMaxCardinality createOWLMaxCardinality()
public OWLMaxCardinality createOWLMaxCardinality(RDFProperty property, int value)
public OWLMaxCardinality createOWLMaxCardinality(RDFProperty property, int value, RDFSClass qualifier)
public OWLMinCardinality createOWLMinCardinality()
public OWLMinCardinality createOWLMinCardinality(RDFProperty property, int value)
public OWLMinCardinality createOWLMinCardinality(RDFProperty property, int value, RDFSClass qualifier)
public OWLNamedClass createOWLNamedClass(String name)
public OWLNamedClass createOWLNamedClass(String name, boolean loadDefaults)
public OWLNamedClass createOWLNamedClass(String name, OWLNamedClass metaclass)
name
- the name of the new classmetaclass
- the metaclass (subclass of owl:Class)
public OWLNamedClass createOWLNamedSubclass(String name, OWLNamedClass superclass)
public OWLObjectProperty createOWLObjectProperty(String name)
name
- the name of the new property
public OWLObjectProperty createOWLObjectProperty(String name, OWLNamedClass metaclass)
public OWLObjectProperty createOWLObjectProperty(String name, Collection allowedClasses)
public OWLOntology createOWLOntology(String prefix)
prefix + ":"
.
prefix
- a valid namespace prefix
public OWLOntology createOWLOntology(String name, String uri)
createOWLOntology(String)
public OWLSomeValuesFrom createOWLSomeValuesFrom()
public OWLSomeValuesFrom createOWLSomeValuesFrom(RDFProperty property, RDFSLiteral[] oneOfValues)
public OWLSomeValuesFrom createOWLSomeValuesFrom(RDFProperty property, RDFResource filler)
public OWLUnionClass createOWLUnionClass()
public OWLUnionClass createOWLUnionClass(Collection operandClasses)
public RDFExternalResource createRDFExternalResource(String uri)
public RDFList createRDFList()
public RDFList createRDFList(Iterator values)
values
- an Iterator on the initial values of this list.
public RDFSClass createRDFSClassFromExpression(String parsableExpression)
parsableExpression
- a parsable expression such as !(Person | Animal)
public RDFSDatatype createRDFSDatatype(String name)
public RDFSLiteral createRDFSLiteral(Object value)
value
- the value (not null)
public RDFSLiteral createRDFSLiteral(String lexicalValue, RDFSDatatype datatype)
lexicalValue
- the value in the literal (not null)datatype
- the RDFSDatatype of the value
public RDFSLiteral createRDFSLiteral(String value, String language)
value
- the value in the literal (not null)language
- the language tag of the value (possibly null)
public Object createRDFSLiteralOrString(String value, String language)
value
- the value in the literal (not null)language
- the language tag of the value (possibly null)
public RDFSNamedClass createRDFSNamedSubclass(String name, RDFSNamedClass superclass)
name
- the name of the new classsuperclass
- the superclass it shall have
public RDFUntypedResource createRDFUntypedResource(String uri)
uri
- the URI to create an untyped resource for
public RDFSNamedClass createSubclass(String name, RDFSNamedClass superclass)
name
- the name of the new subclass or null for a default namesuperclass
- the superclass
public RDFSNamedClass createSubclass(String name, Collection superclasses)
name
- the name of the new subclass or null for a default namesuperclasses
- a Collection of RDFSClasses
public RDFProperty createSubproperty(String name, RDFProperty superproperty)
name
- the name of the new subproperty, or null for a default namesuperproperty
- the superproperty
public RDFSNamedClass createRDFSNamedClass(String name)
public RDFSNamedClass createRDFSNamedClass(String name, boolean loadDefaults)
public RDFSNamedClass createRDFSNamedClass(String name, Collection parents, RDFSClass rdfType)
name
- the name of the new classparents
- the parentsrdfType
- the rdf:type of the new class
public RDFProperty createRDFProperty(String name)
public Triple createTriple(RDFResource subject, RDFProperty predicate, Object object)
subject
- the subject of the Triplepredicate
- the predicate of the Tripleobject
- the object of the Triple
public boolean endTransaction()
beginTransaction(java.lang.String)
public boolean endTransaction(boolean doCommit)
endTransaction
in interface edu.stanford.smi.protege.model.KnowledgeBase
public QueryResults executeSPARQLQuery(String partialQueryText) throws Exception
partialQueryText
- the query text, typically beginning with "SELECT"
Exception
- if the query string could not be handledpublic Set getAllImports()
public edu.stanford.smi.protege.model.Cls getAnonymousRootCls()
public Collection getChangedInferredClasses()
public RDFSNamedClass getCommonSuperclass(Collection classes)
classes
- the RDFSNamedClasses to get the superclass of (at least one)
public String getDefaultLanguage()
public OWLOntology getDefaultOWLOntology()
public boolean getDispatchEventsEnabled()
getDispatchEventsEnabled
in interface edu.stanford.smi.protege.model.KnowledgeBase
setDispatchEventsEnabled(boolean)
public Collection getDomainlessProperties()
public Set getFloatDatatypes()
public boolean getGenerateEventsEnabled()
getGenerateEventsEnabled
in interface edu.stanford.smi.protege.model.KnowledgeBase
setGenerateEventsEnabled(boolean)
public Set getIntegerDatatypes()
public com.hp.hpl.jena.rdf.model.Model getJenaModel()
public RDFProperty getOWLDifferentFromProperty()
public RDFProperty getOWLDisjointWithProperty()
public Collection getInconsistentClasses()
public RDFSNamedClass getOWLAllDifferentClass()
public Collection getOWLAllDifferents()
public Collection getOWLAnnotationProperties()
public RDFSNamedClass getOWLAnnotationPropertyClass()
public OWLClassParser getOWLClassParser()
public OWLClassDisplay getOWLClassDisplay()
setOWLClassDisplay(edu.stanford.smi.protegex.owl.model.classdisplay.OWLClassDisplay)
public OWLDatatypeProperty getOWLDatatypeProperty(String name)
public OWLNamedClass getOWLDatatypePropertyClass()
public RDFSNamedClass getOWLDeprecatedClassClass()
public RDFProperty getOWLEquivalentClassProperty()
public RDFProperty getOWLEquivalentPropertyProperty()
public RDFSNamedClass getOWLFunctionalPropertyClass()
public RDFSNamedClass getOWLInverseFunctionalPropertyClass()
public RDFProperty getOWLOneOfProperty()
public OWLProject getOWLProject()
public OWLNamedClass getOWLThingClass()
public RDFProperty getOWLValuesFromProperty()
public TaskManager getTaskManager()
TaskManager
that can be used for executing tasks
that take a long time.
public RDFProperty getProtegeAllowedParentProperty()
public RDFProperty getProtegeClassificationStatusProperty()
public RDFProperty getProtegeInferredSubclassesProperty()
public RDFProperty getProtegeInferredSuperclassesProperty()
public RepositoryManager getRepositoryManager()
public RDFExternalResource getRDFExternalResource(String uri)
public RDFSClass getRDFExternalResourceClass()
getRDFUntypedResourcesClass()
public RDFProperty getRDFFirstProperty()
public RDFResource getRDFResource(String name)
name
- the name of the resource
public RDFResource getRDFResourceAs(String name, Class javaInterface)
getRDFResource(name).as(javaInterface)
.
Warning: No checks are done.
name
- the name of the resource to getjavaInterface
- the target type of the result
getRDFResource(java.lang.String)
,
RDFResource.as(java.lang.Class)
public RDFResource getRDFResourceByBrowserText(String text)
text
- the browser text
public RDFResource getRDFResourceByNameOrBrowserText(String text)
text
-
public int getRDFSClassCount()
getRDFSClasses().size()
.
public Collection getRDFSClasses()
public RDFSDatatypeFactory getRDFSDatatypeFactory()
public RDFProperty getRDFSIsDefinedByProperty()
public RDFProperty getRDFSLabelProperty()
public int getRDFResourceCount()
getRDFResources().size()
, but
much more efficient than that.
public Collection getRDFResources()
public Collection getRDFResourcesWithPropertyValue(RDFProperty property, Object value)
property
- the RDFPropertyvalue
- the value (must match exactly)
public RDFSNamedClass getRDFListClass()
public RDFUntypedResource getRDFUntypedResource(String uri, boolean createOnDemand)
uri
- the URI to look upcreateOnDemand
- true to have the system create one if it doesn't exist
public RDFSNamedClass getRDFUntypedResourcesClass()
public Collection getResourceNameMatches(String nameExpression, int maxMatches)
nameExpression
- the name patternmaxMatches
- the maximum number of hits to be returnedpublic RDFSNamedClass getOWLDataRangeClass()
public RDFProperty getOWLIntersectionOfProperty()
public OWLJavaFactory getOWLJavaFactory()
setOWLJavaFactory(edu.stanford.smi.protegex.owl.model.factory.OWLJavaFactory)
public OWLNamedClass getOWLNamedClass(String name)
getCls()
.
The invoker must make sure that the name really reflects a OWLNamedClass.
name
- the name of the OWLNamedClass to get
public OWLNamedClass getOWLNamedClassClass()
public Collection getMatchingResources(RDFProperty property, String matchString, int maxMatches)
property
- the (string) property to compare tomatchString
- the match string (can include wild cards). The matching is case insensitive.maxMatches
- the maximum number of matches (-1 for all matches, which can be a lot!)
public String getNextAnonymousResourceName()
public OWLIndividual getOWLIndividual(String name)
public OWLNamedClass getOWLNothing()
owl:Nothing
, which represents the empty set
for reasoners.
public OWLObjectProperty getOWLObjectProperty(String name)
public OWLNamedClass getOWLObjectPropertyClass()
public Collection getOWLOntologies()
getDefaultOWLOntology()
public OWLOntology getOWLOntologyByURI(String uri)
uri
- the URI to look up
public OWLNamedClass getOWLOntologyClass()
public Collection getOWLOntologyProperties()
public OWLFrameStore getOWLFrameStore()
public Collection getOWLIndividuals()
getOWLIndividuals(false)
.
public Collection getOWLIndividuals(boolean onlyVisibleClasses)
onlyVisibleClasses
- true to only return instanceso of visible classes
public RDFProperty getOWLInverseOfProperty()
public OWLProperty getOWLProperty(String name)
name
- the name of the property to get
(OWLProperty) getRDFProperty(name)
public Collection getOWLSystemResources()
public edu.stanford.smi.protege.model.ValueType getOWLValueType(String uri)
uri
- the URI (e.g., "http://www.w3.org/2001/XMLSchema#float")
public OWLDatatypeProperty getProtegeReadOnlyProperty()
public RDFIndividual getRDFIndividual(String name)
public Collection getRDFIndividuals()
public Collection getRDFIndividuals(boolean onlyVisibleClasses)
onlyVisibleClasses
- true to only return instances of visible classes.
public RDFList getRDFNil()
public Collection getRDFProperties()
public RDFProperty getRDFProperty(String name)
name
- the name of the slot to get
(RDFProperty) getSlot(name)
public RDFSNamedClass getRDFPropertyClass()
public RDFSDatatype getRDFSDatatypeByName(String name)
name
- the name of the datatype to get
public RDFSDatatype getRDFSDatatypeByURI(String uri)
uri
- the URI of the datatype to get
public RDFSDatatype getRDFSDatatypeOfValue(Object valueOrRDFSLiteral)
valueOrRDFSLiteral
- the value object
public Collection getRDFSDatatypes()
public RDFSNamedClass getRDFSNamedClassClass()
public RDFSNamedClass getRDFSNamedClass(String name)
public OWLDatatypeProperty getRDFSCommentProperty()
public RDFProperty getRDFRestProperty()
public RDFSNamedClass[] getOWLRestrictionMetaclasses()
public Collection getOWLRestrictionsOnProperty(RDFProperty property)
property
- the property to get all Restrictions for
public RDFProperty getOWLSameAsProperty()
public RDFProperty getOWLUnionOfProperty()
public RDFProperty getOWLVersionInfoProperty()
public RDFProperty getRDFSDomainProperty()
public RDFProperty getRDFSRangeProperty()
public RDFProperty getRDFSSubClassOfProperty()
public RDFProperty getRDFSSubPropertyOfProperty()
public String getResourceNameForURI(String uri)
uri
- a fully qualified URI
public Collection getSearchSynonymProperties()
public RDFProperty getProtegeSubclassesDisjointProperty()
public RDFProperty getRDFTypeProperty()
public RDFProperty[] getSystemAnnotationProperties()
public String getTodoAnnotationPrefix()
public OWLDatatypeProperty getTodoAnnotationProperty()
public String[] getUsedLanguages()
public Collection getUserDefinedOWLProperties()
public Collection getUserDefinedOWLObjectProperties()
public Collection getUserDefinedOWLDatatypeProperties()
public Collection getUserDefinedOWLNamedClasses()
public Collection getUserDefinedRDFIndividuals(boolean onlyVisibleClasses)
onlyVisibleClasses
- true to only return instances of visible classes
public Collection getUserDefinedRDFProperties()
public Collection getUserDefinedRDFSNamedClasses()
public String getValueTypeURI(edu.stanford.smi.protege.model.ValueType valueType)
getValueType
.
valueType
-
public Collection getVisibleUserDefinedOWLProperties()
public Collection getVisibleUserDefinedRDFProperties()
public RDFSDatatype getRDFXMLLiteralType()
public URIResolver getURIResolver()
RepositoryManager
setURIResolver(edu.stanford.smi.protegex.owl.jena.URIResolver)
public List getVisibleResources(Iterator iterator)
iterator
- an Iterator of RDFResources
public RDFSDatatype getXSDanyURI()
public RDFSDatatype getXSDbase64Binary()
public RDFSDatatype getXSDboolean()
public RDFSDatatype getXSDbyte()
public RDFSDatatype getXSDdate()
public RDFSDatatype getXSDdateTime()
public RDFSDatatype getXSDdecimal()
public RDFSDatatype getXSDdouble()
public RDFSDatatype getXSDduration()
public RDFSDatatype getXSDfloat()
public RDFSDatatype getXSDint()
public RDFSDatatype getXSDinteger()
public RDFSDatatype getXSDlong()
public RDFSDatatype getXSDshort()
public RDFSDatatype getXSDstring()
public RDFSDatatype getXSDtime()
public boolean isAnonymousResource(RDFResource resource)
RDFResource.isAnonymous()
public boolean isAnonymousResourceName(String name)
public boolean isOWLSystemFrame(edu.stanford.smi.protege.model.Frame frame)
getOWLSystemResources
.
frame
- the Frame to check
public boolean isProtegeMetaOntologyImported()
public boolean isValidPropertyValue(RDFResource subject, RDFProperty predicate, Object value)
subject
- the subject to check the value forpredicate
- the property to check forvalue
- the potential value
public boolean isValidResourceName(String name, RDFResource resource)
name
- the potential name of the resourceresource
- the RDFResource to test
public Collection getResourcesWithPrefix(String prefix)
prefix
- the prefix to search for
public String getLocalNameForURI(String uri)
http://www.aldi.de/ontologies#Hans
this will return the String Hans
.
uri
- the fully qualified URI
public String getLocalNameForResourceName(String frameName)
public NamespaceManager getNamespaceManager()
public String getNamespaceForResourceName(String resourceName)
public String getNamespaceForURI(String uri)
http://www.aldi.de/ontologies#Hans
this will return
http://www.aldi.de/ontologies#
.
uri
- the fully qualified URI
public String getPrefixForResourceName(String resourceName)
public PropertyValueValidator getPropertyValueValidator()
setPropertyValueValidator(edu.stanford.smi.protegex.owl.model.validator.PropertyValueValidator)
public TripleStoreModel getTripleStoreModel()
public String getURIForResourceName(String resourceName)
public Iterator listOWLAnonymousClasses()
public Iterator listOWLNamedClasses()
public Iterator listRDFProperties()
public Iterator listRDFSNamedClasses()
public Iterator listReferences(Object object, int maxResults)
object
- the object to look formaxResults
- the maximum number of expected results
public Iterator listSubjects(RDFProperty property)
property
- the property to look for
public void removeClassListener(ClassListener listener)
listener
- the ClassListener to removeaddClassListener(edu.stanford.smi.protegex.owl.model.event.ClassListener)
public void removeModelListener(ModelListener listener)
listener
- the ModelListener to removeaddModelListener(edu.stanford.smi.protegex.owl.model.event.ModelListener)
public void removePropertyListener(PropertyListener listener)
listener
- the PropertyListener to removeaddPropertyListener(edu.stanford.smi.protegex.owl.model.event.PropertyListener)
public void removePropertyValueListener(PropertyValueListener listener)
listener
- the listener to removeaddPropertyValueListener(edu.stanford.smi.protegex.owl.model.event.PropertyValueListener)
public void removeResourceListener(ResourceListener listener)
listener
- the ResourceListener to removeaddResourceListener(edu.stanford.smi.protegex.owl.model.event.ResourceListener)
public boolean setDispatchEventsEnabled(boolean enabled)
setDispatchEventsEnabled
in interface edu.stanford.smi.protege.model.KnowledgeBase
getDispatchEventsEnabled()
public boolean setGenerateEventsEnabled(boolean enabled)
setGenerateEventsEnabled
in interface edu.stanford.smi.protege.model.KnowledgeBase
getGenerateEventsEnabled()
public void setOWLClassDisplay(OWLClassDisplay display)
display
- the new display (not null)public void setOWLJavaFactory(OWLJavaFactory factory)
factory
- the new OWLJavaFactoryOWLJavaFactory
,
getOWLJavaFactory()
public void setOWLProject(OWLProject owlProject)
owlProject
- the new OWLProjectgetOWLProject()
public void setPropertyValueValidator(PropertyValueValidator validator)
validator
- the new Validator (or null)isValidPropertyValue(edu.stanford.smi.protegex.owl.model.RDFResource, edu.stanford.smi.protegex.owl.model.RDFProperty, java.lang.Object)
public void setSearchSynonymProperties(Collection properties)
getSearchSynonymProperties()
public void setTaskManager(TaskManager taskManager)
taskManager
- the new TaskManager (not null)getTaskManager()
public void setURIResolver(URIResolver uriResolver)
getURIResolver()
.
uriResolver
- the new URIResolvergetURIResolver()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |