de.fau.cs.www8.jadeowlcodec.triplestore
Class TripleStore
java.lang.Object
de.fau.cs.www8.jadeowlcodec.triplestore.AbsTripleStore
de.fau.cs.www8.jadeowlcodec.triplestore.TripleStore
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Iterable<SimpleTriple>
public class TripleStore
- extends AbsTripleStore
- implements java.lang.Cloneable, java.lang.Iterable<SimpleTriple>
| Fields inherited from class de.fau.cs.www8.jadeowlcodec.triplestore.AbsTripleStore |
kb |
|
Method Summary |
java.util.Map<java.net.URI,java.util.Set<java.lang.Class<? extends Uri>>> |
checkForTwins()
method computes all keys that are stored in more than one class segment |
void |
clearIndices()
call this to compacten a triplestore that once used a few
custom indices but won't ever need them anymore |
void |
copyIndividual(Uri.Individual individualUri,
AssertionSet aset)
|
java.util.Set<Uri.RdfANodeID> |
getAllANodes()
|
java.util.Set<Uri.Concept> |
getAllConcepts()
|
java.util.Set<Uri.Individual> |
getAllIndividuals()
|
java.util.Set<AbsUriOrValue> |
getObjForSubjPred(Uri subj,
Uri pred)
|
SegmentedMap<AbsUriOrValue,SegmentedSet<Uri>> |
getObjSubjForPredicate(Uri pred)
|
SegmentedMap<Uri,SegmentedSet<AbsUriOrValue>> |
getPredObjForSubject(Uri subj)
|
java.util.Map<Uri.Role,SegmentedMap<AbsUriOrValue,SegmentedSet<Uri>>> |
getRoleMapsObjSubj()
|
java.util.Map<Uri.Role,SegmentedMap<Uri,SegmentedSet<AbsUriOrValue>>> |
getRoleTriplesSubjObj()
|
int |
getSize()
|
java.lang.String |
getStatus()
|
SegmentedMap<Uri,SegmentedSet<AbsUriOrValue>> |
getSubjectObjectForRole(Uri.Role r)
|
java.util.Set<Uri> |
getSubjForPredObj(Uri pred,
AbsUriOrValue obj)
|
SegmentedMap<Uri,SegmentedSet<AbsUriOrValue>> |
getSubjObjForPredicate(Uri pred)
|
java.util.Iterator<SimpleTriple> |
iterator()
|
void |
put(Triple t)
|
void |
put(Uri s,
Uri p,
AbsUriOrValue o)
|
void |
remove(Triple t)
|
void |
remove(Uri s,
Uri p,
AbsUriOrValue o)
|
void |
removeAll(AbsTripleStore toRemove)
|
void |
setToTripleSet(java.util.Set<SimpleTriple> in)
clears the whole triplestore and sets it to a given set of triples
expensive, because it iterates all the triplestore vector!
but it is useful for doing things like
ts2.setToTripleSet(ts0.toTripleSet().retainall(ts1.toTripleSet())) |
| Methods inherited from class de.fau.cs.www8.jadeowlcodec.triplestore.AbsTripleStore |
clone, contains, contains, createBitmaskFor, createBitmaskWithout, getAllRoles, getKb, getLatexShortUri, getShortUri, getTriplesAbout, getTriplesAboutObject, getTriplesAboutPredicate, getTriplesAboutSubject, tellInto, toString, toTripleSet, writeDigTell, writeDigTell |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TripleStore
public TripleStore(KnowledgeBase kb)
TripleStore
public TripleStore()
getSubjectObjectForRole
public SegmentedMap<Uri,SegmentedSet<AbsUriOrValue>> getSubjectObjectForRole(Uri.Role r)
getRoleTriplesSubjObj
public java.util.Map<Uri.Role,SegmentedMap<Uri,SegmentedSet<AbsUriOrValue>>> getRoleTriplesSubjObj()
getRoleMapsObjSubj
public java.util.Map<Uri.Role,SegmentedMap<AbsUriOrValue,SegmentedSet<Uri>>> getRoleMapsObjSubj()
getPredObjForSubject
public SegmentedMap<Uri,SegmentedSet<AbsUriOrValue>> getPredObjForSubject(Uri subj)
getSubjForPredObj
public java.util.Set<Uri> getSubjForPredObj(Uri pred,
AbsUriOrValue obj)
- Specified by:
getSubjForPredObj in class AbsTripleStore
getObjForSubjPred
public java.util.Set<AbsUriOrValue> getObjForSubjPred(Uri subj,
Uri pred)
- Specified by:
getObjForSubjPred in class AbsTripleStore
getObjSubjForPredicate
public SegmentedMap<AbsUriOrValue,SegmentedSet<Uri>> getObjSubjForPredicate(Uri pred)
getSubjObjForPredicate
public SegmentedMap<Uri,SegmentedSet<AbsUriOrValue>> getSubjObjForPredicate(Uri pred)
put
public void put(Uri s,
Uri p,
AbsUriOrValue o)
remove
public void remove(Uri s,
Uri p,
AbsUriOrValue o)
put
public void put(Triple t)
remove
public void remove(Triple t)
getSize
public int getSize()
- Specified by:
getSize in class AbsTripleStore
iterator
public java.util.Iterator<SimpleTriple> iterator()
- Specified by:
iterator in interface java.lang.Iterable<SimpleTriple>- Specified by:
iterator in class AbsTripleStore
getAllIndividuals
public java.util.Set<Uri.Individual> getAllIndividuals()
- Specified by:
getAllIndividuals in class AbsTripleStore
getAllConcepts
public java.util.Set<Uri.Concept> getAllConcepts()
- Overrides:
getAllConcepts in class AbsTripleStore
getAllANodes
public java.util.Set<Uri.RdfANodeID> getAllANodes()
copyIndividual
public void copyIndividual(Uri.Individual individualUri,
AssertionSet aset)
getStatus
public java.lang.String getStatus()
- Specified by:
getStatus in class AbsTripleStore
checkForTwins
public java.util.Map<java.net.URI,java.util.Set<java.lang.Class<? extends Uri>>> checkForTwins()
- method computes all keys that are stored in more than one class segment
- Returns:
- all keys that are stored in more than one class segment
clearIndices
public void clearIndices()
- call this to compacten a triplestore that once used a few
custom indices but won't ever need them anymore
setToTripleSet
public void setToTripleSet(java.util.Set<SimpleTriple> in)
- clears the whole triplestore and sets it to a given set of triples
expensive, because it iterates all the triplestore vector!
but it is useful for doing things like
ts2.setToTripleSet(ts0.toTripleSet().retainall(ts1.toTripleSet()))
removeAll
public void removeAll(AbsTripleStore toRemove)
Copyright 2007 Moritz Goeb, Bernhard Schiemann, Ulf Schreiber of Chair of Artificial Intelligence, University of Erlangen-Nuremberg