|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface AbstractBase
The base class for all elementObjects in the Schema
Any element may have attributes:titleiddictRefconventionand convenience get/set methods are provided for all, through the interfaces AttributeTitle, AttributeId and AttributeConvention.An element (FOO) subclassed from a AbstractBase may be constructed in the following ways:FOO(). Creates a new empty element with null values of the attributes. Required for newInstance(), but use carefully since it has no tagName and no document associated with it.FOO(String tagName, Document document). Creates an empty element with null attribute names.FOO(org.w3c.dom.Element element). Creates a subclassed Element with the same attribute values as the input Element. Used when a DOM has been created with non-aware software. The routine makeAndProcessSubclass(Element element) will replace the current Element with the appropriate subclass.
| Field Summary | |
|---|---|
static java.lang.String |
CML1
output CML variants |
static java.lang.String |
CML2
|
static java.lang.String |
CMLCDK
|
static java.lang.String[] |
CONTENT_MODEL
|
static java.lang.String |
CONVENTION
|
static java.lang.String |
DICTREF
|
static int |
FLOAT_TYPE
|
static java.lang.String |
ID
|
static int |
INTEGER_TYPE
|
static java.lang.String |
NAMESPACE_URI
|
static java.lang.String |
PACKAGE_NAME
|
static java.lang.String |
REF
|
static int |
STRING_TYPE
|
static java.lang.String |
TITLE
|
static int |
UNKNOWN
|
| Fields inherited from interface org.w3c.dom.Node |
|---|
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
| Fields inherited from interface org.jscience.ml.cml.CMLNode |
|---|
ARRAY |
| Method Summary | |
|---|---|
void |
characters(SaxHandler saxHandler,
java.lang.String content)
SAX2 parsing routine called from characters() callback NOT namespace aware |
AbstractBase |
deepCopy()
deep clones an element including subclassing uses intermediate XML serialization object is owned by a new document |
AbstractBase |
deepCopy(AbstractCMLDocument document)
deep clones an element including subclassing uses intermediate XML serialization object is owned by document |
void |
endElement(SaxHandler saxHandler)
SAX2 parsing routine called from endElement() callback NOT namespace aware |
java.lang.String |
getAttribute(java.lang.String attName)
gets attribute, changing data type if required |
AbstractCMLDocument |
getCMLDocument()
get owner document as CMLDocument. |
java.lang.String |
getContentValue()
gets text content from an element should only be used for text-only or mixed content. |
boolean |
getDebug()
debug status |
org.w3c.dom.Element |
getOrCreateChild(java.lang.String elemName)
get a child of a given name If it doesn't exist, create and add it |
BaseTool |
getOrCreateTool()
get or create tool. |
BaseTool |
getTool()
get tool. |
void |
removeTextChildren()
removes whitespace nodes or throws any Exception for non-whitespace ones |
void |
setAttribute(java.lang.String attName,
java.lang.String attVal)
sets attribute, changing data type if required |
void |
setContentValue(java.lang.String value)
adds text content to an element should only be used for text-only or mixed content. |
void |
setDebug(boolean d)
toggle debugging |
void |
setTextChild(java.lang.String value)
addStringContent to Element if no Text child, creates one if Text child, resets value if existing non-Text children, no action |
void |
setTool(BaseTool tool)
set tool sets the tool. |
void |
startElement(SaxHandler saxHandler,
org.xml.sax.Attributes attributes)
SAX2 parsing routine called from startElement() callback NOT namespace aware |
void |
updateDelegateAttributes()
update delegate attributes. |
void |
updateDelegateContent()
update delegate content. |
void |
updateDelegates()
update delegates. |
void |
updateDOM()
update DOM. |
void |
updateDOMAttributes()
update DOM attributes. |
void |
updateDOMContent()
update DOM content. |
void |
writeXML(java.io.Writer w)
write XML use current control (version and syntax) |
| Methods inherited from interface org.w3c.dom.Element |
|---|
getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS |
| Methods inherited from interface org.w3c.dom.Node |
|---|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
| Methods inherited from interface org.jscience.ml.cml.CMLNode |
|---|
setArraySyntax, setVersion, writeXML |
| Field Detail |
|---|
static final java.lang.String NAMESPACE_URI
static final java.lang.String PACKAGE_NAME
static final java.lang.String[] CONTENT_MODEL
static final int UNKNOWN
static final int STRING_TYPE
static final int FLOAT_TYPE
static final int INTEGER_TYPE
static final java.lang.String CONVENTION
static final java.lang.String DICTREF
static final java.lang.String ID
static final java.lang.String REF
static final java.lang.String TITLE
static final java.lang.String CML1
static final java.lang.String CML2
static final java.lang.String CMLCDK
| Method Detail |
|---|
void setAttribute(java.lang.String attName,
java.lang.String attVal)
setAttribute in interface org.w3c.dom.ElementattName - attVal - java.lang.String getAttribute(java.lang.String attName)
getAttribute in interface org.w3c.dom.ElementattName -
void removeTextChildren()
throws CMLException
CMLException - non-whitespace Text node
org.w3c.dom.Element getOrCreateChild(java.lang.String elemName)
throws CMLException
elemName - the elementName to get/create (identified by elementName not class)
CMLException - element cannot be added (violates content model)
void characters(SaxHandler saxHandler,
java.lang.String content)
throws CMLException
saxHandler - SaxHandlercontent - throws exception (probably application specific)
CMLException
void endElement(SaxHandler saxHandler)
throws CMLException
saxHandler - Saxhandler
throws exception (probably application specific)
CMLException
void startElement(SaxHandler saxHandler,
org.xml.sax.Attributes attributes)
throws CMLException
saxHandler - Saxhandlerattributes - the attribute list
throws exception (probably application specific)
CMLExceptionvoid setContentValue(java.lang.String value)
value - the content
CMLException - thrown by subclassesjava.lang.String getContentValue()
CMLException - thrown by subclassesAbstractBase deepCopy()
AbstractBase deepCopy(AbstractCMLDocument document)
document - ownerDocument
void writeXML(java.io.Writer w)
throws CMLException,
java.io.IOException
writeXML in interface CMLNodew - - output
CMLException
java.io.IOExceptionAbstractCMLDocument getCMLDocument()
BaseTool getTool()
BaseTool getOrCreateTool()
void setTool(BaseTool tool)
tool - void setDebug(boolean d)
d - debugboolean getDebug()
void setTextChild(java.lang.String value)
value - to addvoid updateDelegates()
void updateDOM()
void updateDelegateContent()
void updateDelegateAttributes()
void updateDOMContent()
void updateDOMAttributes()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||