MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

ch.ethz.mxquery.datamodel
Class DoubleIdentifier

java.lang.Object
  extended by ch.ethz.mxquery.datamodel.DoubleIdentifier
All Implemented Interfaces:
Identifier

public class DoubleIdentifier
extends java.lang.Object
implements Identifier


Method Summary
 int compare(Identifier toCompare)
          Compares this token identifier with an other one.
static Identifier createIdentifier(int newId, Source store)
          Creates an Identifier with the passed id and data soource
static Identifier[] createInsertIdentifiers(Identifier leftBoundId, Identifier rightBoundId, int number, Source source)
          Creates Identifiers for Tokens that are between the ids leftBoundId and rightBoundId.
 boolean equals(java.lang.Object obj)
           
 Source getStore()
          Returns the DataSource to which the Identifier belongs to.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

compare

public int compare(Identifier toCompare)
Description copied from interface: Identifier
Compares this token identifier with an other one.

Specified by:
compare in interface Identifier
Returns:
0 if equal, -1 if identifier is smaller, 1 if identifier is bigger, and -2 if the two Identifier do not belong to the same data source.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getStore

public Source getStore()
Description copied from interface: Identifier
Returns the DataSource to which the Identifier belongs to.

Specified by:
getStore in interface Identifier
Returns:
the Source/Store for this identifier

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

createIdentifier

public static Identifier createIdentifier(int newId,
                                          Source store)
Creates an Identifier with the passed id and data soource

Parameters:
newId - Every newly appended node gets an integer values as new id (which must be bigger then the last given id). This cannot be handled by the Identifier because it is source dependent => every source creates when appending its id's itself.
store -
Returns:
a new identifier

createInsertIdentifiers

public static Identifier[] createInsertIdentifiers(Identifier leftBoundId,
                                                   Identifier rightBoundId,
                                                   int number,
                                                   Source source)
                                            throws MXQueryException
Creates Identifiers for Tokens that are between the ids leftBoundId and rightBoundId.

Parameters:
leftBoundId - left bound
rightBoundId - right bound
number - number of ids that the method must produce
source - data source of the newly created ids
Returns:
array of identifiers
Throws:
MXQueryException

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich