XBRLAPI

A Java API for XBRL


org.xbrlapi.xlink
Class XLinkProcessorImpl

java.lang.Object
  extended by org.xbrlapi.xlink.XLinkProcessorImpl
All Implemented Interfaces:
Serializable, XLinkProcessor

public class XLinkProcessorImpl
extends Object
implements XLinkProcessor, Serializable

XLink 1.1 processor for use with SAX parsers.

Author:
Geoffrey Shuetrim (geoff@galexy.net), Henry S. Thompson (ht@w3.org)
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.xbrlapi.xlink.XLinkProcessor
ARC, CUSTOM_LINK, EXTENDED_LINK, LOCATOR, NOT_XLINK, RESOURCE, SIMPLE_LINK, TITLE
 
Constructor Summary
XLinkProcessorImpl(XLinkHandler xlinkHandler)
          constructor
XLinkProcessorImpl(XLinkHandler xlinkHandler, CustomLinkRecogniser recogniser)
          constructor
 
Method Summary
 void endElement(String namespaceURI, String lName, String qName, Attributes attrs)
          Respond to the end of an element, examining the element for XLink features.
 boolean equals(Object obj)
           
 XLinkHandler getXLinkHandler()
          Provides access to the XLink handler being used by the XLink processor.
 int hashCode()
           
 void setCustomLinkRecogniser(CustomLinkRecogniser customLinkRecogniser)
          Set the custom link recogniser
 void startElement(String namespaceURI, String lName, String qName, Attributes attrs)
          Respond to the start of an element, examining the element for XLink features
 void titleCharacters(char[] buf, int offset, int len)
          Handles the character content for a title element
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XLinkProcessorImpl

public XLinkProcessorImpl(XLinkHandler xlinkHandler)
constructor

Parameters:
xlinkHandler - The XLink Handler

XLinkProcessorImpl

public XLinkProcessorImpl(XLinkHandler xlinkHandler,
                          CustomLinkRecogniser recogniser)
constructor

Parameters:
xlinkHandler - The XLink Handler.
recogniser - The Custom link recogniser.
Method Detail

setCustomLinkRecogniser

public void setCustomLinkRecogniser(CustomLinkRecogniser customLinkRecogniser)
Set the custom link recogniser

Specified by:
setCustomLinkRecogniser in interface XLinkProcessor
Parameters:
customLinkRecogniser - The class that indicates if a custom link has been recognised.

startElement

public void startElement(String namespaceURI,
                         String lName,
                         String qName,
                         Attributes attrs)
                  throws XLinkException
Description copied from interface: XLinkProcessor
Respond to the start of an element, examining the element for XLink features

Specified by:
startElement in interface XLinkProcessor
Throws:
XLinkException
See Also:
XLinkProcessor.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)

endElement

public void endElement(String namespaceURI,
                       String lName,
                       String qName,
                       Attributes attrs)
                throws XLinkException
Description copied from interface: XLinkProcessor
Respond to the end of an element, examining the element for XLink features. The SAX content handler that uses this XLink processor will need to keep track of the attributes of the element being ended and will need to access these attributes from within the endElement method in the content handler that then calls the end element method in this XLink processor.

Specified by:
endElement in interface XLinkProcessor
Parameters:
namespaceURI - The namespace of the element being ended.
lName - The local name of the element being ended.
qName - The QName of the element being ended.
attrs - The attributes of the element being ended.
Throws:
XLinkException
See Also:
XLinkProcessor.endElement(String, String, String, Attributes)

titleCharacters

public void titleCharacters(char[] buf,
                            int offset,
                            int len)
                     throws XLinkException
Description copied from interface: XLinkProcessor
Handles the character content for a title element

Specified by:
titleCharacters in interface XLinkProcessor
Throws:
XLinkException
See Also:
XLinkProcessor.titleCharacters(char[], int, int)

getXLinkHandler

public XLinkHandler getXLinkHandler()
Provides access to the XLink handler being used by the XLink processor.

Specified by:
getXLinkHandler in interface XLinkProcessor
Returns:
the XLink handler being used by the XLink processor.

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

Get Java XBRL API implementation at SourceForge.net.