|
||||||||||
| 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.Scalar
public class Scalar
| Field Summary |
|---|
| Fields inherited from class org.openfast.template.Field |
|---|
id, key, name, optional |
| Constructor Summary | |
|---|---|
Scalar(QName name,
Type type,
OperatorCodec operatorCodec,
ScalarValue defaultValue,
boolean optional)
Scalar constructor - sets the dictionary as global and validates the entries |
|
Scalar(QName name,
Type type,
Operator operator,
ScalarValue defaultValue,
boolean optional)
|
|
Scalar(java.lang.String name,
Type type,
Operator operator,
ScalarValue defaultValue,
boolean optional)
Scalar constructor - sets the dictionary as global and validates the entries |
|
| Method Summary | |
|---|---|
FieldValue |
createValue(java.lang.String value)
createValue method declaration |
FieldValue |
decode(java.io.InputStream in,
Group template,
Context context,
BitVectorReader presenceMapReader)
FieldValue decode method declaration |
ScalarValue |
decode(ScalarValue previousValue)
|
ScalarValue |
decodeValue(ScalarValue newValue,
ScalarValue previousValue)
|
byte[] |
encode(FieldValue fieldValue,
Group template,
Context context,
BitVectorBuilder presenceMapBuilder)
byte[] encode method declaration |
boolean |
equals(java.lang.Object other)
|
ScalarValue |
getBaseValue()
|
ScalarValue |
getDefaultValue()
|
java.lang.String |
getDictionary()
|
Operator |
getOperator()
|
OperatorCodec |
getOperatorCodec()
|
Type |
getType()
|
TypeCodec |
getTypeCodec()
|
java.lang.String |
getTypeName()
getTypeName method declaration |
java.lang.Class |
getValueType()
getValueType method declaration |
int |
hashCode()
|
boolean |
isPresenceMapBitSet(byte[] encoding,
FieldValue fieldValue)
isPresenceMapBitSet method declaration |
java.lang.String |
serialize(ScalarValue value)
|
void |
setDictionary(java.lang.String dictionary)
Sets the dictionary to the passed string |
java.lang.String |
toString()
|
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 |
| Constructor Detail |
|---|
public Scalar(java.lang.String name,
Type type,
Operator operator,
ScalarValue defaultValue,
boolean optional)
name - The name of Scalar as a stringtype - The type of this Scalaroperator - Which operator object is being useddefaultValue - The default value of the ScalarValueoptional - Determines if the Scalar is required or not for the data
public Scalar(QName name,
Type type,
Operator operator,
ScalarValue defaultValue,
boolean optional)
public Scalar(QName name,
Type type,
OperatorCodec operatorCodec,
ScalarValue defaultValue,
boolean optional)
name - The name of Scalar as a stringtype - The type of the scalar fieldoperatorCodec - Which operatorCodec object is being useddefaultValue - The default value of the ScalarValueoptional - Determines if the Scalar is required or not for the data| Method Detail |
|---|
public Type getType()
public OperatorCodec getOperatorCodec()
public Operator getOperator()
public byte[] encode(FieldValue fieldValue,
Group template,
Context context,
BitVectorBuilder presenceMapBuilder)
Field
encode in class FieldfieldValue - The Field valuetemplate - The Group objectcontext - The previous object to keep the data in syncpresenceMapBuilder - The BitVector builder
Throws - RuntimeException if the encoding fails - will print to
console the name of the scalar to failpublic java.lang.String getDictionary()
public ScalarValue decodeValue(ScalarValue newValue,
ScalarValue previousValue)
newValue - previousValue - the previous value that was decoded
public ScalarValue getDefaultValue()
public ScalarValue decode(ScalarValue previousValue)
previousValue - The previousValue of the ScalarValue
public boolean usesPresenceMapBit()
Field
usesPresenceMapBit in class Field
public boolean isPresenceMapBitSet(byte[] encoding,
FieldValue fieldValue)
Field
isPresenceMapBitSet in class Fieldencoding - The byte array to check if it is presentfieldValue - The fieldValue object
public FieldValue decode(java.io.InputStream in,
Group template,
Context context,
BitVectorReader presenceMapReader)
Field
decode in class Fieldin - The InputStream to be decodedtemplate - The Group objectcontext - The previous object to keep the data in syncpresenceMapReader -
public void setDictionary(java.lang.String dictionary)
dictionary - The string to be stored as the dictionarypublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Class getValueType()
Field
getValueType in class Fieldpublic FieldValue createValue(java.lang.String value)
Field
createValue in class Fieldvalue - Creates a FieldValue of the passed value
public java.lang.String getTypeName()
Field
getTypeName in class Fieldpublic ScalarValue getBaseValue()
public TypeCodec getTypeCodec()
public java.lang.String serialize(ScalarValue value)
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||