Package org.drools.drl.parser.lang.dsl
Class AbstractDSLMappingEntry
- java.lang.Object
-
- org.drools.drl.parser.lang.dsl.AbstractDSLMappingEntry
-
- All Implemented Interfaces:
DSLMappingEntry
- Direct Known Subclasses:
AntlrDSLMappingEntry
public abstract class AbstractDSLMappingEntry extends java.lang.Object implements DSLMappingEntry
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.drools.drl.parser.lang.dsl.DSLMappingEntry
DSLMappingEntry.DefaultDSLEntryMetaData, DSLMappingEntry.MetaData, DSLMappingEntry.Section
-
-
Field Summary
-
Fields inherited from interface org.drools.drl.parser.lang.dsl.DSLMappingEntry
ANY, CONDITION, CONSEQUENCE, EMPTY_METADATA, KEYWORD
-
-
Constructor Summary
Constructors Constructor Description AbstractDSLMappingEntry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.util.ListgetErrors()Returns a list of errors found in this mappingjava.util.regex.PatterngetKeyPattern()Returns the compiled pattern based on the given MappingKeyjava.lang.StringgetMappingKey()Returns the key of this mapping, i.e., the source that needs to be translatedjava.lang.StringgetMappingValue()Returns the result of the translationDSLMappingEntry.MetaDatagetMetaData()Returns the meta data info about this mapping entryDSLMappingEntry.SectiongetSection()Returns the section this mapping entry refers tojava.lang.StringgetValuePattern()Returns the transformed mapping value using place holders for variablesjava.util.Map<java.lang.String,java.lang.Integer>getVariables()Returns the list of variables found in the given pattern key in the same order they were foundinthashCode()voidsetKeyPattern(java.util.regex.Pattern keyPattern)voidsetMappingKey(java.lang.String key)voidsetMappingValue(java.lang.String value)voidsetMetaData(DSLMappingEntry.MetaData metadata)voidsetSection(DSLMappingEntry.Section section)voidsetValuePattern(java.lang.String valuePattern)voidsetVariables(java.util.Map<java.lang.String,java.lang.Integer> variables)java.lang.StringtoPatternString()java.lang.StringtoString()
-
-
-
Method Detail
-
getSection
public DSLMappingEntry.Section getSection()
Description copied from interface:DSLMappingEntryReturns the section this mapping entry refers to- Specified by:
getSectionin interfaceDSLMappingEntry- Returns:
-
getMetaData
public DSLMappingEntry.MetaData getMetaData()
Description copied from interface:DSLMappingEntryReturns the meta data info about this mapping entry- Specified by:
getMetaDatain interfaceDSLMappingEntry- Returns:
-
getMappingKey
public java.lang.String getMappingKey()
Description copied from interface:DSLMappingEntryReturns the key of this mapping, i.e., the source that needs to be translated- Specified by:
getMappingKeyin interfaceDSLMappingEntry- Returns:
-
setMappingKey
public void setMappingKey(java.lang.String key)
- Specified by:
setMappingKeyin interfaceDSLMappingEntry- Parameters:
key- the key to set
-
setMappingValue
public void setMappingValue(java.lang.String value)
- Specified by:
setMappingValuein interfaceDSLMappingEntry- Parameters:
value- the value to set
-
setKeyPattern
public void setKeyPattern(java.util.regex.Pattern keyPattern)
-
getMappingValue
public java.lang.String getMappingValue()
Description copied from interface:DSLMappingEntryReturns the result of the translation- Specified by:
getMappingValuein interfaceDSLMappingEntry- Returns:
-
setSection
public void setSection(DSLMappingEntry.Section section)
- Specified by:
setSectionin interfaceDSLMappingEntry- Parameters:
section- the section to set
-
setMetaData
public void setMetaData(DSLMappingEntry.MetaData metadata)
- Specified by:
setMetaDatain interfaceDSLMappingEntry- Parameters:
metadata- the metadata to set
-
getKeyPattern
public java.util.regex.Pattern getKeyPattern()
Description copied from interface:DSLMappingEntryReturns the compiled pattern based on the given MappingKey- Specified by:
getKeyPatternin interfaceDSLMappingEntry- Returns:
- the keyPattern
-
getValuePattern
public java.lang.String getValuePattern()
Description copied from interface:DSLMappingEntryReturns the transformed mapping value using place holders for variables- Specified by:
getValuePatternin interfaceDSLMappingEntry- Returns:
- the valuePattern
-
setValuePattern
public void setValuePattern(java.lang.String valuePattern)
-
getVariables
public java.util.Map<java.lang.String,java.lang.Integer> getVariables()
Description copied from interface:DSLMappingEntryReturns the list of variables found in the given pattern key in the same order they were found- Specified by:
getVariablesin interfaceDSLMappingEntry- Returns:
- the variables
-
setVariables
public void setVariables(java.util.Map<java.lang.String,java.lang.Integer> variables)
-
toPatternString
public java.lang.String toPatternString()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getErrors
public java.util.List getErrors()
Description copied from interface:DSLMappingEntryReturns a list of errors found in this mapping- Specified by:
getErrorsin interfaceDSLMappingEntry- Returns:
-
-