XBRLAPI

A Java API for XBRL


org.xbrlapi.impl
Class FragmentFactory<F>

java.lang.Object
  extended by org.xbrlapi.impl.FragmentFactory<F>

public class FragmentFactory<F>
extends Object

Fragment instantiation factory used to create new fragments of the correct fragment type from data in the data store.

Author:
Geoffrey Shuetrim (geoff@galexy.net)

Constructor Summary
FragmentFactory()
           
 
Method Summary
static Class getClass(String className)
          Get the class for the specified class name.
static
<F extends XML>
F
newFragment(Store store, Element root)
          Instantiate a fragment using its type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FragmentFactory

public FragmentFactory()
Method Detail

getClass

public static Class getClass(String className)
                      throws XBRLException
Get the class for the specified class name.

Parameters:
className - The full name of the class to get.
Returns:
The class that has been named.
Throws:
XBRLException - if the class cannot be obtained.

newFragment

public static <F extends XML> F newFragment(Store store,
                                            Element root)
                                 throws XBRLException
Instantiate a fragment using its type.

Type Parameters:
F - The subclass of XML being returned.
Parameters:
store - The data store that contains the fragment.
root - The root element of the fragment.
Returns:
an instance of the fragment or null if it is not loadable.
Throws:
XBRLException - if the class cannot be loaded.

Get Java XBRL API implementation at SourceForge.net.