net.openmarkup
Class ElementType

java.lang.Object
  extended bynet.openmarkup.ElementType

public class ElementType
extends Object

Defines an element type, complete with a namespace URI, local name, the element implementation class that is used to represent elements of this type at run time, and the default class of objects realized from this element type.

Author:
Ramesh Gupta

Constructor Summary
ElementType(String namespaceURI, String localName)
          Defines an ElementType with the specified local name within the specified namespace.
ElementType(String namespaceURI, String localName, String elemImplClassName)
          Defines an ElementType with the specified local name within the specified namespace.
ElementType(String namespaceURI, String localName, String elemImplClassName, String objectClassName)
          Defines an ElementType with the specified local name within the specified namespace.
 
Method Summary
 boolean equals(Object that)
          Same as the superclass version, but may not be overridden any further.
 Constructor getConstructor()
          Returns a constructor suitable for instantiating the element implementation class.
 String getFullName()
          Returns the full name of the element type with the namespace URI and local name separated by a colon.
 Class getImplementationClass()
          Returns the element implementation class that provides the runtime representation of an instance of this element type.
 String getLocalName()
          Returns the local name of the element type.
 String getNamespaceURI()
          Returns the namespace URI of the element type.
 String getObjectClassName()
          Returns the name of the class of objects realized from this element type.
 ElementType getReferenceElementType()
          Returns the reference type for this element type.
 int hashCode()
          Same as the superclass version, but may not be overridden any further.
 String toString()
          Same as getLocalName().
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ElementType

public ElementType(String namespaceURI,
                   String localName)
Defines an ElementType with the specified local name within the specified namespace. Elements of this type are represented at run time by instances of a default element implementation class. Unless overridden at the markup level, the class of objects realized from elements of this type is Object.

Parameters:
namespaceURI - namespace that elements of this type belong to
localName - local name of elements of this type

ElementType

public ElementType(String namespaceURI,
                   String localName,
                   String elemImplClassName)
Defines an ElementType with the specified local name within the specified namespace. Elements of this type are represented at run time by instances of the specified element implementation class. Unless overridden at the markup level, the class of objects realized from elements of this type is Object.

Parameters:
namespaceURI - namespace that elements of this type belong to
localName - local name of elements of this type
elemImplClassName - element implementation class name
See Also:
DOM Subclassing (TBD)

ElementType

public ElementType(String namespaceURI,
                   String localName,
                   String elemImplClassName,
                   String objectClassName)
Defines an ElementType with the specified local name within the specified namespace. Elements of this type are represented at run time by instances of the specified element implementation class. Unless overridden at the markup level, the class of objects realized from elements of this type is as specified by the objectClassName argument.

Parameters:
namespaceURI - namespace that elements of this type belong to
localName - local name of elements of this type
elemImplClassName - element implementation class name
objectClassName - class of objects realized from this element
See Also:
DOM Subclassing (TBD)
Method Detail

getImplementationClass

public Class getImplementationClass()
Returns the element implementation class that provides the runtime representation of an instance of this element type.

Returns:
the element implementation class that provides the runtime representation of an instance of this element type

getConstructor

public Constructor getConstructor()
Returns a constructor suitable for instantiating the element implementation class.

Returns:
a constructor suitable for instantiating the element implementation class

getFullName

public String getFullName()
Returns the full name of the element type with the namespace URI and local name separated by a colon.

Returns:
the full name of the element type

getLocalName

public String getLocalName()
Returns the local name of the element type.

Returns:
the local name of the element type

getNamespaceURI

public String getNamespaceURI()
Returns the namespace URI of the element type.

Returns:
the namespace URI of the element type

getObjectClassName

public String getObjectClassName()
Returns the name of the class of objects realized from this element type. Class must be present in the current classpath for it to be instantiable.

Returns:
the class of objects realized from this element type

getReferenceElementType

public ElementType getReferenceElementType()
Returns the reference type for this element type.

Returns:
the reference type for this element type

equals

public final boolean equals(Object that)
Same as the superclass version, but may not be overridden any further.

Parameters:
that - the object that this object is compared with for equality
Returns:
true if this object equals to the specified object; otherwise, return false

hashCode

public final int hashCode()
Same as the superclass version, but may not be overridden any further.

Returns:
the hashcode for the object

toString

public final String toString()
Same as getLocalName().

Returns:
the local name of the element type


Copyright 2003-2004 eNode, Inc. All rights reserved.