i3.dragos.gm.core.schema.id
Class GraphEntityClassID

java.lang.Object
  extended by i3.dragos.gm.core.schema.id.GraphEntityClassID
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
EdgeClassID, GraphClassID, NodeClassID, RelationClassID, RelationEndClassID

public class GraphEntityClassID
extends java.lang.Object
implements java.io.Serializable

A GraphEntityClassID identifies an graph entity class in the schema.

Author:
Boris Boehlen <boehlen@cs.rwth-aachen.de>, Thorsten Hermes <thermes@i3.informatik.rwth-aachen.de>
See Also:
Core Graph Model , Implementation Issues , Serialized Form

Constructor Summary
GraphEntityClassID(DataSourceURL dataSourceURL, java.io.Serializable internalIdentifier, java.lang.String name)
          Creates a new ID for a graph entity class.
 
Method Summary
 boolean equals(java.lang.Object o)
          Checks for equality with another object.
 DataSourceURL getDataSourceURL()
          Returns the URL to the data source that uses the Schema to which the schema class represented by this ID belongs.
 GraphEntityClass getGraphEntityClass()
          Returns the graph entity class referenced by this ID.
 java.io.Serializable getInternalIdentifier()
          Returns the internal ID of the schema entity.
 java.lang.String getName()
          Returns the name of the schema entity.
 int hashCode()
          
 boolean isSubclassID()
          Returns true if this is an ID of a subclass (edge, node...), false if this is an ID of a GraphEntityClass itself.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GraphEntityClassID

public GraphEntityClassID(DataSourceURL dataSourceURL,
                          java.io.Serializable internalIdentifier,
                          java.lang.String name)
Creates a new ID for a graph entity class.

Parameters:
dataSourceURL - The dataSourceURL of the GraphPool.
internalIdentifier - Internal graph entity class ID.
name - The name of the graph entity class.
Method Detail

getGraphEntityClass

public GraphEntityClass getGraphEntityClass()
                                     throws DragosException
Returns the graph entity class referenced by this ID.

Returns:
the graph entity class referenced by this ID.
Throws:
DragosException - in case of internal errors.

getDataSourceURL

public final DataSourceURL getDataSourceURL()
Returns the URL to the data source that uses the Schema to which the schema class represented by this ID belongs. The returned value is guaranteed to not be null.

Returns:
The DataSourceURL of the Schema this ID belongs to.

getInternalIdentifier

public final java.io.Serializable getInternalIdentifier()
Returns the internal ID of the schema entity.

Returns:
the internal ID of the schema entity.

getName

public java.lang.String getName()
Returns the name of the schema entity.

Returns:
schema entity's name.

equals

public boolean equals(java.lang.Object o)
Checks for equality with another object.

This object is considered equal if all of the following conditions are met:

Subclasses and implementations might want to extend this list by adding assertions comparing additional or internal data (e.g. the type of the graph entity). However, equality must only be determined by the above rules, preferably by using super.equals(o), and any difference in the additional data for two equal IDs is an error.

Overrides:
equals in class java.lang.Object
Parameters:
o - The Object to compare to.
Returns:
true if o is equal according to above rules, false otherwise.

hashCode

public final int hashCode()

Overrides:
hashCode in class java.lang.Object

isSubclassID

public boolean isSubclassID()
Returns true if this is an ID of a subclass (edge, node...), false if this is an ID of a GraphEntityClass itself.

Returns:
true if this is an ID of a subclass (edge, node...), false if this is an ID of a GraphEntityClass itself.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object


Copyright © 2002-2008 RWTH Aachen, Department of Computer Science 3 (Software Engineering). All Rights Reserved.