|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.beanio.internal.util.TreeNode<ComponentConfig> org.beanio.internal.config.ComponentConfig org.beanio.internal.config.PropertyConfig org.beanio.internal.config.GroupConfig org.beanio.internal.config.StreamConfig
public class StreamConfig
A stream is the root (a.k.a top or parent) group of a stream mapping configuration. As such, it contains other attributes that apply to the entire stream.
By default, a stream can be used for both marshalling (write) and unmarshalling
(read). Calling setMode(String)
can restrict the use of the stream, but
will relax some validations on the types of objects that can be read or written.
Field Summary | |
---|---|
static String |
READ_ONLY_MODE
Stream configuration supports reading only |
static String |
READ_WRITE_MODE
Stream configuration supports reading and writing |
static String |
WRITE_ONLY_MODE
Stream configuration supports writing only |
Fields inherited from class org.beanio.internal.config.PropertyConfig |
---|
JSON_TYPE_ARRAY, JSON_TYPE_BOOLEAN, JSON_TYPE_NONE, JSON_TYPE_NUMBER, JSON_TYPE_OBJECT, JSON_TYPE_STRING |
Fields inherited from class org.beanio.internal.config.ComponentConfig |
---|
CONSTANT, FIELD, GROUP, RECORD, SEGMENT, STREAM, WRAPPER |
Constructor Summary | |
---|---|
StreamConfig()
Constructs a new StreamConfig. |
Method Summary | |
---|---|
void |
addHandler(TypeHandlerConfig handler)
Adds a custom type handler to this stream. |
char |
getComponentType()
Returns the component type. |
String |
getFormat()
Returns the format of this stream. |
List<TypeHandlerConfig> |
getHandlerList()
Returns a list of customized type handlers configured for this stream. |
String |
getMode()
Returns the allowed mode(s) of operation for this stream. |
BeanConfig |
getParserFactory()
Returns the record parser factory configuration bean. |
String |
getResourceBundle()
Returns the path name of the resource bundle containing customized error messages for this stream. |
boolean |
isIgnoreUnidentifiedRecords()
Returns whether to ignore unidentified records. |
boolean |
isStrict()
Returns whether BeanIO should calculate and enforce strict record ordering (based on the order records are declared in the mapping file) and record length (based on configured field occurrences). |
void |
setFormat(String format)
Sets the format of this stream. |
void |
setIgnoreUnidentifiedRecords(boolean ignoreUnidentifiedRecords)
Sets whether to ignore unidentified records. |
void |
setMode(String mode)
Sets the allowed mode(s) of operation for this stream. |
void |
setParserFactory(BeanConfig parserFactory)
Sets the record parser factory configuration bean. |
void |
setResourceBundle(String resourceBundle)
Sets the path name of the resource bundle containing customized error messages for this stream. |
void |
setStrict(boolean strict)
Sets whether BeanIO should calculate and enforce strict record ordering (based on the order records are declared in the mapping file) and record length (based on configured field occurrences). |
Methods inherited from class org.beanio.internal.config.GroupConfig |
---|
getKey, getOrder, getTarget, isSupportedChild, setKey, setOrder, setTarget |
Methods inherited from class org.beanio.internal.config.PropertyConfig |
---|
getCollection, getGetter, getJsonArrayIndex, getJsonName, getJsonType, getMaxOccurs, getMaxSize, getMinOccurs, getMinSize, getPosition, getSetter, getType, getUntil, getXmlType, isBound, isCollection, isIdentifier, isJsonArray, isLazy, isNillable, isRepeating, setBound, setCollection, setGetter, setIdentifier, setJsonArray, setJsonArrayIndex, setJsonName, setJsonType, setMaxOccurs, setMaxSize, setMinOccurs, setMinSize, setNillable, setPosition, setSetter, setType, setUntil, setXmlType |
Methods inherited from class org.beanio.internal.config.ComponentConfig |
---|
getXmlName, getXmlNamespace, getXmlPrefix, isXmlNamespaceAware, setXmlName, setXmlNamespace, setXmlNamespaceAware, setXmlPrefix |
Methods inherited from class org.beanio.internal.util.TreeNode |
---|
add, clone, find, getChildren, getFirst, getName, iterator, print, setName, size, sort, toParamString, toString, updateReferences |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.beanio.internal.config.SelectorConfig |
---|
getMaxOccurs, getMinOccurs, getName |
Field Detail |
---|
public static final String READ_WRITE_MODE
public static final String READ_ONLY_MODE
public static final String WRITE_ONLY_MODE
Constructor Detail |
---|
public StreamConfig()
Method Detail |
---|
public char getComponentType()
ComponentConfig
getComponentType
in interface SelectorConfig
getComponentType
in class GroupConfig
ComponentConfig.GROUP
, ComponentConfig.RECORD
, ComponentConfig.SEGMENT
, ComponentConfig.FIELD
,
ComponentConfig.CONSTANT
or ComponentConfig.WRAPPER
public String getFormat()
public void setFormat(String format)
format
- the stream formatpublic String getMode()
READ_WRITE_MODE
if reading and writing from a stream is allowed,READ_ONLY_MODE
if only reading is allowed,WRITE_ONLY_MODE
if only writing is allowed, public void setMode(String mode)
mode
- READ_WRITE_MODE
if reading and writing from a stream is allowed,READ_ONLY_MODE
if only reading is allowed,WRITE_ONLY_MODE
if only writing is allowedpublic String getResourceBundle()
public void setResourceBundle(String resourceBundle)
resourceBundle
- the resource bundle namepublic void addHandler(TypeHandlerConfig handler)
handler
- the type handler to addpublic List<TypeHandlerConfig> getHandlerList()
public BeanConfig getParserFactory()
public void setParserFactory(BeanConfig parserFactory)
parserFactory
- the record parser factory configuration beanpublic boolean isStrict()
public void setStrict(boolean strict)
strict
- true if strict, false otherwisepublic boolean isIgnoreUnidentifiedRecords()
public void setIgnoreUnidentifiedRecords(boolean ignoreUnidentifiedRecords)
ignoreUnidentifiedRecords
- true to ignore unidentified records, false otherwise
|
BeanIO 2.0.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |