public abstract class ConstraintAdapter extends Object implements Constraint
Modifier and Type | Field and Description |
---|---|
protected Blacklist |
blacklist
Blacklist to detect ubiquitous small molecules.
|
protected int |
size
Size of the constraint.
|
Modifier | Constructor and Description |
---|---|
protected |
ConstraintAdapter()
Empty constructor.
|
protected |
ConstraintAdapter(int size)
Constructor with size.
|
protected |
ConstraintAdapter(int size,
Blacklist blacklist)
Constructor with size.
|
Modifier and Type | Method and Description |
---|---|
protected void |
assertIndLength(int[] ind)
Asserts the size of teh parameter array is equal to the variable size.
|
boolean |
canGenerate()
Specifies if the constraint is generative.
|
protected ConversionDirectionType |
convertStepDirection(StepDirection sdir) |
protected ConversionDirectionType |
findDirectionInCatalysis(Conversion conv)
Searches the controlling catalysis for possible direction of the conversion.
|
protected ConversionDirectionType |
findDirectionInPathways(Conversion conv)
Searches pathways that contains this conversion for the possible directions.
|
Collection<BioPAXElement> |
generate(Match match,
int... ind)
This method has to be overridden by generative constraints.
|
protected ConversionDirectionType |
getCatalysisDirection(Control cont)
Gets the direction of the Control, if exists.
|
protected List<Control> |
getControlChain(Control control,
Interaction inter)
Gets the chain of Control, staring from the given Control, leading to the given Interaction.
|
protected Set<PhysicalEntity> |
getConvParticipants(Conversion conv,
RelType type)
Gets input ot output participants of the Conversion.
|
protected ConversionDirectionType |
getDirection(Conversion conv) |
protected ConversionDirectionType |
getDirection(Conversion conv,
Control cont)
Gets the direction of the Control chain the the Interaction.
|
protected ConversionDirectionType |
getDirection(Conversion conv,
Pathway pathway)
Gets the direction of the Control chain the the Interaction.
|
protected ConversionDirectionType |
getDirection(Conversion conv,
Pathway pathway,
Control cont)
Gets the direction of the Control chain the the Interaction.
|
int |
getVariableSize()
Gets the variable size of the constraint.
|
boolean |
satisfies(Match match,
int... ind)
Use this method only if constraint canGenerate, and satisfaction criteria is that simple.
|
void |
setSize(int size)
Sets the size of the constraint.
|
protected int size
protected ConstraintAdapter(int size)
size
- size if the constraint.protected ConstraintAdapter(int size, Blacklist blacklist)
size
- size if the constraint.blacklist
- for detecting ubiquitous small moleculesprotected ConstraintAdapter()
getVariableSize
instead of using the size variable.public boolean canGenerate()
canGenerate
in interface Constraint
public Collection<BioPAXElement> generate(Match match, int... ind)
generate
in interface Constraint
match
- current pattern matchind
- mapped indicespublic boolean satisfies(Match match, int... ind)
satisfies
in interface Constraint
match
- current pattern matchind
- mapped indicesprotected void assertIndLength(int[] ind)
ind
- index array to assert its sizepublic void setSize(int size)
size
- size of the constraintpublic int getVariableSize()
getVariableSize
in interface Constraint
protected ConversionDirectionType getDirection(Conversion conv, Control cont)
conv
- controlled conversioncont
- top controlprotected ConversionDirectionType getDirection(Conversion conv, Pathway pathway, Control cont)
conv
- controlled conversionpathway
- the container pathwaycont
- top controlprotected ConversionDirectionType getDirection(Conversion conv, Pathway pathway)
conv
- controlled conversionpathway
- the container pathwayprotected ConversionDirectionType getCatalysisDirection(Control cont)
cont
- Control to get its directionprotected List<Control> getControlChain(Control control, Interaction inter)
control
- top level Controlinter
- target Interactionprotected Set<PhysicalEntity> getConvParticipants(Conversion conv, RelType type)
conv
- Conversion to get participantstype
- input or outputprotected ConversionDirectionType findDirectionInPathways(Conversion conv)
conv
- the conversionprotected ConversionDirectionType convertStepDirection(StepDirection sdir)
protected ConversionDirectionType findDirectionInCatalysis(Conversion conv)
conv
- the conversionprotected ConversionDirectionType getDirection(Conversion conv)
Copyright © 2015 BioPAX. All rights reserved.