|
Protégé-OWL 3.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.smi.protegex.owl.model.triplestore.impl.TripleStoreModelImpl
public class TripleStoreModelImpl
Field Summary | |
---|---|
protected edu.stanford.smi.protege.model.framestore.MergingNarrowFrameStore |
mnfs
|
static String |
SUPPRESS_DUPLICATE_PROPERTY_VALUES
|
Constructor Summary | |
---|---|
TripleStoreModelImpl(OWLModel owlModel)
|
Method Summary | |
---|---|
TripleStore |
createActiveImportedTripleStore(edu.stanford.smi.protege.model.framestore.NarrowFrameStore frameStore)
A low level method that creates and adds a new TripleStore to implement imports. |
void |
deleteTripleStore(TripleStore tripleStore)
Deletes an imported TripleStore. |
void |
dispose()
Cleans up all the triple stores managed by this. |
static void |
ensureActiveTripleStore(RDFResource resource)
|
TripleStore |
getActiveTripleStore()
Gets the currently "active" TripleStore, which all future set operations will be operating on. |
TripleStore |
getHomeTripleStore(edu.stanford.smi.protege.model.Instance subject,
edu.stanford.smi.protege.model.Slot predicate,
Object object)
The home triple store of the triple defined by the method arguments. |
TripleStore |
getHomeTripleStore(RDFResource resource)
Gets the "home" triple store of a given resource. |
Collection |
getPropertyValues(RDFResource resource,
RDFProperty property)
A low-level access method to access property values while the usual API methods are in an invalid state. |
Collection |
getSlotValues(edu.stanford.smi.protege.model.Instance instance,
edu.stanford.smi.protege.model.Slot slot)
Similar to getPropertyValues but for native Protege slots and instances. |
TripleStore |
getSystemTripleStore()
Gets the System Triple Store. |
TripleStore |
getTopTripleStore()
Gets the "top" TripleStore, which is the first user-editable TripleStore, from which all imports start. |
TripleStore |
getTripleStore(String name)
Gets the TripleStore with a given name. |
TripleStore |
getTripleStoreByDefaultNamespace(String namespace)
Gets the first TripleStore that uses a given default namespace. |
List<TripleStore> |
getTripleStores()
Gets the TripleStores which provide an RDF triple-based view onto this OWLModel. |
boolean |
isActiveTriple(RDFResource subject,
RDFProperty predicate,
Object object)
Checks if a given triple is stored in the currently active TripleStore. |
boolean |
isEditableTriple(RDFResource subject,
RDFProperty predicate,
Object object)
Checks if a given triple is stored in an editable TripleStore. |
boolean |
isEditableTripleStore(TripleStore tripleStore)
|
Iterator<RDFResource> |
listSubjects(RDFProperty property)
Returns an iterator of all subjects in any triplestore that have a value for property. |
Iterator<Triple> |
listTriplesWithSubject(RDFResource subject)
Combines the result of the corresponding method of each TripleStore. |
Iterator<TripleStore> |
listUserTripleStores()
Provides an Iterator on all user TripleStores, i.e. |
void |
replaceJavaObject(RDFResource subject)
|
void |
setActiveTripleStore(TripleStore tripleStore)
Specifies which TripleStore shall be the active one for future write operations. |
void |
setHomeTripleStore(RDFResource resource,
TripleStore tripleStore)
Moves a given RDFResource into another "home" TripleStore. |
void |
setTopTripleStore(TripleStore tripleStore)
Sets the top level triple store to the currently active triple store. |
void |
setViewActiveOnly(boolean viewActiveOnly)
|
String |
toString()
|
void |
updateEditableResourceState()
Changes the isIncluded() value of all resources to reflect the
currently active TripleStore. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String SUPPRESS_DUPLICATE_PROPERTY_VALUES
protected edu.stanford.smi.protege.model.framestore.MergingNarrowFrameStore mnfs
Constructor Detail |
---|
public TripleStoreModelImpl(OWLModel owlModel)
Method Detail |
---|
public TripleStore createActiveImportedTripleStore(edu.stanford.smi.protege.model.framestore.NarrowFrameStore frameStore)
TripleStoreModel
createActiveImportedTripleStore
in interface TripleStoreModel
frameStore
- the FrameStore to be used with the TripleStore
public void deleteTripleStore(TripleStore tripleStore)
TripleStoreModel
deleteTripleStore
in interface TripleStoreModel
tripleStore
- the TripleStore to delete (must be neither system nor top TripleStore)public static void ensureActiveTripleStore(RDFResource resource)
public TripleStore getTripleStoreByDefaultNamespace(String namespace)
TripleStoreModel
getTripleStoreByDefaultNamespace
in interface TripleStoreModel
namespace
- the namespace
public TripleStore getActiveTripleStore()
TripleStoreModel
getActiveTripleStore
in interface TripleStoreModel
TripleStoreModel.getTripleStores()
,
TripleStoreModel.setActiveTripleStore(edu.stanford.smi.protegex.owl.model.triplestore.TripleStore)
public TripleStore getHomeTripleStore(RDFResource resource)
TripleStoreModel
getHomeTripleStore
in interface TripleStoreModel
resource
- the RDFResource to find the home TripleStore of
public TripleStore getHomeTripleStore(edu.stanford.smi.protege.model.Instance subject, edu.stanford.smi.protege.model.Slot predicate, Object object)
TripleStoreModel
getHomeTripleStore
in interface TripleStoreModel
subject
- - the subject of the triplepredicate
- - the predicate of the tripleobject
- - the object of the triple
(subject, predicate, object)
is definedpublic Collection getPropertyValues(RDFResource resource, RDFProperty property)
TripleStoreModel
getPropertyValues
in interface TripleStoreModel
resource
- the resource to get the property values ofproperty
- the property to get the values of
public Collection getSlotValues(edu.stanford.smi.protege.model.Instance instance, edu.stanford.smi.protege.model.Slot slot)
TripleStoreModel
getSlotValues
in interface TripleStoreModel
instance
- the instance to get the values ofslot
- the slot to get the values of
public TripleStore getTripleStore(String name)
TripleStoreModel
getTripleStore
in interface TripleStoreModel
name
- the name / import URI of the TripleStore
public TripleStore getSystemTripleStore()
TripleStoreModel
getSystemTripleStore
in interface TripleStoreModel
public List<TripleStore> getTripleStores()
TripleStoreModel
getTripleStores
in interface TripleStoreModel
public TripleStore getTopTripleStore()
TripleStoreModel
getTopTripleStore
in interface TripleStoreModel
public void setTopTripleStore(TripleStore tripleStore)
TripleStoreModel
setTopTripleStore
in interface TripleStoreModel
public boolean isActiveTriple(RDFResource subject, RDFProperty predicate, Object object)
TripleStoreModel
getActiveTripleStore().contains(...)
.
isActiveTriple
in interface TripleStoreModel
subject
- the subject of the triplepredicate
- the predicate of the tripleobject
- the object of the triple
public boolean isEditableTriple(RDFResource subject, RDFProperty predicate, Object object)
TripleStoreModel
isEditableTriple
in interface TripleStoreModel
subject
- the subject of the triplepredicate
- the predicate of the tripleobject
- the object of the triple
public boolean isEditableTripleStore(TripleStore tripleStore)
isEditableTripleStore
in interface TripleStoreModel
public Iterator<Triple> listTriplesWithSubject(RDFResource subject)
TripleStoreModel
listTriplesWithSubject
in interface TripleStoreModel
subject
- the subject to get all triples of
public Iterator<RDFResource> listSubjects(RDFProperty property)
TripleStoreModel
listSubjects
in interface TripleStoreModel
public Iterator<TripleStore> listUserTripleStores()
TripleStoreModel
getTripleStores()
except for the first (system) TripleStore.
listUserTripleStores
in interface TripleStoreModel
public void replaceJavaObject(RDFResource subject)
replaceJavaObject
in interface TripleStoreModel
public void setActiveTripleStore(TripleStore tripleStore)
TripleStoreModel
setActiveTripleStore
in interface TripleStoreModel
tripleStore
- one of the results of a recent call to getTripleStores()
.public void setHomeTripleStore(RDFResource resource, TripleStore tripleStore)
TripleStoreModel
setHomeTripleStore
in interface TripleStoreModel
resource
- the RDFResource to movetripleStore
- the new home TripleStoepublic void updateEditableResourceState()
TripleStoreModel
isIncluded()
value of all resources to reflect the
currently active TripleStore. This should be called if the editable flag
is relevant (e.g. in a user interface) after changes of the active TripleStore.
updateEditableResourceState
in interface TripleStoreModel
public void dispose()
TripleStoreModel
dispose
in interface edu.stanford.smi.protege.util.Disposable
dispose
in interface TripleStoreModel
public void setViewActiveOnly(boolean viewActiveOnly)
setViewActiveOnly
in interface TripleStoreModel
public String toString()
toString
in class Object
|
Protégé-OWL 3.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |