public class XpathConstraint extends MutableTypeConstraint
Modifier and Type | Class and Description |
---|---|
static class |
XpathConstraint.XpathChunk |
static class |
XpathConstraint.XpathDataProvider |
Constraint.ConstraintType
Constructor and Description |
---|
XpathConstraint() |
Modifier and Type | Method and Description |
---|---|
XpathConstraint.XpathChunk |
addChunck(Class<?> clazz,
String field,
int index,
boolean iterate,
boolean lazy) |
XpathConstraint |
clone()
Clones the constraint
|
ContextEntry |
createContextEntry() |
LinkedList<XpathConstraint.XpathChunk> |
getChunks() |
Declaration |
getDeclaration() |
InternalReadAccessor |
getReadAccessor() |
Declaration[] |
getRequiredDeclarations()
Returns all the declarations required by the given
constraint implementation.
|
Class<?> |
getResultClass() |
Constraint.ConstraintType |
getType()
Returns the type of the constraint, either ALPHA, BETA or UNKNOWN
|
Declaration |
getXpathStartDeclaration() |
boolean |
isAllowed(InternalFactHandle handle,
InternalWorkingMemory workingMemory) |
boolean |
isAllowedCachedLeft(ContextEntry context,
InternalFactHandle handle) |
boolean |
isAllowedCachedRight(Tuple tuple,
ContextEntry context) |
boolean |
isTemporal()
Returns true in case this constraint is a temporal constraint
|
void |
readExternal(ObjectInput in) |
void |
replaceDeclaration(Declaration oldDecl,
Declaration newDecl)
When a rule contains multiple logical branches, i.e., makes
use of 'OR' CE, it is required to clone patterns and declarations
for each logical branch.
|
void |
setDeclaration(Declaration declaration) |
void |
setXpathStartDeclaration(Declaration xpathStartDeclaration) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
cloneIfInUse, setInUse, setType
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getListenedPropertyMask
public XpathConstraint.XpathChunk addChunck(Class<?> clazz, String field, int index, boolean iterate, boolean lazy)
public Constraint.ConstraintType getType()
Constraint
getType
in interface Constraint
getType
in class MutableTypeConstraint
public Declaration[] getRequiredDeclarations()
Constraint
public void replaceDeclaration(Declaration oldDecl, Declaration newDecl)
Constraint
public XpathConstraint clone()
Constraint
clone
in interface Constraint
clone
in class MutableTypeConstraint
public boolean isTemporal()
Constraint
public boolean isAllowedCachedLeft(ContextEntry context, InternalFactHandle handle)
public boolean isAllowedCachedRight(Tuple tuple, ContextEntry context)
public ContextEntry createContextEntry()
public boolean isAllowed(InternalFactHandle handle, InternalWorkingMemory workingMemory)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class MutableTypeConstraint
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class MutableTypeConstraint
IOException
public LinkedList<XpathConstraint.XpathChunk> getChunks()
public Class<?> getResultClass()
public Declaration getDeclaration()
public void setDeclaration(Declaration declaration)
public InternalReadAccessor getReadAccessor()
public Declaration getXpathStartDeclaration()
public void setXpathStartDeclaration(Declaration xpathStartDeclaration)
Copyright © 2001–2018 JBoss by Red Hat. All rights reserved.