org.gcube.common.core.informationsystem.client.impl
Class AbstractXMLResult

java.lang.Object
  extended by org.gcube.common.core.informationsystem.client.impl.AbstractXMLResult
All Implemented Interfaces:
XMLResult

public class AbstractXMLResult
extends Object
implements XMLResult

Partial implementation of XMLResult.

Author:
Fabio Simeoni (University of Strathclyde), Manuele Simi (CNR)

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.gcube.common.core.informationsystem.client.XMLResult
XMLResult.ISResultEvaluationException, XMLResult.ISResultInitialisationException
 
Field Summary
protected  Node dom
          The result dom source.
protected static DocumentBuilderFactory domFactory
           
protected static XPath engine
           
protected  String result
          The result serialisation.
protected static Transformer transformer
          Transformation engine.
 
Constructor Summary
AbstractXMLResult(String result)
          Creates and instance from its XML serialisation.
 
Method Summary
 List<String> evaluate(String xpath)
          Returns the values of an XPath query against the result.
protected  void parse(String result)
          Parses the result into a DOM structure.
 String toString()
          Returns the result serialisation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

engine

protected static XPath engine

domFactory

protected static DocumentBuilderFactory domFactory

transformer

protected static Transformer transformer
Transformation engine.


result

protected String result
The result serialisation.


dom

protected Node dom
The result dom source.

Constructor Detail

AbstractXMLResult

public AbstractXMLResult(String result)
                  throws XMLResult.ISResultInitialisationException
Creates and instance from its XML serialisation.

Throws:
XMLResult.ISResultInitialisationException
Method Detail

parse

protected void parse(String result)
              throws ISClient.ISMalformedResultException
Parses the result into a DOM structure.

Parameters:
result - the result.
Throws:
ISClient.ISMalformedResultException - if the result could not be parsed.

toString

public String toString()
Returns the result serialisation.

Specified by:
toString in interface XMLResult
Overrides:
toString in class Object
Returns:
the serialisation.

evaluate

public List<String> evaluate(String xpath)
                      throws XMLResult.ISResultEvaluationException
Returns the values of an XPath query against the result.

Specified by:
evaluate in interface XMLResult
Parameters:
xpath - the XPath expression.
Returns:
the values.
Throws:
XMLResult.ISResultEvaluationException


Copyright © 2013. All Rights Reserved.