|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.milyn.payload.FilterSource
org.milyn.payload.JavaSource
public class JavaSource
Java Filtration/Transformation Source.
setEventStreamRequired(boolean)
method, or by configuring the 'http://www.smooks.org/sax/features/generate-java-event-stream'
feature on the reader in the Smoooks configuration as follows:
<reader>
<features>
<setOff feature="http://www.smooks.org/sax/features/generate-java-event-stream" />
</features>
</reader>
Turning off event stream generation can make sense in many situations. In some use cases event stream
generation may add no value and may just reduces performance e.g. where you simply wish to apply a
template to the supplied Java Object(s).
Smooks must generate at least 1 event to which configured resources can be targeted (e.g. a templating
resource). When event stream generation is turned off, Smooks simply generates what we call a "Null Source"
document event. In XML, it could be represented as "<nullsource-document/>". So when event stream
generation is turned off, simply target resources at "nullsource-document" or "#document".
| Field Summary | |
|---|---|
static String |
FEATURE_GENERATE_EVENT_STREAM
|
| Constructor Summary | |
|---|---|
JavaSource()
Deprecated. Use any of the other constructors. |
|
JavaSource(List<Object> sourceObjects)
Construct a JavaSource from the supplied source object. |
|
JavaSource(Object sourceObject)
Construct a JavaSource from the supplied source object. |
|
JavaSource(String objectName,
Object sourceObject)
Construct a JavaSource from the supplied source object. |
|
| Method Summary | |
|---|---|
Map<String,Object> |
getBeans()
Get the input bean map for the transform. |
List<Object> |
getSourceObjects()
Get the source object list. |
boolean |
isEventStreamRequired()
Is SAX event stream generation required for the processing of this JavaSource. |
void |
setBeans(Map<String,Object> beans)
Set the input bean map for the transform. |
void |
setEventStreamRequired(boolean eventStreamRequired)
Turn on/off SAX event stream generation for the processing of this JavaSource. |
| Methods inherited from class org.milyn.payload.FilterSource |
|---|
getSource, getSystemId, setSource, setSystemId |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String FEATURE_GENERATE_EVENT_STREAM
| Constructor Detail |
|---|
public JavaSource()
public JavaSource(Object sourceObject)
sourceObject - The source object.
public JavaSource(String objectName,
Object sourceObject)
objectName - The object name the sourceObject is known undersourceObject - The source object.public JavaSource(List<Object> sourceObjects)
sourceObjects - The source object list.| Method Detail |
|---|
public boolean isEventStreamRequired()
true.
public void setEventStreamRequired(boolean eventStreamRequired)
eventStreamRequired - True if SAX event stream generation is required, otherwise false.public List<Object> getSourceObjects()
public Map<String,Object> getBeans()
public void setBeans(Map<String,Object> beans)
beans - The bean map.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||