Package org.drools.drl.parser.lang.dsl
Interface DSLMappingEntry
-
- All Known Implementing Classes:
AbstractDSLMappingEntry,AntlrDSLMappingEntry
public interface DSLMappingEntryA single entry in a DSL mapping file
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classDSLMappingEntry.DefaultDSLEntryMetaDatastatic interfaceDSLMappingEntry.MetaDataAn inner interface to represent any metadata associated with this entry.static classDSLMappingEntry.SectionAn enum for the sections
-
Field Summary
Fields Modifier and Type Field Description static DSLMappingEntry.SectionANYstatic DSLMappingEntry.SectionCONDITIONstatic DSLMappingEntry.SectionCONSEQUENCEstatic DSLMappingEntry.MetaDataEMPTY_METADATAstatic DSLMappingEntry.SectionKEYWORD
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 foundvoidsetMappingKey(java.lang.String key)voidsetMappingValue(java.lang.String value)voidsetMetaData(DSLMappingEntry.MetaData metadata)voidsetSection(DSLMappingEntry.Section section)
-
-
-
Field Detail
-
KEYWORD
static final DSLMappingEntry.Section KEYWORD
-
CONDITION
static final DSLMappingEntry.Section CONDITION
-
CONSEQUENCE
static final DSLMappingEntry.Section CONSEQUENCE
-
ANY
static final DSLMappingEntry.Section ANY
-
EMPTY_METADATA
static final DSLMappingEntry.MetaData EMPTY_METADATA
-
-
Method Detail
-
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
java.lang.String getMappingKey()
Returns the key of this mapping, i.e., the source that needs to be translated- Returns:
-
getMappingValue
java.lang.String getMappingValue()
Returns the result of the translation- Returns:
-
getKeyPattern
java.util.regex.Pattern getKeyPattern()
Returns the compiled pattern based on the given MappingKey- Returns:
- the keyPattern
-
getValuePattern
java.lang.String getValuePattern()
Returns the transformed mapping value using place holders for variables- Returns:
- the valuePattern
-
getVariables
java.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 found- Returns:
- the variables
-
setMappingKey
void setMappingKey(java.lang.String key)
- Parameters:
key- the key to set
-
setSection
void setSection(DSLMappingEntry.Section section)
- Parameters:
section- the section to set
-
setMappingValue
void setMappingValue(java.lang.String value)
- Parameters:
value- the value to set
-
setMetaData
void setMetaData(DSLMappingEntry.MetaData metadata)
- Parameters:
metadata- the metadata to set
-
getErrors
java.util.List getErrors()
Returns a list of errors found in this mapping- Returns:
-
-