public class FContext
extends java.lang.Object
Constructor and Description |
---|
FContext(XBRLFactItem factitem)
Instantiates a new f context.
|
FContext(XMLElementDefinition el)
Instantiates a new f context.
|
FContext(XMLElementDefinition el,
XBRLContext ctx)
Instantiates a new f context.
|
Modifier and Type | Method and Description |
---|---|
void |
add(XMLFragment fr,
int container,
boolean bIsOcc)
Adds the.
|
void |
clear()
Clears all dimensional and non dimensional information on this context.
|
XMLFragment |
getDimension(javax.xml.namespace.QName dimName)
Returns the dimension value associated to the dimension passed in in the dimName parameter.
|
int |
getDimensionContainer(javax.xml.namespace.QName dimName)
Gets the dimension container.
|
java.util.Collection<javax.xml.namespace.QName> |
getDimensions()
Returns a collection of QNames for of all XDT dimensions explicitly written in the context,
either in the segment or the scenario containers.
|
java.util.Collection<XMLFragment> |
getNonDimensionalInformation(int container)
Returns a collection of fragments with non dimensional information in the context container
indicated in the parameter.
|
XBRLDimensionsContainer |
getXBRLContext(int container)
Converts the internal structures back to an XBRLContext object.
|
static boolean |
isExplicitDimensionContainer(XMLFragment fragment)
returns true if the XMLFragment passed in as a parameter is a container for explicit dimensions.
|
static boolean |
isTypedDimensionContainer(XMLFragment fragment)
returns true if the XMLFragment passed in as a parameter is a container for explicit dimensions.
|
void |
remove(XMLFragment fr,
int container,
boolean bIsOcc)
Removes the.
|
void |
removeDim(javax.xml.namespace.QName dimName)
Removes the dim.
|
void |
setDimension(javax.xml.namespace.QName dimName,
XMLFragment dimension,
int dimensionContainer)
Sets a value for the indicated dimension in the indicated dimension container.
|
void |
setXBRLContext(XBRLContext context)
Stores the information form an XBRL context inside the internal structure.
|
void |
setXBRLScenario(XBRLScenario scenario)
Sets the XBRL scenario.
|
void |
setXBRLSegment(XBRLSegment segment)
Sets the XBRL segment.
|
void |
unsetXBRLScenario(XBRLScenario scenario)
Unset xbrl scenario.
|
void |
unsetXBRLSegment(XBRLSegment segment)
Unset xbrl segment.
|
public FContext(XMLElementDefinition el)
el
- the elpublic FContext(XMLElementDefinition el, XBRLContext ctx)
el
- the element to obtain the context from. May be nullctx
- the XBRL context, must not be null if el is nullpublic FContext(XBRLFactItem factitem)
factitem
- the fact item to work withpublic void setXBRLContext(XBRLContext context)
context
- the new XBRL contextpublic void setXBRLSegment(XBRLSegment segment)
segment
- the new XBRL segmentpublic void setXBRLScenario(XBRLScenario scenario)
scenario
- the new XBRL scenariopublic void add(XMLFragment fr, int container, boolean bIsOcc) throws XFxbrlfeBadSubsequentOCCValue
fr
- the frcontainer
- use -1 in the case of dimensions to NOT CHANGE original container. use XDTHypercubeUse.SEGMENT for segment and XDTHypercubeUse.SCENARIO for scenariobIsOcc
- the b is occXFxbrlfeBadSubsequentOCCValue
- the x fxbrlfe bad subsequent occ valuepublic void unsetXBRLSegment(XBRLSegment segment)
segment
- the segmentpublic void unsetXBRLScenario(XBRLScenario scenario)
scenario
- the scenariopublic void remove(XMLFragment fr, int container, boolean bIsOcc) throws XFxbrlfeBadSubsequentOCCValue
fr
- the frcontainer
- the containerbIsOcc
- the b is occXFxbrlfeBadSubsequentOCCValue
- the x fxbrlfe bad subsequent occ valuepublic XBRLDimensionsContainer getXBRLContext(int container)
Note during the construction of this function, the time and entity is not stored so this class will not be able to generate a complete context. It can only generate the scenario container or the segment container as indicated in the parameters passed in.
container
- use XDTHypercubeUse.SEGMENT for segment and XDTHypercubeUse.SCENARIO for scenariopublic void clear()
public void removeDim(javax.xml.namespace.QName dimName)
dimName
- the dim namepublic java.util.Collection<javax.xml.namespace.QName> getDimensions()
public XMLFragment getDimension(javax.xml.namespace.QName dimName)
The returned data is the XMLFragment including the explicit or implicit member container.
If the dimension has a default, the default is not reported in the context. This method only cares about explicitly written values in the context so the returned value will always be null when a dimension for which a default has been reported is passed in. Note that if, according with other interpretations of closed hypercubes, the dimension for which a default does not apply for the primary item, this method will also return when that dimension is used.
dimName
- the dim namepublic int getDimensionContainer(javax.xml.namespace.QName dimName)
dimName
- the dim namepublic void setDimension(javax.xml.namespace.QName dimName, XMLFragment dimension, int dimensionContainer)
in order to get the preferred dimension container for a dimension call the getDimensionContainer(QName)
method.
the dimension value must contain all elements including the xbrli:explicitMember or xbrli:typedMember element and all required attributes.
dimName
- the dim namedimension
- the dimensiondimensionContainer
- XDTHypercubeUse.SEGMENT for segment and XDTHypercubeUse.SCENARIO for scenariogetDimensionContainer(QName)
public java.util.Collection<XMLFragment> getNonDimensionalInformation(int container)
container
- either XDTHypercubeUse.SCENARIO or XDTHypercubeUse.SEGMENTpublic static boolean isExplicitDimensionContainer(XMLFragment fragment)
fragment
- the fragmentpublic static boolean isTypedDimensionContainer(XMLFragment fragment)
fragment
- the fragmentCopyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa