Protégé-OWL 3.3.1

edu.stanford.smi.protegex.owl.model.triplestore
Interface TripleStore

All Superinterfaces:
edu.stanford.smi.protege.util.Disposable, NamespaceMap
All Known Implementing Classes:
AbstractTripleStore, DatabaseTripleStore, JenaTripleStore

public interface TripleStore
extends NamespaceMap, edu.stanford.smi.protege.util.Disposable

An interface for low-level access to the single triples in an OWLModel. All current implementations are better suited for querying than actually writing triples, so better don't modify the triples in your own application yet. If you need to do that, make sure that you invoke the post-processor as done in the ProtegeOWLParser.

Author:
Holger Knublauch

Method Summary
 void add(RDFResource subject, RDFProperty predicate, Object object)
           
 void add(Triple triple)
           
 boolean contains(RDFResource subject, RDFProperty predicate, Object object)
           
 boolean contains(Triple triple)
           
 void dispose()
          Disposes this triple store.
 void dump()
          Debugging only.
 edu.stanford.smi.protege.model.FrameID generateFrameID()
           
 RDFResource getHomeResource(String name)
           
 String getName()
           
 edu.stanford.smi.protege.model.framestore.NarrowFrameStore getNarrowFrameStore()
          Provides access to the internal Protege storage for low-level access.
 Iterator listHomeResources()
          Gets all resources that have their "home" in this triple store.
 Iterator listObjects(RDFResource subject, RDFProperty property)
          Gets the values of a given subject/property combination.
 Iterator listSubjects(RDFProperty property)
          The the subjects of all triples where a given property has any value.
 Iterator listSubjects(RDFProperty predicate, Object object)
          Gets the subjects of all triples with a given predicate and object.
 Iterator listTriples()
           
 Iterator listTriplesWithObject(RDFObject object)
          Lists all Triples that have a given object.
 Iterator listTriplesWithSubject(RDFResource subject)
          Lists all Triples that have a given subject.
 void remove(RDFResource subject, RDFProperty predicate, Object object)
           
 void remove(Triple triple)
           
 void setName(String value)
           
 void setRDFResourceName(RDFResource resource, String name)
           
 void sortPropertyValues(RDFResource resource, RDFProperty property, Comparator comparator)
           
 
Methods inherited from interface edu.stanford.smi.protegex.owl.model.NamespaceMap
getDefaultNamespace, getNamespaceForPrefix, getPrefix, getPrefixes, removePrefix, setDefaultNamespace, setDefaultNamespace, setPrefix, setPrefix
 

Method Detail

generateFrameID

edu.stanford.smi.protege.model.FrameID generateFrameID()

add

void add(Triple triple)

add

void add(RDFResource subject,
         RDFProperty predicate,
         Object object)

contains

boolean contains(Triple triple)

contains

boolean contains(RDFResource subject,
                 RDFProperty predicate,
                 Object object)

getName

String getName()

getHomeResource

RDFResource getHomeResource(String name)

getNarrowFrameStore

edu.stanford.smi.protege.model.framestore.NarrowFrameStore getNarrowFrameStore()
Provides access to the internal Protege storage for low-level access. This method should only be used by experienced users.

Returns:
the NarrowFrameStore

listHomeResources

Iterator listHomeResources()
Gets all resources that have their "home" in this triple store. The home is defined to be the TripleStore with the :NAME value of the resource.

Returns:
an Iterator of RDFResources

listObjects

Iterator listObjects(RDFResource subject,
                     RDFProperty property)
Gets the values of a given subject/property combination.

Parameters:
subject -
property -
Returns:
a Collection of Objects (e.g. RDFResources)

listSubjects

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

listSubjects

Iterator listSubjects(RDFProperty predicate,
                      Object object)
Gets the subjects of all triples with a given predicate and object.

Parameters:
predicate - the predicate to match
object - the object to match
Returns:
an Iterator of RDFResources

listTriples

Iterator listTriples()

listTriplesWithObject

Iterator listTriplesWithObject(RDFObject object)
Lists all Triples that have a given object.

Parameters:
object - the object to get the triples of
Returns:
an Iterator of Triples

listTriplesWithSubject

Iterator listTriplesWithSubject(RDFResource subject)
Lists all Triples that have a given subject. In other words, this returns all property-value pairs of a given resource. Note that this operation is currently not efficiently implemented.

Parameters:
subject - the subject in the triples
Returns:
an Iterator of Triples

remove

void remove(Triple triple)

remove

void remove(RDFResource subject,
            RDFProperty predicate,
            Object object)

setName

void setName(String value)

setRDFResourceName

void setRDFResourceName(RDFResource resource,
                        String name)

sortPropertyValues

void sortPropertyValues(RDFResource resource,
                        RDFProperty property,
                        Comparator comparator)

dump

void dump()
Debugging only.


dispose

void dispose()
Disposes this triple store. Called by the triple store manager when an OWL model is disposed.

Specified by:
dispose in interface edu.stanford.smi.protege.util.Disposable

Protégé-OWL 3.3.1

Submit a bug report or feature request
Copyright (c) 1998-2007 Stanford University.