org.apache.axiom.ts.om.factory
Class CreateOMElementVariant
java.lang.Object
org.apache.axiom.ts.om.factory.CreateOMElementVariant
public abstract class CreateOMElementVariant
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCES
public static final CreateOMElementVariant[] INSTANCES
CreateOMElementVariant
public CreateOMElementVariant(String name,
boolean supportsDefaultNamespace,
boolean supportsContainer)
getName
public final String getName()
isSupportsDefaultNamespace
public final boolean isSupportsDefaultNamespace()
- Determines whether this strategy can be used to create an
OMElement in the default
namespace, i.e. with an empty prefix.
- Returns:
true if the strategy supports default namespaces, false
otherwise
isSupportsContainer
public final boolean isSupportsContainer()
- Determines whether this strategy can be used to create an
OMElement as a child of
another container.
- Returns:
true if a OMContainer object can be passed to
createOMElement(OMFactory, OMContainer, String, String, String)
createOMElement
public abstract OMElement createOMElement(OMFactory factory,
OMContainer parent,
String localName,
String namespaceURI,
String prefix)
- Create an
OMElement.
- Parameters:
factory - the factory used to create the elementparent - the parent of the element to be created or null to create an orphaned
element; this parameter can only be used if isSupportsContainer() returns
truelocalName - the local name of the elementnamespaceURI - the namespace URI of the elementprefix - the prefix of the element, the empty string if the element is to be created in the
default namespace (only supported if isSupportsDefaultNamespace() returns
true), or null if a prefix should be generated or chosen
based on the namespace context of the parent
- Returns:
- the created element
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.