edu.stanford.smi.protegex.owl.model
Interface OWLModel

All Superinterfaces:
edu.stanford.smi.protege.util.Disposable, edu.stanford.smi.protege.model.KnowledgeBase, OWLTestManager, ProtegeKnowledgeBase
All Known Implementing Classes:
AbstractOWLModel

public interface OWLModel
extends ProtegeKnowledgeBase, OWLTestManager

A KnowledgeBase with a number of convenience methods to handle anonymous classes.

Author:
Holger Knublauch

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.protegex.owl.model.ProtegeKnowledgeBase
addClsListener, addClsListener, addDirectSuperclass, addDirectSuperslot, addDirectTemplateSlot, addDirectType, addFacetListener, addFacetListener, addFrameListener, addFrameListener, addInstance, addInstanceListener, addInstanceListener, addKnowledgeBaseListener, addOwnSlotValue, addSlotListener, addSlotListener, addTemplateFacetValue, addTemplateSlotValue, areValidOwnSlotValues, clearAllListeners, containsFrame, createCls, createCls, createCls, createCls, createFacet, createFacet, createFacet, createInstance, createInstance, createInstance, createInstance, createSimpleInstance, createSlot, createSlot, createSlot, createSlot, deleteCls, deleteFacet, deleteFrame, deleteInstance, deleteSlot, getAllowedClses, getAllowedParents, getAllowedValues, getAllowsMultipleValues, getAssociatedFacet, getAssociatedSlot, getBrowserText, getCls, getClsCount, getClses, getClsNameMatches, getCommandManager, getCurrentUsers, getDefaultClsMetaCls, getDefaultFacetMetaCls, getDefaultSlotMetaCls, getDefaultValues, getDirectBrowserSlotPattern, getDirectDomain, getDirectInstanceCount, getDirectInstances, getDirectlyOverriddenTemplateFacets, getDirectlyOverriddenTemplateSlots, getDirectOwnSlotValue, getDirectOwnSlotValues, getDirectOwnSlotValuesClosure, getDirectSubclassCount, getDirectSubclasses, getDirectSubslotCount, getDirectSubslots, getDirectSuperclassCount, getDirectSuperclasses, getDirectSuperslotCount, getDirectSuperslots, getDirectTemplateFacetValues, getDirectTemplateSlots, getDirectTemplateSlotValues, getDirectType, getDirectTypes, getDocumentation, getDomain, getFacet, getFacetCount, getFacets, getFrame, getFrame, getFrameCount, getFrameCounts, getFrameCreationTimestamp, getFrameCreator, getFrameFactory, getFrameLastModificationTimestamp, getFrameLastModifier, getFrameNameMatches, getFrameNamePrefix, getFrames, getFrameStores, getFramesWithValue, getInstance, getInstanceCount, getInstances, getInstances, getInvalidFrameNameDescription, getInvalidOwnSlotValuesText, getInvalidOwnSlotValueText, getInverseSlot, getMatchingFrames, getMatchingReferences, getMaximumCardinality, getMaximumValue, getMinimumCardinality, getMinimumValue, getName, getName, getNameSlot, getNextFrameNumber, getOverriddenTemplateFacets, getOwnSlotAllowsMultipleValues, getOwnSlotAndSubslotValues, getOwnSlotDefaultValues, getOwnSlotFacets, getOwnSlotFacetValues, getOwnSlots, getOwnSlotValue, getOwnSlotValueCount, getOwnSlotValues, getOwnSlotValueType, getProject, getReachableSimpleInstances, getReferences, getRootCls, getRootClses, getRootClsMetaCls, getRootFacetMetaCls, getRootSlotMetaCls, getRootSlots, getSimpleInstanceCount, getSlot, getSlotCount, getSlots, getSlotValueLastModificationTimestamp, getSlotValueLastModifier, getSubclasses, getSubslots, getSuperclasses, getSuperslots, getSystemFrames, getTemplateFacets, getTemplateFacetValue, getTemplateFacetValues, getTemplateSlotAllowedClses, getTemplateSlotAllowedParents, getTemplateSlotAllowedValues, getTemplateSlotAllowsMultipleValues, getTemplateSlotDefaultValues, getTemplateSlotDocumentation, getTemplateSlotMaximumCardinality, getTemplateSlotMaximumValue, getTemplateSlotMinimumCardinality, getTemplateSlotMinimumValue, getTemplateSlots, getTemplateSlotValue, getTemplateSlotValues, getTemplateSlotValueType, getUnreachableSimpleInstances, getUserName, getValueChecking, getValues, getValueType, getVersionString, hasDirectlyOverriddenTemplateFacet, hasDirectlyOverriddenTemplateSlot, hasDirectSuperclass, hasDirectSuperslot, hasDirectTemplateSlot, hasDirectType, hasInheritedTemplateSlot, hasOverriddenTemplateFacet, hasOverriddenTemplateSlot, hasOwnSlot, hasSlotValueAtSomeFrame, hasSuperclass, hasSuperslot, hasTemplateSlot, hasType, insertFrameStore, insertFrameStore, isAbstract, isAutoUpdatingFacetValues, isCallCachingEnabled, isClsMetaCls, isDefaultClsMetaCls, isDefaultFacetMetaCls, isDefaultSlotMetaCls, isFacetMetaCls, isJournalingEnabled, isLoading, isMetaCls, isSlotMetaCls, isValidFrameName, isValidOwnSlotValue, moveDirectSubclass, moveDirectSubslot, moveDirectTemplateSlot, notifyVisibilityChanged, removeClsListener, removeClsListener, removeDirectSuperclass, removeDirectSuperslot, removeDirectTemplateSlot, removeDirectType, removeFacetListener, removeFacetListener, removeFrameListener, removeFrameListener, removeFrameStore, removeInstanceListener, removeInstanceListener, removeJavaLoadPackage, removeKnowledgeBaseListener, removeOwnSlotValue, removeSlotListener, removeSlotListener, removeTemplateFacetOverrides, setAbstract, setAllowedClses, setAllowedParents, setAllowedValues, setAllowsMultipleValues, setArgumentCheckingEnabled, setAssociatedFacet, setAssociatedSlot, setAutoUpdateFacetValues, setBuildString, setCallCachingEnabled, setChanged, setChangeMonitorEnabled, setCleanDispatchEnabled, setDefaultClsMetaCls, setDefaultFacetMetaCls, setDefaultSlotMetaCls, setDefaultValues, setDirectBrowserSlot, setDirectBrowserSlotPattern, setDirectOwnSlotValues, setDirectType, setDirectTypeOfSubclasses, setDirectTypeOfSubslots, setDirectTypes, setDocumentation, setDocumentation, setFacetCheckingEnabled, setFrameFactory, setFrameName, setFrameNamePrefix, setFrameNameValidator, setGenerateDeletingFrameEventsEnabled, setInverseSlot, setJournalingEnabled, setMaximumCardinality, setMaximumValue, setMinimumCardinality, setMinimumValue, setName, setNextFrameNumber, setOwnSlotValues, setPollForEvents, setProject, setTemplateFacetValue, setTemplateFacetValues, setTemplateSlotAllowedClses, setTemplateSlotAllowedParents, setTemplateSlotAllowedValues, setTemplateSlotAllowsMultipleValues, setTemplateSlotDefaultValues, setTemplateSlotDocumentation, setTemplateSlotDocumentation, setTemplateSlotMaximumCardinality, setTemplateSlotMaximumValue, setTemplateSlotMinimumCardinality, setTemplateSlotMinimumValue, setTemplateSlotValue, setTemplateSlotValues, setTemplateSlotValueType, setUndoEnabled, setUserName, setValueChecking, setValues, setValueType, setVersionString, startJournaling, stopJournaling
 
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

addClassListener

public void addClassListener(ClassListener listener)
Adds a ClassListener to receive events about any class in this OWLModel.

Parameters:
listener - the ClassListener to add (currently must be a ClassAdapter)
See Also:
removeClassListener(edu.stanford.smi.protegex.owl.model.event.ClassListener)

addModelListener

public void addModelListener(ModelListener listener)
Adds a ModelListener to receive notifications when resources have been created, renamed or deleted.

Parameters:
listener - the ModelListener to add (currently must be a ModelAdapter)
See Also:
removeModelListener(edu.stanford.smi.protegex.owl.model.event.ModelListener)

addPropertyListener

public void addPropertyListener(PropertyListener listener)
Adds a PropertyListener to receive events about any property in this OWLModel.

Parameters:
listener - the PropertyListener to add (currently must be a PropertyAdapter)
See Also:
removePropertyListener(edu.stanford.smi.protegex.owl.model.event.PropertyListener)

addPropertyValueListener

public void addPropertyValueListener(PropertyValueListener listener)
Adds a PropertyValueListener to receive events about any property value change in this OWLModel. Note that the number of events is most likely very large and installing such a global listener may slow down the system significantly.

Parameters:
listener - the PropertyValueListener to add
See Also:
removePropertyValueListener(edu.stanford.smi.protegex.owl.model.event.PropertyValueListener)

asRDFSLiteral

public RDFSLiteral asRDFSLiteral(Object value)
Gets an RDFSLiteral for a given value. 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 into a corresponding RDFSLiteral. If the object is null, then the method retrurn null. Objects of other types are not permitted for this method. This is a convenience method to post-process those calls that return either an Object or an RDFSLiteral, if only an RDFSLiteral is desired.

Parameters:
value - a primitive value or an RDFSLiteral
Returns:
an RDFSLiteral of the same value or null if value is null

asRDFObject

public RDFObject asRDFObject(Object object)
Gets an 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.

Parameters:
object - the object to convert
Returns:
an RDFObject with the same value

asRDFSLiterals

public List asRDFSLiterals(Collection values)

addResourceListener

public void addResourceListener(ResourceListener listener)
Adds a ResourceListener to receive events about any RDFResource in this OWLModel.

Parameters:
listener - the ResourceListener to add (currently must be ResourceAdapter)
See Also:
removeResourceListener(edu.stanford.smi.protegex.owl.model.event.ResourceListener)

beginTransaction

public boolean beginTransaction(String name)
Tells the system that one or more edit actions will follow which should be handled as a unit for undo. Editing components should wrap set/add/remove calls to any resource in a beginTransaction() - endTransaction() block.

Specified by:
beginTransaction in interface edu.stanford.smi.protege.model.KnowledgeBase
Parameters:
name - the human-readable name of the following transaction
Returns:
true
See Also:
endTransaction()

createAnnotationOWLDatatypeProperty

public OWLDatatypeProperty createAnnotationOWLDatatypeProperty(String name)

createAnnotationOWLObjectProperty

public OWLObjectProperty createAnnotationOWLObjectProperty(String name)

createNewResourceName

public String createNewResourceName(String partialLocalName)
Creates a unique name from a given local name prefix. For example, if you pass in "Class", then the method will return "Class_42" or "travel:Class_42" depending on the default namespace of the currently active TripleStore. This method can be used to create new names for classes, properties etc.

Parameters:
partialLocalName - the partial name
Returns:
a unique name for a new resource

createOWLAllDifferent

public OWLAllDifferent createOWLAllDifferent()

createOWLAllValuesFrom

public OWLAllValuesFrom createOWLAllValuesFrom()

createOWLAllValuesFrom

public OWLAllValuesFrom createOWLAllValuesFrom(RDFProperty property,
                                               RDFResource filler)

createOWLAllValuesFrom

public OWLAllValuesFrom createOWLAllValuesFrom(RDFProperty property,
                                               RDFSLiteral[] oneOfValues)

createOWLCardinality

public OWLCardinality createOWLCardinality()

createOWLCardinality

public OWLCardinality createOWLCardinality(RDFProperty property,
                                           int value)

createOWLCardinality

public OWLCardinality createOWLCardinality(RDFProperty property,
                                           int value,
                                           RDFSClass qualifier)

createOWLComplementClass

public OWLComplementClass createOWLComplementClass()

createOWLComplementClass

public OWLComplementClass createOWLComplementClass(RDFSClass complement)

createOWLDataRange

public OWLDataRange createOWLDataRange()
Creates an empty owl:DataRange.

Returns:
a new empty owl:DataRange

createOWLDataRange

public OWLDataRange createOWLDataRange(RDFSLiteral[] values)
Creates a new owl:DataRange consisting of a given set of values. This will create an rdf:List to store the values on the fly

Parameters:
values - the values in the owl:oneOf list in the owl:DataRange
Returns:
a new OWLDataRange

createOWLDatatypeProperty

public OWLDatatypeProperty createOWLDatatypeProperty(String name)
Creates a new OWLDatatypeProperty (with default settings, e.g. no range).

Parameters:
name - the name of the new property
Returns:
a new OWLDatatypeProperty

createOWLDatatypeProperty

public OWLDatatypeProperty createOWLDatatypeProperty(String name,
                                                     OWLNamedClass metaclass)
Creates a new OWLDatatypeProperty with a given rdf:type as metaclass.

Parameters:
name - the name of the new property
metaclass - the rdf:type of the property
Returns:
a new OWLDatatypeProperty, instance of the metaclass

createOWLDatatypeProperty

public OWLDatatypeProperty createOWLDatatypeProperty(String name,
                                                     RDFSDatatype datatype)
Creates a new OWLDatatypeProperty with a given RDFSDatatype as range.

Parameters:
name - the name of the new property
datatype - the (initial) range (e.g. getXSDint()
Returns:
a new OWLDatatypeProperty

createOWLDatatypeProperty

public OWLDatatypeProperty createOWLDatatypeProperty(String name,
                                                     RDFSLiteral[] dataRangeLiterals)

createOWLEnumeratedClass

public OWLEnumeratedClass createOWLEnumeratedClass()

createOWLEnumeratedClass

public OWLEnumeratedClass createOWLEnumeratedClass(Collection instances)

createOWLHasValue

public OWLHasValue createOWLHasValue()

createOWLHasValue

public OWLHasValue createOWLHasValue(RDFProperty property,
                                     Object value)
Creates a new OWLHasValue for a given Slot.

Parameters:
property - the restricted Slot
value - an Instance, Boolean, Integer, Double, or String
Returns:
a new OWLHasValue

createOWLIntersectionClass

public OWLIntersectionClass createOWLIntersectionClass()

createOWLIntersectionClass

public OWLIntersectionClass createOWLIntersectionClass(Collection clses)

createOWLMaxCardinality

public OWLMaxCardinality createOWLMaxCardinality()

createOWLMaxCardinality

public OWLMaxCardinality createOWLMaxCardinality(RDFProperty property,
                                                 int value)

createOWLMaxCardinality

public OWLMaxCardinality createOWLMaxCardinality(RDFProperty property,
                                                 int value,
                                                 RDFSClass qualifier)

createOWLMinCardinality

public OWLMinCardinality createOWLMinCardinality()

createOWLMinCardinality

public OWLMinCardinality createOWLMinCardinality(RDFProperty property,
                                                 int value)

createOWLMinCardinality

public OWLMinCardinality createOWLMinCardinality(RDFProperty property,
                                                 int value,
                                                 RDFSClass qualifier)

createOWLNamedClass

public OWLNamedClass createOWLNamedClass(String name)

createOWLNamedClass

public OWLNamedClass createOWLNamedClass(String name,
                                         boolean loadDefaults)

createOWLNamedClass

public OWLNamedClass createOWLNamedClass(String name,
                                         OWLNamedClass metaclass)
Creates a new named OWL class with a given metaclass, which must be a subclass of owl:Class.

Parameters:
name - the name of the new class
metaclass - the metaclass (subclass of owl:Class)
Returns:
the new OWLNamedClass

createOWLNamedSubclass

public OWLNamedClass createOWLNamedSubclass(String name,
                                            OWLNamedClass superclass)

createOWLObjectProperty

public OWLObjectProperty createOWLObjectProperty(String name)
Creates a new OWLObjectProperty.

Parameters:
name - the name of the new property
Returns:
a new owl:ObjectProperty with the given name

createOWLObjectProperty

public OWLObjectProperty createOWLObjectProperty(String name,
                                                 OWLNamedClass metaclass)

createOWLObjectProperty

public OWLObjectProperty createOWLObjectProperty(String name,
                                                 Collection allowedClasses)

createOWLOntology

public OWLOntology createOWLOntology(String prefix)
Creates a new OWLOntology for a given prefix. Note that the prefix of the new ontology must have been defined before. The new OWLOntology will get the internal name prefix + ":".

Parameters:
prefix - a valid namespace prefix
Returns:
the new OWLOntology

createOWLOntology

public OWLOntology createOWLOntology(String name,
                                     String uri)
Deprecated. use the other createOWLOntology method instead

See Also:
createOWLOntology(String)

createOWLSomeValuesFrom

public OWLSomeValuesFrom createOWLSomeValuesFrom()

createOWLSomeValuesFrom

public OWLSomeValuesFrom createOWLSomeValuesFrom(RDFProperty property,
                                                 RDFSLiteral[] oneOfValues)

createOWLSomeValuesFrom

public OWLSomeValuesFrom createOWLSomeValuesFrom(RDFProperty property,
                                                 RDFResource filler)

createOWLUnionClass

public OWLUnionClass createOWLUnionClass()

createOWLUnionClass

public OWLUnionClass createOWLUnionClass(Collection operandClasses)

createRDFExternalResource

public RDFExternalResource createRDFExternalResource(String uri)
Deprecated. use createRDFUntypedResource instead


createRDFList

public RDFList createRDFList()
Creates a new empty rdf:List

Returns:
a new RDFList

createRDFList

public RDFList createRDFList(Iterator values)
Creates a new rdf:List.

Parameters:
values - an Iterator on the initial values of this list.
Returns:
a new RDFList.

createRDFSClassFromExpression

public RDFSClass createRDFSClassFromExpression(String parsableExpression)
Gets or creates an RDFSClass based on a parsable expression. If the expression is parsed into an anonymous class, then the anonymous class will be created. If the expression is just the name of a named class, then the named class will be returned. Note that the expression must be parsable or an null will be returned.

Parameters:
parsableExpression - a parsable expression such as !(Person | Animal)
Returns:
an RDFSClass

createRDFSDatatype

public RDFSDatatype createRDFSDatatype(String name)

createRDFSLiteral

public RDFSLiteral createRDFSLiteral(Object value)
Creates a new RDFSLiteral with a default datatype derived from the value.

Parameters:
value - the value (not null)
Returns:
a new RDFSLiteral

createRDFSLiteral

public RDFSLiteral createRDFSLiteral(String lexicalValue,
                                     RDFSDatatype datatype)
Creates a new RDFSLiteral with a given datatype.

Parameters:
lexicalValue - the value in the literal (not null)
datatype - the RDFSDatatype of the value
Returns:
a new RDFSLiteral

createRDFSLiteral

public RDFSLiteral createRDFSLiteral(String value,
                                     String language)
Creates a new string-typed literal with a given language.

Parameters:
value - the value in the literal (not null)
language - the language tag of the value (possibly null)
Returns:
a new RDFSLiteral

createRDFSLiteralOrString

public Object createRDFSLiteralOrString(String value,
                                        String language)
Creates a new string-typed literal with a given language. If the language is null or empty, then this returns the value as a string only.

Parameters:
value - the value in the literal (not null)
language - the language tag of the value (possibly null)
Returns:
a new RDFSLiteral

createRDFSNamedSubclass

public RDFSNamedClass createRDFSNamedSubclass(String name,
                                              RDFSNamedClass superclass)
Creates a new named OWL class which has exactly a given superclass. This is a convenience method which removes the need to remove the root class.

Parameters:
name - the name of the new class
superclass - the superclass it shall have
Returns:
the new OWLNamedClass

createRDFUntypedResource

public RDFUntypedResource createRDFUntypedResource(String uri)
Creates an untyped rdf:Resource for a given URI. The caller must make sure that no resource with the same URI already exists.

Parameters:
uri - the URI to create an untyped resource for
Returns:
the new RDFUntypedResource

createSubclass

public RDFSNamedClass createSubclass(String name,
                                     RDFSNamedClass superclass)
Creates a subclass of a superclass. The new class will have the same rdf:type as its parent.

Parameters:
name - the name of the new subclass or null for a default name
superclass - the superclass
Returns:
the new subclass

createSubclass

public RDFSNamedClass createSubclass(String name,
                                     Collection superclasses)
Creates a subclass of a number of superclasses. The new class will have the same rdf:type as its first parent

Parameters:
name - the name of the new subclass or null for a default name
superclasses - a Collection of RDFSClasses
Returns:
the new subclass

createSubproperty

public RDFProperty createSubproperty(String name,
                                     RDFProperty superproperty)
Creates a new property as a subproperty of an existing property. The new property will get the same type as the superproperty.

Parameters:
name - the name of the new subproperty, or null for a default name
superproperty - the superproperty
Returns:
a new (sub-) property

createRDFSNamedClass

public RDFSNamedClass createRDFSNamedClass(String name)

createRDFSNamedClass

public RDFSNamedClass createRDFSNamedClass(String name,
                                           boolean loadDefaults)

createRDFSNamedClass

public RDFSNamedClass createRDFSNamedClass(String name,
                                           Collection parents,
                                           RDFSClass rdfType)
Creates an RDFSNamedClass (or perhaps an OWLNamedClass) with given name, superclasses and rdf:type.

Parameters:
name - the name of the new class
parents - the parents
rdfType - the rdf:type of the new class
Returns:
the new class

createRDFProperty

public RDFProperty createRDFProperty(String name)

createTriple

public Triple createTriple(RDFResource subject,
                           RDFProperty predicate,
                           Object object)
Creates a new Triple. This method should be used instead of creating an instance of DefaultTriple directly. The model is not changed at all by this.

Parameters:
subject - the subject of the Triple
predicate - the predicate of the Triple
object - the object of the Triple
Returns:
a new Triple

endTransaction

public boolean endTransaction()
Ends the recently opened transaction and commits the state.

Returns:
true
See Also:
beginTransaction(java.lang.String)

endTransaction

public boolean endTransaction(boolean doCommit)
Specified by:
endTransaction in interface edu.stanford.smi.protege.model.KnowledgeBase

executeSPARQLQuery

public QueryResults executeSPARQLQuery(String partialQueryText)
                                throws Exception
Executes a SPARQL query on this OWLModel. The method will internally add prefix declarations according to the current namespace declarations. The resulting QueryResults object can be used to iterate over the results.

Parameters:
partialQueryText - the query text, typically beginning with "SELECT"
Returns:
a QueryResults object
Throws:
Exception - if the query string could not be handled

getAllImports

public Set getAllImports()
Gets all (transitive) imports in this OWLModel.

Returns:
a Set of String URIs of the import statements

getAnonymousRootCls

public edu.stanford.smi.protege.model.Cls getAnonymousRootCls()
Deprecated. internal Protege detail


getChangedInferredClasses

public 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.

Returns:
a Collection of OWLNamedClass instances

getCommonSuperclass

public RDFSNamedClass getCommonSuperclass(Collection classes)
Gets the most specific common superclass of a given collection of named classes.

Parameters:
classes - the RDFSNamedClasses to get the superclass of (at least one)
Returns:
the most specific common superclass of all classes, e.g. owl:Thing

getDefaultLanguage

public String getDefaultLanguage()
Gets the default language specified by the user through an annotation property at owl:Ontology.

Returns:
the default language or null for none

getDefaultOWLOntology

public OWLOntology getDefaultOWLOntology()

getDispatchEventsEnabled

public boolean getDispatchEventsEnabled()
Specified by:
getDispatchEventsEnabled in interface edu.stanford.smi.protege.model.KnowledgeBase
See Also:
setDispatchEventsEnabled(boolean)

getDomainlessProperties

public Collection getDomainlessProperties()
Gets all properties that have owl:Thing as their domain. This includes all properties that have no domain statement at all.

Returns:
a Collection of RDFProperties

getFloatDatatypes

public Set getFloatDatatypes()
Gets all float XML Schema datatypes, including xsd:float etc. For these datatypes, the method RDFSLiteral.getFloat() is valid.

Returns:
the float types

getGenerateEventsEnabled

public boolean getGenerateEventsEnabled()
Specified by:
getGenerateEventsEnabled in interface edu.stanford.smi.protege.model.KnowledgeBase
See Also:
setGenerateEventsEnabled(boolean)

getIntegerDatatypes

public Set getIntegerDatatypes()
Gets all integer XML Schema datatypes, including xsd:int etc. For these datatypes, the method RDFSLiteral.getInt() is valid.

Returns:
the integer types

getJenaModel

public com.hp.hpl.jena.rdf.model.Model getJenaModel()
Gets a (read-only) Jena Model serving as a live view upon the Protege TripleStores.

Returns:
a Jena Model

getOWLDifferentFromProperty

public RDFProperty getOWLDifferentFromProperty()

getOWLDisjointWithProperty

public RDFProperty getOWLDisjointWithProperty()

getInconsistentClasses

public Collection getInconsistentClasses()
Gets all classes which have been marked as inconsistent.

Returns:
a Collection of NamedClses

getOWLAllDifferentClass

public RDFSNamedClass getOWLAllDifferentClass()

getOWLAllDifferents

public Collection getOWLAllDifferents()
Gets a collection of all OWLAllDifferents in the knowlegde base.

Returns:
a collection of 'em

getOWLAnnotationProperties

public Collection getOWLAnnotationProperties()
Gets all annotation properties.

Returns:
the annotation properties

getOWLAnnotationPropertyClass

public RDFSNamedClass getOWLAnnotationPropertyClass()

getOWLClassParser

public OWLClassParser getOWLClassParser()
Gets the OWLClassParser for the current class expression syntax.

Returns:
the currently used parser

getOWLClassDisplay

public OWLClassDisplay getOWLClassDisplay()
Gets the currently used renderer for classes into display strings.

Returns:
the OWLClassDisplay
See Also:
setOWLClassDisplay(edu.stanford.smi.protegex.owl.model.classdisplay.OWLClassDisplay)

getOWLDatatypeProperty

public OWLDatatypeProperty getOWLDatatypeProperty(String name)

getOWLDatatypePropertyClass

public OWLNamedClass getOWLDatatypePropertyClass()
Gets the standard metaclass of all datatype slots/properties.

Returns:
the metaclass

getOWLDeprecatedClassClass

public RDFSNamedClass getOWLDeprecatedClassClass()

getOWLEquivalentClassProperty

public RDFProperty getOWLEquivalentClassProperty()

getOWLEquivalentPropertyProperty

public RDFProperty getOWLEquivalentPropertyProperty()

getOWLFunctionalPropertyClass

public RDFSNamedClass getOWLFunctionalPropertyClass()

getOWLInverseFunctionalPropertyClass

public RDFSNamedClass getOWLInverseFunctionalPropertyClass()

getOWLOneOfProperty

public RDFProperty getOWLOneOfProperty()
Gets the owl:oneOf property.

Returns:
owl:oneOf

getOWLProject

public OWLProject getOWLProject()
Gets the associated OWLProject, which can be used to store project-specific settings.

Returns:
the OWLProject (never null)

getOWLThingClass

public OWLNamedClass getOWLThingClass()
Gets the root class of the OWL class hierarchy (owl:Thing).

Returns:
owl:Thing

getOWLValuesFromProperty

public RDFProperty getOWLValuesFromProperty()
Gets the owl:valuesFrom property (used for qualified cardinality restrictions.

Returns:
the owl:valuesFrom property

getTaskManager

public TaskManager getTaskManager()
Gets the TaskManager that can be used for executing tasks that take a long time.


getProtegeAllowedParentProperty

public RDFProperty getProtegeAllowedParentProperty()
Gets the property protege:allowedParent (if it exists)

Returns:
the property or null

getProtegeClassificationStatusProperty

public RDFProperty getProtegeClassificationStatusProperty()
Gets the property that is used internally to store the classification status of a class.

Returns:
the protege:classificationStatus property

getProtegeInferredSubclassesProperty

public RDFProperty getProtegeInferredSubclassesProperty()

getProtegeInferredSuperclassesProperty

public RDFProperty getProtegeInferredSuperclassesProperty()

getRepositoryManager

public RepositoryManager getRepositoryManager()

getRDFExternalResource

public RDFExternalResource getRDFExternalResource(String uri)
Deprecated. use getRDFUntypedResource instead


getRDFExternalResourceClass

public RDFSClass getRDFExternalResourceClass()
Deprecated. use getRDFUntypedResourcesClass

See Also:
getRDFUntypedResourcesClass()

getRDFFirstProperty

public RDFProperty getRDFFirstProperty()
Gets the rdf:first property.

Returns:
rdf:first

getRDFResource

public RDFResource getRDFResource(String name)
Gets an RDFResource by its name.

Parameters:
name - the name of the resource
Returns:
an RDFResource or null if none was found under that name

getRDFResourceAs

public RDFResource getRDFResourceAs(String name,
                                    Class javaInterface)
Combines the calls getRDFResource(name).as(javaInterface). Warning: No checks are done.

Parameters:
name - the name of the resource to get
javaInterface - the target type of the result
Returns:
an instance of the Java interface representing the resource, or null
See Also:
getRDFResource(java.lang.String), RDFResource.as(java.lang.Class)

getRDFResourceByBrowserText

public RDFResource getRDFResourceByBrowserText(String text)
Gets the first resource that has a given browser text. This call is extremely inefficient, because it might iterate through all resources in the knowledge base.

Parameters:
text - the browser text
Returns:
the Instance or null

getRDFResourceByNameOrBrowserText

public RDFResource getRDFResourceByNameOrBrowserText(String text)
Gets the first instance that has a given name or browser text. This call is much faster than the getRDFResourceByBrowserText if the default browser key (:NAME) is used.

Parameters:
text -
Returns:
the Instance or null

getRDFSClassCount

public int getRDFSClassCount()
Gets the number of rdfs:Classes (or owl:Classes) in this model, including anonymous classes and system classes. This is equivalent to getRDFSClasses().size().

Returns:
the number of classes

getRDFSClasses

public Collection getRDFSClasses()
Gets all rdfs:Classes (or owl:Classes) in this model, including anonymous classes and system classes.

Returns:
a Collection of RDFSClass objects

getRDFSDatatypeFactory

public RDFSDatatypeFactory getRDFSDatatypeFactory()

getRDFSIsDefinedByProperty

public RDFProperty getRDFSIsDefinedByProperty()

getRDFSLabelProperty

public RDFProperty getRDFSLabelProperty()

getRDFResourceCount

public int getRDFResourceCount()
Gets the number of all RDFResources in this model. This method is useful to estimate the number of iterations for an algorithm without accessing all resources. This is equivalent to getRDFResources().size(), but much more efficient than that.

Returns:
the number of RDFResources

getRDFResources

public Collection getRDFResources()
Gets a list of all RDFResources in this model.

Returns:
a Collection of RDFResource objects

getRDFResourcesWithPropertyValue

public Collection getRDFResourcesWithPropertyValue(RDFProperty property,
                                                   Object value)
Gets all RDFResources that have a given value for a given property.

Parameters:
property - the RDFProperty
value - the value (must match exactly)
Returns:
a Collection of RDFResources

getRDFListClass

public RDFSNamedClass getRDFListClass()
Gets the rdf:List class.

Returns:
rdf:List

getRDFUntypedResource

public RDFUntypedResource getRDFUntypedResource(String uri,
                                                boolean createOnDemand)
Gets an RDFUntypedResource for a given string. If no existing instance of this URI is found, the method can be instructed to create one.

Parameters:
uri - the URI to look up
createOnDemand - true to have the system create one if it doesn't exist
Returns:
the RDFUntypedResource or null if none currently exists.

getRDFUntypedResourcesClass

public RDFSNamedClass getRDFUntypedResourcesClass()
Gets the internal type of all untyped resources.

Returns:
the class of untyped resources

getResourceNameMatches

public Collection getResourceNameMatches(String nameExpression,
                                         int maxMatches)
Gets all RDFResources that have a matching name (possibly using wildcards).

Parameters:
nameExpression - the name pattern
maxMatches - the maximum number of hits to be returned

getOWLDataRangeClass

public RDFSNamedClass getOWLDataRangeClass()
Gets the class owl:DataRange, which is used to represent enumerations of datatype values.

Returns:
owl:DataRange

getOWLIntersectionOfProperty

public RDFProperty getOWLIntersectionOfProperty()

getOWLJavaFactory

public OWLJavaFactory getOWLJavaFactory()
Gets the OWLJavaFactory that is used to create the Java objects for ontology resources.

Returns:
the OWLJavaFactory
See Also:
setOWLJavaFactory(edu.stanford.smi.protegex.owl.model.factory.OWLJavaFactory)

getOWLNamedClass

public OWLNamedClass getOWLNamedClass(String name)
A convenience method which includes the typecast after getCls(). The invoker must make sure that the name really reflects a OWLNamedClass.

Parameters:
name - the name of the OWLNamedClass to get
Returns:
a OWLNamedClass

getOWLNamedClassClass

public OWLNamedClass getOWLNamedClassClass()
Gets the standard metaclass of all named classes.

Returns:
the metaclass owl:Class

getMatchingResources

public Collection getMatchingResources(RDFProperty property,
                                       String matchString,
                                       int maxMatches)
Gets all RDFResources that have a matching value for a given property.

Parameters:
property - the (string) property to compare to
matchString - 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!)
Returns:
the matching RDFResources

getNextAnonymousResourceName

public String getNextAnonymousResourceName()
Gets the next name that can be used to create an "anonymous" instance. Anonymous resources don't exist in Protege, so we need to use naming conventions to mark those anonymous instances, which will then be converted back to real anonymous nodes in the OWL file (e.g. by the JenaCreator).

Returns:
a suitable name for an "anonymous" resource

getOWLIndividual

public OWLIndividual getOWLIndividual(String name)

getOWLNothing

public OWLNamedClass getOWLNothing()
Gets the system class owl:Nothing, which represents the empty set for reasoners.

Returns:
the Nothing class

getOWLObjectProperty

public OWLObjectProperty getOWLObjectProperty(String name)

getOWLObjectPropertyClass

public OWLNamedClass getOWLObjectPropertyClass()
Gets the standard metaclass of all object slots/properties.

Returns:
the metaclass

getOWLOntologies

public Collection getOWLOntologies()
Gets all OWLOntologies in the current model. This always includes the default ontology.

Returns:
a Collection of OWLOntologies
See Also:
getDefaultOWLOntology()

getOWLOntologyByURI

public OWLOntology getOWLOntologyByURI(String uri)
Gets the OWLOntology with a given URI.

Parameters:
uri - the URI to look up
Returns:
the OWLOntology or null if it does not exist yet

getOWLOntologyClass

public OWLNamedClass getOWLOntologyClass()

getOWLOntologyProperties

public Collection getOWLOntologyProperties()
Gets the owl:OntologyProperties defined in OWL. These are incompatibleWith etc.

Returns:
the Ontology properties

getOWLFrameStore

public OWLFrameStore getOWLFrameStore()
Provides low level access to some internal Protege detail - normally not needed.


getOWLIndividuals

public Collection getOWLIndividuals()
Gets those Instances in the ontology that are instances of a OWLNamedClass. This is equivalent to getOWLIndividuals(false).

Returns:
the OWL instances

getOWLIndividuals

public Collection getOWLIndividuals(boolean onlyVisibleClasses)
Gets those Instances in the ontology that are instances of a OWLNamedClass.

Parameters:
onlyVisibleClasses - true to only return instanceso of visible classes
Returns:
the OWL instances

getOWLInverseOfProperty

public RDFProperty getOWLInverseOfProperty()

getOWLProperty

public OWLProperty getOWLProperty(String name)
A convenience method including typecast.

Parameters:
name - the name of the property to get
Returns:
(OWLProperty) getRDFProperty(name)

getOWLSystemResources

public Collection getOWLSystemResources()
Gets a Collection of all system resources installed by the OWL Plugin. These are not editable and not included, but isSystem().

Returns:
a Collection of system resources

getOWLValueType

public edu.stanford.smi.protege.model.ValueType getOWLValueType(String uri)
Gets the Protege ValueType that represents a given URI string.

Parameters:
uri - the URI (e.g., "http://www.w3.org/2001/XMLSchema#float")
Returns:
the ValueType or null if uri is invalid

getProtegeReadOnlyProperty

public OWLDatatypeProperty getProtegeReadOnlyProperty()
Returns:
the Slot ProtegeNames.READ_ONLY

getRDFIndividual

public RDFIndividual getRDFIndividual(String name)

getRDFIndividuals

public Collection getRDFIndividuals()
Gets those Instances in the ontology that are instances of an RDFSNamedClass. This includes all OWL individuals.

Returns:
the RDF instances

getRDFIndividuals

public Collection getRDFIndividuals(boolean onlyVisibleClasses)
Gets those Instances in the ontology that are instances of an RDFSNamedClass.

Parameters:
onlyVisibleClasses - true to only return instances of visible classes.
Returns:
the RDF instances

getRDFNil

public RDFList getRDFNil()
Gets the placeholder for empty rdf:Lists.

Returns:
rdf:nil

getRDFProperties

public Collection getRDFProperties()
Gets a collection of all RDFProperties (or subclasses thereof).

Returns:
a Collection of RDFProperties

getRDFProperty

public RDFProperty getRDFProperty(String name)
A convenience method to access a slot as RDFProperty.

Parameters:
name - the name of the slot to get
Returns:
(RDFProperty) getSlot(name)

getRDFPropertyClass

public RDFSNamedClass getRDFPropertyClass()
Gets the rdf:Property metaclass.

Returns:
rdf:Property

getRDFSDatatypeByName

public RDFSDatatype getRDFSDatatypeByName(String name)
Gets an XML Schema Datatype using the prefix notation (e.g. "xsd:int").

Parameters:
name - the name of the datatype to get
Returns:
the RDFSDatatype

getRDFSDatatypeByURI

public RDFSDatatype getRDFSDatatypeByURI(String uri)
Gets an XML Schema Datatype by its URI (e.g. XSDDatatype.XSDint).

Parameters:
uri - the URI of the datatype to get
Returns:
the RDFSDatatype

getRDFSDatatypeOfValue

public RDFSDatatype getRDFSDatatypeOfValue(Object valueOrRDFSLiteral)
Gets the RDFSDatatype of a given primitive value, which can be either a standard value (e.g. Integer, Float), or an RDFSLiteral.

Parameters:
valueOrRDFSLiteral - the value object
Returns:
the RDFSDatatype of this value

getRDFSDatatypes

public Collection getRDFSDatatypes()
Gets a Collection of the (named) RDF/XML Schema datatypes.

Returns:
the datatype objects (instance of RDFSDatatype)

getRDFSNamedClassClass

public RDFSNamedClass getRDFSNamedClassClass()
Gets the rdfs:Class metaclass

Returns:
rdfs:Class

getRDFSNamedClass

public RDFSNamedClass getRDFSNamedClass(String name)

getRDFSCommentProperty

public OWLDatatypeProperty getRDFSCommentProperty()

getRDFRestProperty

public RDFProperty getRDFRestProperty()
Gets the rdf:rest property, which is used to describe the rest of an rdf:List.

Returns:
the rdf:rest property (never null)

getOWLRestrictionMetaclasses

public RDFSNamedClass[] getOWLRestrictionMetaclasses()
Gets the metaclasses of the available OWLRestriction kinds.

Returns:
an Array of metaclasses

getOWLRestrictionsOnProperty

public Collection getOWLRestrictionsOnProperty(RDFProperty property)
Gets a Collection of all Restrictions that are defined on a given property.

Parameters:
property - the property to get all Restrictions for
Returns:
a Collection of OWLRestriction objects

getOWLSameAsProperty

public RDFProperty getOWLSameAsProperty()

getOWLUnionOfProperty

public RDFProperty getOWLUnionOfProperty()

getOWLVersionInfoProperty

public RDFProperty getOWLVersionInfoProperty()

getRDFSDomainProperty

public RDFProperty getRDFSDomainProperty()
Gets the rdfs:domain property.

Returns:
rdfs:domain

getRDFSRangeProperty

public RDFProperty getRDFSRangeProperty()
Gets the rdfs:range property.

Returns:
rdfs:range

getRDFSSubClassOfProperty

public RDFProperty getRDFSSubClassOfProperty()

getRDFSSubPropertyOfProperty

public RDFProperty getRDFSSubPropertyOfProperty()
Gets the property rdfs:subPropertyOf

Returns:
rdfs:subPropertyOf

getResourceNameForURI

public String getResourceNameForURI(String uri)
Gets the name of a Frame by converting a URI. The name in the format prefix:localName. If the namespace of the URI is the default namespace, then the prefix will be empty and the name will consist of only the local name.

Parameters:
uri - a fully qualified URI
Returns:
the name of the corresponding Frame

getSearchSynonymProperties

public Collection getSearchSynonymProperties()
Gets the slots that are used for matching when the user searches for a frame in the search fields. These are used in addition to the :NAME slot in the getFrameNameMatches() method.

Returns:
the collection of synonym slots (by default: an empty collection)

getProtegeSubclassesDisjointProperty

public RDFProperty getProtegeSubclassesDisjointProperty()
Returns:
the Slot OWLNames.Slot.SUBCLASSES_DISJOINT

getRDFTypeProperty

public RDFProperty getRDFTypeProperty()
Gets the rdf:type property.

Returns:
rdf:type as an RDFProperty

getSystemAnnotationProperties

public RDFProperty[] getSystemAnnotationProperties()
Gets the pre-defined system annotation slots such as rdfs:comment.

Returns:
the system annotation slots

getTodoAnnotationPrefix

public String getTodoAnnotationPrefix()
Gets the prefix used to distinguish "to-do" list items from other values of the to-do list property.

Returns:
the current prefix (as specified in an owl:Ontology annotation)

getTodoAnnotationProperty

public OWLDatatypeProperty getTodoAnnotationProperty()
Gets the (annotation) slot that is used to represent "to-do" list items in this knowledge base. This can be specified using the appropriate annotation value in the owl:Ontology.

Returns:
the current to-do slot (default: OWLNames.Slot.VERSION_INFO)

getUsedLanguages

public String[] getUsedLanguages()
Gets the list of language prefixes defined by the user in the owl:Ontology. This can be used to provide default values in language selection boxes.

Returns:
a list of language prefixes (e.g. ["de", "en", "fr"])

getUserDefinedOWLProperties

public Collection getUserDefinedOWLProperties()
Gets a Collection of all user-defined OWLProperties in this knowledge base.

Returns:
a Collection of OWLProperty objects

getUserDefinedOWLObjectProperties

public Collection getUserDefinedOWLObjectProperties()
Gets a Collection of all user-defined OWLObjectProperties in this knowledge base.

Returns:
a Collection of OWLObjectProperty objects.

getUserDefinedOWLDatatypeProperties

public Collection getUserDefinedOWLDatatypeProperties()
Gets a Collection of all user-defined OWLDatatypeProperties in this knowledge base.

Returns:
a Collection of OWLDatatypeProperty objects.

getUserDefinedOWLNamedClasses

public Collection getUserDefinedOWLNamedClasses()
Gets a Collection of all user-defined named OWL classes in this knowledge base. Note that this returns neither anonymous classes such as Restrictions nor system classes. like owl:Thing and owl:Nothing.

Returns:
a Collection of OWLNamedClass instances

getUserDefinedRDFIndividuals

public Collection getUserDefinedRDFIndividuals(boolean onlyVisibleClasses)
Gets all non-system individuals in this OWLModel.

Parameters:
onlyVisibleClasses - true to only return instances of visible classes
Returns:
a collection of RDFResources

getUserDefinedRDFProperties

public Collection getUserDefinedRDFProperties()
Gets all user-defined RDF properties in this OWLModel.

Returns:
a collection of RDFProperty instances

getUserDefinedRDFSNamedClasses

public Collection getUserDefinedRDFSNamedClasses()
Gets all user-defined RDFSClses including the OWLNamedClses.

Returns:
the user-defined RDFSNamedClasses

getValueTypeURI

public String getValueTypeURI(edu.stanford.smi.protege.model.ValueType valueType)
The inverse of getValueType.

Parameters:
valueType -
Returns:
the OWL URI of a given ValueType

getVisibleUserDefinedOWLProperties

public Collection getVisibleUserDefinedOWLProperties()
Gets a Collection of all user-defined, visible OWLProperties in this knowledge base.

Returns:
a Collection of OWLProperty objects

getVisibleUserDefinedRDFProperties

public Collection getVisibleUserDefinedRDFProperties()
Gets all visible, user-defined RDF properties in this knowledge base.

Returns:
a collection of RDFProperty instances

getRDFXMLLiteralType

public RDFSDatatype getRDFXMLLiteralType()
Gets the resource representing the datatype rdf:XMLLiteral.

Returns:
rdf:XMLLiteral

getURIResolver

public URIResolver getURIResolver()
Deprecated. Replaced by RepositoryManager

Gets the OWLModel's URIResolver, which is used to convert the URIs of imported ontologies into physical URLs (for saving and loading files).

Returns:
the URIResolver (a DefaultURIResolver by default)
See Also:
setURIResolver(edu.stanford.smi.protegex.owl.jena.URIResolver)

getVisibleResources

public List getVisibleResources(Iterator iterator)
Gets a list of resources, only containing the visible entries of a given Iterator.

Parameters:
iterator - an Iterator of RDFResources
Returns:
a sublist of iterator

getXSDanyURI

public RDFSDatatype getXSDanyURI()
Gets the default datatype for URI values.

Returns:
xsd:anyURI

getXSDbase64Binary

public RDFSDatatype getXSDbase64Binary()
Gets the default datatype for byte[] values.

Returns:
xsd:base64Binary

getXSDboolean

public RDFSDatatype getXSDboolean()
Gets the default datatype for boolean values.

Returns:
xsd:boolean

getXSDbyte

public RDFSDatatype getXSDbyte()
Gets the default datatype for byte values.

Returns:
xsd:byte

getXSDdate

public RDFSDatatype getXSDdate()
Gets the default datatype for date values.

Returns:
xsd:date

getXSDdateTime

public RDFSDatatype getXSDdateTime()
Gets the default datatype for timestamp values.

Returns:
xsd:dateTime

getXSDdecimal

public RDFSDatatype getXSDdecimal()
Gets the default datatype for BigDecimal values.

Returns:
xsd:decimal

getXSDdouble

public RDFSDatatype getXSDdouble()
Gets the default datatype for double values.

Returns:
xsd:double

getXSDduration

public RDFSDatatype getXSDduration()
Gets the datatype for duration values.

Returns:
xsd:duration

getXSDfloat

public RDFSDatatype getXSDfloat()
Gets the default datatype for float values.

Returns:
xsd:float

getXSDint

public RDFSDatatype getXSDint()
Gets the default datatype for integer values.

Returns:
xsd:int

getXSDinteger

public RDFSDatatype getXSDinteger()
Gets the default datatype for BigInteger values.

Returns:
xsd:integer

getXSDlong

public RDFSDatatype getXSDlong()
Gets the default datatype for long values.

Returns:
xsd:long

getXSDshort

public RDFSDatatype getXSDshort()
Gets the default datatype for short values.

Returns:
xsd:short

getXSDstring

public RDFSDatatype getXSDstring()
Gets the default datatype for string values.

Returns:
xsd:string

getXSDtime

public RDFSDatatype getXSDtime()
Gets the default datatype for time values.

Returns:
xsd:time

isAnonymousResource

public boolean isAnonymousResource(RDFResource resource)
Deprecated.  

See Also:
RDFResource.isAnonymous()

isAnonymousResourceName

public boolean isAnonymousResourceName(String name)

isOWLSystemFrame

public boolean isOWLSystemFrame(edu.stanford.smi.protege.model.Frame frame)
Deprecated.  

Checks whether a given frame is one of the results of getOWLSystemResources.

Parameters:
frame - the Frame to check
Returns:
true if frame is one of the system frames

isProtegeMetaOntologyImported

public boolean isProtegeMetaOntologyImported()

isValidPropertyValue

public boolean isValidPropertyValue(RDFResource subject,
                                    RDFProperty predicate,
                                    Object value)
Checks if a certain object would be a valid value for a given subject/property pair. This can be used by visual components to validate user input. Typical implementations check for constraint violations such as numeric ranges, string length etc. This does not check for cardinality restrictions.

Parameters:
subject - the subject to check the value for
predicate - the property to check for
value - the potential value
Returns:
true if value would be valid for the subject/predicate pair

isValidResourceName

public boolean isValidResourceName(String name,
                                   RDFResource resource)
Checks whether a given String would be a valid name for a given resource.

Parameters:
name - the potential name of the resource
resource - the RDFResource to test
Returns:
true if the resource could be renamed to name

getResourcesWithPrefix

public Collection getResourcesWithPrefix(String prefix)
Gets all resource in this that have a given prefix.

Parameters:
prefix - the prefix to search for
Returns:
a Collection of the matching NamespaceInstances

getLocalNameForURI

public 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.

Parameters:
uri - the fully qualified URI
Returns:
the local name in the URI

getLocalNameForResourceName

public String getLocalNameForResourceName(String frameName)

getNamespaceManager

public NamespaceManager getNamespaceManager()
Gets the NamespaceManager used by this knowledge base.

Returns:
the NamespaceManager

getNamespaceForResourceName

public String getNamespaceForResourceName(String resourceName)

getNamespaceForURI

public String getNamespaceForURI(String uri)
Gets the namespace part of a given URI. For http://www.aldi.de/ontologies#Hans this will return http://www.aldi.de/ontologies#.

Parameters:
uri - the fully qualified URI
Returns:
the namespace including the #

getPrefixForResourceName

public String getPrefixForResourceName(String resourceName)

getPropertyValueValidator

public PropertyValueValidator getPropertyValueValidator()
Gets the currently used PropertyValueValidator.

Returns:
the validator
See Also:
setPropertyValueValidator(edu.stanford.smi.protegex.owl.model.validator.PropertyValueValidator)

getTripleStoreModel

public TripleStoreModel getTripleStoreModel()

getURIForResourceName

public String getURIForResourceName(String resourceName)

listOWLAnonymousClasses

public Iterator listOWLAnonymousClasses()
Gets an Iterator of all OWLAnonymousClasses in the ontology.

Returns:
an Iterator of OWLAnonymousClass objects

listOWLNamedClasses

public Iterator listOWLNamedClasses()
Gets an Iterator on all OWLNamedClasses in the ontology, including system classes.

Returns:
an Iterator of OWLNamedClass objects

listRDFProperties

public Iterator listRDFProperties()
Gets an Iterator on all RDFProperties in the model, including system properties.

Returns:
an Iterator of RDFProperty objects

listRDFSNamedClasses

public Iterator listRDFSNamedClasses()
Gets an Iterator on all RDFSNamedClasses in the ontology, including system classes.

Returns:
an Iterator of RDFSNamedClass objects

listReferences

public 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.

Parameters:
object - the object to look for
maxResults - the maximum number of expected results
Returns:
an Iterator of type Tuple

listSubjects

public Iterator listSubjects(RDFProperty property)
The the subjects of all triples where a given property has any value. The Iterator does not contain duplicates.

Parameters:
property - the property to look for
Returns:
an Iterator of RDFResources

removeClassListener

public void removeClassListener(ClassListener listener)
Removes a ClassListener that was previously added.

Parameters:
listener - the ClassListener to remove
See Also:
addClassListener(edu.stanford.smi.protegex.owl.model.event.ClassListener)

removeModelListener

public void removeModelListener(ModelListener listener)
Removes a ModelListener that was previously added.

Parameters:
listener - the ModelListener to remove
See Also:
addModelListener(edu.stanford.smi.protegex.owl.model.event.ModelListener)

removePropertyListener

public void removePropertyListener(PropertyListener listener)
Removes a PropertyListener that was previously added.

Parameters:
listener - the PropertyListener to remove
See Also:
addPropertyListener(edu.stanford.smi.protegex.owl.model.event.PropertyListener)

removePropertyValueListener

public void removePropertyValueListener(PropertyValueListener listener)
Removes a PropertyValueListener previously added.

Parameters:
listener - the listener to remove
See Also:
addPropertyValueListener(edu.stanford.smi.protegex.owl.model.event.PropertyValueListener)

removeResourceListener

public void removeResourceListener(ResourceListener listener)
Removes a ResourceListener that was previously added.

Parameters:
listener - the ResourceListener to remove
See Also:
addResourceListener(edu.stanford.smi.protegex.owl.model.event.ResourceListener)

setDispatchEventsEnabled

public boolean setDispatchEventsEnabled(boolean enabled)
Specified by:
setDispatchEventsEnabled in interface edu.stanford.smi.protege.model.KnowledgeBase
See Also:
getDispatchEventsEnabled()

setGenerateEventsEnabled

public boolean setGenerateEventsEnabled(boolean enabled)
Specified by:
setGenerateEventsEnabled in interface edu.stanford.smi.protege.model.KnowledgeBase
See Also:
getGenerateEventsEnabled()

setOWLClassDisplay

public void setOWLClassDisplay(OWLClassDisplay display)
Sets the OWLClassDisplay to change the default display of classes. As a side-effect, this call also changes the OWLClassParser, which depends on the display.

Parameters:
display - the new display (not null)

setOWLJavaFactory

public void setOWLJavaFactory(OWLJavaFactory factory)
Sets the OWLJavaFactory for this OWLModel. An OWLJavaFactory creates the Java object for an RDFResource.

Parameters:
factory - the new OWLJavaFactory
See Also:
OWLJavaFactory, getOWLJavaFactory()

setOWLProject

public void setOWLProject(OWLProject owlProject)
Sets the associated OWLProject.

Parameters:
owlProject - the new OWLProject
See Also:
getOWLProject()

setPropertyValueValidator

public void setPropertyValueValidator(PropertyValueValidator validator)
Sets the validator that shall be used in future calls of the validation methods.

Parameters:
validator - the new Validator (or null)
See Also:
isValidPropertyValue(edu.stanford.smi.protegex.owl.model.RDFResource, edu.stanford.smi.protegex.owl.model.RDFProperty, java.lang.Object)

setSearchSynonymProperties

public void setSearchSynonymProperties(Collection properties)
See Also:
getSearchSynonymProperties()

setTaskManager

public void setTaskManager(TaskManager taskManager)
Sets the TaskManager.

Parameters:
taskManager - the new TaskManager (not null)
See Also:
getTaskManager()

setURIResolver

public void setURIResolver(URIResolver uriResolver)
Sets the URIResolver which is used in future calls of getURIResolver().

Parameters:
uriResolver - the new URIResolver
See Also:
getURIResolver()