com.ihr.xbrl.adins.efm
Class EFMProcessor

java.lang.Object
  extended by com.ihr.xbrl.adins.efm.EFMProcessor
All Implemented Interfaces:
XBRLPlugInProcessor

public class EFMProcessor
extends java.lang.Object
implements XBRLPlugInProcessor

Author:
Ignacio

Field Summary
static java.lang.String DEI_2008_NS
          Namespace for the dei taxonomy. this is commonly used so it is declared here.
static java.lang.String DEI_2009_NS
          Namespace for the dei taxonomy. this is commonly used so it is declared here.
static java.lang.String DEI_2011_NS
          Namespace for the dei taxonomy. this is commonly used so it is declared here.
static java.lang.String DEI_2012_NS
          Namespace for the dei taxonomy. this is commonly used so it is declared here.
static java.lang.String EdgarTaxonomiesFile
          XML file that contains a description of all files that can be used for SEC filing
static java.lang.String EFM_PARAMETER_RESOLVER
          The EFM_PARAMETER_RESOLVER property contains an instance of a class that implements the EFMParameterResolver interface.
static java.lang.String EFM_VERSION
          The EFM_VERSION property indicates the version of the Edgar Filer Manual document to be used.
static java.lang.String EFM_VERSION_18_111122
          The EFM_VERSION_18_111122 property indicates the processor will use EFM rules in the version 18_111122 of the EFM document.
static java.lang.String EFM_VERSION_18_120228
          The EFM_VERSION_18_120228 property indicates the processor will use EFM rules in the version 18_120228 of the EFM document.
static java.lang.String NONNUM_NS
          Namespace for non-numeric. created by XBRL International in the light of harmonizing the content of the US-GAAP taxonomy and the IFRS taxonomy.
static java.lang.String PROCESSORNAME
           
static java.lang.String US_GAAP
          Namespace for US_GAAP.
static java.lang.String US_TYPES_2008_NS
          Namespace for us-types.
static java.lang.String US_TYPES_2009_NS
          Namespace for us-types.
static java.lang.String US_TYPES_2011_NS
          Namespace for us-types.
static java.lang.String US_TYPES_2012_NS
          Namespace for us-types.
 
Method Summary
 void configure(java.util.Properties properties)
          Configures the processor according with the properties passed in in the properties parameter
static EFMProcessor create(DTSContainer dts)
          Obtains the instance of the EFMProcessor that has been registered for this DTS.
 DTSContainer getContainer()
           
 java.lang.String[] getDEIVersions()
          Depending on the value of the EFM_VERSION, this method returns different sets of namespaces to searc for.
 java.lang.String getDescription()
          Returns the processor description so it can be written in validation reports
static java.lang.String getDescriptionStatic()
          Obtains the description of this processor regardless of the instance
 java.lang.String getEFMLang(XMLFragment f)
          Returns the value or default value of the xml:lang attribute on the XMLFragment passed in as a parameter.
 java.lang.String getEnglishStandardLanguage(XMLFragment f)
          Access to the "English Standard Language" label as defined in the EFM.
 java.lang.String getName()
          Returns the processor name so it can be written in validation reports
 java.lang.Object getParameterValue(java.lang.String parameterName)
          Returns the value assigned to the parameter indicated in the name. or null if no value has been assigned or if there is no a parameter resolver assigned to this processor.
 java.lang.String getRegistrantName(java.lang.String identifier)
          The parameter is a CIK identifier.
 boolean isDefaultParameterValue(java.lang.String parameterName, java.lang.Object parameterValue)
          returns true if the value inParameterObj is the default value for the parameter indicated in param
 boolean isDerivedFromDomainItemType(XBRLItem item, boolean inStandardTaxonomy)
           
 boolean isInternalAndShallNotBeUsed(java.net.URI hRef)
          Returns true if the document indicated in the URI shall not be directly referenced by company files
 boolean isStandard(java.net.URI hRef)
          Validates the URI passed in as parameter is one of the standard taxonomy schemas.
 boolean isStandardNamespaceURI(java.lang.String uriRef)
          Validates the URI passed in as parameter is one of the standard taxonomy schemas.
static boolean isXMLWhiteSpace(char ch)
           
 XBRLValidationReport validate()
          Validates the content of the DTS according to the rules indicated in this plug-in processor.
 XBRLValidationReport validate(XBRLDocument xDocument)
          Validates the document according to the rules indicated in this plug-in processor.
 XBRLValidationReport validateAtMostOneAll(XMLElementDefinition elDef)
           
 XBRLValidationReport validateCalculationAndPresentation(XBRLItem fromItem, XBRLItem toItem)
          6.14.5 If an instance contains non-empty facts for the source and target of an effective calculation relationship, then at least one effective presentation relationship that the source and target appear in (because of 6.12.3) must be either (a) a relationship with each other or (b) two relationships with any other elements that share a single extended link role.
 void validateEFMURI(java.net.URI hRef)
          Validates the URI from an xlink:href attribute
 XBRLValidationReport validateOneLabelPerRoleAndLang(XMLFragment f)
           
 XBRLValidationReport validatePresentationNetworks(XMLFragment elDef)
          Validates EFM rule 6.12.3 An element used in an instance must participate in at least one effective presentation relationship in the DTS of that instance.
 XBRLValidationReport validatePresentationPreferredLabels(XMLFragment elDef, java.util.HashSet<XMLFragment> processed)
          Validates EFM rule 6.12.3 An element used in an instance must participate in at least one effective presentation relationship in the DTS of that instance.
 XBRLValidationReport validateTextIsProperHTML(java.lang.String stringValue, XBRLFact fact, XBRLResource res)
           
 XBRLValidationReport validateTextIsProperHTML(XBRLFact fact)
           
 XBRLValidationReport validateTextIsProperHTML(XBRLResource res)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROCESSORNAME

public static final java.lang.String PROCESSORNAME
See Also:
Constant Field Values

DEI_2012_NS

public static final java.lang.String DEI_2012_NS
Namespace for the dei taxonomy. this is commonly used so it is declared here. The value is http://xbrl.sec.gov/dei/2012-01-31

See Also:
Constant Field Values

DEI_2011_NS

public static final java.lang.String DEI_2011_NS
Namespace for the dei taxonomy. this is commonly used so it is declared here. The value is http://xbrl.sec.gov/dei/2011-01-31

See Also:
Constant Field Values

DEI_2009_NS

public static final java.lang.String DEI_2009_NS
Namespace for the dei taxonomy. this is commonly used so it is declared here. The value is http://xbrl.us/dei/2009-01-31

See Also:
Constant Field Values

DEI_2008_NS

public static final java.lang.String DEI_2008_NS
Namespace for the dei taxonomy. this is commonly used so it is declared here. The value is http://xbrl.us/dei/2008-03-31

See Also:
Constant Field Values

NONNUM_NS

public static final java.lang.String NONNUM_NS
Namespace for non-numeric. created by XBRL International in the light of harmonizing the content of the US-GAAP taxonomy and the IFRS taxonomy.

See Also:
Constant Field Values

US_TYPES_2012_NS

public static final java.lang.String US_TYPES_2012_NS
Namespace for us-types. Created by the XBRL-US jurisdiction in 2011.

See Also:
Constant Field Values

US_TYPES_2011_NS

public static final java.lang.String US_TYPES_2011_NS
Namespace for us-types. Created by the XBRL-US jurisdiction in 2011.

See Also:
Constant Field Values

US_TYPES_2009_NS

public static final java.lang.String US_TYPES_2009_NS
Namespace for us-types. Created by the XBRL-US jurisdiction in 2009.

See Also:
Constant Field Values

US_TYPES_2008_NS

public static final java.lang.String US_TYPES_2008_NS
Namespace for us-types. Created by the XBRL-US jurisdiction in 2008.

See Also:
Constant Field Values

US_GAAP

public static final java.lang.String US_GAAP
Namespace for US_GAAP. Created by the FASB.

See Also:
Constant Field Values

EdgarTaxonomiesFile

public static final java.lang.String EdgarTaxonomiesFile
XML file that contains a description of all files that can be used for SEC filing

See Also:
Constant Field Values

EFM_VERSION

public static final java.lang.String EFM_VERSION
The EFM_VERSION property indicates the version of the Edgar Filer Manual document to be used. The possible value is EFM_VERSION_18. More values will be added in the future.

The value of the EFM_VERSION constant is "http://www.reportingstandard.com/properties/efm-version".

The default value for the property it refers to is EFM_VERSION_18 which is the lastest release.

See Also:
Constant Field Values

EFM_PARAMETER_RESOLVER

public static final java.lang.String EFM_PARAMETER_RESOLVER
The EFM_PARAMETER_RESOLVER property contains an instance of a class that implements the EFMParameterResolver interface. That interface shall be able to obtain parameters, parameter values and the parameter type as they are documented in the EFM conformance suite.

See Also:
Constant Field Values

EFM_VERSION_18_111122

public static final java.lang.String EFM_VERSION_18_111122
The EFM_VERSION_18_111122 property indicates the processor will use EFM rules in the version 18_111122 of the EFM document.

See Also:
Constant Field Values

EFM_VERSION_18_120228

public static final java.lang.String EFM_VERSION_18_120228
The EFM_VERSION_18_120228 property indicates the processor will use EFM rules in the version 18_120228 of the EFM document.

See Also:
Constant Field Values
Method Detail

getDEIVersions

public java.lang.String[] getDEIVersions()
Depending on the value of the EFM_VERSION, this method returns different sets of namespaces to searc for.

Returns:
array of namespaces as Strings

create

public static EFMProcessor create(DTSContainer dts)
                           throws com.rs.lic.LicenseVerificationException,
                                  XBRLValidationException
Obtains the instance of the EFMProcessor that has been registered for this DTS. If none has been registered a new one is created. The creator will register the instance within the DTS.

Parameters:
dts -
Returns:
Throws:
com.rs.lic.LicenseVerificationException
XBRLValidationException

validate

public XBRLValidationReport validate()
Description copied from interface: XBRLPlugInProcessor
Validates the content of the DTS according to the rules indicated in this plug-in processor.

This is the method that is called by the DTSContainer on each XBRLPlugInProcessor when the validation() method is called on the DTSContainer instance.

Specified by:
validate in interface XBRLPlugInProcessor
Returns:
an XBRLValidationReport object XBRLValidationReport

validate

public XBRLValidationReport validate(XBRLDocument xDocument)
Description copied from interface: XBRLPlugInProcessor
Validates the document according to the rules indicated in this plug-in processor.

Specified by:
validate in interface XBRLPlugInProcessor
Returns:
an XBRLValidationReport object XBRLValidationReport

getName

public java.lang.String getName()
Description copied from interface: XBRLPlugInProcessor
Returns the processor name so it can be written in validation reports

Specified by:
getName in interface XBRLPlugInProcessor

getDescription

public java.lang.String getDescription()
Description copied from interface: XBRLPlugInProcessor
Returns the processor description so it can be written in validation reports

Specified by:
getDescription in interface XBRLPlugInProcessor

getDescriptionStatic

public static java.lang.String getDescriptionStatic()
Obtains the description of this processor regardless of the instance

Returns:

configure

public void configure(java.util.Properties properties)
Description copied from interface: XBRLPlugInProcessor
Configures the processor according with the properties passed in in the properties parameter

Specified by:
configure in interface XBRLPlugInProcessor

getContainer

public DTSContainer getContainer()
Returns:

validateEFMURI

public void validateEFMURI(java.net.URI hRef)
                    throws EFMValidationException
Validates the URI from an xlink:href attribute

Parameters:
hRef - as an URI
Throws:
EFMValidationException - in case of any errors

isStandard

public boolean isStandard(java.net.URI hRef)
Validates the URI passed in as parameter is one of the standard taxonomy schemas.

Parameters:
hRef -
Returns:
boolean value

isInternalAndShallNotBeUsed

public boolean isInternalAndShallNotBeUsed(java.net.URI hRef)
Returns true if the document indicated in the URI shall not be directly referenced by company files

Parameters:
hRef -
Returns:
boolean value

getEFMLang

public java.lang.String getEFMLang(XMLFragment f)
Returns the value or default value of the xml:lang attribute on the XMLFragment passed in as a parameter. The default value is "en-US" if there is no such attribute on that XMLFragment, otherwise it is the explicitly declared value.

Note, this is not 100% XML comformant as the XML rules indicates that the value on a parent element applies. This method is not observing that rule because that behavior is not indicated in the EFM manual.

Parameters:
f -
Returns:

getEnglishStandardLanguage

public java.lang.String getEnglishStandardLanguage(XMLFragment f)
Access to the "English Standard Language" label as defined in the EFM.

An element “has an English standard label” in a DTS if there is an effective relationship with the defining xsd:element source, an xlink:arcrole attribute equal to “http://www.xbrl.org/2003/role/concept-label” and target link:label with an xml:lang attribute equal to “en-US” and an xlink:role attribute equal to “http://www.xbrl.org/2003/role/label”.

This method returns null if such a label is not found.

Parameters:
f -
Returns:
String with the label text or null

validateOneLabelPerRoleAndLang

public XBRLValidationReport validateOneLabelPerRoleAndLang(XMLFragment f)

isStandardNamespaceURI

public boolean isStandardNamespaceURI(java.lang.String uriRef)
Validates the URI passed in as parameter is one of the standard taxonomy schemas.

Parameters:
uriRef -
Returns:
boolean value

isXMLWhiteSpace

public static boolean isXMLWhiteSpace(char ch)
Parameters:
ch -
Returns:

validateTextIsProperHTML

public XBRLValidationReport validateTextIsProperHTML(java.lang.String stringValue,
                                                     XBRLFact fact,
                                                     XBRLResource res)
Parameters:
stringValue -
fact -
Returns:

validateTextIsProperHTML

public XBRLValidationReport validateTextIsProperHTML(XBRLFact fact)
Parameters:
fact -
Returns:

validateTextIsProperHTML

public XBRLValidationReport validateTextIsProperHTML(XBRLResource res)
Parameters:
fact -
Returns:

getParameterValue

public java.lang.Object getParameterValue(java.lang.String parameterName)
Returns the value assigned to the parameter indicated in the name. or null if no value has been assigned or if there is no a parameter resolver assigned to this processor.

Note, parameter resolvers can be assigned during the instantiation of the XBRL processor.

Parameters:
parameterName - must be a string
Returns:
the parameter value of the appropriate data type or null.

isDefaultParameterValue

public boolean isDefaultParameterValue(java.lang.String parameterName,
                                       java.lang.Object parameterValue)
returns true if the value inParameterObj is the default value for the parameter indicated in param

Parameters:
parameterName -
parameterValue -
Returns:

getRegistrantName

public java.lang.String getRegistrantName(java.lang.String identifier)
The parameter is a CIK identifier. The returned value is a Registrant Name obtained from the parameters or null if there is not a value in the parameters

Parameters:
identifier - (a CIK)
Returns:
the registrant name from the parameters or null.

isDerivedFromDomainItemType

public boolean isDerivedFromDomainItemType(XBRLItem item,
                                           boolean inStandardTaxonomy)
Parameters:
item -
inStandardTaxonomy -
Returns:

validatePresentationNetworks

public XBRLValidationReport validatePresentationNetworks(XMLFragment elDef)
Validates EFM rule 6.12.3 An element used in an instance must participate in at least one effective presentation relationship in the DTS of that instance.

Parameters:
elDef -
Returns:

validatePresentationPreferredLabels

public XBRLValidationReport validatePresentationPreferredLabels(XMLFragment elDef,
                                                                java.util.HashSet<XMLFragment> processed)
Validates EFM rule 6.12.3 An element used in an instance must participate in at least one effective presentation relationship in the DTS of that instance.

Parameters:
elDef -
Returns:

validateCalculationAndPresentation

public XBRLValidationReport validateCalculationAndPresentation(XBRLItem fromItem,
                                                               XBRLItem toItem)
6.14.5 If an instance contains non-empty facts for the source and target of an effective calculation relationship, then at least one effective presentation relationship that the source and target appear in (because of 6.12.3) must be either (a) a relationship with each other or (b) two relationships with any other elements that share a single extended link role. When facts participate in a calculation together, they must be shown with presentation relationships in the same relationship group, although not necessarily adjacent to each other.

Parameters:
elDef - item definition of a reported fact in the instance
Returns:

validateAtMostOneAll

public XBRLValidationReport validateAtMostOneAll(XMLElementDefinition elDef)
Parameters:
elDef -
Returns:


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