be.re.repo
Interface XMLStorage
public interface XMLStorage
The interface for storage implementations that wish to store XML documents
per version. The byte stream they produce is stored in the database. Such
modules are declared in /configuration/maps.xml
using the storage
element as in the following example:
<storage>
<mime-type>application/xml</mime-type>
<!-- Additional mime-type elements can come here. -->
<!-- Several path elements can come here. -->
<class>
<name>be.re.repo.mod.DefaultXMLStorage</name>
<!-- Optional URL relative to maps.xml.
<jar>modules/my_module.jar</jar>
-->
</class>
</storage>
- Author:
- Werner Donné
Method Summary |
void |
read(String vcr,
String version,
String systemId,
InputStream in,
XMLEventWriter out,
XMLResolver entityResolver,
boolean expand,
String mimeType,
Context context)
|
XMLEventReader |
read(String vcr,
String version,
String systemId,
InputStream in,
XMLResolver entityResolver,
boolean expand,
String mimeType,
Context context)
|
void |
write(String vcr,
String version,
XMLEventReader in,
OutputStream out,
String mimeType,
Context context)
|
read
void read(String vcr,
String version,
String systemId,
InputStream in,
XMLEventWriter out,
XMLResolver entityResolver,
boolean expand,
String mimeType,
Context context)
throws IOException,
XMLStreamException
- Parameters:
vcr
- the local path of the VCR.version
- the local path of the version.systemId
- can be used to resolve relative URLs.in
- the inputstream of the version.out
- the XML-stream into which the result should be written.entityResolver
- a StAX entity resolver.expand
- whether XML-entities and XInclude elements should be expanded
in the result.mimeType
- the MIME type of the document.context
- the repository context.
- Throws:
IOException
XMLStreamException
read
XMLEventReader read(String vcr,
String version,
String systemId,
InputStream in,
XMLResolver entityResolver,
boolean expand,
String mimeType,
Context context)
throws IOException,
XMLStreamException
- Parameters:
vcr
- the local path of the VCR.version
- the local path of the version.systemId
- can be used to resolve relative URLs.in
- the inputstream of the version.entityResolver
- a StAX entity resolver.expand
- whether XML-entities and XInclude elements should be
expanded in the result.mimeType
- the MIME type of the document.context
- the repository context.
- Returns:
- The XML-stream from which the result is read.
- Throws:
IOException
XMLStreamException
write
void write(String vcr,
String version,
XMLEventReader in,
OutputStream out,
String mimeType,
Context context)
throws IOException,
XMLStreamException
- Parameters:
vcr
- the local path of the VCR.version
- the local path of the version.in
- the XML-stream of the version.out
- the outputstream into which the result should be written.mimeType
- the MIME type of the document.context
- the repository context.
- Throws:
IOException
XMLStreamException