gr.uoa.di.madgik.grs.record.field
Class FileFieldDefinition

java.lang.Object
  extended by gr.uoa.di.madgik.grs.record.field.FieldDefinition
      extended by gr.uoa.di.madgik.grs.record.field.FileFieldDefinition

public class FileFieldDefinition
extends FieldDefinition

The FieldDefinition implementation for FileField

Author:
gpapanikos

Field Summary
static java.lang.String DefaultCharset
          The default charset used to encode the original payload path name for transport.
static boolean DefaultDeleteOnDispose
          The default producer side cleanup behavior
static IBuffer.TransportDirective DefaultDirective
          The default transport directive currently set to IBuffer.TransportDirective.Inherit
static int DefaultLocalBuffer
          The default size of the local buffer used to read the local file and send over the stream
static java.lang.String DefaultMimeType
          The default MIME type currently set to application/octet-stream
 
Fields inherited from class gr.uoa.di.madgik.grs.record.field.FieldDefinition
DefaultChunkSize, DefaultDoCompress
 
Constructor Summary
FileFieldDefinition()
          Creates a new instance
FileFieldDefinition(java.lang.String name)
          Creates a new instance
 
Method Summary
 void extendDeflate(java.io.DataOutput out)
          Method to be implemented by class extenders to deflate additional information
 boolean extendEquals(java.lang.Object obj)
          Method to be implemented by extenders to check if two instances are equal
 void extendFromXML(org.w3c.dom.Element element)
           
 void extendInflate(java.io.DataInput in)
          Method to be implemented by the class extenders to inflate additional information previously deflated
 void extendToXML(org.w3c.dom.Document doc, org.w3c.dom.Element element)
           
 java.lang.String getCharset()
          Retrieves the charset name used to encode the payload path
 boolean getDeleteOnDispose()
          Retrieves the local file cleanup behavior
 int getLocalBuffer()
          Retrieves the local buffer size used when accessing the local file
 void setCharset(java.lang.String charset)
          The charset name to use to encode the payload path
 void setDeleteOnDispose(boolean deleteOnDispose)
          Sets the local file cleanup behavior
 void setLocalBuffer(int localBuffer)
          Sets the local buffer size used when accessing the local file
 
Methods inherited from class gr.uoa.di.madgik.grs.record.field.FieldDefinition
deflate, equals, fromXML, getChunkSize, getMimeType, getName, getTransportDirective, inflate, isCompress, setChunkSize, setCompress, setMimeType, setName, setTransportDirective, toXML
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DefaultMimeType

public static final java.lang.String DefaultMimeType
The default MIME type currently set to application/octet-stream

See Also:
Constant Field Values

DefaultDirective

public static final IBuffer.TransportDirective DefaultDirective
The default transport directive currently set to IBuffer.TransportDirective.Inherit


DefaultCharset

public static final java.lang.String DefaultCharset
The default charset used to encode the original payload path name for transport. Currently set to UTF-8

See Also:
Constant Field Values

DefaultLocalBuffer

public static final int DefaultLocalBuffer
The default size of the local buffer used to read the local file and send over the stream

See Also:
Constant Field Values

DefaultDeleteOnDispose

public static final boolean DefaultDeleteOnDispose
The default producer side cleanup behavior

See Also:
Constant Field Values
Constructor Detail

FileFieldDefinition

public FileFieldDefinition()
Creates a new instance


FileFieldDefinition

public FileFieldDefinition(java.lang.String name)
Creates a new instance

Parameters:
name - the field definition name
Method Detail

setCharset

public void setCharset(java.lang.String charset)
The charset name to use to encode the payload path

Parameters:
charset - the charset name

getCharset

public java.lang.String getCharset()
Retrieves the charset name used to encode the payload path

Returns:
the charset name

setLocalBuffer

public void setLocalBuffer(int localBuffer)
Sets the local buffer size used when accessing the local file

Parameters:
localBuffer - the local buffer size

getLocalBuffer

public int getLocalBuffer()
Retrieves the local buffer size used when accessing the local file

Returns:
the local buffer size

setDeleteOnDispose

public void setDeleteOnDispose(boolean deleteOnDispose)
Sets the local file cleanup behavior

Parameters:
deleteOnDispose - true if the local file should be deleted when this FileField is disposed, false otherwise

getDeleteOnDispose

public boolean getDeleteOnDispose()
Retrieves the local file cleanup behavior

Returns:
true if the local file will be deleted when this FileField is disposed, false otherwise

extendEquals

public boolean extendEquals(java.lang.Object obj)
Method to be implemented by extenders to check if two instances are equal

Specified by:
extendEquals in class FieldDefinition
Parameters:
obj - the instance to check for equality
Returns:
true if equal, false otherwise
See Also:
FieldDefinition.extendEquals(java.lang.Object)

extendDeflate

public void extendDeflate(java.io.DataOutput out)
                   throws GRS2RecordSerializationException
Method to be implemented by class extenders to deflate additional information

Specified by:
extendDeflate in class FieldDefinition
Parameters:
out - the stream to deflate to
Throws:
GRS2RecordSerializationException - A serialization error occurred
See Also:
FieldDefinition.extendDeflate(java.io.DataOutput)

extendInflate

public void extendInflate(java.io.DataInput in)
                   throws GRS2RecordSerializationException
Method to be implemented by the class extenders to inflate additional information previously deflated

Specified by:
extendInflate in class FieldDefinition
Parameters:
in - the stream to inflate from
Throws:
GRS2RecordSerializationException - A deserialization error occurred
See Also:
FieldDefinition.extendInflate(java.io.DataInput)

extendToXML

public void extendToXML(org.w3c.dom.Document doc,
                        org.w3c.dom.Element element)
                 throws GRS2RecordSerializationException
Specified by:
extendToXML in class FieldDefinition
Throws:
GRS2RecordSerializationException

extendFromXML

public void extendFromXML(org.w3c.dom.Element element)
                   throws GRS2RecordSerializationException
Specified by:
extendFromXML in class FieldDefinition
Throws:
GRS2RecordSerializationException