Class PathConstraint

java.lang.Object
org.biopax.paxtools.pattern.constraint.ConstraintAdapter
org.biopax.paxtools.pattern.constraint.PathConstraint
All Implemented Interfaces:
Constraint

public class PathConstraint extends ConstraintAdapter
PathConstraint encapsulates PathAccessor of Paxtools.
Author:
Ozgun Babur
  • Constructor Details

    • PathConstraint

      public PathConstraint(String path)
      Constructor with the constructor String of PathAccessor.
      Parameters:
      path - constructor String of PathAccessor
  • Method Details

    • satisfies

      public boolean satisfies(Match match, int... ind)
      Checks if the PathAccessor is generating the second mapped element.
      Specified by:
      satisfies in interface Constraint
      Overrides:
      satisfies in class ConstraintAdapter
      Parameters:
      match - current pattern match
      ind - mapped indices
      Returns:
      true if second element is generated by PathAccessor
    • canGenerate

      public boolean canGenerate()
      This is a generative constraint.
      Specified by:
      canGenerate in interface Constraint
      Overrides:
      canGenerate in class ConstraintAdapter
      Returns:
      true
    • generate

      public Collection<BioPAXElement> generate(Match match, int... ind)
      Uses the encapsulated PAthAccessor to generate satisfying elements.
      Specified by:
      generate in interface Constraint
      Overrides:
      generate in class ConstraintAdapter
      Parameters:
      match - current pattern match
      ind - mapped indices
      Returns:
      generated elements