@Component public class JcrXmlSerializer extends BaseFedoraObjectSerializer
repo
JCR_XML
Constructor and Description |
---|
JcrXmlSerializer() |
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
|
public JcrXmlSerializer()
public String getKey()
FedoraObjectSerializer
public String getMediaType()
FedoraObjectSerializer
public boolean canSerialize(FedoraResource resource)
FedoraObjectSerializer
FedoraObjectSerializer.serialize(org.fcrepo.kernel.models.FedoraResource, java.io.OutputStream, boolean, boolean)
.resource
- the resourcepublic void serialize(FedoraResource obj, OutputStream out, boolean skipBinary, boolean recurse) throws javax.jcr.RepositoryException, IOException, InvalidSerializationFormatException
FedoraObjectSerializer
serialize
in interface FedoraObjectSerializer
serialize
in class BaseFedoraObjectSerializer
obj
- the objout
- the outskipBinary
- skip binaryrecurse
- the recursejavax.jcr.RepositoryException
- if repository exception occurredIOException
- if IO exception occurredInvalidSerializationFormatException
- if invalid serialization occurredpublic void deserialize(javax.jcr.Session session, String path, InputStream stream) throws javax.jcr.RepositoryException, IOException, InvalidSerializationFormatException
FedoraObjectSerializer
deserialize
in interface FedoraObjectSerializer
deserialize
in class BaseFedoraObjectSerializer
session
- the sessionpath
- the pathstream
- the streamjavax.jcr.RepositoryException
- if repository exception occurredIOException
- if IO exception occurredInvalidSerializationFormatException
- if invadlid serialization occurredCopyright © 2013–2015 DuraSpace, Inc.. All rights reserved.