de.fau.cs.www8.jadeowlcodec.triplestore
Class AbsTripleStore

java.lang.Object
  extended by de.fau.cs.www8.jadeowlcodec.triplestore.AbsTripleStore
All Implemented Interfaces:
java.lang.Iterable<SimpleTriple>
Direct Known Subclasses:
MaskedTripleStore, TripleStore

public abstract class AbsTripleStore
extends java.lang.Object
implements java.lang.Iterable<SimpleTriple>

A subset of the Triplestore interface that is in no way dependant on the internal structure of the TripleStore and is completely read-only basically implements everything that uses the iterator

Author:
Ulf Schreiber

Field Summary
protected  KnowledgeBase kb
           
 
Constructor Summary
AbsTripleStore(KnowledgeBase kb)
           
 
Method Summary
 TripleStore clone()
           
 boolean contains(Triple t)
           
 boolean contains(Uri s, Uri p, AbsUriOrValue o)
           
 PhysicalBitField createBitmaskFor(AbsTripleStore other)
          method computes a bitmask for this TripleStore that has all those triples set to true that are in other
 PhysicalBitField createBitmaskWithout(AbsTripleStore other)
          method computes a bitmask for this TripleStore that has all those triples set to true that are not in other
 java.util.Set<Uri.Concept> getAllConcepts()
           
abstract  java.util.Set<Uri.Individual> getAllIndividuals()
           
 java.util.Set<Uri.Role> getAllRoles()
           
 KnowledgeBase getKb()
           
 java.lang.String getLatexShortUri(AbsUriOrValue u)
           
abstract  java.util.Set<AbsUriOrValue> getObjForSubjPred(Uri subj, Uri pred)
           
 java.lang.String getShortUri(AbsUriOrValue u)
           
abstract  int getSize()
           
abstract  java.lang.String getStatus()
           
abstract  java.util.Set<Uri> getSubjForPredObj(Uri pred, AbsUriOrValue obj)
           
 java.util.Set<SimpleTriple> getTriplesAbout(Uri uri)
           
 java.util.Set<SimpleTriple> getTriplesAboutObject(AbsUriOrValue obj)
           
 java.util.Set<SimpleTriple> getTriplesAboutPredicate(Uri pred)
           
 java.util.Set<SimpleTriple> getTriplesAboutSubject(Uri subj)
           
abstract  java.util.Iterator<SimpleTriple> iterator()
           
 ReasonerKBHandle tellInto(ReasonerKBHandle rkbh)
           
 java.lang.String toString()
           
 java.util.Set<Triple> toTripleSet()
          copies the whole triplestore to a set of triples expensive but useful for doing things like ts2.setToTripleSet(ts0.toTripleSet().retainall(ts1.toTripleSet()))
 void writeDigTell(java.io.StringWriter w)
           
 void writeDigTell(java.io.Writer w)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

kb

protected KnowledgeBase kb
Constructor Detail

AbsTripleStore

public AbsTripleStore(KnowledgeBase kb)
Method Detail

getSubjForPredObj

public abstract java.util.Set<Uri> getSubjForPredObj(Uri pred,
                                                     AbsUriOrValue obj)

getObjForSubjPred

public abstract java.util.Set<AbsUriOrValue> getObjForSubjPred(Uri subj,
                                                               Uri pred)

contains

public final boolean contains(Uri s,
                              Uri p,
                              AbsUriOrValue o)

contains

public boolean contains(Triple t)

getSize

public abstract int getSize()

iterator

public abstract java.util.Iterator<SimpleTriple> iterator()
Specified by:
iterator in interface java.lang.Iterable<SimpleTriple>

writeDigTell

public final void writeDigTell(java.io.StringWriter w)

writeDigTell

public final void writeDigTell(java.io.Writer w)
                        throws java.io.IOException
Throws:
java.io.IOException

tellInto

public final ReasonerKBHandle tellInto(ReasonerKBHandle rkbh)
Parameters:
rkbh -
Returns:
the existing uri or the new uri (if parameter uri was null) or null (in case of failure)
To do:
Ulf fragen, ob das return noch passt. Vermutung: method computes the DIG result of the given ReasonerKBHandle and returns a ReasonerKBHandle if no"">Ulf fragen

getStatus

public abstract java.lang.String getStatus()

getTriplesAbout

public final java.util.Set<SimpleTriple> getTriplesAbout(Uri uri)

getTriplesAboutSubject

public final java.util.Set<SimpleTriple> getTriplesAboutSubject(Uri subj)

getTriplesAboutPredicate

public final java.util.Set<SimpleTriple> getTriplesAboutPredicate(Uri pred)

getTriplesAboutObject

public final java.util.Set<SimpleTriple> getTriplesAboutObject(AbsUriOrValue obj)

toTripleSet

public final java.util.Set<Triple> toTripleSet()
copies the whole triplestore to a set of triples expensive but useful for doing things like ts2.setToTripleSet(ts0.toTripleSet().retainall(ts1.toTripleSet()))

Returns:
a copy of the whole TripleStore content as a Set of triples

getShortUri

public java.lang.String getShortUri(AbsUriOrValue u)

getLatexShortUri

public java.lang.String getLatexShortUri(AbsUriOrValue u)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

clone

public TripleStore clone()
Overrides:
clone in class java.lang.Object

createBitmaskFor

public PhysicalBitField createBitmaskFor(AbsTripleStore other)
method computes a bitmask for this TripleStore that has all those triples set to true that are in other

Parameters:
other -
Returns:
PhysicalBitField a bitmask for this TripleStore that has all those triples set to true

createBitmaskWithout

public PhysicalBitField createBitmaskWithout(AbsTripleStore other)
method computes a bitmask for this TripleStore that has all those triples set to true that are not in other

Parameters:
other -
Returns:
PhysicalBitField a bitmask for this TripleStore that has all those triples set to true

getAllIndividuals

public abstract java.util.Set<Uri.Individual> getAllIndividuals()

getAllConcepts

public java.util.Set<Uri.Concept> getAllConcepts()

getAllRoles

public java.util.Set<Uri.Role> getAllRoles()

getKb

public KnowledgeBase getKb()


Copyright 2007 Moritz Goeb, Bernhard Schiemann, Ulf Schreiber of Chair of Artificial Intelligence, University of Erlangen-Nuremberg