|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XMLExchangeProperties
The interface for external modules to extract and update meta-properties in an XML document. The DublinCore properties can correspond to DublinCore elements or terms. The name of the former starts with "dc:" and of the latter with "dcterms:". DublinCore properties are localized. Pincette also supports the localized properties "re:company", "re:keyword", "re:manager" and "re:status" and properties with the "atom:" prefix.
Such modules are declared in /configuration/maps.xml
using the exchange-properties
element as in the following
example:
<exchange-properties>
<mime-type>application/xhtml+xml</mime-type>
<!-- Additional mime-type elements can come here. -->
<!-- Several path elements can come here. -->
<class>
<name>be.re.repo.mod.ExchangePropertiesXHTML</name>
<!-- Optional URL relative to maps.xml.
<jar>modules/my_module.jar</jar>
</class>
</exchange-properties>
Method Summary | |
---|---|
XMLEventReader |
get(String vcr,
String version,
XMLEventReader in,
Set<Property> properties,
String mimeType,
Context context)
The method should return an event stream the system can read from. |
XMLEventReader |
set(String vcr,
String version,
XMLEventReader in,
Set<Property> newProperties,
Set<Property> oldProperties,
String mimeType,
Context context)
The method should return an event stream the system can read from. |
Method Detail |
---|
XMLEventReader get(String vcr, String version, XMLEventReader in, Set<Property> properties, String mimeType, Context context) throws IOException, XMLStreamException
in
parameter contains the original document stream. The
method is supposed to fill properties
with the extracted
document properties. The properties should be of type
be.re.repo.Property
.
vcr
- the local path of the resource.version
- the version URL of the resource.in
- the original document stream.properties
- the property set that is to be filled.mimeType
- the MIME type of the resource. A module could several
types of document.context
- the repository context.
in
. Note that if
in
has been consumed it can no longer just be returned. The
module could for example insert a filter that extracts the properties from
the original document stream.
IOException
XMLStreamException
Property
XMLEventReader set(String vcr, String version, XMLEventReader in, Set<Property> newProperties, Set<Property> oldProperties, String mimeType, Context context) throws IOException, XMLStreamException
in
parameter contains the original document stream. The
method is supposed to update the document properties with those found in
newProperties
. The properties are of type
be.re.repo.Property
. A module may have some validation policy
and change the set of properties.
vcr
- the local path of the resource.version
- the version URL of the resource.in
- the original document stream.newProperties
- the complete set of properties that is to be updated
in the document. A module is allowed to modify this set according to its
validation rules. The repository will then use the modified set.oldProperties
- the properties the document currently has. This may
be usefull for the validation of newProperties
.mimeType
- the MIME type of the resource. A module could several
types of document.context
- the repository context.
null
the repository will not update the contents of the
resource.
IOException
XMLStreamException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |