Protégé-OWL 3.3.1

edu.stanford.smi.protegex.owl.model.impl
Class AbstractOWLModel

java.lang.Object
  extended by edu.stanford.smi.protege.model.DefaultKnowledgeBase
      extended by edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel
All Implemented Interfaces:
edu.stanford.smi.protege.model.KnowledgeBase, edu.stanford.smi.protege.util.Disposable, NamespaceManagerListener, OWLModel, ProtegeKnowledgeBase, OWLTestManager
Direct Known Subclasses:
JenaOWLModel, OWLDatabaseModel

public abstract class AbstractOWLModel
extends edu.stanford.smi.protege.model.DefaultKnowledgeBase
implements NamespaceManagerListener, OWLModel

Author:
Holger Knublauch

Field Summary
static String ANONYMOUS_BASE
           
static String DEFAULT_ANNOTATION_PROPERTY_NAME
           
static String DEFAULT_CLASS_NAME
           
static String DEFAULT_DATATYPE_PROPERTY_NAME
           
static String DEFAULT_INDIVIDUAL_NAME
           
static String DEFAULT_OBJECT_PROPERTY_NAME
           
static String DEFAULT_PROPERTY_NAME
           
static String DEFAULT_TODO_PREFIX
           
static String[] DEFAULT_USED_LANGUAGES
           
 
Fields inherited from class edu.stanford.smi.protege.model.DefaultKnowledgeBase
SERVER_PROCESS_USER
 
Fields inherited from interface edu.stanford.smi.protege.model.KnowledgeBase
MAXIMUM_CARDINALITY_UNBOUNDED, UNLIMITED_MATCHES
 
Constructor Summary
AbstractOWLModel(edu.stanford.smi.protege.model.KnowledgeBaseFactory factory)
           
AbstractOWLModel(edu.stanford.smi.protege.model.KnowledgeBaseFactory factory, NamespaceManager namespaceManager)
           
 
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 addOWLTest(OWLTest test)
           
 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.
 void adjustClientFrameStores()
           
 void adjustSystemClasses()
           
 void adjustThing()
           
 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)
           
 void bootstrap()
          Creates the OWL metamodel.
 void copyFacetValuesIntoNamedClses()
          Copies all facet values of restriction superclasses into their named subclasses and thus makes sure that both values are synchronized.
 OWLDatatypeProperty createAnnotationOWLDatatypeProperty(String name)
           
 OWLObjectProperty createAnnotationOWLObjectProperty(String name)
           
 edu.stanford.smi.protege.model.Cls createCls(edu.stanford.smi.protege.model.FrameID id, String name, Collection directSuperclasses, Collection directTypes, boolean loadDefaults)
           
protected  void createDefaultOWLOntologyReally()
           
protected  edu.stanford.smi.protege.model.framestore.FrameStoreManager createFrameStoreManager()
           
 edu.stanford.smi.protege.model.Instance createInstance(edu.stanford.smi.protege.model.FrameID id, String name, Collection directTypes, boolean initializeDefaults)
           
 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.
 OWLDatatypeProperty createOWLDatatypeProperty(String name, OWLNamedClass metaCls)
          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 metaCls)
          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 metaCls)
           
 OWLOntology createOWLOntology(String prefix)
          Creates a new OWLOntology for a given prefix.
 OWLOntology createOWLOntology(String name, String uri)
          Deprecated.  
 OWLSomeValuesFrom createOWLSomeValuesFrom()
           
 OWLSomeValuesFrom createOWLSomeValuesFrom(RDFProperty property, RDFResource filler)
           
 OWLSomeValuesFrom createOWLSomeValuesFrom(RDFProperty property, RDFSLiteral[] oneOfValues)
           
 OWLUnionClass createOWLUnionClass()
           
 OWLUnionClass createOWLUnionClass(Collection clses)
           
 RDFExternalResource createRDFExternalResource(String uri)
          Deprecated.  
 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.
protected  edu.stanford.smi.protege.model.SystemFrames createSystemFrames()
           
 Triple createTriple(RDFResource subject, RDFProperty predicate, Object object)
          Creates a new Triple.
 String createUniqueNewFrameName(String baseName)
           
 void defaultNamespaceChanged(String oldValue, String newValue)
           
static void deleteAllFrames(OWLModel owlModel)
          Deletes all Frames that are not system classes (including OWL system classes).
 void deleteCls(edu.stanford.smi.protege.model.Cls cls)
           
 void dispose()
           
 boolean endTransaction()
           
 boolean ensureProtegeMetaOntologyImported()
          Makes sure that the Protege meta ontology is imported in an ontology tag that has rdf:about="".
 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.  
 String getBrowserText(edu.stanford.smi.protege.model.Instance instance)
           
 edu.stanford.smi.protege.server.framestore.background.ServerCacheStateMachine getCacheMachine()
           
 Collection getChangedInferredClasses()
          Gets all named classes where the classification status is OWLNames.CLASSIFICATION_STATUS_CONSISTENT_AND_CHANGED, i.e.
 RDFSNamedClass getCommonSuperclass(Collection<RDFSNamedClass> classes)
          Chooses a most specific common named superclass of a given collection of named classes.
 Set<RDFSNamedClass> getCommonSuperclasses(Collection<RDFSNamedClass> classes)
          Gets the most specific common named superclasses 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()
           
 Collection getDomainlessProperties()
          Gets all properties that have owl:Thing as their domain.
 Set getFloatDatatypes()
          Gets all float XML Schema datatypes, including xsd:float etc.
 String getFrameNameForURI(String uri, boolean generatePrefix)
           
 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.
 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()
           
 edu.stanford.smi.protege.model.Cls getOWLAllDifferentClassCls()
           
 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.
 Collection getOWLClasses()
          Deprecated. use getRDFSClasses instead
 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.
 edu.stanford.smi.protege.model.Cls getOWLDatatypePropertyMetaClassCls()
           
 RDFSNamedClass getOWLDeprecatedClassClass()
           
 RDFProperty getOWLDifferentFromProperty()
           
 RDFProperty getOWLDisjointWithProperty()
           
 RDFProperty getOWLDistinctMembersProperty()
           
 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.
 edu.stanford.smi.protege.model.Cls getOWLNamedClassMetaClassCls()
           
 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.
 edu.stanford.smi.protege.model.Cls getOWLObjectPropertyMetaClassCls()
           
 RDFProperty getOWLOneOfProperty()
          Gets the owl:oneOf property.
 Collection getOWLOntologies()
          Gets all OWLOntologies in the current model.
 OWLOntology getOWLOntologyByURI(String uri)
           
 RDFResource getOWLOntologyByURI(URI uri)
          Gets the OWLOntology with a given URI.
 OWLNamedClass getOWLOntologyClass()
           
 edu.stanford.smi.protege.model.Cls getOWLOntologyCls()
           
 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()
           
 RDFSNamedClass getOWLSomeValuesFromRestrictionClass()
          Gets the meta class that represents some values from restrictions.
protected  edu.stanford.smi.protege.model.Frame[] getOWLSystemFramesArray()
          Gets the array of OWL System frames.
 Collection getOWLSystemResources()
          Gets a Collection of all system resources installed by the OWL Plugin.
 OWLTest[] getOWLTests()
           
 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 frameName)
           
 Collection getPropertyValueLiterals(RDFResource resource, RDFProperty property)