Package org.aksw.jenax.reprogen.hashid
Class HashIdCxtImpl
java.lang.Object
org.aksw.jenax.reprogen.hashid.HashIdCxtImpl
- All Implemented Interfaces:
HashIdCxt
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected BiPredicate<? super org.apache.jena.rdf.model.RDFNode,? super Integer> protected BiFunction<? super org.apache.jena.rdf.model.RDFNode,? super HashIdCxt, ? extends com.google.common.hash.HashCode> protected com.google.common.hash.HashFunctionprotected Set<org.apache.jena.rdf.model.RDFNode>The set of reachable items not yet in processingprotected Set<org.apache.jena.rdf.model.RDFNode>The set of items for which processing was requested (items are thus in processing or processed state)protected Map<org.apache.jena.rdf.model.RDFNode,com.google.common.hash.HashCode> Items that are fully processed have an entry of the processing result in this mapThe set of items in traversed state.protected boolean -
Constructor Summary
ConstructorsConstructorDescriptionHashIdCxtImpl(com.google.common.hash.HashFunction hashFn, BiFunction<? super org.apache.jena.rdf.model.RDFNode, ? super HashIdCxt, ? extends com.google.common.hash.HashCode> globalProcessor) -
Method Summary
Modifier and TypeMethodDescriptionbooleandeclarePending(org.apache.jena.rdf.model.RDFNode node) Declare traversal of a node.booleandeclareProcessing(org.apache.jena.rdf.model.RDFNode node) Declaration of processing implies a call to declareTraversal.BiFunction<? super org.apache.jena.rdf.model.RDFNode,? super HashIdCxt, ? extends com.google.common.hash.HashCode> getHashAsString(com.google.common.hash.HashCode hashCode) Default approach for converting a HashCode into string representation, such as by applying base64url encodinggetHashAsString(org.apache.jena.rdf.model.RDFNode rdfNode) com.google.common.hash.HashFunctionThe hashing used in this contextcom.google.common.hash.HashCodegetHashId(org.apache.jena.rdf.model.RDFNode node) Map<org.apache.jena.rdf.model.RDFNode,com.google.common.hash.HashCode> Set<org.apache.jena.rdf.model.RDFNode>getStringId(org.apache.jena.rdf.model.RDFNode node) booleanisPending(org.apache.jena.rdf.model.RDFNode node) booleanisVisited(org.apache.jena.rdf.model.RDFNode node) com.google.common.hash.HashCodeputHashId(org.apache.jena.rdf.model.RDFNode node, com.google.common.hash.HashCode hashCode) putStringId(org.apache.jena.rdf.model.RDFNode node, String str) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aksw.jenax.reprogen.hashid.HashIdCxt
getNodeMapping
-
Field Details
-
hashFn
protected com.google.common.hash.HashFunction hashFn -
globalProcessor
protected BiFunction<? super org.apache.jena.rdf.model.RDFNode,? super HashIdCxt, globalProcessor? extends com.google.common.hash.HashCode> -
processing
The set of items for which processing was requested (items are thus in processing or processed state) -
pending
The set of reachable items not yet in processing -
rdfNodeToHashCode
Items that are fully processed have an entry of the processing result in this map -
rdfNodeToString
The set of items in traversed state. -
hashCodeEncoder
-
useInnerIris
protected boolean useInnerIris -
filterKeep
-
depth
protected int depth
-
-
Constructor Details
-
HashIdCxtImpl
public HashIdCxtImpl(com.google.common.hash.HashFunction hashFn, BiFunction<? super org.apache.jena.rdf.model.RDFNode, ? super HashIdCxt, ? extends com.google.common.hash.HashCode> globalProcessor)
-
-
Method Details
-
declareProcessing
public boolean declareProcessing(org.apache.jena.rdf.model.RDFNode node) Declaration of processing implies a call to declareTraversal. Conversely, it is possible to traverse through nodes without triggering processing.- Specified by:
declareProcessingin interfaceHashIdCxt- Returns:
-
putHashId
public com.google.common.hash.HashCode putHashId(org.apache.jena.rdf.model.RDFNode node, com.google.common.hash.HashCode hashCode) -
getHashId
public com.google.common.hash.HashCode getHashId(org.apache.jena.rdf.model.RDFNode node) -
getGlobalProcessor
public BiFunction<? super org.apache.jena.rdf.model.RDFNode,? super HashIdCxt, getGlobalProcessor()? extends com.google.common.hash.HashCode> - Specified by:
getGlobalProcessorin interfaceHashIdCxt
-
getHashFunction
public com.google.common.hash.HashFunction getHashFunction()Description copied from interface:HashIdCxtThe hashing used in this context- Specified by:
getHashFunctionin interfaceHashIdCxt- Returns:
-
getHashIdMapping
- Specified by:
getHashIdMappingin interfaceHashIdCxt
-
isVisited
public boolean isVisited(org.apache.jena.rdf.model.RDFNode node) -
getStringId
- Specified by:
getStringIdin interfaceHashIdCxt
-
putStringId
- Specified by:
putStringIdin interfaceHashIdCxt
-
getStringIdMapping
- Specified by:
getStringIdMappingin interfaceHashIdCxt
-
getHashAsString
Description copied from interface:HashIdCxtDefault approach for converting a HashCode into string representation, such as by applying base64url encoding- Specified by:
getHashAsStringin interfaceHashIdCxt- Returns:
-
getHashAsString
- Specified by:
getHashAsStringin interfaceHashIdCxt
-
declarePending
public boolean declarePending(org.apache.jena.rdf.model.RDFNode node) Description copied from interface:HashIdCxtDeclare traversal of a node. Traversal is the search for nodes subject to processing. A node may be declared as traversed any number of times - in contrast to declareProcessing which may only be invoked once on an unprocessed node.- Specified by:
declarePendingin interfaceHashIdCxt- Returns:
-
isPending
public boolean isPending(org.apache.jena.rdf.model.RDFNode node) -
getPending
- Specified by:
getPendingin interfaceHashIdCxt
-