jInfer

cz.cuni.mff.ksi.jinfer.iss.objects
Class AttributeMappingId

java.lang.Object
  extended by cz.cuni.mff.ksi.jinfer.iss.objects.AttributeMappingId
All Implemented Interfaces:
Comparable<AttributeMappingId>

public class AttributeMappingId
extends Object
implements Comparable<AttributeMappingId>

This is a representation of an attribute mapping identifier, as described in the article "Finding ID Attributes in XML Documents". It contains the element and attribute names. This representation follows the immutable object design pattern.


Constructor Summary
AttributeMappingId(String element, String attribute)
          Full constructor.
 
Method Summary
 int compareTo(AttributeMappingId o)
           
 boolean equals(Object obj)
          Two attribute mapping IDs are equal iff their element and attribute names are equal (case sensitive).
 String getAttribute()
           
 String getElement()
           
 int hashCode()
           
 boolean isType(String type)
          Checks whether this object represents an attribute mapping of the specified type (whether the element has the speficied name).
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeMappingId

public AttributeMappingId(String element,
                          String attribute)
Full constructor.

Parameters:
element - Element name.
attribute - Attribute name.
Method Detail

getElement

public String getElement()

isType

public boolean isType(String type)
Checks whether this object represents an attribute mapping of the specified type (whether the element has the speficied name). This check is case-sensitive.

Parameters:
type - Type to check.
Returns:
true if this mapping is of the specified type, false otherwise.

getAttribute

public String getAttribute()

equals

public boolean equals(Object obj)
Two attribute mapping IDs are equal iff their element and attribute names are equal (case sensitive).

Overrides:
equals in class Object
Parameters:
obj - Other object to check equality.
Returns:
true if the other object is AttributeMappingId and its element and attribute names are equal to ones in this mapping, false otherwise.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(AttributeMappingId o)
Specified by:
compareTo in interface Comparable<AttributeMappingId>

jInfer

Generated on Fri Dec 9 00:01:25 CET 2011