public class BaseIdentifier extends java.lang.Object implements Identifier
Constructor and Description |
---|
BaseIdentifier(ContentHandler contentHandler) |
Modifier and Type | Method and Description |
---|---|
void |
endElement(java.lang.String namespaceURI,
java.lang.String lName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
Updates the state of the fragment identifier
when the end of an element is parsed.
|
ContentHandler |
getContentHandler() |
ElementState |
getElementState() |
Loader |
getLoader() |
void |
processFragment(Fragment fragment,
org.xml.sax.Attributes attrs)
Performs the following operations on the fragment:
Sets its fragment index
Determines if the fragment as an ID attribute and if so, appends
an ID ( @see org.xbrlapi.Fragment#appendID(String) ) and
sets the ID in the element state.
Adds the fragment ( @see org.xbrlapi.loader.Loader#add(org.xbrlapi.Fragment,org.xbrlapi.xlink.ElementState) )
Override this base implementation if an ID of the fragment root element can be
expressed by an attribute other than "id".
|
void |
setContentHandler(ContentHandler contentHandler) |
void |
startElement(java.lang.String namespaceURI,
java.lang.String lName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
Determines if the element starts a new fragment and if so:
creates the fragment
sets the fragment index
stores any ID attributes on the fragment root in the fragment metadata
and in the element state object
adds the fragment to the loader
|
public BaseIdentifier(ContentHandler contentHandler) throws XBRLException
contentHandler
- The content handler using this fragment identifier.XBRLException
- if the XLink processor is null.public ContentHandler getContentHandler()
getContentHandler
in interface Identifier
Identifier.getContentHandler()
public void setContentHandler(ContentHandler contentHandler) throws XBRLException
setContentHandler
in interface Identifier
contentHandler
- The content handler using the fragment identifier.XBRLException
- if the content handler is null.Identifier.setContentHandler(ContentHandler)
public Loader getLoader()
getLoader
in interface Identifier
Identifier.getLoader()
public ElementState getElementState()
getElementState
in interface Identifier
Identifier.getElementState()
public void startElement(java.lang.String namespaceURI, java.lang.String lName, java.lang.String qName, org.xml.sax.Attributes attrs) throws XBRLException
Identifier
startElement
in interface Identifier
namespaceURI
- the namespace of the elementlName
- the local name of the elementqName
- the qname of the elementattrs
- the attributes of the elementXBRLException
Identifier.startElement(String, String, String, Attributes)
public void endElement(java.lang.String namespaceURI, java.lang.String lName, java.lang.String qName, org.xml.sax.Attributes attrs) throws XBRLException
Identifier
endElement
in interface Identifier
namespaceURI
- the namespace of the elementlName
- the local name of the elementqName
- the qname of the elementattrs
- the attributes of the elementXBRLException
Identifier.endElement(String, String, String, Attributes)
public void processFragment(Fragment fragment, org.xml.sax.Attributes attrs) throws XBRLException
processFragment
in interface Identifier
fragment
- The fragment that has been identified.attrs
- The attributes of the root element of the fragment.XBRLException
Identifier.processFragment(Fragment, Attributes)