com.webobjects.appserver.parser.woml.namespaces
Class WOMLAbstractNamespace.WOGenericElementRule
java.lang.Object
com.webobjects.appserver.parser.woml.namespaces.WOMLAbstractNamespace.WOGenericElementRule
- Enclosing class:
- WOMLAbstractNamespace
public static class WOMLAbstractNamespace.WOGenericElementRule
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RULES
public static NSMutableDictionary RULES
DEFAULT_RULE
public static WOMLAbstractNamespace.WOGenericElementRule DEFAULT_RULE
WOMLAbstractNamespace.WOGenericElementRule
public WOMLAbstractNamespace.WOGenericElementRule(String name,
NSDictionary ruleDictionary)
WOMLAbstractNamespace.WOGenericElementRule
public WOMLAbstractNamespace.WOGenericElementRule(String name,
WOMLAbstractNamespace.WOGenericElementRule.EndTagPolicy endTagOptionality)
decodeEndTagPolicy
protected static WOMLAbstractNamespace.WOGenericElementRule.EndTagPolicy decodeEndTagPolicy(Object value,
WOMLAbstractNamespace.WOGenericElementRule.EndTagPolicy defaultValue)
getGenericElementRule
public static WOMLAbstractNamespace.WOGenericElementRule getGenericElementRule(WOElement element)
- Returns the generic element rule for the given generic element.
If the parameter is not a WOGenericElement this will return the
default rule.
- Parameters:
element
-
- Returns:
getGenericElementRule
public static WOMLAbstractNamespace.WOGenericElementRule getGenericElementRule(String elementName)
- Returns the generic element rule for the given element name. If the
rule for the given element does not exist this will return the
default rule.
- Parameters:
elementName
-
- Returns:
getName
public String getName()
- Returns the name to which this rule is associated.
- Returns:
getGenericElementType
public String getGenericElementType(WOElement element)
- Returns either WOGenericElement or WOGenericContainer, depending
on the state of the input element. A container is returned if the
element has children or if the GenericElementRules require an
end tag.
The returned type is suitable for finding a type declaration via
a WODeclaration.
- Parameters:
element
-
- Returns:
isContainer
public boolean isContainer(String elementName,
boolean hasChildren)
- Convenience API for getGenericElementType that will return true if
the represented elementName and hasChildren should be represented
by a container tag (i.e. <div></div> instead of <div/>
- Parameters:
element
-
- Returns:
Copyright © 2000-2008 Apple Inc.