scriptella.configuration
Class DialectBasedContentEl

java.lang.Object
  extended by scriptella.configuration.XmlConfigurableBase
      extended by scriptella.configuration.DialectBasedContentEl
All Implemented Interfaces:
XmlConfigurable

public class DialectBasedContentEl
extends XmlConfigurableBase

Represents dialect based content used inside query/script/onerror elements.

When the DOM is traversed the internal representation model is built. This model contains enough info to speed up selection based on a requested dialect identifier. The following example demonstrates the algorithm using pseudo markup:

 AAA[Dialect1 111]BBB[Dialect2 222]
 
The returned text for default Dialect is: AAABBB
The returned text for Dialect1 is: AAA111BBB

Version:
1.0
Author:
Fyodor Kupolov

Constructor Summary
DialectBasedContentEl()
           
DialectBasedContentEl(XmlElement element)
           
 
Method Summary
 void configure(XmlElement element)
          Configures the class using specified XML element.
 ContentEl getContent(DialectIdentifier id)
          This method returns content for specified dialect id or null - if script doesn't support this dialect.
 
Methods inherited from class scriptella.configuration.XmlConfigurableBase
assertRequiredFieldPresent, assertRequiredFieldPresent, findGetter, findSetter, getLocation, load, loadClass, setLocation, setLocation, setPatternProperty, setPatternProperty, setProperty, setProperty, setRequiredProperty, setRequiredProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialectBasedContentEl

public DialectBasedContentEl()

DialectBasedContentEl

public DialectBasedContentEl(XmlElement element)
Method Detail

configure

public void configure(XmlElement element)
Description copied from interface: XmlConfigurable
Configures the class using specified XML element.

Parameters:
element - XML element.

getContent

public ContentEl getContent(DialectIdentifier id)
This method returns content for specified dialect id or null - if script doesn't support this dialect.

Parameters:
id - dialect identifier. null if any dialect.
Returns:
content for specified dialect id or null - if script doesn't support this dialect.


Copyright © Copyright 2006-2009 The Scriptella Project Team.