@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
- void serialize(FedoraResource obj, OutputStream out, boolean skipBinary, boolean recurse) throws javax.jcr.RepositoryException, IOException, InvalidSerializationFormatException
obj
- out
- skipBinary
- recurse
- javax.jcr.RepositoryException
IOException
InvalidSerializationFormatException
void deserialize(javax.jcr.Session session, String path, InputStream stream) throws IOException, javax.jcr.RepositoryException, InvalidChecksumException, InvalidSerializationFormatException
session
- path
- stream
- IOException
javax.jcr.RepositoryException
InvalidChecksumException
InvalidSerializationFormatException
Copyright © 2013-2015 DuraSpace, Inc.. All Rights Reserved.