org.exist.collections.triggers
Class STXTransformerTrigger
java.lang.Object
org.exist.collections.triggers.FilteringTrigger
org.exist.collections.triggers.STXTransformerTrigger
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, DocumentTrigger, org.xml.sax.ext.LexicalHandler, Trigger
- public class STXTransformerTrigger
- extends FilteringTrigger
STXTransformerTrigger applies an STX stylesheet to the input SAX stream,
using Joost. The stylesheet location
is identified by parameter "src". If the src parameter is just a path, the stylesheet
will be loaded from the database, otherwise, it is interpreted as an URI.
- Author:
- wolf
Methods inherited from class org.exist.collections.triggers.FilteringTrigger |
characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, finish, getCollection, getInputHandler, getLexicalInputHandler, getLexicalOutputHandler, getLogger, getOutputHandler, ignorableWhitespace, isValidating, processingInstruction, setDocumentLocator, setLexicalOutputHandler, setOutputHandler, setValidating, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STXTransformerTrigger
public STXTransformerTrigger()
configure
public void configure(DBBroker broker,
Collection parent,
java.util.Map parameters)
throws CollectionConfigurationException
- Description copied from class:
FilteringTrigger
- Configure the trigger. The default implementation just stores the parent collection
reference into the field
collection
. Use method getCollection
to later retrieve the collection.
- Specified by:
configure
in interface Trigger
- Overrides:
configure
in class FilteringTrigger
- Throws:
CollectionConfigurationException
prepare
public void prepare(int event,
DBBroker broker,
Txn transaction,
XmldbURI documentName,
DocumentImpl existingDocument)
throws TriggerException
- Description copied from interface:
DocumentTrigger
- This method is called once before the database will actually parse the input data. You may take any action
here, using the supplied broker instance.
- Parameters:
event
- the type of event that triggered this call (see the constants defined in this interface). The ContentHandler instance for the output.broker
- the database instance used to process the current action.transaction
- the current transaction contextdocumentName
- the full absolute path of the document currently processed.existingDocument
- optional: if event is a Trigger.UPDATE_DOCUMENT_EVENT
,
existingDocument will contain the Document object for the old document, which will be overwritten. Otherwise, the parameter
is null.
- Throws:
TriggerException
- throwing a TriggerException will abort the current action.
Copyright (C) Wolfgang Meier. All rights reserved.