com.webobjects.appserver.parser.woml.namespaces
Class WOMLGenericElementGenerator
java.lang.Object
com.webobjects.appserver.parser.woml.namespaces.WOMLGenericElementGenerator
- All Implemented Interfaces:
- WOMLAbstractNamespace.WOMLElementGenerator
- Direct Known Subclasses:
- WOMLConditionalElementGenerator, WOMLImageElementGenerator, WOMLRepetitionElementGenerator, WOMLURLElementGenerator
public class WOMLGenericElementGenerator
- extends Object
- implements WOMLAbstractNamespace.WOMLElementGenerator
Method Summary |
void |
contributeToDeclaration(WOMLAbstractNamespace namespace,
WOMLElement element,
WOMutableDeclaration declaration,
NSArray languages,
WOAssociationFactory associationFactory)
Default implementation copies all associations in the given namespace to the
declaration. |
WOElement |
generateElement(WOMLAbstractNamespace namespace,
WOMLElement element,
WOElement template,
WOMutableDeclaration declaration,
NSArray languages,
WOAssociationFactory associationFactory)
Default implementation generates a new dynamic element with the
declaration's type and associations. |
protected Map |
getElementAssociationsForContribution(WOMLAbstractNamespace namespace,
WOMLElement element,
WOAssociationFactory associationFactory)
Returns the map of associations from the element to be used by the default
contributeToDeclaration() method. |
protected boolean |
shouldContributeAssociation(WOMLAbstractNamespace namespace,
WOMLElement element,
WOMutableDeclaration declaration,
NSArray languages,
String name,
WOAssociation association)
Returns true if the given association with the given name should be contributed
to the declaration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ELEMENT_NAME_ASSOCIATION
public static final String ELEMENT_NAME_ASSOCIATION
- See Also:
- Constant Field Values
WOMLGenericElementGenerator
public WOMLGenericElementGenerator()
getElementAssociationsForContribution
protected Map getElementAssociationsForContribution(WOMLAbstractNamespace namespace,
WOMLElement element,
WOAssociationFactory associationFactory)
- Returns the map of associations from the element to be used by the default
contributeToDeclaration() method. The default implementation of this method
returns a copy of the elements associations for only the namespace given.
This returned map can then be manipulated without altering the associations
in the element itself.
- Parameters:
namespace
- element
- associationFactory
-
- Returns:
shouldContributeAssociation
protected boolean shouldContributeAssociation(WOMLAbstractNamespace namespace,
WOMLElement element,
WOMutableDeclaration declaration,
NSArray languages,
String name,
WOAssociation association)
- Returns true if the given association with the given name should be contributed
to the declaration. The default implementation calls the namespace's shouldContributeAssociation
to determine includability.
- Parameters:
namespace
- element
- declaration
- name
- association
-
- Returns:
generateElement
public WOElement generateElement(WOMLAbstractNamespace namespace,
WOMLElement element,
WOElement template,
WOMutableDeclaration declaration,
NSArray languages,
WOAssociationFactory associationFactory)
throws WOMLElementGenerationException
- Default implementation generates a new dynamic element with the
declaration's type and associations.
- Specified by:
generateElement
in interface WOMLAbstractNamespace.WOMLElementGenerator
- Parameters:
namespace
- element
- template
- declaration
- associationFactory
-
- Returns:
-
- Throws:
WOMLElementGenerationException
- See Also:
com.webobjects.appserver.parser.woml.namespaces.WOMLWebObjectsNamespace.WOMLWebObjectsElementGenerator#generateElement(com.webobjects.appserver.parser.woml.WOMLNamespace, com.webobjects.appserver.parser.woml.WOMLElement, com.webobjects.appserver.WOElement, com.webobjects.appserver._private.WOMutableDeclaration, com.webobjects.appserver.WOAssociationFactory)
contributeToDeclaration
public void contributeToDeclaration(WOMLAbstractNamespace namespace,
WOMLElement element,
WOMutableDeclaration declaration,
NSArray languages,
WOAssociationFactory associationFactory)
throws WOMLElementGenerationException
- Default implementation copies all associations in the given namespace to the
declaration.
- Specified by:
contributeToDeclaration
in interface WOMLAbstractNamespace.WOMLElementGenerator
- Parameters:
namespace
- element
- declaration
- associationFactory
-
- Throws:
WOMLElementGenerationException
- See Also:
com.webobjects.appserver.parser.woml.namespaces.WOMLWebObjectsNamespace.WOMLWebObjectsElementGenerator#contributeToDeclaration(com.webobjects.appserver.parser.woml.WOMLNamespace, com.webobjects.appserver.parser.woml.WOMLElement, com.webobjects.appserver._private.WOMutableDeclaration, com.webobjects.appserver.WOAssociationFactory)
Copyright © 2000-2008 Apple Inc.