Package org.drools.drl.parser.lang.dsl
Interface DSLMappingEntry
- All Known Implementing Classes:
AbstractDSLMappingEntry,AntlrDSLMappingEntry
public interface DSLMappingEntry
A single entry in a DSL mapping file
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic interfaceAn inner interface to represent any metadata associated with this entry.static enumAn enum for the sections -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DSLMappingEntry.Sectionstatic final DSLMappingEntry.Sectionstatic final DSLMappingEntry.Sectionstatic final DSLMappingEntry.MetaDatastatic final DSLMappingEntry.Section -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of errors found in this mappingReturns the compiled pattern based on the given MappingKeyReturns the key of this mapping, i.e., the source that needs to be translatedReturns the result of the translationReturns the meta data info about this mapping entryReturns the section this mapping entry refers toReturns the transformed mapping value using place holders for variablesReturns the list of variables found in the given pattern key in the same order they were foundvoidsetMappingKey(String key) voidsetMappingValue(String value) voidsetMetaData(DSLMappingEntry.MetaData metadata) voidsetSection(DSLMappingEntry.Section section)
-
Field Details
-
KEYWORD
-
CONDITION
-
CONSEQUENCE
-
ANY
-
EMPTY_METADATA
-
-
Method Details
-
getSection
DSLMappingEntry.Section getSection()Returns the section this mapping entry refers to- Returns:
-
getMetaData
DSLMappingEntry.MetaData getMetaData()Returns the meta data info about this mapping entry- Returns:
-
getMappingKey
String getMappingKey()Returns the key of this mapping, i.e., the source that needs to be translated- Returns:
-
getMappingValue
String getMappingValue()Returns the result of the translation- Returns:
-
getKeyPattern
Pattern getKeyPattern()Returns the compiled pattern based on the given MappingKey- Returns:
- the keyPattern
-
getValuePattern
String getValuePattern()Returns the transformed mapping value using place holders for variables- Returns:
- the valuePattern
-
getVariables
Returns the list of variables found in the given pattern key in the same order they were found- Returns:
- the variables
-
setMappingKey
- Parameters:
key- the key to set
-
setSection
- Parameters:
section- the section to set
-
setMappingValue
- Parameters:
value- the value to set
-
setMetaData
- Parameters:
metadata- the metadata to set
-
getErrors
List getErrors()Returns a list of errors found in this mapping- Returns:
-