public abstract class FieldDefinition extends Object implements Serializable
Field and holds all the metadata available for the
Field. All extending classes of this class must define a default no arguments constructor| Modifier and Type | Field and Description |
|---|---|
static int |
DefaultChunkSize
The default chunk size to be used during partial transfer.
|
static IBuffer.TransportDirective |
DefaultDirective
The default
IBuffer.TransportDirective to be used by the FieldDefinition. |
static boolean |
DefaultDoCompress
The default value for the compression option.
|
static String |
DefaultMimeType
The default MIME type to be used by the
FieldDefinition. |
| Constructor and Description |
|---|
FieldDefinition() |
| Modifier and Type | Method and Description |
|---|---|
void |
deflate(DataOutput out)
Deflates the field definition in the provided stream and calls
extendDeflate(DataOutput) |
boolean |
equals(Object obj) |
abstract void |
extendDeflate(DataOutput out)
Method to be implemented by class extenders to deflate additional information
|
abstract boolean |
extendEquals(Object obj)
Method to be implemented by extenders to check if two instances are equal
|
abstract void |
extendFromXML(Element element) |
abstract void |
extendInflate(DataInput in)
Method to be implemented by the class extenders to inflate additional information previously deflated
|
abstract void |
extendToXML(Document doc,
Element element) |
void |
fromXML(Element element) |
int |
getChunkSize()
Retrieves the chunk size in bytes that will be used during partial transfer
|
String |
getMimeType()
Gets the MIME type
|
String |
getName()
Gets the field name
|
IBuffer.TransportDirective |
getTransportDirective()
Retrieves the transport directive to be used during transfer
|
void |
inflate(DataInput in)
Inflates the field definition from the previously deflated stream.
|
boolean |
isCompress()
Whether or not compression will be used during transfer
|
void |
setChunkSize(int chunkSize)
Sets the chunk size in bytes that will be used during partial transfer
|
void |
setCompress(boolean compress)
Sets whether compression should be used during transfer
|
void |
setMimeType(String mimeType)
Sets the MIME type
|
void |
setName(String name)
Sets the name of the field
|
void |
setTransportDirective(IBuffer.TransportDirective directive)
Sets the transport directive to be used during transfer
|
Element |
toXML(Document doc) |
public static final IBuffer.TransportDirective DefaultDirective
IBuffer.TransportDirective to be used by the FieldDefinition.
Currently set to IBuffer.TransportDirective.Inheritpublic static final String DefaultMimeType
FieldDefinition. Currently set to text/plainpublic static final boolean DefaultDoCompress
public static final int DefaultChunkSize
public void setName(String name)
name - the field namepublic String getName()
public void setMimeType(String mimeType)
mimeType - the MIME typepublic String getMimeType()
public void setCompress(boolean compress)
compress - whether or not to use compression during transferpublic boolean isCompress()
public void setChunkSize(int chunkSize)
chunkSize - the chunk size in bytes that will be used during partial transferpublic int getChunkSize()
public void setTransportDirective(IBuffer.TransportDirective directive)
directive - the directive to be usedpublic IBuffer.TransportDirective getTransportDirective()
public boolean equals(Object obj)
The properties checked for equality are the configuration values that can be set for the FieldDefinition
and additionally, the extendEquals(Object) is invoked to check the extender equality logic
equals in class ObjectObject.equals(java.lang.Object)public abstract boolean extendEquals(Object obj)
obj - the instance to check for equalitypublic void deflate(DataOutput out) throws GRS2RecordSerializationException
extendDeflate(DataOutput)out - the stream to deflate toGRS2RecordSerializationException - A serialization error occurredpublic final Element toXML(Document doc) throws GRS2RecordSerializationException, GRS2RecordDefinitionException, DOMException
public abstract void extendToXML(Document doc, Element element) throws GRS2RecordSerializationException
GRS2RecordSerializationExceptionpublic abstract void extendFromXML(Element element) throws GRS2RecordSerializationException
GRS2RecordSerializationExceptionpublic abstract void extendDeflate(DataOutput out) throws GRS2RecordSerializationException
out - the stream to deflate toGRS2RecordSerializationException - A serialization error occurredpublic void inflate(DataInput in) throws GRS2RecordSerializationException
extendInflate(DataInput) is invokedin - the stream to inflate fromGRS2RecordSerializationException - A deserialization error occurredpublic final void fromXML(Element element) throws GRS2RecordSerializationException, GRS2RecordDefinitionException, DOMException
public abstract void extendInflate(DataInput in) throws GRS2RecordSerializationException
in - the stream to inflate fromGRS2RecordSerializationException - A deserialization error occurredCopyright © 2014. All Rights Reserved.