public class BeanMetadata extends Object
Modifier and Type | Field and Description |
---|---|
protected Object |
bean |
protected org.smooks.api.delivery.fragment.Fragment |
createSource |
protected String |
namespace |
protected String |
namespacePrefix |
protected List<org.smooks.api.delivery.fragment.Fragment> |
populateSources |
protected String |
preText |
protected Map<Object,Object> |
properties |
protected BeanWriter |
writer |
Constructor and Description |
---|
BeanMetadata(Object bean)
Public constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
getBean()
Get the bean instance with which this metadata instance is associated.
|
org.smooks.api.delivery.fragment.Fragment |
getCreateSource()
Get the source
Fragment that created the bean instance. |
String |
getNamespace()
Get the XML namespace with which the associated bean instance is associated.
|
String |
getNamespacePrefix()
Get the XML namespace prefix.
|
List<org.smooks.api.delivery.fragment.Fragment> |
getPopulateSources()
Get the "population"
fragments that contributed data to the bean instance
(set data on it's properties). |
String |
getPreText()
Get the "pre text" associated with the bean.
|
Map<Object,Object> |
getProperties()
Get user properties/metadata associated with the bean.
|
BeanWriter |
getWriter()
Get the
BeanWriter instance to be used to serialize the bean instance. |
BeanMetadata |
setCreateSource(org.smooks.api.delivery.fragment.Fragment createSource)
Set the source
Fragment that created the bean instance. |
BeanMetadata |
setNamespace(String namespace)
Set the XML namespace with which the associated bean instance is associated.
|
BeanMetadata |
setNamespacePrefix(String namespacePrefix)
Set the XML namespace prefix.
|
BeanMetadata |
setPreText(String preText)
Set the "pre text" associated with the bean.
|
BeanMetadata |
setWriter(BeanWriter writer)
Set the
BeanWriter instance to be used to serialize the bean instance. |
protected Object bean
protected String namespace
protected String namespacePrefix
protected org.smooks.api.delivery.fragment.Fragment createSource
protected List<org.smooks.api.delivery.fragment.Fragment> populateSources
protected String preText
protected BeanWriter writer
public BeanMetadata(Object bean)
bean
- The bean instance.public Object getBean()
public String getNamespace()
setNamespace(String)
,
setNamespacePrefix(String)
,
getNamespacePrefix()
public BeanMetadata setNamespace(String namespace)
registered manually on the Model
, the
default namepsace
is
set (can be reset).namespace
- The XML namespace with which the bean instance is associated.this
BeanMetadata instance.getNamespace()
,
setNamespacePrefix(String)
,
getNamespacePrefix()
public String getNamespacePrefix()
setNamespace(String)
,
getNamespace()
,
setNamespacePrefix(String)
public BeanMetadata setNamespacePrefix(String namespacePrefix)
registered manually on the Model
, the
default namepsace prefix
is
set (can be reset).namespacePrefix
- The XML namespace prefix.this
BeanMetadata instance.setNamespace(String)
,
getNamespace()
,
getNamespacePrefix()
public String getPreText()
Model is created/read from a source XML message
,
the different fragments in the source message are responsible for triggering creation of beans that go into
the Model
instance. The "pre text" of a bean is the XML whitespace, comments, CDATA and non contributing
XML that precedes the XML fragment that created the bean. This is an ad-hoc mechanism for maintaining user comments
etc.public BeanMetadata setPreText(String preText)
Model is created/read from a source XML message
,
the different fragments in the source message are responsible for triggering creation of beans that go into
the Model
instance. The "pre text" of a bean is the XML whitespace, comments, CDATA and non contributing
XML that precedes the XML fragment that created the bean. This is an ad-hoc mechanism for maintaining user comments
etc.preText
- The "pre text".this
BeanMetadata instance.public BeanWriter getWriter()
BeanWriter
instance to be used to serialize the bean instance.BeanWriter
instance to be used to serialize the bean instance, or null if
no BeanWriter
instance is configured for the bean type and namespace combination.public BeanMetadata setWriter(BeanWriter writer)
BeanWriter
instance to be used to serialize the bean instance.writer
- The BeanWriter
instance to be used to serialize the bean instance.this
BeanMetadata instance.public BeanMetadata setCreateSource(org.smooks.api.delivery.fragment.Fragment createSource)
Fragment
that created the bean instance.createSource
- The source fragment.this
BeanMetadata instance.public org.smooks.api.delivery.fragment.Fragment getCreateSource()
Fragment
that created the bean instance.public List<org.smooks.api.delivery.fragment.Fragment> getPopulateSources()
fragments
that contributed data to the bean instance
(set data on it's properties).Copyright © 2024. All rights reserved.