org.gcube.resources.discovery.client.impl
Class JAXBParser<R>
java.lang.Object
org.gcube.resources.discovery.client.impl.JAXBParser<R>
- Type Parameters:
R - the type of parsed results
- All Implemented Interfaces:
- ResultParser<R>
public class JAXBParser<R>
- extends Object
- implements ResultParser<R>
A ResultParser that parses query results into JAXB annotated classes.
- Author:
- Fabio Simeoni
|
Constructor Summary |
JAXBParser(Class<R> type)
Creates an instance with a JAXB-annotated class. |
|
Method Summary |
R |
parse(String result)
Transforms an untyped result. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JAXBParser
public JAXBParser(Class<R> type)
- Creates an instance with a JAXB-annotated class.
- Parameters:
type - the class
parse
public R parse(String result)
throws Exception
- Description copied from interface:
ResultParser
- Transforms an untyped result.
- Specified by:
parse in interface ResultParser<R>
- Parameters:
result - the untyped results
- Returns:
- the typed result
- Throws:
Exception - if the result cannot be typed
Copyright © 2013. All Rights Reserved.