public class Group extends Field
Modifier and Type | Field and Description |
---|---|
protected String |
childNamespace |
protected Field[] |
fieldDefinitions |
protected Map |
fieldIdMap |
protected Map |
fieldIndexMap |
protected Map |
fieldNameMap |
protected Field[] |
fields |
protected Map |
introspectiveFieldMap |
protected StaticTemplateReference[] |
staticTemplateReferences |
protected boolean |
usesPresenceMap |
attributes, name
Constructor and Description |
---|
Group(QName name,
Field[] fields,
boolean optional) |
Group(String name,
Field[] fields,
boolean optional) |
Modifier and Type | Method and Description |
---|---|
FieldValue |
createValue(String value)
createValue method declaration
|
FieldValue |
decode(InputStream in,
Group group,
Context context,
BitVectorReader pmapReader)
FieldValue decode method declaration
|
FieldValue[] |
decodeFieldValues(InputStream in,
Group template,
BitVectorReader pmapReader,
Context context)
Goes through the all the field value array, starting with the index
passed, checks to see if a map actually created for the field to pass to
the decoder - the field index is created as a new Group object and stored
to the the FieldValue array.
|
protected FieldValue[] |
decodeFieldValues(InputStream in,
Group template,
Context context)
If there is not a vector map created for the inputStream, a vector map
will be created to pass to the public decodeFieldValues method.
|
byte[] |
encode(FieldValue value,
Group template,
Context context)
If there is no BitVector, this encoding method will create one.
|
byte[] |
encode(FieldValue value,
Group template,
Context context,
BitVectorBuilder presenceMapBuilder)
If your FieldValue already has a BitVector, use this encode method.
|
boolean |
equals(Object obj) |
String |
getChildNamespace() |
Field |
getField(int index)
Find the field object of the index passed
|
Field |
getField(QName name) |
Field |
getField(String fieldName)
Find the field object of the passed field name
|
Field |
getFieldById(String id) |
int |
getFieldCount()
Find the number of total fields
|
Field[] |
getFieldDefinitions() |
int |
getFieldIndex(Field field) |
int |
getFieldIndex(String fieldName)
Find the index of the passed field name as an integer
|
Field[] |
getFields() |
Group |
getGroup(String fieldName)
Find the group with the passed fieldName
|
Scalar |
getIntrospectiveField(String fieldName) |
Scalar |
getScalar(int index) |
Scalar |
getScalar(String fieldName)
Get the Scalar Value of the passed fieldName
|
Sequence |
getSequence(String fieldName)
Get the Sequence of the passed fieldName
|
StaticTemplateReference |
getStaticTemplateReference(QName name) |
StaticTemplateReference |
getStaticTemplateReference(String name) |
StaticTemplateReference[] |
getStaticTemplateReferences() |
String |
getTypeName()
getTypeName method declaration
|
QName |
getTypeReference() |
Class |
getValueType()
getValueType method declaration
|
boolean |
hasField(QName fieldName) |
boolean |
hasField(String fieldName)
Determine if the map has a specified field name.
|
boolean |
hasFieldWithId(String id) |
int |
hashCode() |
boolean |
hasIntrospectiveField(String fieldName) |
boolean |
hasTypeReference() |
boolean |
isPresenceMapBitSet(byte[] encoding,
FieldValue fieldValue)
Determine if there is a Map of the passed byte array and fieldValue
|
void |
setChildNamespace(String childNamespace) |
void |
setTypeReference(QName typeReference)
Set the name of the type referenced by this group
|
String |
toString() |
boolean |
usesPresenceMap() |
boolean |
usesPresenceMapBit()
usesPresenceMapBit method declaration
|
getId, getKey, getName, getQName, getTemplate, isOptional, isPresent, setId, setKey, setMessageTemplate
addNode, getAttribute, getAttributes, getChildren, getNodeName, getNodes, hasAttribute, hasChild, setAttribute
protected String childNamespace
protected final Field[] fields
protected final Map fieldIndexMap
protected final Map fieldIdMap
protected final Map fieldNameMap
protected final boolean usesPresenceMap
protected final StaticTemplateReference[] staticTemplateReferences
protected final Field[] fieldDefinitions
protected final Map introspectiveFieldMap
public byte[] encode(FieldValue value, Group template, Context context, BitVectorBuilder presenceMapBuilder)
encode
in class Field
value
- The value of the FieldValue to be encodedtemplate
- The Group object to be encodedcontext
- The previous object to keep the data in syncpresenceMapBuilder
- The BitVector object that will be used to encode.public byte[] encode(FieldValue value, Group template, Context context)
value
- The value of the FieldValue to be encodedtemplate
- The Group object to be encodedcontext
- The previous object to keep the data in syncpublic FieldValue decode(InputStream in, Group group, Context context, BitVectorReader pmapReader)
Field
protected FieldValue[] decodeFieldValues(InputStream in, Group template, Context context)
in
- The InputStream to be decodedtemplate
- The Group object to be decodedcontext
- The previous object to keep the data in syncpublic FieldValue[] decodeFieldValues(InputStream in, Group template, BitVectorReader pmapReader, Context context)
in
- The InputStream to be decodedtemplate
- The Group objectpmap
- The BitVector to be decodedcontext
- The previous object to keep the data in syncstart
- The index of the Field to start decoding fromThrows
- RuntimeException if there is an problem in the decodingpublic boolean isPresenceMapBitSet(byte[] encoding, FieldValue fieldValue)
isPresenceMapBitSet
in class Field
encoding
- The byte array to be checkedfieldValue
- The fieldValue to be checkedpublic boolean usesPresenceMapBit()
Field
usesPresenceMapBit
in class Field
public boolean usesPresenceMap()
public int getFieldCount()
public Field getField(int index)
index
- The index within the field that is being searched forpublic Class getValueType()
Field
getValueType
in class Field
public FieldValue createValue(String value)
Field
createValue
in class Field
value
- The value that the fieldValue that is to be createdpublic String getTypeName()
Field
getTypeName
in class Field
public Field getField(String fieldName)
fieldName
- The field name of the field object that is to be returnedpublic int getFieldIndex(String fieldName)
fieldName
- The field name that is being searched forpublic int getFieldIndex(Field field)
public Sequence getSequence(String fieldName)
fieldName
- The field name that is being searched forpublic Scalar getScalar(String fieldName)
fieldName
- The field name that is being searched forpublic Scalar getScalar(int index)
public Group getGroup(String fieldName)
fieldName
- The field name that is being searched forpublic boolean hasField(String fieldName)
fieldName
- The name of the fieldName that is being searched forpublic boolean hasField(QName fieldName)
public Field[] getFields()
public void setTypeReference(QName typeReference)
typeReference
- The name of the application type referenced by this gouppublic QName getTypeReference()
public boolean hasTypeReference()
public boolean hasFieldWithId(String id)
public String getChildNamespace()
public void setChildNamespace(String childNamespace)
public StaticTemplateReference[] getStaticTemplateReferences()
public StaticTemplateReference getStaticTemplateReference(String name)
public StaticTemplateReference getStaticTemplateReference(QName name)
public Field[] getFieldDefinitions()
public boolean hasIntrospectiveField(String fieldName)
Copyright © 2006-2013 The LaSalle Technology Group, LLC. All Rights Reserved.