This appendix contains the complete Java [Java] bindings for the Level 3 Document Object Model Content Model and Load and Save.
The Java files are also available as http://www.w3.org/TR/2000/WD-DOM-Level-3-Content-Models-and-Load-Save-20001101/java-binding.zip
package org.w3c.dom.contentModel; public interface CMObject { }
package org.w3c.dom.contentModel; public interface CMExternalObject { }
package org.w3c.dom.contentModel; public interface CMNode { }
package org.w3c.dom.contentModel; public interface CMNodeList { }
package org.w3c.dom.contentModel; public interface NamedCMNodeMap { }
package org.w3c.dom.contentModel; public interface CMDataType { }
package org.w3c.dom.contentModel; public interface CMType { }
package org.w3c.dom.contentModel; public interface ElementDeclaration { public String getElementName(); public String getContentType(); public void setContentType(String contentType); public NamedCMNodeMap getAttributes(); public void setAttributes(NamedCMNodeMap attributes); }
package org.w3c.dom.contentModel; public interface CMElement { public String getListOperator(); public void setListOperator(String listOperator); public CMDataType getElementType(); public void setElementType(CMDataType elementType); public int getMultiplicity(); public void setMultiplicity(int multiplicity); public int getLowValue(); public void setLowValue(int lowValue); public int getHighValue(); public void setHighValue(int highValue); public NamedCMNodeMap getSubModels(); public void setSubModels(NamedCMNodeMap subModels); public CMNodeList getDefiningElement(); public void setDefiningElement(CMNodeList definingElement); }
package org.w3c.dom.contentModel; public interface AttributeDeclaration { public String getAttrName(); public CMDataType getAttrType(); public void setAttrType(CMDataType attrType); public String getDefaultValue(); public void setDefaultValue(String defaultValue); public String getEnumAttr(); public void setEnumAttr(String enumAttr); public CMNodeList getOwnerElement(); public void setOwnerElement(CMNodeList ownerElement); }
package org.w3c.dom.contentModel; public interface EntityDeclaration { }
package org.w3c.dom.contentModel; import org.w3c.dom.Document; public interface DocumentCM extends Document { public boolean isValid(); public int numCMs(); public CMObject getInternalCM(); public CMExternalObject getCMs(); public CMObject getActiveCM(); public void addCM(CMObject cm); public void removeCM(CMObject cm); public boolean activateCM(CMObject cm); public void setErrorHandler(ErrorHandler handler); }
package org.w3c.dom.contentModel; import org.w3c.dom.DomImplementation; public interface DomImplementationCM extends DomImplementation { public boolean validate(); public CMObject createCM(); public CMExternalObject createExternalCM(); public CMObject cloneCM(CMObject cm); public CMExternalObject cloneExternalCM(CMExternalObject cm); }
package org.w3c.dom.contentModel; import org.w3c.dom.DOMException2; public interface ErrorHandler { public void warning(DOMLocator where, String how, String why) throws DOMException2; public void fatalError(DOMLocator where, String how, String why) throws DOMException2; public void error(DOMLocator where, String how, String why) throws DOMException2; }
package org.w3c.dom.contentModel; import org.w3c.dom.Node; public interface DOMLocator { public int getColumnNumber(); public int getLineNumber(); public String getPublicID(); public String getSystemID(); public Node getNode(); }
package org.w3c.dom.contentModel; import org.w3c.dom.namedCMNodeMap; import org.w3c.dom.nsElement; public interface CMObject { public boolean getIsNamespaceAware(); public nsElement getCMNamespace(); public namedCMNodeMap getCMElements(); public boolean removeCMNode(CMNode node); public boolean insertbeforeCMNode(CMNode newnode, CMNode parentnode); }
package org.w3c.dom.contentModel; public interface CMNode { public CMType getCMNodeType(); }
package org.w3c.dom.contentModel; import org.w3c.dom.namedCMNodeMap; public interface ElementDeclaration { public int getContentType(); public CMElement getCMElement(); public namedCMNodeMap getCMAttributes(); public namedCMNodeMap getCMElementsChildren(); }
package org.w3c.dom.contentModel; public interface CMElement { public CMElement setCMElementCardinality(CMNode node, int high, int low); public CMElement getCMElementCardinality(CMNode node, int high, int low); }
package org.w3c.dom.contentModel; import org.w3c.dom.Node; import org.w3c.dom.DOMException; public interface NodeCM extends Node { public boolean canInsertBefore(Node newChild, Node refChild) throws DOMException; public boolean canRemoveChild(Node oldChild) throws DOMException; public boolean canReplaceChild(Node newChild, Node oldChild) throws DOMException; public boolean canAppendChild(Node newChild) throws DOMException; }
package org.w3c.dom.contentModel; import org.w3c.dom.Node; import org.w3c.dom.Element; public interface ElementCM extends Element { public boolean isValid(); public int contentType(); public boolean canSetAttribute(String attrname, String attrval); public boolean canSetAttributeNode(Node node); public boolean canSetAttributeNodeNS(Node node, String namespaceURI, String localName); public boolean canSetAttributeNS(String attrname, String attrval, String namespaceURI, String localName); }
package org.w3c.dom.contentModel; import org.w3c.dom.Text; import org.w3c.dom.DOMException; public interface CharacterDataCM extends Text { public boolean isWhitespaceOnly(); public boolean canSetData(int offset, String arg) throws DOMException; public boolean canAppendData(String arg) throws DOMException; public boolean canReplaceData(int offset, int count, String arg) throws DOMException; public boolean canInsertData(int offset, String arg) throws DOMException; public boolean canDeleteData(int offset, String arg) throws DOMException; }
package org.w3c.dom.contentModel; import org.w3c.dom.DocumentType; public interface DocumentTypeCM extends DocumentType { public boolean isElementDefined(String elemTypeName); public boolean isElementDefinedNS(String elemTypeName, String namespaceURI, String localName); public boolean isAttributeDefined(String elemTypeName, String attrName); public boolean isAttributeDefinedNS(String elemTypeName, String attrName, String namespaceURI, String localName); public boolean isEntityDefined(String entName); }
package org.w3c.dom.loadSave; public interface DOMImplementationLS { public DOMBuilder createDOMBuilder(); public DOMWriter createDOMWriter(); }
package org.w3c.dom.loadSave; import org.w3c.dom.DOMErrorHandler; import org.w3c.dom.Document; import org.w3c.dom.DOMSystemException; import org.w3c.dom.DOMException; public interface DOMBuilder { public DOMEntityResolver getEntityResolver(); public void setEntityResolver(DOMEntityResolver entityResolver); public DOMErrorHandler getErrorHandler(); public void setErrorHandler(DOMErrorHandler errorHandler); public DOMBuilderFilter getFilter(); public void setFilter(DOMBuilderFilter filter); public void setFeature(String name, boolean state) throws DOMException; public boolean supportsFeature(String name); public boolean canSetFeature(String name, boolean state); public boolean getFeature(String name) throws DOMException; public Document parseURI(String uri) throws DOMException, DOMSystemException; public Document parseDOMInputSource(DOMInputSource is) throws DOMException, DOMSystemException; }
package org.w3c.dom.loadSave; import org.w3c.dom.DOMString ; import org.w3c.dom.DOMReader; import org.w3c.dom.DOMInputStream; public interface DOMInputSource { public DOMInputStream getByteStream(); public void setByteStream(DOMInputStream byteStream); public DOMReader getCharacterStream(); public void setCharacterStream(DOMReader characterStream); public DOMString getEncoding(); public void setEncoding(DOMString encoding); public DOMString getPublicId(); public void setPublicId(DOMString publicId); public DOMString getSystemId(); public void setSystemId(DOMString systemId); }
package org.w3c.dom.loadSave; import org.w3c.dom.DOMSystemException; public interface DOMEntityResolver { public DOMInputSource resolveEntity(String publicId, String systemId ) throws DOMSystemException; }
package org.w3c.dom.loadSave; import org.w3c.dom.Element; public interface DOMBuilderFilter { public boolean endElement(Element element); }
package org.w3c.dom.loadSave; import org.w3c.dom.DOMOutputStream; import org.w3c.dom.Node; import org.w3c.dom.TreeWalker; import org.w3c.dom.DOMSystemException; public interface DOMWriter { public DOMFormatter getFormatter(); public void setFormatter(DOMFormatter formatter); public void writeNode(DOMOutputStream destination, Node node) throws DOMSystemException; public void writeTreeWalker(DOMOutputStream destination, TreeWalker tree) throws DOMSystemException; public void writeString(DOMOutputStream destination, String aString) throws DOMSystemException; }
package org.w3c.dom.loadSave; import org.w3c.dom.DOMOutputStream; import org.w3c.dom.Node; import org.w3c.dom.TreeWalker; import org.w3c.dom.DOMSystemException; public interface DOMFormatter { public String getEncoding(); public void setEncoding(String encoding); public String getLastEncoding(); public String getSubstituteChars(); public void setSubstituteChars(String substituteChars); public short getFormat(); public void setFormat(short format); public void formatNode(Node rootNode, DOMOutputStream destination) throws DOMSystemException; public void formatTreeWalker(TreeWalker tree, DOMOutputStream destination) throws DOMSystemException; }