PropertyElementBase
Date: 2013-03-24

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gcube.common.searchservice.searchlibrary.resultset.elements
Class PropertyElementBase

    java.lang.Object
      org.gcube.common.searchservice.searchlibrary.resultset.elements.PropertyElementBase

Direct Known Subclasses:
  PropertyElementEstimationCount, PropertyElementGC, PropertyElementLifeSpanGC, PropertyElementType, PropertyElementURIValidation, PropertyElementWellFormed, PropertyElementWSEPR, PropertyElementXSDContentValidation

    public abstract class PropertyElementBase

extends java.lang.Object

This class is the base class that must be extended by anyone wishing to implement a custom Property element class. Every class extending this one must define an accessible default constructor with an empty argument list

Author:
  UoA

Constructor Summary
`PropertyElementBase()`

Method Summary
`abstract void` | `fromXML(java.lang.String xml)` Method to be implemented that will handle the population of the custom Property element.
`java.lang.String` | `getType()` Retrieves the Type of the current property
`static java.lang.String` | `getType(java.lang.String xml)` Retrieves the Type of the provided property serialization
`void` | `RS_fromXML(java.lang.String xml)` Populates the current property element with provided property serialization
`java.lang.String` | `RS_toXML()` Creates a serialization of the current property element that can be added to the `ResultSet` head part.
`void` | `setType(java.lang.String type)` Sets the Type of the current property element
`abstract java.lang.String` | `toXML()` Method to be implemented that will handle the serialization of the custom Property element.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PropertyElementBase

    public PropertyElementBase()

Method Detail

### getType

    public final java.lang.String getType()
                                   throws java.lang.Exception

  Retrieves the Type of the current property

  Returns:
    the type of the current property
  Throws:
    `java.lang.Exception` - An unrecoverable for the operation error has occured

### setType

    public final void setType(java.lang.String type)
                       throws java.lang.Exception

  Sets the Type of the current property element

  Parameters:
    `type` - The type this property element has
  Throws:
    `java.lang.Exception` - An unrecoverable for the operation error has occured

### getType

    public static final java.lang.String getType(java.lang.String xml)
                                          throws java.lang.Exception

  Retrieves the Type of the provided property serialization

  Parameters:
    `xml` - the serialixed property
  Returns:
    the type of the provided property
  Throws:
    `java.lang.Exception` - An unrecoverable for the operation error has occured

### RS_toXML

    public final java.lang.String RS_toXML()
                                    throws java.lang.Exception

  Creates a serialization of the current property element that can be added to the `ResultSet` head part.

  Returns:
    The valid serialization of the property element
  Throws:
    `java.lang.Exception` - An unrecoverable for the operation error has occured

### RS_fromXML

    public final void RS_fromXML(java.lang.String xml)
                          throws java.lang.Exception

  Populates the current property element with provided property serialization

  Parameters:
    `xml` - The serialized property
  Throws:
    `java.lang.Exception` - An unrecoverable for the operation error has occured

### fromXML

    public abstract void fromXML(java.lang.String xml)
                          throws java.lang.Exception

  Method to be implemented that will handle the population of the custom Property element. It is called by the `RS_fromXML(String)` after it has striped the xml serialization of the type property

  Parameters:
    `xml` - The striped xml serialization the custom property element must handle
  Throws:
    `java.lang.Exception` - The extending element can specify the Exception that is thrown
  See Also:
    `toXML()`

### toXML

    public abstract java.lang.String toXML()
                                    throws java.lang.Exception

  Method to be implemented that will handle the serialization of the custom Property element. It is called by the `RS_toXML()` which then enriches the returned serialization to produce a valid property xml string

  Returns:
    an xml serialization of the proeprty content
  Throws:
    `java.lang.Exception` - The extending element can specify the Exception that is thrown
  See Also:
    `PropertyElementBase#fromXML()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD