站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

DefaultDSLMappingEntry (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.lang.dsl
Class DefaultDSLMappingEntry

java.lang.Object
  extended by org.drools.lang.dsl.DefaultDSLMappingEntry
All Implemented Interfaces:
DSLMappingEntry

public class DefaultDSLMappingEntry
extends Object
implements DSLMappingEntry

A default implementation for the DSL Mapping Entry interface

Author:
etirelli

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.drools.lang.dsl.DSLMappingEntry
DSLMappingEntry.AnySection, DSLMappingEntry.ConditionSection, DSLMappingEntry.ConsequenceSection, DSLMappingEntry.DefaultDSLEntryMetaData, DSLMappingEntry.KeywordSection, DSLMappingEntry.MetaData, DSLMappingEntry.Section
 
Field Summary
 
Fields inherited from interface org.drools.lang.dsl.DSLMappingEntry
ANY, CONDITION, CONSEQUENCE, EMPTY_METADATA, KEYWORD
 
Constructor Summary
DefaultDSLMappingEntry()
           
DefaultDSLMappingEntry(DSLMappingEntry.Section section, DSLMappingEntry.MetaData metadata, String key, String value)
           
 
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 getVariables()
          Returns the list of variables found in the given pattern key
 int hashCode()
           
 void setMappingKey(String key)
           
 void setMappingValue(String value)
           
 void setMetaData(DSLMappingEntry.MetaData metadata)
           
 void setSection(DSLMappingEntry.Section section)
           
 String toPatternString()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultDSLMappingEntry

public DefaultDSLMappingEntry()

DefaultDSLMappingEntry

public DefaultDSLMappingEntry(DSLMappingEntry.Section section,
                              DSLMappingEntry.MetaData metadata,
                              String key,
                              String value)
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:

getMappingValue

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

Specified by:
getMappingValue in interface DSLMappingEntry
Returns:

setMappingKey

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

setSection

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

setMappingValue

public void setMappingValue(String value)
Specified by:
setMappingValue in interface DSLMappingEntry
Parameters:
value - the value 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

getVariables

public Map getVariables()
Description copied from interface: DSLMappingEntry
Returns the list of variables found in the given pattern key

Specified by:
getVariables in interface DSLMappingEntry
Returns:
the 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-2007 JBoss Inc.. All Rights Reserved.