|
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.impl.XMLImpl
public class XMLImpl
| Field Summary | |
|---|---|
protected static org.apache.log4j.Logger |
logger
|
| Constructor Summary | |
|---|---|
XMLImpl()
|
|
| Method Summary | |
|---|---|
void |
appendMetadataElement(String eName,
Map<String,String> attributes)
Appends a child element to the root metadata element. |
int |
compareTo(XML other)
Comparison is based upon the fragment index. |
boolean |
equals(Object obj)
Override the Object equals method to base equality on the fragment index. |
protected void |
finalize()
|
Builder |
getBuilder()
Get the fragment builder. |
Document |
getDocumentNode()
Get the XML DOM Document for the fragment data. |
String |
getIndex()
Get the index of the XML resource. |
String |
getMetaAttribute(String name)
Get a fragment metadata attribute. |
Element |
getMetadataRootElement()
Get the root element of the fragment metadata. |
Store |
getStore()
Get the data store that manages this fragment. |
String |
getType()
Get the Fragment type. |
int |
hashCode()
Override the Object hashCode method to provide for equality comparisons that are based on the fragment index. |
boolean |
hasMetaAttribute(String name)
|
boolean |
isa(Class<?> targetClass)
|
boolean |
isa(String type)
|
void |
removeMetaAttribute(String name)
Removes 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. |
String |
serialize()
|
void |
serialize(File file)
Serializes the XML to the specified file. |
void |
serialize(OutputStream outputStream)
Serializes the XML to the specified output stream. |
void |
setBuilder(Builder builder)
Set the builder that constructs the fragment XML during parsing. |
void |
setIndex(String index)
Set the fragment index. |
void |
setMetaAttribute(String name,
String value)
Set a fragment metadata attribute. |
void |
setResource(Element rootElement)
Closes down the fragment builder and sets the data and metadata resources for the fragment. |
void |
setStore(Store store)
Set the data store that manages this fragment. |
void |
updateInStore()
Updates the data store to reflect the current state of this XML object. |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger logger
| Constructor Detail |
|---|
public XMLImpl()
| Method Detail |
|---|
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
public boolean isa(String type)
throws XBRLException
isa in interface XMLtype - The specified fragment type to test against.
XBRLExceptionXML.isa(String)
public boolean isa(Class<?> targetClass)
throws XBRLException
isa in interface XMLtargetClass - The specified XML resource subclass to test against.
XBRLExceptionXML.isa(Class)public int hashCode()
XML
hashCode in interface XMLhashCode in class ObjectObject.hashCode()public boolean equals(Object obj)
XML
equals in interface XMLequals in class ObjectObject.equals(java.lang.Object)
public int compareTo(XML other)
throws ClassCastException
compareTo in interface Comparable<XML>ClassCastExceptionComparable.compareTo(Object o)
public void setResource(Element rootElement)
throws XBRLException
XML
setResource in interface XMLrootElement - The fragment data.
XBRLException - If the builder cannot be shut down or if the
resource cannot be set or is null.XML.setResource(Element)public Document getDocumentNode()
XML
getDocumentNode in interface XMLXML.getDocumentNode()
public void setStore(Store store)
throws XBRLException
XML
setStore in interface XMLstore - The data store.
XBRLException - if the data store has already been set.XML.setStore(Store)public void setBuilder(Builder builder)
XML
setBuilder in interface XMLbuilder - The builder object used to construct the fragment XML.XML.setBuilder(Builder)public Store getStore()
XML
getStore in interface XMLXML.getStore()public Builder getBuilder()
XML
getBuilder in interface XMLXML.getBuilder()public Element getMetadataRootElement()
XML
getMetadataRootElement in interface XMLXML.getMetadataRootElement()public String getIndex()
XML
getIndex in interface XMLXML.getIndex()
public void setIndex(String index)
throws XBRLException
XML
setIndex in interface XMLXBRLExceptionXML.setIndex(String)public String getType()
XML
getType in interface XMLXML.getType()
public void setMetaAttribute(String name,
String value)
throws XBRLException
XML
setMetaAttribute in interface XMLname - the name of the attributevalue - the value to give to the metadata attribute
XBRLExceptionXML.setMetaAttribute(String, String)
public void removeMetaAttribute(String name)
throws XBRLException
XML
removeMetaAttribute in interface XMLname - The name of the attribute to remove
XBRLExceptionXML.removeMetaAttribute(String)public String getMetaAttribute(String name)
XML
getMetaAttribute in interface XMLname - the name of the attribute.
XML.getMetaAttribute(String)public boolean hasMetaAttribute(String name)
hasMetaAttribute in interface XMLname - the name of the attribute.
XML.getMetaAttribute(String)
public void appendMetadataElement(String eName,
Map<String,String> attributes)
throws XBRLException
XML
appendMetadataElement in interface XMLeName - Name of the element to be added (no namespaces are used).attributes - A map from attribute name keys to attribute values.
XBRLExceptionXML.appendMetadataElement(String, Map)
public void removeMetadataElement(String eName,
HashMap<String,String> attributes)
throws XBRLException
XML
removeMetadataElement in interface XMLeName - Name of the element to be added (no namespaces are used).attributes - A hashmap from attribute name keys to attribute values.
XBRLException - If no deletion happens.XML.removeMetadataElement(String, HashMap)
public void serialize(File file)
throws XBRLException
XML
serialize in interface XMLfile - The specified output file.
XBRLExceptionXML.serialize(File)
public void serialize(OutputStream outputStream)
throws XBRLException
XML
serialize in interface XMLoutputStream - The specified output stream.
XBRLExceptionXML.serialize(OutputStream)
public String serialize()
throws XBRLException
serialize in interface XMLXBRLExceptionXML.serialize()
public void updateInStore()
throws XBRLException
XML
updateInStore in interface XMLXBRLExceptionXML.updateInStore()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||