public class WalkConstraintGeneric extends Object implements WalkConstraint
| Constructor and Description |
|---|
WalkConstraintGeneric() |
WalkConstraintGeneric(Map<org.openrdf.model.URI,Direction> walkRules)
Build an instance of walk constraint considering the walk rule.
|
WalkConstraintGeneric(org.openrdf.model.URI acceptedPredicate,
Direction dir)
Build an instance of walk constraint considering the given predicate URI
and direction.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptInWalks()
Check if the walk give access to IN edges
|
boolean |
acceptOutWalks()
Check if the walk give access to OUT edges
|
void |
addAcceptedTraversal(Set<org.openrdf.model.URI> pred,
Direction dir)
Add the current Traversal in the mapping of admitted traversal.
|
void |
addAcceptedTraversal(org.openrdf.model.URI pred,
Direction dir)
Add the current Traversal in the mapping of admitted traversal.
|
void |
addWalkconstraints(WalkConstraint wc)
Add to the current constraints the ones defines in the walk constraint
passed in parameter.
|
Set<org.openrdf.model.URI> |
getAcceptedPredicates()
Access to a view of the set of predicates (edge types) the walk consider
during edge evaluation.
|
Set<org.openrdf.model.URI> |
getAcceptedWalks_DIR_BOTH()
Intersection of
WalkConstraint.getAcceptedWalks_DIR_IN() and
WalkConstraint.getAcceptedWalks_DIR_OUT(). |
Set<org.openrdf.model.URI> |
getAcceptedWalks_DIR_IN()
Access to a view of the set of predicates which can be traversed from
target to source, i.e.
|
Set<org.openrdf.model.URI> |
getAcceptedWalks_DIR_OUT()
Access to a view of the set of predicates which can be traversed from
source to target i.e.
|
Direction |
getAssociatedDirection(org.openrdf.model.URI uri)
Return the direction associated to the given predicate the object admits
|
boolean |
respectConstaints(E e,
Direction dir)
The method defines the behavior of a walk reaching the given edge.
|
String |
toString() |
public WalkConstraintGeneric()
public WalkConstraintGeneric(Map<org.openrdf.model.URI,Direction> walkRules)
walkRules - a map containing the predicate to consider and their
respective directionpublic WalkConstraintGeneric(org.openrdf.model.URI acceptedPredicate,
Direction dir)
acceptedPredicate - the predicate URI to considerdir - the direction associatedpublic boolean respectConstaints(E e, Direction dir)
WalkConstraintrespectConstaints in interface WalkConstrainte - the vertex to evaluatesdir - the direction of the edgepublic Set<org.openrdf.model.URI> getAcceptedPredicates()
WalkConstraintgetAcceptedPredicates in interface WalkConstraintpublic Set<org.openrdf.model.URI> getAcceptedWalks_DIR_IN()
WalkConstraintgetAcceptedWalks_DIR_IN in interface WalkConstraintpublic Set<org.openrdf.model.URI> getAcceptedWalks_DIR_OUT()
WalkConstraintgetAcceptedWalks_DIR_OUT in interface WalkConstraintpublic Set<org.openrdf.model.URI> getAcceptedWalks_DIR_BOTH()
WalkConstraintWalkConstraint.getAcceptedWalks_DIR_IN() and
WalkConstraint.getAcceptedWalks_DIR_OUT(). Return the set of URIs corresponding
to the valid predicatesgetAcceptedWalks_DIR_BOTH in interface WalkConstraintpublic Direction getAssociatedDirection(org.openrdf.model.URI uri)
WalkConstraintgetAssociatedDirection in interface WalkConstrainturi - the URI of the predicate of interestpublic void addAcceptedTraversal(org.openrdf.model.URI pred,
Direction dir)
WalkConstraintaddAcceptedTraversal in interface WalkConstraintpred - the predicate URI (not null).dir - the accepted direction corresponding to the given predicate
(not null).public void addAcceptedTraversal(Set<org.openrdf.model.URI> pred, Direction dir)
WalkConstraintaddAcceptedTraversal in interface WalkConstraintpred - the predicate URI (not null).dir - the accepted direction corresponding to the given predicate
(not null).public void addWalkconstraints(WalkConstraint wc)
WalkConstraintaddWalkconstraints in interface WalkConstraintwc - the walk constraintpublic boolean acceptOutWalks()
WalkConstraintacceptOutWalks in interface WalkConstraintpublic boolean acceptInWalks()
WalkConstraintacceptInWalks in interface WalkConstraintCopyright © 2014. All rights reserved.