XBRLAPI

A Java API for XBRL


org.xbrlapi.sax.identifiers
Class SchemaIdentifier

java.lang.Object
  extended by org.xbrlapi.sax.identifiers.BaseIdentifier
      extended by org.xbrlapi.sax.identifiers.SchemaIdentifier
All Implemented Interfaces:
Identifier
Direct Known Subclasses:
SchemaIdentifier

public class SchemaIdentifier
extends BaseIdentifier
implements Identifier

Identifies XML Schema fragments.

Author:
Geoffrey Shuetrim (geoff@galexy.net)

Field Summary
 
Fields inherited from class org.xbrlapi.sax.identifiers.BaseIdentifier
logger
 
Constructor Summary
SchemaIdentifier(ContentHandler contentHandler)
           
 
Method Summary
protected  org.apache.xerces.xs.XSModel constructXSModel()
          (Commented out!) Modified on 13 February, 2007 by Howard Ungar to use the static grammar pool provided by the GrammarCache implementation.
 void endElement(String namespaceURI, String lName, String qName, Attributes attrs)
          The implementation assumes that XML schemas do not nest XML schemas.
protected  String getTargetNamespace()
           
protected  org.apache.xerces.xs.XSModel getXSModel()
           
protected  void setTargetNamespace(String targetNamespace)
           
protected  void setXSModel(org.apache.xerces.xs.XSModel model)
           
 void startElement(String namespaceURI, String lName, String qName, Attributes attrs)
          Find fragments with root elements in the XML Schema namespace.
 
Methods inherited from class org.xbrlapi.sax.identifiers.BaseIdentifier
getContentHandler, getElementState, getLoader, processFragment, setContentHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xbrlapi.sax.identifiers.Identifier
getContentHandler, getElementState, getLoader, processFragment, setContentHandler
 

Constructor Detail

SchemaIdentifier

public SchemaIdentifier(ContentHandler contentHandler)
                 throws XBRLException
Throws:
XBRLException
See Also:
BaseIdentifier.BaseIdentifier(ContentHandler)
Method Detail

startElement

public void startElement(String namespaceURI,
                         String lName,
                         String qName,
                         Attributes attrs)
                  throws XBRLException
Find fragments with root elements in the XML Schema namespace.

Specified by:
startElement in interface Identifier
Overrides:
startElement in class BaseIdentifier
Parameters:
namespaceURI - the namespace of the element
lName - the local name of the element
qName - the qname of the element
attrs - the attributes of the element
Throws:
XBRLException
See Also:
BaseIdentifier.startElement(String,String,String,Attributes)

endElement

public void endElement(String namespaceURI,
                       String lName,
                       String qName,
                       Attributes attrs)
                throws XBRLException
The implementation assumes that XML schemas do not nest XML schemas. Set the target namespace to null once the schema element is ended.

Specified by:
endElement in interface Identifier
Overrides:
endElement in class BaseIdentifier
Parameters:
namespaceURI - the namespace of the element
lName - the local name of the element
qName - the qname of the element
attrs - the attributes of the element
Throws:
XBRLException
See Also:
Identifier.endElement(String, String, String, Attributes)

getXSModel

protected org.apache.xerces.xs.XSModel getXSModel()
Returns:
the XML Schema grammar model.

setXSModel

protected void setXSModel(org.apache.xerces.xs.XSModel model)
                   throws XBRLException
Parameters:
model - The XML Schema grammar model.
Throws:
XBRLException - if the model is null.

getTargetNamespace

protected String getTargetNamespace()
Returns:
the target namespace.

setTargetNamespace

protected void setTargetNamespace(String targetNamespace)
Parameters:
targetNamespace - The target namespace of the schema.

constructXSModel

protected org.apache.xerces.xs.XSModel constructXSModel()
                                                 throws XBRLException
(Commented out!) Modified on 13 February, 2007 by Howard Ungar to use the static grammar pool provided by the GrammarCache implementation. TODO Determine why a static grammar pool is needed to use included anonymous schemas.

Returns:
the XML Schema grammar model for the XML Schema being parsed.
Throws:
XBRLException

Get Java XBRL API implementation at SourceForge.net.