org.drools.lang.dsl
Interface DSLMappingEntry

All Known Implementing Classes:
AbstractDSLMappingEntry, AntlrDSLMappingEntry

public interface DSLMappingEntry

A single entry in a DSL mapping file


Nested Class Summary
static class DSLMappingEntry.DefaultDSLEntryMetaData
           
static interface DSLMappingEntry.MetaData
          An inner interface to represent any metadata associated with this entry.
static class DSLMappingEntry.Section
          An enum for the sections
 
Field Summary
static DSLMappingEntry.Section ANY
           
static DSLMappingEntry.Section CONDITION
           
static DSLMappingEntry.Section CONSEQUENCE
           
static DSLMappingEntry.MetaData EMPTY_METADATA
           
static DSLMappingEntry.Section KEYWORD
           
 
Method Summary
 List getErrors()
          Returns a list of errors found in this mapping
 Pattern getKeyPattern()
          Returns the compiled pattern based on the given MappingKey
 String getMappingKey()
          Returns the key of this mapping, i.e., the source that needs to be translated
 String getMappingValue()
          Returns the result of the translation
 DSLMappingEntry.MetaData getMetaData()
          Returns the meta data info about this mapping entry
 DSLMappingEntry.Section getSection()
          Returns the section this mapping entry refers to
 String getValuePattern()
          Returns the transformed mapping value using place holders for variables
 Map<String,Integer> getVariables()
          Returns the list of variables found in the given pattern key in the same order they were found
 void setMappingKey(String key)
           
 void setMappingValue(String value)
           
 void setMetaData(DSLMappingEntry.MetaData metadata)
           
 void setSection(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

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

Map<String,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(String key)
Parameters:
key - the key to set

setSection

void setSection(DSLMappingEntry.Section section)
Parameters:
section - the section to set

setMappingValue

void setMappingValue(String value)
Parameters:
value - the value to set

setMetaData

void setMetaData(DSLMappingEntry.MetaData metadata)
Parameters:
metadata - the metadata to set

getErrors

List getErrors()
Returns a list of errors found in this mapping

Returns:


Copyright © 2001-2013 JBoss Inc.. All Rights Reserved.