com.ihr.xbrl.comparator
Class XBRLFragmentWrapper

java.lang.Object
  extended by com.ihr.xbrl.comparator.XBRLFragmentWrapper
All Implemented Interfaces:
java.lang.Comparable<XBRLFragmentWrapper>

public class XBRLFragmentWrapper
extends java.lang.Object
implements java.lang.Comparable<XBRLFragmentWrapper>

This is a wrapper class for an XMLFragment object. Instances of this class can be compared to other other XBRLFragmentWrapper to generate an ordered set of objects.

Author:
Ignacio

Constructor Summary
XBRLFragmentWrapper(XMLFragment item, DTSComparator comparator)
          Creates a XBRLFragmentWrapper object.
 
Method Summary
 int compareTo(XBRLFragmentWrapper o)
          This method has been implemented in order to order to sets of relationships so they can be compared in the right sequence.
 boolean equals(java.lang.Object other)
          Each XBRLFragmentWrapper has an array of correspondenceID Two XBRLFragmentWrapper equals if they have one correspondenceID in common
 java.lang.String[] getCorrespondenceID()
          Access to the array of correspondence IDs
static java.lang.String[] getCorrespondenceID(XMLFragment item2, DTSComparator comparator, java.util.HashSet<XMLFragment> skipFragments)
          Generates the array of correspondence IDs for an XMLFragment
 java.lang.String getIdentificationID()
          Access to the identification ID for the surrounding object
static java.lang.String getIdentificationID(XMLFragment item2)
          The Item Identification ID is an string identifying the concept in a DTS
 java.lang.String getItemShortName()
          Access to the short name of the encapsulated item
static java.lang.String getItemShortName(java.lang.Object item)
          Returns a short name describing an object
 int hashCode()
          Generates a hash code for this Wrapper object This code MUST be independent of the Wrapper DTS container
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XBRLFragmentWrapper

public XBRLFragmentWrapper(XMLFragment item,
                           DTSComparator comparator)
Creates a XBRLFragmentWrapper object. This object contains a reference to the item and one created element id. The element ids MUST be unique for each XMLFragment The comp parameter MAY be null. It is only needed if the object is going to be compared to another in terms of equality not in terms of precedence.

Parameters:
item -
comparator -
Method Detail

equals

public boolean equals(java.lang.Object other)
Each XBRLFragmentWrapper has an array of correspondenceID Two XBRLFragmentWrapper equals if they have one correspondenceID in common

Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(XBRLFragmentWrapper o)
This method has been implemented in order to order to sets of relationships so they can be compared in the right sequence. The compareToSignature string helps doing this faster

Specified by:
compareTo in interface java.lang.Comparable<XBRLFragmentWrapper>

hashCode

public int hashCode()
Generates a hash code for this Wrapper object This code MUST be independent of the Wrapper DTS container

Overrides:
hashCode in class java.lang.Object

getItemShortName

public static java.lang.String getItemShortName(java.lang.Object item)
Returns a short name describing an object

Parameters:
item -
Returns:
String

getIdentificationID

public java.lang.String getIdentificationID()
Access to the identification ID for the surrounding object

Returns:
String

getCorrespondenceID

public java.lang.String[] getCorrespondenceID()
Access to the array of correspondence IDs

Returns:
Array of Strings

getIdentificationID

public static java.lang.String getIdentificationID(XMLFragment item2)
The Item Identification ID is an string identifying the concept in a DTS

Parameters:
item2 -
Returns:
String

getCorrespondenceID

public static java.lang.String[] getCorrespondenceID(XMLFragment item2,
                                                     DTSComparator comparator,
                                                     java.util.HashSet<XMLFragment> skipFragments)
Generates the array of correspondence IDs for an XMLFragment

Parameters:
item2 - the XMLFragment
comparator - the DTSComparator class used to obtain the tables for namespace, item and resource correspondence
skipFragments - set of XMLFragments that will be skiped during the generation of the correspondende ID (used during recursive calls)
Returns:
Array of Strings

getItemShortName

public java.lang.String getItemShortName()
Access to the short name of the encapsulated item

Returns:
String


Copyright 2006-2009 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa