Class ReasoningMonitorRelation
java.lang.Object
com.semedy.reasoner.reasoning.monitor.RelationAdapter
com.semedy.reasoner.reasoning.monitor.ReasoningMonitorRelation
- All Implemented Interfaces:
BaseRelation,Relation
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddTuple(int tupleaddress) add a tuple to the relationbooleanaddTuple(long[] tuple) add a tuple to the relationbooleanaddTuple(TupleBuffer terms) add a tuple to the relationvoidclear()remove all tuplesvoidclose()Close the relation.static Relation[]create(ReasoningRelation... relations) static Relation[]create(List<ReasoningRelation> relations) createIndex(int[] indexedpositions) Get or create a simple (not sorted index) by the argument positions in indexed positions.static RelationcreateSingle(ReasoningRelation relation) createSortedIndex(int[] indexedpositions) ret or create a sorted index given by the argument positions in indexed positionselements()returns an enumerator for all tuplesget the caching infolong[]get an input buffer for relationlonggetNumberOfMatchingTuples(int[] arguments, long[] values) booleanremoveTuple(int tupleaddress) remove a tuple from the relationbooleanremoveTuple(TupleBuffer buffer) remove a tuple from the relationMethods inherited from class com.semedy.reasoner.reasoning.monitor.RelationAdapter
addSubRelation, checkSanity, containsTuple, containsTuple, containsTuple, delete, deSelect, elements, flush, getArity, getDataFilePath, getDirectEncodedType, getFilename, getGrounds, getIdentifier, getIndex, getInternalArity, getMaxValue, getMinValue, getName, getNumberOfDifferentValues, getNumberOfDifferentValues, getPredicateSymbol, getSortedIndex, hasDuplicates, hasIndices, isDirectEncoded, isEmpty, isOverwrittenByTuple, isPersistent, isTemporary, lastModificationTime, mayContainDuplicates, overwriteTuple, overwriteTuple, readBinaryFromBackup, readTupleFile, registerListener, removeIndices, removeTuple, select, size, sizeInBytes, subtractRelation, transactionBegin, transactionCommit, transactionRollback, union, unionRelation, writeBinary, writeBinaryToBackup, writeBinaryWithGrounds
-
Method Details
-
createSingle
-
create
-
create
-
elements
Description copied from interface:BaseRelationreturns an enumerator for all tuples- Specified by:
elementsin interfaceBaseRelation- Overrides:
elementsin classRelationAdapter- Returns:
- returns enumerator for tuples
- Throws:
IOExceptionEDBException
-
createSortedIndex
Description copied from interface:BaseRelationret or create a sorted index given by the argument positions in indexed positions- Specified by:
createSortedIndexin interfaceBaseRelation- Overrides:
createSortedIndexin classRelationAdapter- Returns:
- Throws:
IOException
-
createIndex
Description copied from interface:BaseRelationGet or create a simple (not sorted index) by the argument positions in indexed positions.- Specified by:
createIndexin interfaceBaseRelation- Overrides:
createIndexin classRelationAdapter- Parameters:
indexedpositions- , positions which are indexed- Returns:
- index
- Throws:
IOException
-
clear
Description copied from interface:BaseRelationremove all tuples- Specified by:
clearin interfaceBaseRelation- Overrides:
clearin classRelationAdapter- Throws:
IOException
-
close
Description copied from interface:BaseRelationClose the relation. Must be called to finalize the relation correctly- Specified by:
closein interfaceBaseRelation- Overrides:
closein classRelationAdapter- Throws:
IOException
-
getCacheInfo
Description copied from interface:BaseRelationget the caching info- Specified by:
getCacheInfoin interfaceBaseRelation- Overrides:
getCacheInfoin classRelationAdapter- Returns:
- object containing caching info
-
addTuple
Description copied from interface:BaseRelationadd a tuple to the relation- Specified by:
addTuplein interfaceBaseRelation- Overrides:
addTuplein classRelationAdapter- Parameters:
terms- the tuple to add- Returns:
- tuple has been added
- Throws:
IOException
-
addTuple
Description copied from interface:BaseRelationadd a tuple to the relation- Specified by:
addTuplein interfaceBaseRelation- Overrides:
addTuplein classRelationAdapter- Parameters:
tuple- the tuple to add- Returns:
- tuple has been added
- Throws:
IOException
-
removeTuple
Description copied from interface:BaseRelationremove a tuple from the relation- Specified by:
removeTuplein interfaceBaseRelation- Overrides:
removeTuplein classRelationAdapter- Parameters:
tupleaddress- , address of tuple in tuple store- Returns:
- true, if tuple has been removed
- Throws:
IOException
-
removeTuple
Description copied from interface:BaseRelationremove a tuple from the relation- Specified by:
removeTuplein interfaceBaseRelation- Overrides:
removeTuplein classRelationAdapter- Parameters:
buffer- , tuple to be removed- Returns:
- true, if tuple has been removed
- Throws:
IOException
-
getInputBuffer
Description copied from interface:BaseRelationget an input buffer for relation- Specified by:
getInputBufferin interfaceBaseRelation- Overrides:
getInputBufferin classRelationAdapter- Returns:
- a tuple store which serves as buffer for input tuples
-
addTuple
Description copied from interface:BaseRelationadd a tuple to the relation- Specified by:
addTuplein interfaceBaseRelation- Overrides:
addTuplein classRelationAdapter- Parameters:
tupleaddress- the tuple to add- Returns:
- tuple has been added
- Throws:
IOException
-
getFilter
public long[] getFilter() -
getNumberOfMatchingTuples
public long getNumberOfMatchingTuples(int[] arguments, long[] values) throws IOException, EDBException - Overrides:
getNumberOfMatchingTuplesin classRelationAdapter- Throws:
IOExceptionEDBException
-