public class XBRLTableProcessor extends java.lang.Object implements XBRLCompilableProcessor, XBRLValidationConfiguration
Modifier and Type | Class and Description |
---|---|
static class |
XBRLTableProcessor.TableResourceSG
This enumeration contains an entry for each element definition that
might have XML nodes in its substitution group.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
aspect_node_filter_PWD_2013_05_17_URI
http://xbrl.org/arcrole/PWD/2013-05-17/aspect-node-filter
|
static java.lang.String |
aspect_node_filter_REC_2014_03_18_URI
The Constant aspect_node_filter_REC_2014_03_18_URI.
|
static javax.xml.namespace.QName |
aspectNodeFilterArc_PWD_2013_05_17
The Constant aspectNodeFilterArc_PWD_2013_05_17.
|
static javax.xml.namespace.QName |
aspectNodeFilterArc_REC_2014_03_18
The Constant aspectNodeFilterArc_REC_2014_03_18.
|
static java.lang.String |
breakdown_tree_PWD_2013_05_17_URI
http://xbrl.org/arcrole/PWD/2013-05-17/breakdown-tree
|
static java.lang.String |
breakdown_tree_REC_2014_03_18_URI
The Constant breakdown_tree_REC_2014_03_18_URI.
|
static javax.xml.namespace.QName |
breakdownTreeArc_PWD_2013_05_17
The Constant breakdownTreeArc_PWD_2013_05_17.
|
static javax.xml.namespace.QName |
breakdownTreeArc_REC_2014_03_18
The Constant breakdownTreeArc_REC_2014_03_18.
|
static java.lang.String |
definition_node_subtree_PWD_2013_05_17_URI
http://xbrl.org/arcrole/PWD/2013-05-17/definition-node-subtree
|
static java.lang.String |
definition_node_subtree_REC_2014_03_18_URI
The Constant definition_node_subtree_REC_2014_03_18_URI.
|
static javax.xml.namespace.QName |
definitionNodeSubtreeArc_PWD_2013_05_17
The Constant definitionNodeSubtreeArc_PWD_2013_05_17.
|
static javax.xml.namespace.QName |
definitionNodeSubtreeArc_REC_2014_03_18
The Constant definitionNodeSubtreeArc_REC_2014_03_18.
|
static java.lang.String |
PROCESSORNAME
The Constant PROCESSORNAME.
|
static int |
PWD_2013_05_17
This constant identifies resources from the PWD 2013-05-17 table linkbase
during the construction of the definition model, resources that belongs to
this specification version are processed for the relationships defined in
that specification version.
|
static int |
REC_2014_03_18
This constant identifies resources from the PWD 2013-05-17 table linkbase
during the construction of the definition model, resources that belongs to
this specification version are processed for the relationships defined in
that specification version.
|
static java.lang.String |
table_breakdown_PWD_2013_05_17_URI
http://xbrl.org/arcrole/PWD/2013-05-17/table-breakdown
|
static java.lang.String |
table_breakdown_REC_2014_03_18_URI
The Constant table_breakdown_REC_2014_03_18_URI.
|
static java.lang.String |
table_filter_PWD_2013_05_17_URI
http://xbrl.org/arcrole/PWD/2013-05-17/table-filter
|
static java.lang.String |
table_filter_REC_2014_03_18_URI
The Constant table_filter_REC_2014_03_18_URI.
|
static java.lang.String |
table_parameter_URI
http://xbrl.org/arcrole/2014/table-parameter
|
static java.lang.String |
TABLE_VERSION
The TABLE_VERSION property indicates the version of the Specification document this processor
is currently implementing
The possible value is TABLE_VERSION_PWD_2013_05_17 More values will be added in the future.
|
static java.lang.String |
TABLE_VERSION_PWD_2013_05_17
The TABLE_VERSION_PWD_2013_05_17 property indicates the processor will use the PWD of 2013-05-17
specification version.
|
static java.lang.String |
TABLE_VERSION_REC_2014_03_18
The TABLE_VERSION_REC_2014_03_18 property indicates the processor will use the REC of 2014-03-18
specification version.
|
static javax.xml.namespace.QName |
tableBreakdownArc_PWD_2013_05_17
The Constant tableBreakdownArc_PWD_2013_05_17.
|
static javax.xml.namespace.QName |
tableBreakdownArc_REC_2014_03_18
The Constant tableBreakdownArc_REC_2014_03_18.
|
static javax.xml.namespace.QName |
tableFilterArc_PWD_2013_05_17
The Constant tableFilterArc_PWD_2013_05_17.
|
static javax.xml.namespace.QName |
tableFilterArc_REC_2014_03_18
The Constant tableFilterArc_REC_2014_03_18.
|
static javax.xml.namespace.QName |
tableParameterArc_PWD_2013_05_17
The Constant tableParameterArc_PWD_2013_05_17.
|
static javax.xml.namespace.QName |
tableParameterArc_REC_2014_03_18
The Constant tableParameterArc_REC_2014_03_18.
|
VALIDATE_ALL_TABLES, VALIDATE_CYCLES, VALIDATE_DOCUMENT, VALIDATE_ESSENCE_ALIAS, VALIDATE_REPORT_ITEMS_AND_TUPLES, VALIDATE_REQUIRES_ELEMENT, VALIDATE_SUMMATION_ITEM, VALIDATE_TABLE_RELATIONSHIPS
Modifier and Type | Method and Description |
---|---|
void |
addDefinitionNode(XBRLDefinitionNode definitionNode)
Adds the rule node.
|
static void |
addLabels(XMLFragment parent,
XMLFragment node)
This method implements the following paragraphs of the specification:
"When choosing a single label, the generic label with the standard
resource role (http://www.xbrl.org/2008/role/label), if available,
SHOULD be used in preference to other labels.
|
void |
addNode(net.sf.saxon.om.NodeInfo ni,
XBRLTableProcessor.TableResourceSG resourceCode)
Adds a node to be compiled during the compileResources phase of this processor.
|
void |
addTable(XBRLTable table)
Adds the table.
|
javax.xml.namespace.QName |
checkValidQNameIsConcept(javax.xml.namespace.QName qname)
Validates the QName passed in in the QName parameter is a concept defined in the DTS
and is not a dimension and not an hypercube.
|
javax.xml.namespace.QName |
checkValidQNameIsConceptOrDimension(javax.xml.namespace.QName qname,
javax.xml.namespace.QName ifDimensionMustBeThis)
Validates the QName passed in in the QName parameter is a concept or a dimension defined in the DTS
and not an hypercube.
|
void |
clear()
Clear.
|
static net.sf.saxon.s9api.XPathExecutable |
compileFormulaExpression(java.lang.String expression,
XBRLTableResource resource,
java.util.Collection<net.sf.saxon.s9api.QName> variablesInSet,
java.util.Collection<javax.xml.namespace.QName> requiredVariables)
Compiles an XPath expression using the formula processor compiler and parameters.
|
XBRLValidationReport |
compileResources()
Compile resources.
|
void |
configure(java.util.Properties properties)
Configure.
|
static XBRLTableProcessor |
create(DTSContainer dts)
Creates or gets the instance of the table processor .
|
XMLDocumentImpl |
createModel(XBRLTable table)
Returns an XML document with the serialization of the table model as defined
in the table specification.
|
void |
freeUnnecessary()
Free unnecessary.
|
javax.xml.namespace.QName |
getAspectNodeFilterArc()
Access to the QName of aspectNodeFilterArc arcs for the specification version
recognized during the compilation process.
|
XBRLArcroleType |
getAspectNodeFilterArcroleType()
Gets the aspect node filter arcrole type.
|
java.util.Iterator<DTSBase> |
getBasesWithTables()
Access to an iterator over bases that defines tables.
|
javax.xml.namespace.QName |
getBreakdownTreeArc()
Access to the QName of breakdownTreeArc arcs for the specification version
recognized during the compilation process.
|
XBRLArcroleType |
getBreakdownTreeArcroleType()
Gets the breakdown tree arcrole type.
|
DTSContainer |
getContainer()
Gets the container.
|
javax.xml.namespace.QName |
getDefinitionNodeSubtreeArc()
Access to the QName of definitionNodeSubtreeArc arcs for the specification version
recognized during the compilation process.
|
XBRLArcroleType |
getDefinitionNodeSubtreeArcroleType()
Gets the definition node subtree arcrole type.
|
java.lang.String |
getDescription()
Gets the description.
|
static java.lang.String |
getDescriptionStatic()
Gets the description static.
|
XBRLFilterOrderTool |
getFilterOrderInstance()
Gets the filter order instance.
|
java.lang.String |
getName()
Gets the name.
|
int |
getSpecificationVersion()
Access to the specification version recognized in the incoming linkbases.
|
XBRLTable |
getTable(java.lang.String idTable)
Returns an XBRLTable instance that contains an id with the value of the idTable parameter.
|
javax.xml.namespace.QName |
getTableBreakdownArc()
Access to the QName of tableBreakdownArc arcs for the specification version
recognized during the compilation process.
|
XBRLArcroleType |
getTableBreakdownArcroleType()
Gets the table breakdown arcrole type.
|
javax.xml.namespace.QName |
getTableFilterArc()
Access to the QName of tableFilterArc arcs for the specification version
recognized during the compilation process.
|
XBRLArcroleType |
getTableFilterArcroleType()
Gets the table filter arcrole type.
|
javax.xml.namespace.QName |
getTablePamaterArc()
Access to the QName of tablePamaterArc arcs for the specification version
recognized during the compilation process.
|
XBRLArcroleType |
getTableParameterArcroleType()
Access to the table-parameter arcrole defined in this DTS. returns null if the
table_parameter arcrole is not defined.
|
java.util.Iterator<XBRLTable> |
getTables()
Gets the tables.
|
java.util.Iterator<XBRLTable> |
getTables(XBRLRoleType role)
Return an iterator over all tables defined in the role type
received as parameter.
|
int |
getWhatToValidate()
Gets the what to validate.
|
boolean |
isHidden()
Checks if is hidden.
|
static boolean |
isNegated(XMLFragment node)
Returns true if the node XMLFragment has a label with a negated role.
|
static boolean |
isNet(XMLFragment node)
Returns true if the node XMLFragment has a label with a net role.
|
boolean |
isSpecificationVersion(int version)
returns true when the current DTSContainer contains resources for the
specification version received in the version parameter.
|
static boolean |
isTotal(XMLFragment node)
Returns true if the node XMLFragment has a label with a total role.
|
static java.util.Map<java.lang.String,java.util.Map<java.lang.Object,AspectAndDistanceToLeaf>> |
mergeAspects(CellHeader header1,
CellHeader header2,
java.util.Set<java.lang.String> sortedTagSelectors)
This method combines the aspects of two cell headers and returns an structure of combined
aspects.
|
static void |
mergeAspects(java.util.Map<java.lang.String,java.util.Map<java.lang.Object,AspectAndDistanceToLeaf>> inputAspects,
java.util.Map<java.lang.String,java.util.Map<java.lang.Object,AspectAndDistanceToLeaf>> outputAspects)
helper method that is used during the creation of the table structural nodes to
merge aspects of the parent node with the child node.
|
static void |
mergeAspectsWithCellHeader(java.util.Map<java.lang.String,java.util.Map<java.lang.Object,AspectAndDistanceToLeaf>> returnValue,
CellHeader header)
Combines the aspects in the first parameter with the aspects in the CellHeader.
|
static void |
registerProcessorStatic()
Register processor static.
|
void |
removeDefinitionNode(XBRLDefinitionNode definitionNode)
Removes the rule node.
|
void |
removeTable(XBRLTable table)
Removes the table.
|
int |
setWhatToValidate(int newValue)
Sets the what to validate.
|
XBRLValidationReport |
validate()
Validate.
|
XBRLValidationReport |
validate(XBRLDocument xDocument)
Validate.
|
public static final java.lang.String PROCESSORNAME
public static final java.lang.String TABLE_VERSION_PWD_2013_05_17
public static final java.lang.String TABLE_VERSION_REC_2014_03_18
public static final java.lang.String TABLE_VERSION
The value of the TABLE_VERSION constant is "http://www.reportingstandard.com/properties/table-version".
The default value for the property it refers to is TABLE_VERSION_PWD_2013_05_17 which is the latest release.
public static final java.lang.String table_breakdown_PWD_2013_05_17_URI
public static final java.lang.String table_breakdown_REC_2014_03_18_URI
public static final java.lang.String table_filter_PWD_2013_05_17_URI
public static final java.lang.String table_filter_REC_2014_03_18_URI
public static final java.lang.String definition_node_subtree_PWD_2013_05_17_URI
public static final java.lang.String definition_node_subtree_REC_2014_03_18_URI
public static final java.lang.String breakdown_tree_PWD_2013_05_17_URI
public static final java.lang.String breakdown_tree_REC_2014_03_18_URI
public static final java.lang.String aspect_node_filter_PWD_2013_05_17_URI
public static final java.lang.String aspect_node_filter_REC_2014_03_18_URI
public static final javax.xml.namespace.QName tableBreakdownArc_PWD_2013_05_17
public static final javax.xml.namespace.QName tableBreakdownArc_REC_2014_03_18
public static final javax.xml.namespace.QName breakdownTreeArc_PWD_2013_05_17
public static final javax.xml.namespace.QName breakdownTreeArc_REC_2014_03_18
public static final javax.xml.namespace.QName definitionNodeSubtreeArc_PWD_2013_05_17
public static final javax.xml.namespace.QName definitionNodeSubtreeArc_REC_2014_03_18
public static final javax.xml.namespace.QName tableFilterArc_PWD_2013_05_17
public static final javax.xml.namespace.QName tableFilterArc_REC_2014_03_18
public static final javax.xml.namespace.QName tableParameterArc_PWD_2013_05_17
public static final javax.xml.namespace.QName tableParameterArc_REC_2014_03_18
public static final javax.xml.namespace.QName aspectNodeFilterArc_PWD_2013_05_17
public static final javax.xml.namespace.QName aspectNodeFilterArc_REC_2014_03_18
public static final java.lang.String table_parameter_URI
public static final int PWD_2013_05_17
isSpecificationVersion(int)
,
Constant Field Valuespublic static final int REC_2014_03_18
isSpecificationVersion(int)
,
Constant Field Valuespublic boolean isSpecificationVersion(int version)
version
- one of the versions supported.PWD_2013_05_17
,
REC_2014_03_18
public int getSpecificationVersion()
PWD_2013_05_17
,
REC_2014_03_18
public static void registerProcessorStatic()
public javax.xml.namespace.QName getTableBreakdownArc()
public javax.xml.namespace.QName getBreakdownTreeArc()
public javax.xml.namespace.QName getAspectNodeFilterArc()
public javax.xml.namespace.QName getTablePamaterArc()
public javax.xml.namespace.QName getTableFilterArc()
public javax.xml.namespace.QName getDefinitionNodeSubtreeArc()
public XBRLArcroleType getTableBreakdownArcroleType()
public XBRLArcroleType getTableFilterArcroleType()
public XBRLArcroleType getBreakdownTreeArcroleType()
public XBRLArcroleType getDefinitionNodeSubtreeArcroleType()
public XBRLArcroleType getAspectNodeFilterArcroleType()
public XBRLArcroleType getTableParameterArcroleType()
public XBRLValidationReport validate()
validate
in interface XBRLPlugInProcessor
public XBRLValidationReport validate(XBRLDocument xDocument)
validate
in interface XBRLPlugInProcessor
xDocument
- the x documentpublic java.lang.String getName()
getName
in interface XBRLPlugInProcessor
public java.lang.String getDescription()
getDescription
in interface XBRLPlugInProcessor
public void configure(java.util.Properties properties)
configure
in interface XBRLPlugInProcessor
properties
- the propertiespublic XBRLValidationReport compileResources()
compileResources
in interface XBRLCompilableProcessor
public void addNode(net.sf.saxon.om.NodeInfo ni, XBRLTableProcessor.TableResourceSG resourceCode)
ni
- the NodeInfo representing the resource to be transoformed into an specific table resourceresourceCode
- the resource codepublic java.util.Iterator<XBRLTable> getTables()
public java.util.Iterator<XBRLTable> getTables(XBRLRoleType role)
role
- the rolepublic void removeDefinitionNode(XBRLDefinitionNode definitionNode)
definitionNode
- the rule nodepublic void addDefinitionNode(XBRLDefinitionNode definitionNode)
definitionNode
- the definition nodepublic void addTable(XBRLTable table)
table
- the tablepublic void removeTable(XBRLTable table)
table
- the tablepublic DTSContainer getContainer()
getContainer
in interface HasDTSContainer
public void freeUnnecessary() throws com.rs.lic.LicenseVerificationException, XBRLValidationException
freeUnnecessary
in interface XBRLCompilableProcessor
com.rs.lic.LicenseVerificationException
- the license verification exceptionXBRLValidationException
- the XBRL validation exceptionpublic static XBRLTableProcessor create(DTSContainer dts) throws com.rs.lic.LicenseVerificationException, XBRLValidationException
dts
- the DTSContainer to create/get the XBRLTableProcessor fromcom.rs.lic.LicenseVerificationException
- the license verification exceptionXBRLValidationException
- the XBRL validation exceptionpublic static java.lang.String getDescriptionStatic()
public javax.xml.namespace.QName checkValidQNameIsConcept(javax.xml.namespace.QName qname) throws XTxbrlteInvalidQNameAspectValue
qname
- the concept to checkXTxbrlteInvalidQNameAspectValue
- in case the concept does not exists or is a dimension or is an hypercubepublic javax.xml.namespace.QName checkValidQNameIsConceptOrDimension(javax.xml.namespace.QName qname, javax.xml.namespace.QName ifDimensionMustBeThis) throws XTxbrlteInvalidQNameAspectValue
qname
- the concept to checkifDimensionMustBeThis
- the if dimension must be thisXTxbrlteInvalidQNameAspectValue
- in case the concept does not exists or is a dimension or is an hypercubepublic XBRLFilterOrderTool getFilterOrderInstance()
public java.util.Iterator<DTSBase> getBasesWithTables()
public static net.sf.saxon.s9api.XPathExecutable compileFormulaExpression(java.lang.String expression, XBRLTableResource resource, java.util.Collection<net.sf.saxon.s9api.QName> variablesInSet, java.util.Collection<javax.xml.namespace.QName> requiredVariables)
expression
- XPath expression to be compiledresource
- the table resourcevariablesInSet
- the variables in setrequiredVariables
- (OUT) this is a collection of QName with variable names that are required to evaluate the expressionpublic boolean isHidden()
isHidden
in interface XBRLPlugInProcessor
public void clear()
clear
in interface XBRLPlugInProcessor
public XMLDocumentImpl createModel(XBRLTable table) throws XTValidationException, XFException
table
- the table to produce the document forXTValidationException
- the XT validation exceptionXFException
- the XF exceptionpublic static boolean isTotal(XMLFragment node)
node
- the nodepublic static boolean isNegated(XMLFragment node)
node
- the nodepublic static boolean isNet(XMLFragment node)
node
- the nodepublic static void addLabels(XMLFragment parent, XMLFragment node)
parent
- parent node to attach labels tonode
- the Object to search labels frompublic static void mergeAspects(java.util.Map<java.lang.String,java.util.Map<java.lang.Object,AspectAndDistanceToLeaf>> inputAspects, java.util.Map<java.lang.String,java.util.Map<java.lang.Object,AspectAndDistanceToLeaf>> outputAspects)
inputAspects
- this is a hash table indexed by tag of all source aspects to merge. Aspects here will be combined to the outputAspects. May be nulloutputAspects
- this is the target of the merge operation. Must not be nullpublic static java.util.Map<java.lang.String,java.util.Map<java.lang.Object,AspectAndDistanceToLeaf>> mergeAspects(CellHeader header1, CellHeader header2, java.util.Set<java.lang.String> sortedTagSelectors)
header1
- the header 1header2
- the header 2sortedTagSelectors
- the sorted tag selectorspublic static void mergeAspectsWithCellHeader(java.util.Map<java.lang.String,java.util.Map<java.lang.Object,AspectAndDistanceToLeaf>> returnValue, CellHeader header)
returnValue
- the return valueheader
- the headerpublic int setWhatToValidate(int newValue)
setWhatToValidate
in interface XBRLValidationConfiguration
newValue
- the new valuepublic int getWhatToValidate()
getWhatToValidate
in interface XBRLValidationConfiguration
public XBRLTable getTable(java.lang.String idTable)
idTable
- the id tableCopyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa