|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.fedoracommons.funapi.fedora.FedoraResolver
public class FedoraResolver
Implementation of ObjectResolver for a Fedora repository.
This implementation will attempt to load a properties file with the name
FedoraResolver.properties
.
Required properties:
<json> [["info:fedora/*/DC","oai_dc","text/xml","http://www.openarchives.org/OAI/2.0/oai_dc.xsd"], ["info:fedora/*/demo:dc2mods.sdef/transform","mods","application/xml","http://www.loc.gov/standards/mods/"]] </json>The above is a JSON array of arrays surrounded by <json> tags. Each four-element inner array represents a single unAPI format. The first element is the dissemination type URI which will requested object in the requested format. The remaining three elements are the unAPI format, type and docs.
Constructor Summary | |
---|---|
FedoraResolver()
|
Method Summary | |
---|---|
UnapiFormats |
getFormats()
Provide the object formats which should be supported for all objects available through the unAPI service. |
UnapiFormats |
getFormats(java.lang.String id)
Provide a list of object formats available from the unAPI service for the object identified by id . |
UnapiObject |
getObject(java.lang.String id,
java.lang.String format)
Return an UnapiObject representing the object
specified by id in the format specified by
format . |
protected void |
setFedoraClient(fedora.client.FedoraClient fedoraClient)
|
protected void |
setHttpClient(org.apache.commons.httpclient.HttpClient httpClient)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FedoraResolver() throws UnapiException
UnapiException
Method Detail |
---|
public UnapiFormats getFormats() throws UnapiException
ObjectResolver
getFormats
in interface ObjectResolver
UnapiException
public UnapiFormats getFormats(java.lang.String id) throws UnapiException
ObjectResolver
id
.
It is similar to the getFormats
response, but the
returned UnapiFormats object must have the requested id
set.
getFormats
in interface ObjectResolver
UnapiException
public UnapiObject getObject(java.lang.String id, java.lang.String format) throws UnapiException
ObjectResolver
Return an UnapiObject
representing the object
specified by id
in the format specified by
format
.
Implementations should throw an IdentifierException
for requests for an identifier that is not available
on the server.
Implementations should throw a FormatException
for requests for an identifier that is available on the server in a
format that is not available for that identifier.
getObject
in interface ObjectResolver
UnapiException
protected void setHttpClient(org.apache.commons.httpclient.HttpClient httpClient)
protected void setFedoraClient(fedora.client.FedoraClient fedoraClient)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |