|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gcube.common.searchservice.searchlibrary.resultset.elements.ResultElementBase
public abstract class ResultElementBase
This class is the base class that must be extended by anyone wishing to implement a custom Record element class. Every class extending this one must define an accessible default constructor with an empty argument list
Constructor Summary | |
---|---|
ResultElementBase()
|
Method Summary | |
---|---|
abstract void |
fromXML(java.lang.String xml)
This method must be able to reconstruct the result elelement from a xml string as returned by toXML() |
RecordAttribute[] |
getRecordAttributes()
Retrieves the Attributs of the recors |
RecordAttribute[] |
getRecordAttributes(java.lang.String attrName)
Retrieveds the record Attributes with the given attribute name |
static boolean |
isValid(java.lang.String xml)
This operations checkes if the provided xml string is a valid serialization of a record |
void |
RS_fromXML(java.lang.String xml)
This operation is used to unmarshal a result element from a serialization string only if this is a valid result serialization as returned by RS_toXML() . |
java.lang.String |
RS_toXML()
This operation is used to retrieve the searialization of the provided record element checking if it is a valid serialization. |
void |
setRecordAttributes(RecordAttribute[] attrs)
Sets the record Attributes |
abstract java.lang.String |
toXML()
This method must return a valid xml serialization of the result record payload. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResultElementBase()
Method Detail |
---|
public abstract java.lang.String toXML() throws java.lang.Exception
java.lang.Exception
- The extending element can specify the Exception that is thrownpublic abstract void fromXML(java.lang.String xml) throws java.lang.Exception
toXML()
xml
- The xml serialization
java.lang.Exception
- The elelement creation could not be performedpublic RecordAttribute[] getRecordAttributes()
public RecordAttribute[] getRecordAttributes(java.lang.String attrName)
attrName
- The name of the attribute
public void setRecordAttributes(RecordAttribute[] attrs)
attrs
- The Attributespublic final java.lang.String RS_toXML() throws java.lang.Exception
java.lang.Exception
- The serialization is not a valid record serializationpublic final void RS_fromXML(java.lang.String xml) throws java.lang.Exception
RS_toXML()
.
It also parses the availalbe atributes
xml
- The xml string to be unmarshaled
java.lang.Exception
- The unmarshaling could not be performedpublic static final boolean isValid(java.lang.String xml)
xml
- The serialization that must be checked
true
if it is a valid serialization, false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |