|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openfast.template.Field
public abstract class Field
| Field Summary | |
|---|---|
protected java.lang.String |
id
|
protected QName |
key
|
protected QName |
name
|
protected boolean |
optional
|
| Constructor Summary | |
|---|---|
Field(QName name,
boolean optional)
Field Constructor |
|
Field(QName name,
QName key,
boolean optional)
Field Constructor |
|
Field(java.lang.String name,
java.lang.String key,
boolean optional,
java.lang.String id)
Field Constructor |
|
| Method Summary | |
|---|---|
void |
addAttribute(QName name,
java.lang.String value)
|
abstract FieldValue |
createValue(java.lang.String value)
createValue method declaration |
abstract FieldValue |
decode(java.io.InputStream in,
Group template,
Context context,
BitVectorReader presenceMapReader)
FieldValue decode method declaration |
abstract byte[] |
encode(FieldValue value,
Group template,
Context context,
BitVectorBuilder presenceMapBuilder)
byte[] encode method declaration |
java.lang.String |
getAttribute(QName name)
|
java.lang.String |
getId()
Find the ID |
QName |
getKey()
Find the key |
java.lang.String |
getName()
Find the name |
QName |
getQName()
|
abstract java.lang.String |
getTypeName()
getTypeName method declaration |
abstract java.lang.Class |
getValueType()
getValueType method declaration |
boolean |
hasAttribute(QName attributeName)
|
boolean |
isOptional()
Check to see if the Field is required |
abstract boolean |
isPresenceMapBitSet(byte[] encoding,
FieldValue fieldValue)
isPresenceMapBitSet method declaration |
protected boolean |
isPresent(BitVectorReader presenceMapReader)
|
void |
setId(java.lang.String id)
Set the ID |
void |
setKey(QName key)
Sets the passed key to the current field key |
abstract boolean |
usesPresenceMapBit()
usesPresenceMapBit method declaration |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final QName name
protected QName key
protected final boolean optional
protected java.lang.String id
| Constructor Detail |
|---|
public Field(QName name,
boolean optional)
name - The name of the Field, a stringoptional - Determines if the Field is required or not for the data
public Field(QName name,
QName key,
boolean optional)
name - The name of the Field, a stringkey - The key of the Field, a stringoptional - Determines if the Field is required or not for the data
public Field(java.lang.String name,
java.lang.String key,
boolean optional,
java.lang.String id)
name - The name of the Field, a stringkey - The key of the Field, a stringoptional - Determines if the Field is required or not for the dataid - The id string| Method Detail |
|---|
public java.lang.String getName()
public QName getQName()
public boolean isOptional()
public QName getKey()
public void setKey(QName key)
key - The key to be setpublic java.lang.String getId()
public void setId(java.lang.String id)
id - The new ID to set the Field's ID topublic boolean hasAttribute(QName attributeName)
public void addAttribute(QName name,
java.lang.String value)
public java.lang.String getAttribute(QName name)
protected boolean isPresent(BitVectorReader presenceMapReader)
public abstract byte[] encode(FieldValue value,
Group template,
Context context,
BitVectorBuilder presenceMapBuilder)
value - The FieldValue object to be encodedtemplate - The Group object to be encodedcontext - The previous object to keep the data in syncpresenceMapBuilder - The BitVectorBuilder object to be encoded
public abstract FieldValue decode(java.io.InputStream in,
Group template,
Context context,
BitVectorReader presenceMapReader)
in - The inputStream to be decodedtemplate - The Group object to be decodedcontext - The previous object to keep the data in syncpresent - public abstract boolean usesPresenceMapBit()
public abstract boolean isPresenceMapBitSet(byte[] encoding,
FieldValue fieldValue)
encoding - The byte array to check if it is presentfieldValue - The fieldValue objectpublic abstract java.lang.Class getValueType()
public abstract FieldValue createValue(java.lang.String value)
value - The string of the FieldValue that is to be createdpublic abstract java.lang.String getTypeName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||