com.batavia.xbrl.factory
Class InstanceDocumentFactory

java.lang.Object
  extended by com.batavia.xbrl.factory.InstanceDocumentFactory

public class InstanceDocumentFactory
extends java.lang.Object

A Factory implementation for creating and initializing InstanceDocument implementations.

Use the InstanceDocument interface to obtain acces to the root. Use the XbrlElement interface to acces the roots attributes and child elements. This interface can also be used to obtain information on sugested potential and obligatory children and attributes.

Copyright 2006 J2R BV, The Netherlands.

Part of Licensed Materials.

www.batavia-xbrl.com

Author:
Ron van Ardenne

Constructor Summary
InstanceDocumentFactory()
           
 
Method Summary
static InstanceDocument create(boolean useDtsCache)
          Create an empty InstanceDocument.
static void createContext(InstanceDocument instance, java.lang.String contextId, java.lang.String entityIdentifier, java.lang.String identifierScheme, com.batavia.jdom.Element optionalEntitySegmentContent, java.lang.String begin_ddmmyyyy, java.lang.String end_ddmmyyyy, com.batavia.jdom.Element optionalScenarioContent)
          Create a context with plain-as-possible arguments for the given context id so it can be used to create facts
static InstanceDocument createEmpty(java.lang.String urlTaxonomySchema, boolean useDtsCache)
          Create an empty InstanceDocument and add a root that complies to the given Taxonomy schema.
static java.lang.String createFact(InstanceDocument instance, java.lang.String parentIdOrRoot, java.lang.String contextId, java.lang.String prefixConcept, java.lang.String namespaceConcept, java.lang.String localNameConcept, java.lang.String optionalValueFact, java.lang.String optionalPrecisionValue, java.lang.String optionalSingleMeasureUnitFact, java.lang.String optionalFootnoteFact)
          Create a fact with plain-as-possible arguments and return the id in case the fact is a tuple (or string root) so it can be used to create other child facts
static InstanceDocument createPopulated(java.lang.String urlTaxonomySchema, boolean includeDefaultValues, boolean useDtsCache)
          Create an populated InstanceDocument and add a root that complies to the given Taxonomy schema.
static InstanceDocument read(java.lang.String url, boolean useDtsCache)
          Create an initialized InstanceDocument.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanceDocumentFactory

public InstanceDocumentFactory()
Method Detail

create

public static InstanceDocument create(boolean useDtsCache)
Create an empty InstanceDocument. Hide the implementation for classes that use the InstanceDocument.

Returns:
an InstanceDocument object

read

public static InstanceDocument read(java.lang.String url,
                                    boolean useDtsCache)
                             throws XbrlException
Create an initialized InstanceDocument. Hide the implementation for classes that use the InstanceDocument.

Parameters:
url - resolvable location containing instance data.
Returns:
an InstanceDocument object
Throws:
XbrlException

createEmpty

public static InstanceDocument createEmpty(java.lang.String urlTaxonomySchema,
                                           boolean useDtsCache)
                                    throws XbrlException
Create an empty InstanceDocument and add a root that complies to the given Taxonomy schema. Hide the implementation for classes that use the InstanceDocument.

Parameters:
urlTaxonomySchema - location that contains TaxonomySchema data.
Returns:
an InstanceDocument object.
Throws:
XbrlException

createPopulated

public static InstanceDocument createPopulated(java.lang.String urlTaxonomySchema,
                                               boolean includeDefaultValues,
                                               boolean useDtsCache)
                                        throws XbrlException
Create an populated InstanceDocument and add a root that complies to the given Taxonomy schema. Hide the implementation for classes that use the InstanceDocument.

Parameters:
urlTaxonomySchema - location that contains TaxonomySchema data.
Returns:
an InstanceDocument object.
Throws:
XbrlException

createContext

public static void createContext(InstanceDocument instance,
                                 java.lang.String contextId,
                                 java.lang.String entityIdentifier,
                                 java.lang.String identifierScheme,
                                 com.batavia.jdom.Element optionalEntitySegmentContent,
                                 java.lang.String begin_ddmmyyyy,
                                 java.lang.String end_ddmmyyyy,
                                 com.batavia.jdom.Element optionalScenarioContent)
                          throws java.text.ParseException
Create a context with plain-as-possible arguments for the given context id so it can be used to create facts

Throws:
java.text.ParseException

createFact

public static java.lang.String createFact(InstanceDocument instance,
                                          java.lang.String parentIdOrRoot,
                                          java.lang.String contextId,
                                          java.lang.String prefixConcept,
                                          java.lang.String namespaceConcept,
                                          java.lang.String localNameConcept,
                                          java.lang.String optionalValueFact,
                                          java.lang.String optionalPrecisionValue,
                                          java.lang.String optionalSingleMeasureUnitFact,
                                          java.lang.String optionalFootnoteFact)
                                   throws XbrlException
Create a fact with plain-as-possible arguments and return the id in case the fact is a tuple (or string root) so it can be used to create other child facts

Throws:
XbrlException