|
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.builder.BuilderImpl
public class BuilderImpl
Class defining the SAX event handlers that enable a fragment to be built up during DTS discovery. This should only be instantiated during the creation of a fragment subclass. The builder is responsible for construction of the XML constituting the fragment itself and the XML that contains the metadata about the fragment and its relationship to other fragments.
| Constructor Summary | |
|---|---|
BuilderImpl()
Create the builder making sure that the static DOM is instantiated and creating the metadata root element. |
|
BuilderImpl(Document dom)
Create the builder controlling which XML DOM is being used. |
|
| Method Summary | |
|---|---|
void |
appendAttributeDecl(String eName,
String aName,
String type,
String valueDefault,
String value)
Append an attribute DTD declaration |
void |
appendComment(String text)
Append a comment node. |
void |
appendElement(URI namespaceURI,
String lName,
String qName)
Insert a new element without attributes. |
void |
appendElement(URI namespaceURI,
String lName,
String qName,
Attributes attrs)
Append an element node. |
void |
appendElementDecl(String name,
String model)
Append an element DTD declaration. |
void |
appendExternalEntityDecl(String name,
String publicId,
String systemId)
Append an external entity DTD declarations. |
void |
appendInternalEntityDecl(String name,
String value)
Append an internal entity DTD declaration. |
void |
appendMetadataElement(String eName,
Map<String,String> attributes)
Appends a child element to the root metadata element. |
void |
appendNotationDecl(String name,
String publicId,
String systemId)
Append a notation declaration. |
void |
appendProcessingInstruction(String target,
String data)
Append a processing instruction node |
void |
appendText(String text)
Append a text node. |
void |
appendUnparsedEntityDecl(String name,
String publicId,
String systemId,
String notationName)
Append an unparsed entity declaration. |
void |
close()
Restores the builder to its pre-use state. |
void |
endElement(String namespaceURI,
String lName,
String qName)
Update the insertion point for new content when reaching the end of an element. |
Element |
getData()
Get the Document object used to build the fragment. |
Element |
getInsertionPoint()
Get the insertion point for new data content. |
String |
getMetaAttribute(String name)
Get a metadata attribute. |
Element |
getMetadata()
Get the metadata DOM document. |
boolean |
hasMetaAttribute(String name)
|
boolean |
isNewFragment()
Returns true iff the builder has not yet added an element to the fragment. |
void |
removeMetaAttribute(String name)
Remove a metadata attribute. |
void |
removeMetadataElement(String eName,
HashMap<String,String> attributes)
Removes a child element from the metadata root element by specifying the name of the child and the value of the element's text content and/or the value of a named attribute. |
void |
setMetaAttribute(String name,
String value)
Set a metadata attribute. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BuilderImpl(Document dom)
throws XBRLException
dom - The DOM to use in the builder.
XBRLException - if the DOM is null.
public BuilderImpl()
throws XBRLException
XBRLException - if the DOM Builder cannot be instantiated.| Method Detail |
|---|
public void close()
public Element getData()
throws XBRLException
Builder
getData in interface BuilderXBRLException - if the data has not been built yet.Builder.getData()public Element getMetadata()
getMetadata in interface Builderpublic boolean isNewFragment()
Builder
isNewFragment in interface Builderpublic Element getInsertionPoint()
getInsertionPoint in interface Builder
public void appendText(String text)
throws XBRLException
appendText in interface Buildertext - The node to be appended.
XBRLException - if the node cannot be appended.
public void appendProcessingInstruction(String target,
String data)
throws XBRLException
appendProcessingInstruction in interface Buildertarget - The processing target application identifier.data - The data defining what is to be done.
XBRLException - if the node cannot be appended.
public void appendComment(String text)
throws XBRLException
appendComment in interface Buildertext - The data constituting the content of the comment.
XBRLException - if the node cannot be appended.
public void appendElement(URI namespaceURI,
String lName,
String qName,
Attributes attrs)
throws XBRLException
appendElement in interface BuildernamespaceURI - The namespace of the element found by the SAX parser.lName - The local name of the element found by the SAX parser.qName - The QName of the element found by the SAX parser.attrs - The set of attributes found by the SAX parser.
XBRLException - if the node cannot be appended.
public void appendElement(URI namespaceURI,
String lName,
String qName)
throws XBRLException
appendElement in interface BuildernamespaceURI - The namespace of the element found by the SAX parser.lName - The local name of the element found by the SAX parser.qName - The QName of the element found by the SAX parser.
XBRLException - if the node cannot be appended.
public void endElement(String namespaceURI,
String lName,
String qName)
throws XBRLException
Builder
endElement in interface BuildernamespaceURI - The namespace URI of the element that is ending.lName - The local name of the element that is ending.qName - The QName of the element that is ending.
XBRLException - if the current insertion point is not an
element node or if the new (parent) insertion point is not an element node.Builder.endElement(String, String, String)
public void appendNotationDecl(String name,
String publicId,
String systemId)
throws XBRLException
appendNotationDecl in interface BuilderXBRLException
public void appendUnparsedEntityDecl(String name,
String publicId,
String systemId,
String notationName)
throws XBRLException
appendUnparsedEntityDecl in interface BuilderXBRLException
public void appendElementDecl(String name,
String model)
throws XBRLException
appendElementDecl in interface BuilderXBRLException
public void appendInternalEntityDecl(String name,
String value)
throws XBRLException
appendInternalEntityDecl in interface BuilderXBRLException
public void appendExternalEntityDecl(String name,
String publicId,
String systemId)
throws XBRLException
appendExternalEntityDecl in interface BuilderXBRLException
public void appendAttributeDecl(String eName,
String aName,
String type,
String valueDefault,
String value)
throws XBRLException
appendAttributeDecl in interface BuilderXBRLException
public void setMetaAttribute(String name,
String value)
setMetaAttribute in interface Buildername - The name of the attribute.value - The value of the attribute.public String getMetaAttribute(String name)
Builder
getMetaAttribute in interface Buildername - The name of the attribute.
Builder.getMetaAttribute(String)public boolean hasMetaAttribute(String name)
hasMetaAttribute in interface Buildername - The name of the attribute.
Builder.hasMetaAttribute(String)public void removeMetaAttribute(String name)
removeMetaAttribute in interface Buildername - The name of the attribute.
public void appendMetadataElement(String eName,
Map<String,String> attributes)
throws XBRLException
appendMetadataElement in interface BuildereName - Name of the element to be added (no namespaces are used).attributes - A map from attribute name keys to attribute values.
XBRLException - if the metadata element cannot be appended.
public void removeMetadataElement(String eName,
HashMap<String,String> attributes)
throws XBRLException
removeMetadataElement in interface BuildereName - Name of the element to be added (no namespaces are used).attributes - A hashmap from attribute name keys to attribute values.
XBRLException - if the metadata element cannot be removed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||