org.drools.lang.dsl
Class AbstractDSLMappingEntry

java.lang.Object
  extended by org.drools.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.lang.dsl.DSLMappingEntry
DSLMappingEntry.DefaultDSLEntryMetaData, DSLMappingEntry.MetaData, DSLMappingEntry.Section
 
Field Summary
 
Fields inherited from interface org.drools.lang.dsl.DSLMappingEntry
ANY, CONDITION, CONSEQUENCE, EMPTY_METADATA, KEYWORD
 
Constructor Summary
AbstractDSLMappingEntry()
           
 
Method Summary
 boolean equals(Object obj)
           
 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
 int hashCode()
           
 void setKeyPattern(Pattern keyPattern)
           
 void setMappingKey(String key)
           
 void setMappingValue(String value)
           
 void setMetaData(DSLMappingEntry.MetaData metadata)
           
 void setSection(DSLMappingEntry.Section section)
           
 void setValuePattern(String valuePattern)
           
 void setVariables(Map<String,Integer> variables)
           
 String toPatternString()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractDSLMappingEntry

public AbstractDSLMappingEntry()
Method Detail

getSection

public DSLMappingEntry.Section getSection()
Description copied from interface: DSLMappingEntry
Returns the section this mapping entry refers to

Specified by:
getSection in interface DSLMappingEntry
Returns:

getMetaData

public DSLMappingEntry.MetaData getMetaData()
Description copied from interface: DSLMappingEntry
Returns the meta data info about this mapping entry

Specified by:
getMetaData in interface DSLMappingEntry
Returns:

getMappingKey

public String getMappingKey()
Description copied from interface: DSLMappingEntry
Returns the key of this mapping, i.e., the source that needs to be translated

Specified by:
getMappingKey in interface DSLMappingEntry
Returns:

setMappingKey

public void setMappingKey(String key)
Specified by:
setMappingKey in interface DSLMappingEntry
Parameters:
key - the key to set

setMappingValue

public void setMappingValue(String value)
Specified by:
setMappingValue in interface DSLMappingEntry
Parameters:
value - the value to set

setKeyPattern

public void setKeyPattern(Pattern keyPattern)

getMappingValue

public String getMappingValue()
Description copied from interface: DSLMappingEntry
Returns the result of the translation

Specified by:
getMappingValue in interface DSLMappingEntry
Returns:

setSection

public void setSection(DSLMappingEntry.Section section)
Specified by:
setSection in interface DSLMappingEntry
Parameters:
section - the section to set

setMetaData

public void setMetaData(DSLMappingEntry.MetaData metadata)
Specified by:
setMetaData in interface DSLMappingEntry
Parameters:
metadata - the metadata to set

getKeyPattern

public Pattern getKeyPattern()
Description copied from interface: DSLMappingEntry
Returns the compiled pattern based on the given MappingKey

Specified by:
getKeyPattern in interface DSLMappingEntry
Returns:
the keyPattern

getValuePattern

public String getValuePattern()
Description copied from interface: DSLMappingEntry
Returns the transformed mapping value using place holders for variables

Specified by:
getValuePattern in interface DSLMappingEntry
Returns:
the valuePattern

setValuePattern

public void setValuePattern(String valuePattern)

getVariables

public Map<String,Integer> getVariables()
Description copied from interface: DSLMappingEntry
Returns the list of variables found in the given pattern key in the same order they were found

Specified by:
getVariables in interface DSLMappingEntry
Returns:
the variables

setVariables

public void setVariables(Map<String,Integer> variables)

toPatternString

public String toPatternString()

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getErrors

public List getErrors()
Description copied from interface: DSLMappingEntry
Returns a list of errors found in this mapping

Specified by:
getErrors in interface DSLMappingEntry
Returns:


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