public class AbstractProcessor extends Object implements Processor
Processor
that delegates all methods to its underlying processor.Modifier | Constructor and Description |
---|---|
protected |
AbstractProcessor(Processor processor)
Constructs a new
AbstractProcessor with an embedded processor . |
Modifier and Type | Method and Description |
---|---|
void |
addHandler(PersistenceHandler persistenceHandler)
Adds an
InputHandler that will be notified. |
Iterable<PersistenceHandler> |
getHandlers()
Returns all registered handlers.
|
boolean |
hasHandler()
Defines if this notifier has at least one
InputHandler to notify. |
void |
notifyAttribute(Attribute attribute)
Notifies all registered handlers of a new attribute.
|
void |
notifyCharacters(String characters)
Notifies all registered handlers of a new set of characters.
|
void |
notifyEndDocument()
Notifies all registered handlers of the end of the current document.
|
void |
notifyEndElement()
Notifies all registered handlers of the end of the current element.
|
void |
notifyReference(Reference reference)
Notifies all registered handlers of a new reference.
|
void |
notifyStartDocument()
Notifies all registered handlers of the start of a document.
|
void |
notifyStartElement(Classifier classifier)
Notifies all registered handlers of the start of a new element.
|
void |
processAttribute(Attribute attribute)
Process an attribute in the current element.
|
void |
processCharacters(String characters)
Process a set of characters.
|
void |
processEndDocument()
Process the end of a document.
|
void |
processEndElement()
Process the end of the current element.
|
void |
processReference(Reference reference)
Process a reference from the current element to another element.
|
void |
processStartDocument()
Process the start of a document.
|
void |
processStartElement(Classifier classifier)
Process the start of an element.
|
protected AbstractProcessor(Processor processor)
AbstractProcessor
with an embedded processor
.processor
- the embedded processorpublic void processStartDocument()
InputHandler
processStartDocument
in interface InputHandler
InputNotifier.notifyStartDocument()
public void processStartElement(Classifier classifier)
InputHandler
processStartElement
in interface InputHandler
classifier
- the classifier of the new elementInputNotifier.notifyStartElement(Classifier)
public void processAttribute(Attribute attribute)
InputHandler
An attribute is a simple key/value.
processAttribute
in interface InputHandler
attribute
- the new attributeInputNotifier.notifyAttribute(Attribute)
public void processReference(Reference reference)
InputHandler
A reference is an attribute which is link to another element.
processReference
in interface InputHandler
reference
- the new referenceInputNotifier.notifyReference(Reference)
public void processEndElement()
InputHandler
processEndElement
in interface InputHandler
InputNotifier.notifyEndElement()
public void processEndDocument()
InputHandler
processEndDocument
in interface InputHandler
InputNotifier.notifyEndDocument()
public void processCharacters(String characters)
InputHandler
processCharacters
in interface InputHandler
characters
- the new charactersInputNotifier.notifyCharacters(String)
public final void addHandler(PersistenceHandler persistenceHandler)
InputNotifier
InputHandler
that will be notified.addHandler
in interface InputNotifier<PersistenceHandler>
persistenceHandler
- the handler to addpublic final boolean hasHandler()
InputNotifier
InputHandler
to notify.hasHandler
in interface InputNotifier<PersistenceHandler>
true
if this notifier has at least one handler to notify.public final Iterable<PersistenceHandler> getHandlers()
InputNotifier
getHandlers
in interface InputNotifier<PersistenceHandler>
public final void notifyStartDocument()
InputNotifier
notifyStartDocument
in interface InputNotifier<PersistenceHandler>
InputNotifier.notifyEndDocument()
,
InputHandler.processStartDocument()
public final void notifyStartElement(Classifier classifier)
InputNotifier
notifyStartElement
in interface InputNotifier<PersistenceHandler>
classifier
- the classifier of the new elementInputNotifier.notifyEndElement()
,
InputHandler.processStartElement(Classifier)
public final void notifyAttribute(Attribute attribute)
InputNotifier
notifyAttribute
in interface InputNotifier<PersistenceHandler>
attribute
- the new attributeInputHandler.processAttribute(Attribute)
public final void notifyReference(Reference reference)
InputNotifier
notifyReference
in interface InputNotifier<PersistenceHandler>
reference
- the new referenceInputHandler.processReference(Reference)
public final void notifyCharacters(String characters)
InputNotifier
notifyCharacters
in interface InputNotifier<PersistenceHandler>
characters
- the new charactersInputHandler.processCharacters(String)
public final void notifyEndElement()
InputNotifier
notifyEndElement
in interface InputNotifier<PersistenceHandler>
InputNotifier.notifyStartElement(Classifier)
,
InputHandler.processEndElement()
public final void notifyEndDocument()
InputNotifier
notifyEndDocument
in interface InputNotifier<PersistenceHandler>
InputNotifier.notifyStartDocument()
,
InputHandler.processEndDocument()
Copyright © 2013–2017 Atlanmod INRIA LINA Mines Nantes. All rights reserved.