net.sourceforge.gxl
Class GXLType

java.lang.Object
  |
  +--net.sourceforge.gxl.GXLElement
        |
        +--net.sourceforge.gxl.GXLType

public class GXLType
extends GXLElement

Represents the GXL type element.

The type element is used in conjuction with a GXL schema to define types of graphs, nodes etc. The URI of a type element must always point to a GXL schema entity. If types are used, then all elements in the GXL graph MUST be typed and point to the SAME GXL schema.

Children
The type element may not contain any children.

Attributes
xlink:type - Fixed string = "simple" xlink:href - Required uri pointing to a GXL schema.

See Also:
GXLTypedElement

Constructor Summary
GXLType(URI uri)
          Creates a new GXLType element.
 
Method Summary
 boolean equals(Object o)
          Compares this type to another object.
 URI getURI()
          Returns the URI of this type.
 void setURI(URI uri)
          Sets the URI of this type.
 
Methods inherited from class net.sourceforge.gxl.GXLElement
add, getAttribute, getChildAt, getChildCount, getDocument, getParent, indexOf, insert, remove, setAttribute
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GXLType

public GXLType(URI uri)
Creates a new GXLType element.

Parameters:
uri - A URI pointing to a GXL schema.
Method Detail

getURI

public URI getURI()
Returns the URI of this type.

Returns:
The URI of this type.

setURI

public void setURI(URI uri)
Sets the URI of this type.

Parameters:
uri - The new URI.

equals

public boolean equals(Object o)
Compares this type to another object. Equality is defined as using the URI class' equals method.

Overrides:
equals in class Object
Parameters:
o - The object to compare this type to.
Returns:
Whether the specified object is considered equal to this one.
Throws:
ClassCastException - If the specified object is not an instance of GXLType.