|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.writersforge.catalan.transform.ProcessorRegistry
Central registry for connecting XML transform elements up to NodeProcessor implementations. The XML map has a simple format:
<registry>
<proc-one class="org.mystuff.processors.ProcOne"/>
<proc-two class="org.mystuff.processors.ProcTwo"/>
</registry>
Each child element represents an element in the Transform XML; the "class"
attribute is the processor class that the Transform XML element should map
to. In the example above, the element <proc-one> in Transform XML
would map to the processor class org.mystuff.processors.ProcOne. Classes
that don't exist in the current Java environment resolve to a null.
| Constructor Summary | |
ProcessorRegistry()
Creates a new instance of ProcessorRegistry with the default Transform XML mapping. |
|
ProcessorRegistry(org.writersforge.bellows.Datum baseMap)
Creates a new instance of ProcessorRegistry. |
|
| Method Summary | |
void |
addFallback(org.writersforge.bellows.Datum map)
Adds a registry map to the front of the registry. |
void |
addOverride(org.writersforge.bellows.Datum map)
Adds a registry map to the front of the registry. |
org.writersforge.bellows.traverse.NodeProcessor |
createProcessor(org.writersforge.bellows.Datum xmlOp)
Instantiates a processor from the settings in the given Transform XML operation. |
java.lang.Class |
lookup(java.lang.String opName)
Looks up a Transform XML element name in the registry and retrieves the corresponding NodeProcessor implementation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ProcessorRegistry()
public ProcessorRegistry(org.writersforge.bellows.Datum baseMap)
baseMap - initial registry map| Method Detail |
public void addOverride(org.writersforge.bellows.Datum map)
map - override registry mappublic void addFallback(org.writersforge.bellows.Datum map)
map - fallback registry mappublic java.lang.Class lookup(java.lang.String opName)
opName - the Transform XML name for the processor
public org.writersforge.bellows.traverse.NodeProcessor createProcessor(org.writersforge.bellows.Datum xmlOp)
MyProcessor (Datum xml, ProcessorRegistry registry) MyProcessor (Datum xml) MyProcessor ()
xmlOp - a Transform XML operation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||