|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.topologi.diffx.event.impl.EventFactory
public final class EventFactory
Factory for events.
This class is designed to returned events that are optimised for the type of sequence that it is being inserted in.
Non-namespace aware objects are lighter than namespace aware ones.
Constructor Summary | |
---|---|
EventFactory()
Creates a new namespace aware factory for events. |
|
EventFactory(boolean isNamespaceAware)
Creates a factory for events. |
Method Summary | |
---|---|
AttributeEvent |
makeAttribute(String uri,
String name,
String value)
Returns the attribute event from the name and value given. |
AttributeEvent |
makeAttribute(String uri,
String localName,
String qName,
String value)
Returns the attribute event from the name and value given. |
CloseElementEvent |
makeCloseElement(OpenElementEvent open)
Returns the close element event from the corresponding open element event. |
OpenElementEvent |
makeOpenElement(String uri,
String name)
Returns the open element event from the uri and name given. |
OpenElementEvent |
makeOpenElement(String uri,
String localName,
String qName)
Returns the open element event from the uri and names given. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EventFactory()
public EventFactory(boolean isNamespaceAware)
isNamespaceAware
- true
to create new namespace aware factory;
false
otherwise.Method Detail |
---|
public OpenElementEvent makeOpenElement(String uri, String name)
If the factory is namespace aware, it returns an open element implementation using the namespace URI and the name.
If the factory is NOT namespace aware, it returns an open element implementation using the specified name.
Use this implementation if the name of the element is determined prior to the call of this method.
uri
- The namespace URI of the element (ignored if not namespace aware)name
- The name of the element.
public OpenElementEvent makeOpenElement(String uri, String localName, String qName)
If the factory is namespace aware, it returns an open element implementation using the namespace URI and the local name.
If the factory is NOT namespace aware, it returns an open element implementation using the qName (namespace-prefixed name).
uri
- The namespace URI of the element (ignored if not namespace aware)localName
- The local name of the element.qName
- The qualified name of the element.
public CloseElementEvent makeCloseElement(OpenElementEvent open)
open
- The corresponding open element event.
public AttributeEvent makeAttribute(String uri, String name, String value)
If the factory is namespace aware, it returns an attribute implementation using the namespace URI and the name.
If the factory is NOT namespace aware, it returns an attribute implementation using the specified name.
Use this implementation if the name of the element is determined prior to the call of this method.
uri
- The namespace URI of the attribute (ignored if not namespace aware)name
- The name of the attribute.value
- The value of the attribute.
public AttributeEvent makeAttribute(String uri, String localName, String qName, String value)
If the factory is namespace aware, it returns an attribute implementation using the namespace URI and the local name.
If the factory is NOT namespace aware, it returns an attribute implementation using the qName (namespace-prefixed name).
uri
- The namespace URI of the attribute (ignored if not namespace aware)localName
- The local name of the attribute.qName
- The qualified name of the attribute.value
- The value of the attribute.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |