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 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(Object obj)ListgetErrors()Returns a list of errors found in this mappingPatterngetKeyPattern()Returns the compiled pattern based on the given MappingKeyStringgetMappingKey()Returns the key of this mapping, i.e., the source that needs to be translatedStringgetMappingValue()Returns the result of the translationDSLMappingEntry.MetaDatagetMetaData()Returns the meta data info about this mapping entryDSLMappingEntry.SectiongetSection()Returns the section this mapping entry refers toStringgetValuePattern()Returns the transformed mapping value using place holders for variablesMap<String,Integer>getVariables()Returns the list of variables found in the given pattern key in the same order they were foundinthashCode()voidsetKeyPattern(Pattern keyPattern)voidsetMappingKey(String key)voidsetMappingValue(String value)voidsetMetaData(DSLMappingEntry.MetaData metadata)voidsetSection(DSLMappingEntry.Section section)voidsetValuePattern(String valuePattern)voidsetVariables(Map<String,Integer> variables)StringtoPatternString()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 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(String key)
- Specified by:
setMappingKeyin interfaceDSLMappingEntry- Parameters:
key- the key to set
-
setMappingValue
public void setMappingValue(String value)
- Specified by:
setMappingValuein interfaceDSLMappingEntry- Parameters:
value- the value to set
-
setKeyPattern
public void setKeyPattern(Pattern keyPattern)
-
getMappingValue
public 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 Pattern getKeyPattern()
Description copied from interface:DSLMappingEntryReturns the compiled pattern based on the given MappingKey- Specified by:
getKeyPatternin interfaceDSLMappingEntry- Returns:
- the keyPattern
-
getValuePattern
public 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(String valuePattern)
-
getVariables
public Map<String,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
-
toPatternString
public String toPatternString()
-
getErrors
public List getErrors()
Description copied from interface:DSLMappingEntryReturns a list of errors found in this mapping- Specified by:
getErrorsin interfaceDSLMappingEntry- Returns:
-
-