XBRLAPI

A Java API for XBRL


org.xbrlapi.aspects
Class IDGenerator

java.lang.Object
  extended by org.xbrlapi.aspects.IDGenerator

public class IDGenerator
extends Object

Generates semantic IDs based on element content of segment/scenario/typed dimension structures.

Author:
Geoff Shuetrim (geoff@galexy.net)

Constructor Summary
IDGenerator()
           
 
Method Summary
static String getLabel(Element child)
          Convenience method to return a unique representation of a single element.
static String getLabel(List<Element> children)
          Convenience method to enable a list of elements to be converted into something a bit more readable.
static String getLabel(Text child)
          Convenience method to return a unique representation of a single element.
static String getLabelFromMixedNodes(List<Node> children)
          Convenience method to enable a list of elements and text nodes to be converted into something a bit more readable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IDGenerator

public IDGenerator()
Method Detail

getLabelFromMixedNodes

public static String getLabelFromMixedNodes(List<Node> children)
Convenience method to enable a list of elements and text nodes to be converted into something a bit more readable.

Parameters:
children - The list of elements and text nodes.
Returns:
the label.

getLabel

public static String getLabel(List<Element> children)
Convenience method to enable a list of elements to be converted into something a bit more readable.

Parameters:
children - The list of elements.
Returns:
the label.

getLabel

public static String getLabel(Element child)
Convenience method to return a unique representation of a single element. TODO change so that this will treat QName attribute and element content as QNames and not simple text.

Parameters:
child - The single element.
Returns:
the unique string representation.

getLabel

public static String getLabel(Text child)
Convenience method to return a unique representation of a single element. TODO change so that this will treat QName attribute and element content as QNames and not simple text.

Parameters:
child - The single text node.
Returns:
the unique string representation.

Get Java XBRL API implementation at SourceForge.net.