|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.uoa.di.madgik.grs.record.field.FieldDefinition
public abstract class FieldDefinition
The field definition represents the scheme of a single Field
and holds all the metadata available for the
Field
. All extending classes of this class must define a default no arguments constructor
Field Summary | |
---|---|
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 java.lang.String |
DefaultMimeType
The default MIME type to be used by the FieldDefinition . |
Constructor Summary | |
---|---|
FieldDefinition()
|
Method Summary | |
---|---|
void |
deflate(java.io.DataOutput out)
Deflates the field definition in the provided stream and calls extendDeflate(DataOutput) |
boolean |
equals(java.lang.Object obj)
|
abstract void |
extendDeflate(java.io.DataOutput out)
Method to be implemented by class extenders to deflate additional information |
abstract boolean |
extendEquals(java.lang.Object obj)
Method to be implemented by extenders to check if two instances are equal |
abstract void |
extendFromXML(org.w3c.dom.Element element)
|
abstract void |
extendInflate(java.io.DataInput in)
Method to be implemented by the class extenders to inflate additional information previously deflated |
abstract void |
extendToXML(org.w3c.dom.Document doc,
org.w3c.dom.Element element)
|
void |
fromXML(org.w3c.dom.Element element)
|
int |
getChunkSize()
Retrieves the chunk size in bytes that will be used during partial transfer |
java.lang.String |
getMimeType()
Gets the MIME type |
java.lang.String |
getName()
Gets the field name |
IBuffer.TransportDirective |
getTransportDirective()
Retrieves the transport directive to be used during transfer |
void |
inflate(java.io.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(java.lang.String mimeType)
Sets the MIME type |
void |
setName(java.lang.String name)
Sets the name of the field |
void |
setTransportDirective(IBuffer.TransportDirective directive)
Sets the transport directive to be used during transfer |
org.w3c.dom.Element |
toXML(org.w3c.dom.Document doc)
|
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final IBuffer.TransportDirective DefaultDirective
IBuffer.TransportDirective
to be used by the FieldDefinition
.
Currently set to IBuffer.TransportDirective.Inherit
public static final java.lang.String DefaultMimeType
FieldDefinition
. Currently set to text/plain
public static final boolean DefaultDoCompress
public static final int DefaultChunkSize
Constructor Detail |
---|
public FieldDefinition()
Method Detail |
---|
public void setName(java.lang.String name)
name
- the field namepublic java.lang.String getName()
public void setMimeType(java.lang.String mimeType)
mimeType
- the MIME typepublic java.lang.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(java.lang.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 java.lang.Object
Object.equals(java.lang.Object)
public abstract boolean extendEquals(java.lang.Object obj)
obj
- the instance to check for equality
public void deflate(java.io.DataOutput out) throws GRS2RecordSerializationException
extendDeflate(DataOutput)
out
- the stream to deflate to
GRS2RecordSerializationException
- A serialization error occurredpublic final org.w3c.dom.Element toXML(org.w3c.dom.Document doc) throws GRS2RecordSerializationException, GRS2RecordDefinitionException, org.w3c.dom.DOMException
GRS2RecordSerializationException
GRS2RecordDefinitionException
org.w3c.dom.DOMException
public abstract void extendToXML(org.w3c.dom.Document doc, org.w3c.dom.Element element) throws GRS2RecordSerializationException
GRS2RecordSerializationException
public abstract void extendFromXML(org.w3c.dom.Element element) throws GRS2RecordSerializationException
GRS2RecordSerializationException
public abstract void extendDeflate(java.io.DataOutput out) throws GRS2RecordSerializationException
out
- the stream to deflate to
GRS2RecordSerializationException
- A serialization error occurredpublic void inflate(java.io.DataInput in) throws GRS2RecordSerializationException
extendInflate(DataInput)
is invoked
in
- the stream to inflate from
GRS2RecordSerializationException
- A deserialization error occurredpublic final void fromXML(org.w3c.dom.Element element) throws GRS2RecordSerializationException, GRS2RecordDefinitionException, org.w3c.dom.DOMException
GRS2RecordSerializationException
GRS2RecordDefinitionException
org.w3c.dom.DOMException
public abstract void extendInflate(java.io.DataInput in) throws GRS2RecordSerializationException
in
- the stream to inflate from
GRS2RecordSerializationException
- A deserialization error occurred
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |