XBRLAPI

A Java API for XBRL


org.xbrlapi.xlink
Interface XLinkProcessor

All Superinterfaces:
Serializable
All Known Implementing Classes:
XLinkProcessorImpl

public interface XLinkProcessor
extends Serializable

The XLink processor is responsible for taking the input from a SAX event and recognising any XLink events resulting from that SAX event and then passing the XLink event through to the chosen XLinkHandler. This makes the job of the XLink handler simplify down to one of Syntax recognition and XLink state tracking to ensure that only actual XLink are triggering XLink events. Note that the XLink specification is pretty persnicketty regarding nested XLink structures.

Author:
Geoffrey Shuetrim (geoff@galexy.net)

Field Summary
static Integer ARC
           
static Integer CUSTOM_LINK
           
static Integer EXTENDED_LINK
           
static Integer LOCATOR
           
static Integer NOT_XLINK
           
static Integer RESOURCE
           
static Integer SIMPLE_LINK
           
static Integer TITLE
           
 
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.
 XLinkHandler getXLinkHandler()
          Provides access to the XLink handler being used by the XLink processor.
 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
 

Field Detail

SIMPLE_LINK

static final Integer SIMPLE_LINK

EXTENDED_LINK

static final Integer EXTENDED_LINK

CUSTOM_LINK

static final Integer CUSTOM_LINK

RESOURCE

static final Integer RESOURCE

LOCATOR

static final Integer LOCATOR

ARC

static final Integer ARC

TITLE

static final Integer TITLE

NOT_XLINK

static final Integer NOT_XLINK
Method Detail

setCustomLinkRecogniser

void setCustomLinkRecogniser(CustomLinkRecogniser customLinkRecogniser)
Set the custom link recogniser

Parameters:
customLinkRecogniser - The class that indicates if a custom link has been recognised.

startElement

void startElement(String namespaceURI,
                  String lName,
                  String qName,
                  Attributes attrs)
                  throws XLinkException
Respond to the start of an element, examining the element for XLink features

Parameters:
namespaceURI -
lName -
qName -
attrs -
Throws:
XLinkException

endElement

void endElement(String namespaceURI,
                String lName,
                String qName,
                Attributes attrs)
                throws XLinkException
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.

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:
ElementState.ElementState(ElementState, Attributes)

titleCharacters

void titleCharacters(char[] buf,
                     int offset,
                     int len)
                     throws XLinkException
Handles the character content for a title element

Parameters:
buf -
offset -
len -
Throws:
XLinkException

getXLinkHandler

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

Returns:
the XLink handler being used by the XLink processor.

Get Java XBRL API implementation at SourceForge.net.