|
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
public class XBRLXLinkHandlerImpl
XBRL XLink Handler This class provides a real world example of an XLink handler for XBRL.
| Field Summary | |
|---|---|
protected BaseURISAXResolver |
baseURIResolver
The base URI resolver used by the XLink handler |
protected ElementState |
elementState
Data required to track the element scheme XPointer expressions that can be used to identify XBRL fragments. |
protected Loader |
loader
The XBRL DTS loader that is using this XLink handler |
| Constructor Summary | |
|---|---|
XBRLXLinkHandlerImpl()
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 |
boolean |
equals(Object obj)
|
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. |
int |
hashCode()
|
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)
Handles the start of processing a local resource. |
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.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 |
| Field Detail |
|---|
protected Loader loader
protected BaseURISAXResolver baseURIResolver
protected transient ElementState elementState
| Constructor Detail |
|---|
public XBRLXLinkHandlerImpl()
| Method Detail |
|---|
public void setLoader(Loader loader)
loader - The XBRL DTS loaderpublic void setBaseURISAXResolver(BaseURISAXResolver resolver)
resolver - the base URI resolver used by the XLink handler.
public void xmlBaseStart(String value)
throws XLinkException
xmlBaseStart in interface XLinkHandlerxmlBaseStart in class XLinkHandlerDefaultImplvalue - 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 XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.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 XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.xmlBaseEnd()
public void startExtendedLink(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String role,
String title)
throws XLinkException
startExtendedLink in interface XLinkHandlerstartExtendedLink in class XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.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 XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.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
XLinkHandler
startResource in interface XLinkHandlerstartResource in class XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.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 XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.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 XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.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 XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.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 XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.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 XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.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 XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.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 XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.endSimpleLink(java.lang.String, java.lang.String, java.lang.String)public void setElementState(ElementState elementState)
elementState - 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 XLinkHandlerDefaultImplnamespaceURI - 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 XLinkHandlerDefaultImplnamespaceURI - 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)public int hashCode()
hashCode in class XLinkHandlerDefaultImplObject.hashCode()public boolean equals(Object obj)
equals in class XLinkHandlerDefaultImplObject.equals(java.lang.Object)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||