@Component public interface FedoraObjectSerializer
| Modifier and Type | Method and Description |
|---|---|
boolean |
canSerialize(FedoraResource resource)
Determines whether this FedoraObjectSerializer can be used to
serialize the given resource.
|
void |
deserialize(javax.jcr.Session session,
String path,
InputStream stream)
Read the given InputStream and de-serialize the content
into new nodes in the given session using the given path
as the parent node
|
String |
getKey()
Get the key for the serializer (that will be
used at the REST API to identify the format)
|
String |
getMediaType()
Get the media type for the serialized output
(so we can send the right mime type as appropriate)
|
void |
serialize(FedoraResource obj,
OutputStream out,
boolean skipBinary,
boolean recurse)
Serialize a FedoraObject into some format with options for recurse
and skipBinary, and write it to the given OutputStream
|
static final String JCR_XML
String getKey()
String getMediaType()
boolean canSerialize(FedoraResource resource)
serialize(org.fcrepo.kernel.models.FedoraResource, java.io.OutputStream, boolean, boolean).resource - the resourcevoid serialize(FedoraResource obj, OutputStream out, boolean skipBinary, boolean recurse) throws javax.jcr.RepositoryException, IOException, InvalidSerializationFormatException
obj - the objout - the outskipBinary - skip binaryrecurse - the recursejavax.jcr.RepositoryException - if repository exception occurredIOException - if IO exception occurredInvalidSerializationFormatException - if invalid serialization occurredvoid deserialize(javax.jcr.Session session, String path, InputStream stream) throws IOException, javax.jcr.RepositoryException, InvalidChecksumException, InvalidSerializationFormatException
session - the sessionpath - the pathstream - the streamIOException - if IO exception occurredjavax.jcr.RepositoryException - if repository exception occurredInvalidChecksumException - if invalid checksum exception occurredInvalidSerializationFormatException - if invadlid serialization occurredCopyright © 2013–2015 DuraSpace, Inc.. All rights reserved.