org.openrdf.server.metadata.readers.base
Class MessageReaderBase<FF extends FileFormat,S,T>
java.lang.Object
org.openrdf.server.metadata.readers.base.MessageReaderBase<FF,S,T>
- Type Parameters:
FF - file formatS - parser factoryT - Java type returned
- All Implemented Interfaces:
- MessageBodyReader<T>
- Direct Known Subclasses:
- BooleanMessageReader, GraphMessageReader, ModelMessageReader, TupleMessageReader
public abstract class MessageReaderBase<FF extends FileFormat,S,T>
- extends Object
- implements MessageBodyReader<T>
Base class for readers that use a FileFormat.
- Author:
- James Leigh
|
Method Summary |
protected S |
getFactory(String mime)
|
protected FF |
getFormat(String mimeType)
|
boolean |
isReadable(Class<?> type,
Type genericType,
String mimeType,
ObjectConnection con)
|
T |
readFrom(Class<?> type,
Type genericType,
String media,
InputStream in,
Charset charset,
String base,
String location,
ObjectConnection con)
Must close InputStream or return an object that will later close the
InputStream. |
abstract T |
readFrom(S factory,
InputStream in,
Charset charset,
String base)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageReaderBase
public MessageReaderBase(FileFormatServiceRegistry<FF,S> registry,
Class<T> type)
isReadable
public boolean isReadable(Class<?> type,
Type genericType,
String mimeType,
ObjectConnection con)
- Specified by:
isReadable in interface MessageBodyReader<T>
readFrom
public T readFrom(Class<?> type,
Type genericType,
String media,
InputStream in,
Charset charset,
String base,
String location,
ObjectConnection con)
throws QueryResultParseException,
TupleQueryResultHandlerException,
IOException,
QueryEvaluationException
- Description copied from interface:
MessageBodyReader
- Must close InputStream or return an object that will later close the
InputStream.
- Specified by:
readFrom in interface MessageBodyReader<T>
- Throws:
QueryResultParseException
TupleQueryResultHandlerException
IOException
QueryEvaluationException
readFrom
public abstract T readFrom(S factory,
InputStream in,
Charset charset,
String base)
throws QueryResultParseException,
TupleQueryResultHandlerException,
IOException,
QueryEvaluationException
- Throws:
QueryResultParseException
TupleQueryResultHandlerException
IOException
QueryEvaluationException
getFactory
protected S getFactory(String mime)
getFormat
protected FF getFormat(String mimeType)
Copyright © 2004-2009 James Leigh Services Inc.. All Rights Reserved.