|
XBRLAPIA Java API for XBRL |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Fragment
Defines the functionality exposed by any fragment.
| Method Summary | ||
|---|---|---|
void |
appendElementSchemeXPointer(String expression)
Add an element Scheme XPointer Expression to the metadata. |
|
void |
appendID(String id)
Add an ID (used in XPointer resolution) to the metadata. |
|
List<Fragment> |
getAllChildren()
Gets all child fragments. |
|
Set<String> |
getAllChildrenIndices()
|
|
Fragment |
getAncestorOrSelf(String type)
Gets the ancestor (or self) fragment with the specified fragment type. |
|
Fragment |
getChild(String type,
int index)
Get a specific child fragment. |
|
|
getChildren(Class<?> requiredClass)
Gets the child fragments with the specified fragment type. |
|
|
getChildren(String type)
Gets the child fragments with the specified fragment type. |
|
Set<String> |
getChildrenIndices(String type)
|
|
Element |
getDataRootElement()
Get the root element of the fragment data. |
|
String |
getElementSchemeXPointerExpression()
|
|
String |
getIDXPointerExpression()
|
|
List<LabelResource> |
getLabels()
|
|
List<LabelResource> |
getLabels(List<String> languages,
List<URI> labelRoles)
|
|
List<LabelResource> |
getLabels(List<String> languages,
List<URI> labelRoles,
List<URI> linkRoles)
|
|
List<LabelResource> |
getLabelsWithLanguage(String language)
|
|
List<LabelResource> |
getLabelsWithLanguageAndResourceRole(String language,
URI role)
|
|
List<LabelResource> |
getLabelsWithLanguageAndResourceRoleAndLinkRole(String language,
URI resourceRole,
URI linkRole)
|
|
List<LabelResource> |
getLabelsWithResourceRole(URI role)
|
|
String |
getLanguage()
|
|
String |
getLanguage(Node node)
|
|
String |
getLanguageName(List<String> languageNameEncodings)
|
|
String |
getLanguageName(String languageNameEncoding)
|
|
String |
getLocalname()
Get the local name of the fragment's root element |
|
String |
getLocalnameFromQName(String qname)
Returns the local name for a QName |
|
URI |
getNamespace()
Get the namespace of the fragment root element. |
|
URI |
getNamespaceFromQName(String qname,
Node node)
Returns the Namespace for a QName in the context of a node in the fragment. |
|
Fragment |
getParent()
Get the parent fragment of this fragment or null if there is none. |
|
Element |
getParentElement(Element parentDataRootElement)
Get the element in the parent fragment that has this fragment as its child. |
|
String |
getParentIndex()
Get the index of the parent fragment or null if the fragment does not have a parent fragment. |
|
String |
getPrefixFromQName(String qname)
Returns the Namespace prefix for a QName |
|
List<ReferenceResource> |
getReferences()
|
|
List<ReferenceResource> |
getReferencesWithLanguage(String language)
|
|
List<ReferenceResource> |
getReferencesWithLanguageAndResourceRoleAndLinkRole(String language,
URI resourceRole,
URI linkRole)
|
|
List<ReferenceResource> |
getReferencesWithLanguageAndRole(String language,
URI role)
|
|
List<ReferenceResource> |
getReferencesWithResourceRole(String role)
|
|
List<Locator> |
getReferencingLocators()
Retrieves a list of all locators that target this fragment. |
|
String[] |
getSequenceToParentElement()
Get the sequence of steps through the parent fragment DOM to the parent element. |
|
String |
getSequenceToParentElementAsString()
|
|
List<SimpleLink> |
getSimpleLinks()
|
|
URI |
getURI()
Get the URI of the document containing this fragment. |
|
String |
getXPath()
Get the XPath to the element in the parent fragment that is the parent element of this fragment's root element. |
|
String |
getXPointerExpression()
|
|
boolean |
isAncestorOf(Fragment descendant)
|
|
boolean |
isChild()
|
|
boolean |
isNewFragment()
Tests if a fragment is new in the sense that it does not have a root data element. |
|
boolean |
isRoot()
|
|
void |
setParentIndex(String index)
Set the index of the parent fragment. |
|
void |
setSequenceToParentElement(Fragment parent)
Specifies the set of ancestor elements of the element in the parent fragment that is the insertion point for this fragment's root element. |
|
void |
setURI(URI uri)
Set the URI of the fragment's document. |
|
| Methods inherited from interface org.xbrlapi.XML |
|---|
appendMetadataElement, equals, getBuilder, getDocumentNode, getIndex, getMetaAttribute, getMetadataRootElement, getStore, getType, hashCode, hasMetaAttribute, isa, isa, removeMetaAttribute, removeMetadataElement, serialize, serialize, serialize, setBuilder, setIndex, setMetaAttribute, setResource, setStore, updateInStore |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Method Detail |
|---|
Element getDataRootElement()
throws XBRLException
XBRLException - if the fragment does not have fragment data.
boolean isNewFragment()
throws XBRLException
XBRLException
URI getURI()
throws XBRLException
XBRLException
void setURI(URI uri)
throws XBRLException
uri - The string value of the document's absolute URI
XBRLException.
XBRLException
List<Locator> getReferencingLocators()
throws XBRLException
XBRLException.
XBRLException
String getParentIndex()
throws XBRLException
XBRLException - if the parent fragment index is not available.
boolean isRoot()
throws XBRLException
XBRLExceptionisChild()
String[] getSequenceToParentElement()
throws XBRLException
XBRLException
String getSequenceToParentElementAsString()
throws XBRLException
XBRLException
void setParentIndex(String index)
throws XBRLException
index - The index of the parent fragment.
XBRLException - if the parent fragment index cannot be set.
String getXPath()
throws XBRLException
XBRLException
void setSequenceToParentElement(Fragment parent)
throws XBRLException
parent - The parent fragment.
XBRLException
void appendID(String id)
throws XBRLException
id - The value of the ID.
XBRLException.
XBRLException
void appendElementSchemeXPointer(String expression)
throws XBRLException
expression - The XPointer expression
XBRLException
String getXPointerExpression()
throws XBRLException
XBRLException
String getElementSchemeXPointerExpression()
throws XBRLException
XBRLException
String getIDXPointerExpression()
throws XBRLException
XBRLException
URI getNamespace()
throws XBRLException
XBRLException - if there is no data element
in the fragment.
String getLocalname()
throws XBRLException
XBRLException
Element getParentElement(Element parentDataRootElement)
throws XBRLException
parentDataRootElement - The root element of the parent fragment's data.
XBRLException
Fragment getParent()
throws XBRLException
XBRLException
boolean isChild()
throws XBRLException
XBRLException
boolean isAncestorOf(Fragment descendant)
throws XBRLException
descendant - The candidate descendant fragment.
XBRLException
List<Fragment> getAllChildren()
throws XBRLException
XBRLException
Set<String> getAllChildrenIndices()
throws XBRLException
XBRLException
List<SimpleLink> getSimpleLinks()
throws XBRLException
XBRLException
Fragment getAncestorOrSelf(String type)
throws XBRLException
type - The required fragment type of the ancestor (or self).
XBRLException - if no such ancestor fragment exists.
URI getNamespaceFromQName(String qname,
Node node)
throws XBRLException
qname - The qName value to resolvenode - The node in the fragment data (as a DOM representation) to start QName resolution from.
XBRLException - if the namespace is not declaredString getLocalnameFromQName(String qname)
qname - The qName value to resolve
String getPrefixFromQName(String qname)
qname - The qName value to resolve
XBRLException
List<LabelResource> getLabels()
throws XBRLException
XBRLException
List<LabelResource> getLabelsWithResourceRole(URI role)
throws XBRLException
role - The XLink role value
XBRLException
List<LabelResource> getLabels(List<String> languages,
List<URI> labelRoles)
throws XBRLException
languages - the list of language codes in order of preference from most preferred to least
preferred, eventually allowing any language if no explicit preference match.labelRoles - the list of label resource roles in order of preference from most preferred
to least preferred, eventually allowing any resource role.
XBRLException
List<LabelResource> getLabels(List<String> languages,
List<URI> labelRoles,
List<URI> linkRoles)
throws XBRLException
languages - the list of language codes in order of preference from most
preferred to least preferred, eventually allowing any language
if no explicit preference match.labelRoles - the list of label resource roles in order of preference from
most preferred to least preferred, eventually allowing any
resource role.linkRoles - the list of extended link roles in order of preference from
most preferred to least preferred, eventually allowing any
link role.
XBRLException
List<ReferenceResource> getReferencesWithResourceRole(String role)
throws XBRLException
role - The XLink role value
XBRLException
List<LabelResource> getLabelsWithLanguage(String language)
throws XBRLException
language - The xml:lang language codevalue
XBRLException
List<LabelResource> getLabelsWithLanguageAndResourceRole(String language,
URI role)
throws XBRLException
language - The xml:lang language code valuerole - The XLink role value
XBRLException
List<LabelResource> getLabelsWithLanguageAndResourceRoleAndLinkRole(String language,
URI resourceRole,
URI linkRole)
throws XBRLException
language - The xml:lang language code value or null if not used as
a a label selection criterion.resourceRole - The XLink resource role value on the label or null if not used as
a a label selection criterion.linkRole - The XLink extended link role value on the
extended link containing the label or null if not used as
a a label selection criterion..
XBRLException
List<ReferenceResource> getReferences()
throws XBRLException
XBRLException
List<ReferenceResource> getReferencesWithLanguage(String language)
throws XBRLException
language - The xml:lang language code value
XBRLException
List<ReferenceResource> getReferencesWithLanguageAndRole(String language,
URI role)
throws XBRLException
language - The xml:lang language code valuerole - The XLink role value
XBRLException
List<ReferenceResource> getReferencesWithLanguageAndResourceRoleAndLinkRole(String language,
URI resourceRole,
URI linkRole)
throws XBRLException
language - The xml:lang language code valueresourceRole - The XLink resource role value on the referencelinkRole - The XLink extended link role value on the
extended link containing the reference.
XBRLException
Fragment getChild(String type,
int index)
throws XBRLException
type - The fragment type of the required childindex - The index of the required child fragment (among other children of the same type)
with the first child being at index 0.
XBRLException - if the index is out of bounds
<F extends Fragment> List<F> getChildren(String type)
throws XBRLException
type - The required fragment type of the child.
EG: If a list of
org.xbrlapi.impl.ReferenceArcImpl fragments is required then
this parameter would have a value of "ReferenceArc".
Note that if the parameter contains full stops, then it is used directly
as the value for the fragment type, enabling fragment extensions to exploit this
method without placing fragment implementations in the org.xbrlapi package.
XBRLException
<F extends Fragment> List<F> getChildren(Class<?> requiredClass)
throws XBRLException
requiredClass - The required fragment class of the child fragments.
XBRLException
Set<String> getChildrenIndices(String type)
throws XBRLException
type - The fragment type
XBRLException
String getLanguage(Node node)
throws XBRLException
node - The XML node to get the XML language fragment for.
XBRLException
String getLanguage()
throws XBRLException
XBRLException
String getLanguageName(String languageNameEncoding)
throws XBRLException
languageNameEncoding - The language encoding of the language name, available
in the data store in the form of a Language XML resource.
XBRLExceptionfor details of these objects.
String getLanguageName(List<String> languageNameEncodings)
throws XBRLException
XBRLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||