|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.uoa.di.madgik.grs.record.RecordDefinition
public abstract class RecordDefinition
The record definition represents the scheme of a single Record
along with the respective FieldDefinition
holds all the metadata available for the Record
and the hoste4d Field
s. All extending classes of this
class must define a default no arguments constructor
Constructor Summary | |
---|---|
RecordDefinition()
Creates a new instance |
|
RecordDefinition(FieldDefinition[] fieldDefinitions)
Creates a new instance |
Method Summary | |
---|---|
void |
copyFrom(RecordDefinition other)
|
void |
deflate(java.io.DataOutput out)
Deflates the state and information kept in the RecordDefinition . |
boolean |
equals(java.lang.Object obj)
|
abstract void |
extendDeflate(java.io.DataOutput out)
Method that needs to be implemented by the RecordDefinition extenders to deflate any additional information
kept |
abstract boolean |
extendEquals(java.lang.Object obj)
Method that needs to be implemented by the RecordDefinition extenders to extend the equality logic
based on additional logic contained in the implementations |
abstract void |
extendFromXML(org.w3c.dom.Element element)
|
abstract void |
extendInflate(java.io.DataInput in)
Method that needs to be implemented by the RecordDefinition extenders to inflate any additional information
previously deflated by the respective extender method |
abstract void |
extendToXML(org.w3c.dom.Document out,
org.w3c.dom.Element element)
|
void |
fromXML(org.w3c.dom.Element element)
|
FieldDefinition |
getDefinition(int index)
Retrieves the field definition with the provided index |
int |
getDefinition(java.lang.String name)
Retrieves the field definition with the provided name |
int |
getDefinitionSize()
Retrieves the length of the field definitions |
IBuffer.TransportDirective |
getTransportDirective()
Retrieves the transport directive |
void |
inflate(java.io.DataInput in)
Inflates the previously deflated information of this RecordDefinition . |
void |
setTransportDirective(IBuffer.TransportDirective directive)
Sets the transport directive for this Record |
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 |
Constructor Detail |
---|
public RecordDefinition()
public RecordDefinition(FieldDefinition[] fieldDefinitions)
fieldDefinitions
- the field definitionsMethod Detail |
---|
public void copyFrom(RecordDefinition other) throws GRS2RecordSerializationException
GRS2RecordSerializationException
public FieldDefinition getDefinition(int index)
index
- the index of the definition
public int getDefinition(java.lang.String name)
name
- the name of the definition
public int getDefinitionSize()
public void setTransportDirective(IBuffer.TransportDirective directive)
Record
directive
- the directivepublic IBuffer.TransportDirective getTransportDirective()
public boolean equals(java.lang.Object obj)
To check for equality, the type of the argument is checked. The field definitions length in both definitions must be
the same as well as the defined IBuffer.TransportDirective
. For each field definition hosted, FieldDefinition.equals(Object)
is invoked and finally the extendEquals(Object)
is consulted. If any of the above conditions are
not met, the two instances are not equal
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public abstract boolean extendEquals(java.lang.Object obj)
RecordDefinition
extenders to extend the equality logic
based on additional logic contained in the implementations
obj
- the object to check equality for
public void deflate(java.io.DataOutput out) throws GRS2RecordSerializationException
RecordDefinition
. After deflating the locally maintained
information, for each field definition hosted, FieldDefinition.deflate(DataOutput)
is invoked
and finally, Field.extendDeflate(java.io.DataOutput)
out
- the stream to deflate the information to
GRS2RecordSerializationException
- there was a problem serializing the definition statepublic abstract void extendToXML(org.w3c.dom.Document out, org.w3c.dom.Element element) throws GRS2RecordSerializationException
GRS2RecordSerializationException
public 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 final void fromXML(org.w3c.dom.Element element) throws GRS2RecordSerializationException, GRS2RecordDefinitionException, org.w3c.dom.DOMException
GRS2RecordSerializationException
GRS2RecordDefinitionException
org.w3c.dom.DOMException
public abstract void extendDeflate(java.io.DataOutput out) throws GRS2RecordSerializationException
RecordDefinition
extenders to deflate any additional information
kept
out
- the stream to deflate to
GRS2RecordSerializationException
- there was a serialization errorpublic void inflate(java.io.DataInput in) throws GRS2RecordSerializationException
RecordDefinition
. After retrieving the locally maintained
information, for all the hosted fields, the FieldDefinition.inflate(DataInput)
is called, and finally
extendInflate(DataInput)
is invoked
in
- the stream to inflate from
GRS2RecordSerializationException
- there was a problem deserializing the definition statepublic abstract void extendInflate(java.io.DataInput in) throws GRS2RecordSerializationException
RecordDefinition
extenders to inflate any additional information
previously deflated by the respective extender method
in
- the stream to inflate from
GRS2RecordSerializationException
- there was a problem deserializing the definition statepublic abstract void extendFromXML(org.w3c.dom.Element element) throws GRS2RecordSerializationException
GRS2RecordSerializationException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |