|
XBRLAPIA Java API for XBRL |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xbrlapi.xlink.XLinkHandlerDefaultImpl
org.xbrlapi.xlink.handler.XBRLXLinkHandlerImpl
org.xbrlapi.xdt.XLinkHandlerImpl
public class XLinkHandlerImpl
XBRL XLink Handler This class provides a real world example of an XLink handler for XBRL.
| Field Summary |
|---|
| Fields inherited from class org.xbrlapi.xlink.handler.XBRLXLinkHandlerImpl |
|---|
baseURIResolver, elementState, loader |
| Constructor Summary | |
|---|---|
XLinkHandlerImpl()
XBRL XLink handler constructor |
|
| Method Summary | |
|---|---|
void |
endArc(String namespaceURI,
String sName,
String qName)
Handle the end of the arc. |
void |
endExtendedLink(String namespaceURI,
String sName,
String qName)
Nothing needs to be done at the end of the extended link discovery. |
void |
endLocator(String namespaceURI,
String sName,
String qName)
Handle the end of the locator. |
void |
endResource(String namespaceURI,
String sName,
String qName)
Handle the end of the resource. |
void |
endSimpleLink(String namespaceURI,
String sName,
String qName)
Handle the end of the simple link |
void |
error(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String message)
Walter Hamscher has identified documents in the XBRL community that violate the constraint that attributes not defined in the XLink specification must not be in the XLink namespace. |
void |
setBaseURISAXResolver(BaseURISAXResolver resolver)
Set the base URI resolver for the XBRL XLink handler. |
void |
setElementState(ElementState elementState)
|
void |
setLoader(Loader loader)
Set the XBRL DTS loader |
void |
startArc(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String from,
String to,
String arcrole,
String title,
String show,
String actuate)
Create the arc fragment first. |
void |
startExtendedLink(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String role,
String title)
The extended link processing algorithm, central to this implementation, operates as follows: Store all locators and resources that are found in the extended link in a map of lists where the map is indexed by XLink label attribute values and each list is made up of the locators and resources that have been found in the extended link that carry the same XLink label. |
void |
startLocator(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String href,
String role,
String title,
String label)
Create the locator fragment and then add it to the map of arc anchors. |
void |
startResource(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String role,
String title,
String label)
Create the resource and add it to the map of arc anchors ready to be processed once the end of the containing extended link has been found. |
void |
startSimpleLink(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String href,
String role,
String arcrole,
String title,
String show,
String actuate)
Add the href to the set of XML documents to be explored and create the fragment for the simple link. |
void |
startTitle(String namespaceURI,
String lName,
String qName,
Attributes attrs)
Creates and stores an XLink title fragment. |
void |
warning(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String message)
Log a warning message |
void |
xmlBaseEnd()
Handle the change of XML Base scope as you step back up the tree |
void |
xmlBaseStart(String value)
Handle the XML Base attribute discovery |
| Methods inherited from class org.xbrlapi.xlink.handler.XBRLXLinkHandlerImpl |
|---|
equals, hashCode |
| Methods inherited from class org.xbrlapi.xlink.XLinkHandlerDefaultImpl |
|---|
endTitle, titleCharacters |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xbrlapi.xlink.XLinkHandler |
|---|
endTitle, titleCharacters |
| Constructor Detail |
|---|
public XLinkHandlerImpl()
| Method Detail |
|---|
public void setLoader(Loader loader)
setLoader in class XBRLXLinkHandlerImplloader - The XBRL DTS loaderpublic void setBaseURISAXResolver(BaseURISAXResolver resolver)
setBaseURISAXResolver in class XBRLXLinkHandlerImplresolver - the base URI resolver used by the XLink handler.
public void xmlBaseStart(String value)
throws XLinkException
xmlBaseStart in interface XLinkHandlerxmlBaseStart in class XBRLXLinkHandlerImplvalue - the Value of the XML Base attribute
XLinkExceptionXLinkHandler.xmlBaseStart(java.lang.String)
public void startTitle(String namespaceURI,
String lName,
String qName,
Attributes attrs)
throws XLinkException
startTitle in interface XLinkHandlerstartTitle in class XBRLXLinkHandlerImplXLinkExceptionXLinkHandler.startTitle(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
public void xmlBaseEnd()
throws XLinkException
xmlBaseEnd in interface XLinkHandlerxmlBaseEnd in class XBRLXLinkHandlerImplXLinkExceptionXLinkHandler.xmlBaseEnd()
public void startExtendedLink(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String role,
String title)
throws XLinkException
startExtendedLink in interface XLinkHandlerstartExtendedLink in class XBRLXLinkHandlerImplXLinkExceptionXLinkHandler.startExtendedLink(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes, java.lang.String, java.lang.String)
public void endExtendedLink(String namespaceURI,
String sName,
String qName)
throws XLinkException
endExtendedLink in interface XLinkHandlerendExtendedLink in class XBRLXLinkHandlerImplXLinkExceptionXLinkHandler.endExtendedLink(java.lang.String, java.lang.String, java.lang.String)
public void startResource(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String role,
String title,
String label)
throws XLinkException
startResource in interface XLinkHandlerstartResource in class XBRLXLinkHandlerImplXLinkExceptionXLinkHandler.startResource(String, String, String, Attributes, String, String, String)
public void endResource(String namespaceURI,
String sName,
String qName)
throws XLinkException
endResource in interface XLinkHandlerendResource in class XBRLXLinkHandlerImplXLinkExceptionXLinkHandler.endResource(java.lang.String, java.lang.String, java.lang.String)
public void startLocator(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String href,
String role,
String title,
String label)
throws XLinkException
startLocator in interface XLinkHandlerstartLocator in class XBRLXLinkHandlerImplXLinkExceptionXLinkHandler.startLocator(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public void endLocator(String namespaceURI,
String sName,
String qName)
throws XLinkException
endLocator in interface XLinkHandlerendLocator in class XBRLXLinkHandlerImplXLinkExceptionXLinkHandler.endLocator(java.lang.String, java.lang.String, java.lang.String)
public void startArc(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String from,
String to,
String arcrole,
String title,
String show,
String actuate)
throws XLinkException
startArc in interface XLinkHandlerstartArc in class XBRLXLinkHandlerImplXLinkExceptionXLinkHandler.startArc(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public void endArc(String namespaceURI,
String sName,
String qName)
throws XLinkException
endArc in interface XLinkHandlerendArc in class XBRLXLinkHandlerImplXLinkExceptionXLinkHandler.endArc(java.lang.String, java.lang.String, java.lang.String)
public void startSimpleLink(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String href,
String role,
String arcrole,
String title,
String show,
String actuate)
throws XLinkException
startSimpleLink in interface XLinkHandlerstartSimpleLink in class XBRLXLinkHandlerImplXLinkExceptionXLinkHandler.startSimpleLink(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public void endSimpleLink(String namespaceURI,
String sName,
String qName)
throws XLinkException
endSimpleLink in interface XLinkHandlerendSimpleLink in class XBRLXLinkHandlerImplXLinkExceptionXLinkHandler.endSimpleLink(java.lang.String, java.lang.String, java.lang.String)public void setElementState(ElementState elementState)
setElementState in class XBRLXLinkHandlerImplelementState - The state for the current element.
public void error(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String message)
throws XLinkException
error in interface XLinkHandlererror in class XBRLXLinkHandlerImplnamespaceURI - Namespace of the element generating the errorlName - local name of the element generating the errorqName - qName of the element generating the errorattrs - attributes of the element generating the errormessage - The text of the error message
XLinkException - if the handler does not deal with
the XLink problem internallyXLinkHandler.warning(java.lang.String,java.lang.String, java.lang.String, org.xml.sax.Attributes, java.lang.String)
public void warning(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String message)
throws XLinkException
warning in interface XLinkHandlerwarning in class XBRLXLinkHandlerImplnamespaceURI - Namespace of the element generating the errorlName - local name of the element generating the errorqName - qName of the element generating the errorattrs - attributes of the element generating the errormessage - The text of the warning message
XLinkException - if the handler does not deal with
the XLink warning internallyXLinkHandler.warning(java.lang.String,java.lang.String, java.lang.String, org.xml.sax.Attributes, java.lang.String)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||