|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.collections.triggers.FilteringTrigger
public abstract class FilteringTrigger
Abstract default implementation of a Trigger. This implementation just forwards all SAX events to the output content handler.
Field Summary |
---|
Fields inherited from interface org.exist.collections.triggers.Trigger |
---|
CREATE_COLLECTION_EVENT, DELETE_COLLECTION_EVENT, REMOVE_DOCUMENT_EVENT, RENAME_COLLECTION_EVENT, STORE_DOCUMENT_EVENT, UPDATE_DOCUMENT_EVENT |
Constructor Summary | |
---|---|
FilteringTrigger()
|
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
comment(char[] ch,
int start,
int length)
|
void |
configure(DBBroker broker,
Collection parent,
Map parameters)
Configure the trigger. |
void |
endCDATA()
|
void |
endDocument()
|
void |
endDTD()
|
void |
endElement(String namespaceURI,
String localName,
String qname)
|
void |
endEntity(String arg0)
|
void |
endPrefixMapping(String prefix)
|
void |
finish(int event,
DBBroker broker,
Txn transaction,
XmldbURI documentPath,
DocumentImpl document)
This method is called after the operation completed. |
Collection |
getCollection()
|
ContentHandler |
getInputHandler()
Returns the input content handler. |
LexicalHandler |
getLexicalInputHandler()
Returns the lexical input handler for this trigger. |
LexicalHandler |
getLexicalOutputHandler()
Called by the database to set the lexical output handler for this trigger. |
Logger |
getLogger()
Returns a Logger object. |
ContentHandler |
getOutputHandler()
Returns the output handler to which SAX events should be forwarded. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
boolean |
isValidating()
Returns true if the SAX parser is currently in validation phase. |
void |
processingInstruction(String target,
String data)
|
void |
setDocumentLocator(Locator locator)
|
void |
setLexicalOutputHandler(LexicalHandler handler)
Called by the database to set the lexical output content handler for this trigger. |
void |
setOutputHandler(ContentHandler handler)
Called by the database to set the output content handler for this trigger. |
void |
setValidating(boolean validating)
Called by the database to report that it is entering validation phase. |
void |
skippedEntity(String arg0)
|
void |
startCDATA()
|
void |
startDocument()
|
void |
startDTD(String name,
String publicId,
String systemId)
|
void |
startElement(String namespaceURI,
String localName,
String qname,
Attributes attributes)
|
void |
startEntity(String arg0)
|
void |
startPrefixMapping(String prefix,
String namespaceURI)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.exist.collections.triggers.DocumentTrigger |
---|
prepare |
Constructor Detail |
---|
public FilteringTrigger()
Method Detail |
---|
public void configure(DBBroker broker, Collection parent, Map parameters) throws CollectionConfigurationException
collection
. Use method getCollection
to later retrieve the collection.
configure
in interface Trigger
broker
- the database instance used to load the collection configuration. The broker object is
required for all database actions. Please note: the broker instance used for configuration is probably
different from the one passed to the prepare method. Don't store the broker object in your class.parent
- the collection to which this trigger belongs.parameters
- a Map containing any key/value parameters defined in the configuration file.
CollectionConfigurationException
- if the trigger cannot be initialized.public void finish(int event, DBBroker broker, Txn transaction, XmldbURI documentPath, DocumentImpl document)
DocumentTrigger
finish
in interface DocumentTrigger
event
- the type of event that triggered this call (see the constants defined in this interface).broker
- the database instance used to process the current action.transaction
- the current transaction contextdocumentPath
- the path of the document, if removed the old path of the documentdocument
- the stored document or null if the document is removedpublic void setValidating(boolean validating)
DocumentTrigger
setValidating
in interface DocumentTrigger
public boolean isValidating()
DocumentTrigger
isValidating
returns false, no exceptions should be
thrown.
isValidating
in interface DocumentTrigger
public Collection getCollection()
public ContentHandler getInputHandler()
DocumentTrigger
getInputHandler
in interface DocumentTrigger
public LexicalHandler getLexicalInputHandler()
DocumentTrigger
getInputHandler
.
getLexicalInputHandler
in interface DocumentTrigger
public ContentHandler getOutputHandler()
DocumentTrigger
getOutputHandler
in interface DocumentTrigger
public LexicalHandler getLexicalOutputHandler()
DocumentTrigger
getLexicalOutputHandler
in interface DocumentTrigger
public void setOutputHandler(ContentHandler handler)
DocumentTrigger
setOutputHandler
in interface DocumentTrigger
public void setLexicalOutputHandler(LexicalHandler handler)
DocumentTrigger
setLexicalOutputHandler
in interface DocumentTrigger
public Logger getLogger()
Trigger
getLogger
in interface Trigger
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
public void startDocument() throws SAXException
startDocument
in interface ContentHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
SAXException
public void startPrefixMapping(String prefix, String namespaceURI) throws SAXException
startPrefixMapping
in interface ContentHandler
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
SAXException
public void startElement(String namespaceURI, String localName, String qname, Attributes attributes) throws SAXException
startElement
in interface ContentHandler
SAXException
public void endElement(String namespaceURI, String localName, String qname) throws SAXException
endElement
in interface ContentHandler
SAXException
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ignorableWhitespace
in interface ContentHandler
SAXException
public void processingInstruction(String target, String data) throws SAXException
processingInstruction
in interface ContentHandler
SAXException
public void skippedEntity(String arg0) throws SAXException
skippedEntity
in interface ContentHandler
SAXException
public void startDTD(String name, String publicId, String systemId) throws SAXException
startDTD
in interface LexicalHandler
SAXException
public void endDTD() throws SAXException
endDTD
in interface LexicalHandler
SAXException
public void startEntity(String arg0) throws SAXException
startEntity
in interface LexicalHandler
SAXException
public void endEntity(String arg0) throws SAXException
endEntity
in interface LexicalHandler
SAXException
public void startCDATA() throws SAXException
startCDATA
in interface LexicalHandler
SAXException
public void endCDATA() throws SAXException
endCDATA
in interface LexicalHandler
SAXException
public void comment(char[] ch, int start, int length) throws SAXException
comment
in interface LexicalHandler
SAXException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |