Package org.drools.compiler.lang.descr
Class PatternDescr
- java.lang.Object
-
- org.drools.compiler.lang.descr.BaseDescr
-
- org.drools.compiler.lang.descr.AnnotatedBaseDescr
-
- org.drools.compiler.lang.descr.PatternDescr
-
- All Implemented Interfaces:
Externalizable
,Serializable
,Cloneable
,org.drools.core.rule.Annotated
,org.drools.core.rule.Namespaceable
public class PatternDescr extends AnnotatedBaseDescr implements Cloneable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PatternDescr()
PatternDescr(String objectType)
PatternDescr(String objectType, String identifier)
PatternDescr(String objectType, String identifier, boolean isQuery)
-
Method Summary
-
Methods inherited from class org.drools.compiler.lang.descr.AnnotatedBaseDescr
addAnnotation, addAnnotation, addAnnotation, addQualifiedAnnotation, getAnnotation, getAnnotation, getAnnotationNames, getAnnotations, getTypedAnnotation, hasAnnotation, indexByFQN, readExternal, writeExternal
-
Methods inherited from class org.drools.compiler.lang.descr.BaseDescr
copyLocation, getColumn, getEndCharacter, getEndColumn, getEndLine, getLine, getNamespace, getResource, getStartCharacter, getText, isNegated, negate, positionAsString, replaceVariable, setEndCharacter, setEndLocation, setLocation, setNamespace, setStartCharacter, setText
-
-
-
-
Method Detail
-
setIdentifier
public void setIdentifier(String identifier)
-
setObjectType
public void setObjectType(String objectType)
-
setQuery
public void setQuery(boolean query)
-
getObjectType
public String getObjectType()
-
getGenericType
public org.drools.core.factmodel.GenericTypeDefinition getGenericType()
-
getIdentifier
public String getIdentifier()
-
isQuery
public boolean isQuery()
-
isPassive
public boolean isPassive(RuleBuildContext context)
-
addConstraint
public void addConstraint(BaseDescr base)
-
removeAllConstraint
public void removeAllConstraint()
-
removeConstraint
public boolean removeConstraint(BaseDescr base)
-
getConstraint
public ConditionalElementDescr getConstraint()
-
negateConstraint
public PatternDescr negateConstraint()
-
isInternalFact
public boolean isInternalFact(RuleBuildContext context)
-
getLeftParentCharacter
public int getLeftParentCharacter()
- Returns:
- the leftParentCharacter
-
setLeftParentCharacter
public void setLeftParentCharacter(int leftParentCharacter)
- Parameters:
leftParentCharacter
- the leftParentCharacter to set
-
getRightParentCharacter
public int getRightParentCharacter()
- Returns:
- the rightParentCharacter
-
setRightParentCharacter
public void setRightParentCharacter(int rightParentCharacter)
- Parameters:
rightParentCharacter
- the rightParentCharacter to set
-
getSource
public PatternSourceDescr getSource()
-
setSource
public void setSource(PatternSourceDescr source)
-
setResource
public void setResource(org.kie.api.io.Resource resource)
- Overrides:
setResource
in classBaseDescr
-
getBehaviors
public List<BehaviorDescr> getBehaviors()
- Returns:
- the behaviors
-
setBehaviors
public void setBehaviors(List<BehaviorDescr> behaviors)
- Parameters:
behaviors
- the behaviors to set
-
addBehavior
public void addBehavior(BehaviorDescr behavior)
-
isUnification
public boolean isUnification()
- Returns:
- the unification
-
setUnification
public void setUnification(boolean unification)
- Parameters:
unification
- the unification to set
-
getXpathStartDeclaration
public org.drools.core.rule.Declaration getXpathStartDeclaration()
-
setXpathStartDeclaration
public void setXpathStartDeclaration(org.drools.core.rule.Declaration xpathStartDeclaration)
-
clone
public PatternDescr clone()
-
accept
public void accept(DescrVisitor visitor)
-
-