Overview | Package | Class | Tree | Deprecated | Index | Help
| Protégé-OWL 3.4 rc2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

All Superinterfaces:
  edu.stanford.smi.protege.util.Disposable, NamespaceMap

All Known Implementing Classes:
  TripleStoreImpl

    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)`
`void` | `addIOAddress(String uri)`
`boolean` | `contains(RDFResource subject, RDFProperty predicate, Object object)`
`boolean` | `contains(Triple triple)`
`void` | `dispose()` Disposes this triple store.
`void` | `dump(Level level)` Debugging only.
`RDFResource` | `getHomeResource(String name)`
`Collection<String>` | `getIOAddresses()` Tracks the set of io names that have been used to retrieve this triple store.
`String` | `getName()`
`NamespaceManager` | `getNamespaceManager()`
`edu.stanford.smi.protege.model.framestore.NarrowFrameStore` | `getNarrowFrameStore()` Provides access to the internal Protege storage for low-level access.
`String` | `getOriginalXMLBase()`
`OWLOntology` | `getOWLOntology()`
`Set<RDFSNamedClass>` | `getUserDefinedClasses()`
`
`<X extends RDFResource> Set<X>`
` | `getUserDefinedDirectInstancesOf(RDFSClass rdfsClass, Class<? extends X> javaClass)` Returns the direct class instances defined in this triplestore as objects of `X`.
`
`<X extends RDFResource> Set<X>`
` | `getUserDefinedInstancesOf(RDFSClass rdfsClass, Class<? extends X> javaClass)` Returns the all (direct and indirect) class instances defined in this triplestore as objects of `X`.
`Set<RDFProperty>` | `getUserDefinedProperties()`
`Iterator<RDFResource>` | `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<RDFResource>` | `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<Triple>` | `listTriples()`
`Iterator<Triple>` | `listTriplesWithObject(RDFObject object)` Lists all Triples that have a given object.
`Iterator<Triple>` | `listTriplesWithSubject(RDFResource subject)` Lists all Triples that have a given subject.
`void` | `remove(RDFResource subject, RDFProperty predicate, Object object)`
`void` | `remove(Triple triple)`
`void` | `removeIOAddress(String uri)`
`void` | `setName(String value)`
`void` | `setOriginalXMLBase(String xmlBase)`
`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

### getNamespaceManager

    NamespaceManager getNamespaceManager()

### getOWLOntology

    OWLOntology getOWLOntology()

### 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<RDFResource> 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<RDFResource> 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<Triple> listTriples()

### getUserDefinedClasses

    Set<RDFSNamedClass> getUserDefinedClasses()

  Returns:
    All the user defined classes (non-system) defined in this triplestore.

### getUserDefinedProperties

    Set<RDFProperty> getUserDefinedProperties()

  Returns:
    All the user defined properties (non-system) defined in this triplestore.

### getUserDefinedDirectInstancesOf

    <X extends RDFResource> Set<X> getUserDefinedDirectInstancesOf(RDFSClass rdfsClass,
                                                                   Class<? extends X> javaClass)

  Returns the direct class instances defined in this triplestore as objects of `X`.

### getUserDefinedInstancesOf

    <X extends RDFResource> Set<X> getUserDefinedInstancesOf(RDFSClass rdfsClass,
                                                             Class<? extends X> javaClass)

  Returns the all (direct and indirect) class instances defined in this triplestore as objects of `X`.

### listTriplesWithObject

    Iterator<Triple> 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<Triple> 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)

### sortPropertyValues

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

### getOriginalXMLBase

    String getOriginalXMLBase()

### setOriginalXMLBase

    void setOriginalXMLBase(String xmlBase)

### dump

    void dump(Level level)

  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`

### getIOAddresses

    Collection<String> getIOAddresses()

  Tracks the set of io names that have been used to retrieve this triple store. This can be different than the ontology name in the case of a broken import statement.

### addIOAddress

    void addIOAddress(String uri)

### removeIOAddress

    void removeIOAddress(String uri)

Overview | Package | Class | Tree | Deprecated | Index | Help
| Protégé-OWL 3.4 rc2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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