org.jhotdraw.xml
Interface DOMFactory

All Known Implementing Classes:
DefaultDOMFactory, DrawFigureFactory, NetFactory, PertFactory, QuickAndDirtyDOMFactory

public interface DOMFactory

DOMFactory.

Design pattern:
Name: Abstract Factory.
Role: Abstract Factory.
Partners: DOMInput as Client of the Abstract Factory, DOMOutput as Client of the Abstract Factory.

Version:
$Id: DOMFactory.java 604 2010-01-09 12:00:29Z rawcoder $
Author:
Werner Randelshofer

Method Summary
 java.lang.Object create(java.lang.String name)
          Creates an object from the specified element name.
 java.lang.Enum createEnum(java.lang.String name, java.lang.String value)
          Creates an enum from the specified element name.
 java.lang.String getEnumName(java.lang.Enum o)
          Returns the element tag name for the specified Enum class.
 java.lang.String getEnumValue(java.lang.Enum o)
          Returns the enum tag name for the specified Enum instance.
 java.lang.String getName(DOMStorable o)
          Returns the element name for the specified object.
 

Method Detail

getName

java.lang.String getName(DOMStorable o)
Returns the element name for the specified object. Note: The element names "string", "int", "float", "long", "double", "boolean", "enum" and "null" are reserved and must not be returned by this operation.


create

java.lang.Object create(java.lang.String name)
Creates an object from the specified element name.


getEnumName

java.lang.String getEnumName(java.lang.Enum o)
Returns the element tag name for the specified Enum class.


getEnumValue

java.lang.String getEnumValue(java.lang.Enum o)
Returns the enum tag name for the specified Enum instance.


createEnum

java.lang.Enum createEnum(java.lang.String name,
                          java.lang.String value)
Creates an enum from the specified element name.