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)
WalkConstraint
respectConstaints
in interface WalkConstraint
e
- the vertex to evaluatesdir
- the direction of the edgepublic Set<org.openrdf.model.URI> getAcceptedPredicates()
WalkConstraint
getAcceptedPredicates
in interface WalkConstraint
public Set<org.openrdf.model.URI> getAcceptedWalks_DIR_IN()
WalkConstraint
getAcceptedWalks_DIR_IN
in interface WalkConstraint
public Set<org.openrdf.model.URI> getAcceptedWalks_DIR_OUT()
WalkConstraint
getAcceptedWalks_DIR_OUT
in interface WalkConstraint
public Set<org.openrdf.model.URI> getAcceptedWalks_DIR_BOTH()
WalkConstraint
WalkConstraint.getAcceptedWalks_DIR_IN()
and
WalkConstraint.getAcceptedWalks_DIR_OUT()
. Return the set of URIs corresponding
to the valid predicatesgetAcceptedWalks_DIR_BOTH
in interface WalkConstraint
public Direction getAssociatedDirection(org.openrdf.model.URI uri)
WalkConstraint
getAssociatedDirection
in interface WalkConstraint
uri
- the URI of the predicate of interestpublic void addAcceptedTraversal(org.openrdf.model.URI pred, Direction dir)
WalkConstraint
addAcceptedTraversal
in interface WalkConstraint
pred
- 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)
WalkConstraint
addAcceptedTraversal
in interface WalkConstraint
pred
- the predicate URI (not null).dir
- the accepted direction corresponding to the given predicate
(not null).public void addWalkconstraints(WalkConstraint wc)
WalkConstraint
addWalkconstraints
in interface WalkConstraint
wc
- the walk constraintpublic boolean acceptOutWalks()
WalkConstraint
acceptOutWalks
in interface WalkConstraint
public boolean acceptInWalks()
WalkConstraint
acceptInWalks
in interface WalkConstraint
Copyright © 2014. All rights reserved.