|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openfast.template.Field
org.openfast.template.Group
public class Group
| Field Summary | |
|---|---|
protected java.lang.String |
childNamespace
|
protected Field[] |
fieldDefinitions
|
protected java.util.Map |
fieldIdMap
|
protected java.util.Map |
fieldIndexMap
|
protected java.util.Map |
fieldNameMap
|
protected Field[] |
fields
|
protected java.util.Map |
introspectiveFieldMap
|
protected StaticTemplateReference[] |
staticTemplateReferences
|
protected boolean |
usesPresenceMap
|
| Fields inherited from class org.openfast.template.Field |
|---|
id, key, name, optional |
| Constructor Summary | |
|---|---|
Group(QName name,
Field[] fields,
boolean optional)
|
|
Group(java.lang.String name,
Field[] fields,
boolean optional)
|
|
| Method Summary | |
|---|---|
FieldValue |
createValue(java.lang.String value)
createValue method declaration |
FieldValue |
decode(java.io.InputStream in,
Group group,
Context context,
BitVectorReader pmapReader)
FieldValue decode method declaration |
FieldValue[] |
decodeFieldValues(java.io.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(java.io.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(java.lang.Object obj)
|
java.lang.String |
getChildNamespace()
|
Field |
getField(int index)
Find the field object of the index passed |
Field |
getField(QName name)
|
Field |
getField(java.lang.String fieldName)
Find the field object of the passed field name |
Field |
getFieldById(java.lang.String id)
|
int |
getFieldCount()
Find the number of total fields |
Field[] |
getFieldDefinitions()
|
int |
getFieldIndex(Field field)
|
int |
getFieldIndex(java.lang.String fieldName)
Find the index of the passed field name as an integer |
Field[] |
getFields()
|
Group |
getGroup(java.lang.String fieldName)
Find the group with the passed fieldName |
Scalar |
getIntrospectiveField(java.lang.String fieldName)
|
Scalar |
getScalar(int index)
|
Scalar |
getScalar(java.lang.String fieldName)
Get the Scalar Value of the passed fieldName |
Sequence |
getSequence(java.lang.String fieldName)
Get the Sequence of the passed fieldName |
StaticTemplateReference |
getStaticTemplateReference(QName name)
|
StaticTemplateReference |
getStaticTemplateReference(java.lang.String name)
|
StaticTemplateReference[] |
getStaticTemplateReferences()
|
java.lang.String |
getTypeName()
getTypeName method declaration |
QName |
getTypeReference()
|
java.lang.Class |
getValueType()
getValueType method declaration |
boolean |
hasField(QName fieldName)
|
boolean |
hasField(java.lang.String fieldName)
Determine if the map has a specified field name. |
boolean |
hasFieldWithId(java.lang.String id)
|
int |
hashCode()
|
boolean |
hasIntrospectiveField(java.lang.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(java.lang.String childNamespace)
|
void |
setTypeReference(QName typeReference)
Set the name of the type referenced by this group |
java.lang.String |
toString()
|
boolean |
usesPresenceMap()
|
boolean |
usesPresenceMapBit()
usesPresenceMapBit method declaration |
| Methods inherited from class org.openfast.template.Field |
|---|
addAttribute, getAttribute, getId, getKey, getName, getQName, hasAttribute, isOptional, isPresent, setId, setKey |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String childNamespace
protected final Field[] fields
protected final java.util.Map fieldIndexMap
protected final java.util.Map fieldIdMap
protected final java.util.Map fieldNameMap
protected final boolean usesPresenceMap
protected final StaticTemplateReference[] staticTemplateReferences
protected final Field[] fieldDefinitions
protected final java.util.Map introspectiveFieldMap
| Constructor Detail |
|---|
public Group(java.lang.String name,
Field[] fields,
boolean optional)
public Group(QName name,
Field[] fields,
boolean optional)
| Method Detail |
|---|
public byte[] encode(FieldValue value,
Group template,
Context context,
BitVectorBuilder presenceMapBuilder)
encode in class Fieldvalue - 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 sync
public FieldValue decode(java.io.InputStream in,
Group group,
Context context,
BitVectorReader pmapReader)
Field
decode in class Fieldin - The InputStream to be decodedgroup - The Group object to be decodedcontext - The previous object to keep the data in syncpresent -
protected FieldValue[] decodeFieldValues(java.io.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 sync
public FieldValue[] decodeFieldValues(java.io.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 from
Throws - RuntimeException if there is an problem in the decoding
public boolean isPresenceMapBitSet(byte[] encoding,
FieldValue fieldValue)
isPresenceMapBitSet in class Fieldencoding - The byte array to be checkedfieldValue - The fieldValue to be checked
public boolean usesPresenceMapBit()
Field
usesPresenceMapBit in class Fieldpublic boolean usesPresenceMap()
public int getFieldCount()
public Field getField(int index)
index - The index within the field that is being searched for
public java.lang.Class getValueType()
Field
getValueType in class Fieldpublic FieldValue createValue(java.lang.String value)
Field
createValue in class Fieldvalue - The value that the fieldValue that is to be created
public java.lang.String getTypeName()
Field
getTypeName in class Fieldpublic Field getField(java.lang.String fieldName)
fieldName - The field name of the field object that is to be returned
public Field getField(QName name)
public int getFieldIndex(java.lang.String fieldName)
fieldName - The field name that is being searched for
public int getFieldIndex(Field field)
public Sequence getSequence(java.lang.String fieldName)
fieldName - The field name that is being searched for
public Scalar getScalar(java.lang.String fieldName)
fieldName - The field name that is being searched for
public Scalar getScalar(int index)
public Group getGroup(java.lang.String fieldName)
fieldName - The field name that is being searched for
public boolean hasField(java.lang.String fieldName)
fieldName - The name of the fieldName that is being searched for
public 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 java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic boolean hasFieldWithId(java.lang.String id)
public Field getFieldById(java.lang.String id)
public java.lang.String getChildNamespace()
public void setChildNamespace(java.lang.String childNamespace)
public StaticTemplateReference[] getStaticTemplateReferences()
public StaticTemplateReference getStaticTemplateReference(java.lang.String name)
public StaticTemplateReference getStaticTemplateReference(QName name)
public Field[] getFieldDefinitions()
public boolean hasIntrospectiveField(java.lang.String fieldName)
public Scalar getIntrospectiveField(java.lang.String fieldName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||