public interface EntityDereferencer
Site to dereference Representation
for entity ids. Implementations of this interface are dependent on the
service provided by the referenced site.| Modifier and Type | Field and Description |
|---|---|
static String |
ACCESS_URI
The key used to define the baseUri of the service used for the
implementation of this interface.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDereference(String uri)
Whether the parsed entity ID can be dereferenced by this Dereferencer or
not.
|
Representation |
dereference(String uri)
Dereferences the Representation of the referred Entity
|
InputStream |
dereference(String uri,
String contentType)
Generic getter for the data of the parsed entity id
|
String |
getAccessUri()
The base uri used to access this site
|
static final String ACCESS_URI
SiteConfiguration#ACCESS_URIString getAccessUri()
boolean canDereference(String uri)
uri - the URI to be checkedtrue of URIs of that kind can be typically dereferenced
by this service instance.InputStream dereference(String uri, String contentType) throws IOException
uri - the entity to dereferencecontentType - the content type of the datanull if not present or wrong data type
TODO: we should use exceptions instead of returning null!IOExceptionRepresentation dereference(String uri) throws IOException
uri - the uri of the referred entitynull if no Entity was found
for the parsed entity reference.IOExceptionCopyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.