This appendix contains the complete Java [Java] bindings for the Level 3 Document Object Model Abstract Schemas and Load and Save.
The Java files are also available as http://www.w3.org/TR/2001/WD-DOM-Level-3-ASLS-20010607/java-binding.zip
package org.w3c.dom.abstractSchemas; import org.w3c.dom.DOMException; public interface ASModel extends ASNode { public boolean getIsNamespaceAware(); public ASElementDeclaration getRootElementDecl(); public void setRootElementDecl(ASElementDeclaration rootElementDecl); public String getSystemId(); public void setSystemId(String systemId); public String getPublicId(); public void setPublicId(String publicId); public ASNodeList getASNodes(); public boolean removeNode(ASNode node); public boolean insertBefore(ASNode newNode, ASNode refNode); public boolean validate(); public ASElementDeclaration createASElementDeclaration(String namespaceURI, String qualifiedElementName) throws DOMException; public ASAttributeDeclaration createASAttributeDeclaration(String namespaceURI, String qualifiedName) throws DOMException; public ASNotationDeclaration createASNotationDeclaration(String namespaceURI, String qualifiedElementName, String systemIdentifier, String publicIdentifier) throws DOMException; public ASEntityDeclaration createASEntityDeclaration(String name) throws DOMException; public ASChildren createASChildren(int minOccurs, int maxOccurs, short operator) throws DOMException; }
package org.w3c.dom.abstractSchemas; public interface ASExternalModel extends ASModel { }
package org.w3c.dom.abstractSchemas; public interface ASNode { public static final short AS_ELEMENT_DECLARATION = 1; public static final short AS_ATTRIBUTE_DECLARATION = 2; public static final short AS_NOTATION_DECLARATION = 3; public static final short AS_ENTITY_DECLARATION = 4; public static final short AS_CHILDREN = 5; public static final short AS_MODEL = 6; public static final short AS_EXTERNALMODEL = 7; public short getCmNodeType(); public ASModel getOwnerASModel(); public void setOwnerASModel(ASModel ownerASModel); public String getNodeName(); public void setNodeName(String nodeName); public String getPrefix(); public void setPrefix(String prefix); public String getLocalName(); public void setLocalName(String localName); public String getNamespaceURI(); public void setNamespaceURI(String namespaceURI); public ASNode cloneASNode(); }
package org.w3c.dom.abstractSchemas; public interface ASNodeList { public int getLength(); public ASNode item(int index); }
package org.w3c.dom.abstractSchemas; public interface ASDOMStringList { public int getLength(); public String item(int index); }
package org.w3c.dom.abstractSchemas; import org.w3c.dom.DOMASException; public interface ASNamedNodeMap { public int getLength(); public ASNode getNamedItem(String name); public ASNode getNamedItemNS(String namespaceURI, String localName); public ASNode item(int index); public ASNode removeNamedItem(String name); public ASNode removeNamedItemNS(String namespaceURI, String localName); public ASNode setNamedItem(ASNode newASNode) throws DOMASException; public ASNode setNamedItemNS(ASNode newASNode) throws DOMASException; }
package org.w3c.dom.abstractSchemas; public interface ASDataType { public static final short STRING_DATATYPE = 1; public short getASPrimitiveType(); }
package org.w3c.dom.abstractSchemas; import org.w3c.dom.decimal; public interface ASPrimitiveType extends ASDataType { public static final short BOOLEAN_DATATYPE = 2; public static final short FLOAT_DATATYPE = 3; public static final short DOUBLE_DATATYPE = 4; public static final short DECIMAL_DATATYPE = 5; public static final short HEXBINARY_DATATYPE = 6; public static final short BASE64BINARY_DATATYPE = 7; public static final short ANYURI_DATATYPE = 8; public static final short QNAME_DATATYPE = 9; public static final short DURATION_DATATYPE = 10; public static final short DATETIME_DATATYPE = 11; public static final short DATE_DATATYPE = 12; public static final short TIME_DATATYPE = 13; public static final short YEARMONTH_DATATYPE = 14; public static final short YEAR_DATATYPE = 15; public static final short MONTHDAY_DATATYPE = 16; public static final short DAY_DATATYPE = 17; public static final short MONTH_DATATYPE = 18; public static final short NOTATION_DATATYPE = 19; public decimal getLowValue(); public void setLowValue(decimal lowValue); public decimal getHighValue(); public void setHighValue(decimal highValue); }
package org.w3c.dom.abstractSchemas; import org.w3c.dom.DOMASException; public interface ASElementDeclaration extends ASNode { public static final short EMPTY_CONTENTTYPE = 1; public static final short ANY_CONTENTTYPE = 2; public static final short MIXED_CONTENTTYPE = 3; public static final short ELEMENTS_CONTENTTYPE = 4; public boolean getStrictMixedContent(); public void setStrictMixedContent(boolean strictMixedContent); public ASDataType getElementType(); public void setElementType(ASDataType elementType); public boolean getIsPCDataOnly(); public void setIsPCDataOnly(boolean isPCDataOnly); public short getContentType(); public void setContentType(short contentType); public String getTagName(); public void setTagName(String tagName); public ASChildren getASChildren(); public void setASChildren(ASChildren elementContent) throws DOMASException; public ASNamedNodeMap getASAttributeDecls(); public void setASAttributeDecls(ASNamedNodeMap attributes); public void addASAttributeDecl(ASAttributeDeclaration attributeDecl); public ASAttributeDeclaration removeASAttributeDecl(ASAttributeDeclaration attributeDecl); }
package org.w3c.dom.abstractSchemas; public interface ASChildren extends ASNode { public static final int UNBOUNDED = MAX_LONG; public static final short NONE = 0; public static final short SEQUENCE = 1; public static final short CHOICE = 2; public short getListOperator(); public void setListOperator(short listOperator); public int getMinOccurs(); public void setMinOccurs(int minOccurs); public int getMaxOccurs(); public void setMaxOccurs(int maxOccurs); public ASNodeList getSubModels(); public void setSubModels(ASNodeList subModels); public ASNode removeASNode(int nodeIndex); public int insertASNode(int nodeIndex, ASNode newNode); public int appendASNode(ASNode newNode); }
package org.w3c.dom.abstractSchemas; public interface ASAttributeDeclaration extends ASNode { public static final short NO_VALUE_CONSTRAINT = 0; public static final short DEFAULT_VALUE_CONSTRAINT = 1; public static final short FIXED_VALUE_CONSTRAINT = 2; public String getAttrName(); public void setAttrName(String attrName); public ASDataType getAttrType(); public void setAttrType(ASDataType attrType); public String getAttributeValue(); public void setAttributeValue(String attributeValue); public String getEnumAttr(); public void setEnumAttr(String enumAttr); public ASNodeList getOwnerElement(); public void setOwnerElement(ASNodeList ownerElement); public short getConstraintType(); public void setConstraintType(short constraintType); }
package org.w3c.dom.abstractSchemas; public interface ASEntityDeclaration extends ASNode { public static final short INTERNAL_ENTITY = 1; public static final short EXTERNAL_ENTITY = 2; public short getEntityType(); public void setEntityType(short entityType); public String getEntityName(); public void setEntityName(String entityName); public String getEntityValue(); public void setEntityValue(String entityValue); public String getSystemId(); public void setSystemId(String systemId); public String getPublicId(); public void setPublicId(String publicId); public String getNotationName(); public void setNotationName(String notationName); }
package org.w3c.dom.abstractSchemas; public interface ASNotationDeclaration extends ASNode { public String getNotationName(); public void setNotationName(String notationName); public String getSystemId(); public void setSystemId(String systemId); public String getPublicId(); public void setPublicId(String publicId); }
package org.w3c.dom.abstractSchemas; public interface Document { public void setErrorHandler(DOMErrorHandler handler); }
package org.w3c.dom.abstractSchemas; public interface DocumentAS extends Document { public boolean getContinuousValidityChecking(); public void setContinuousValidityChecking(boolean continuousValidityChecking); public int numASs(); public ASModel getInternalAS(); public ASNodeList getASs(); public ASModel getActiveAS(); public void addAS(ASModel cm); public void removeAS(ASModel cm); public boolean activateAS(ASModel cm); }
package org.w3c.dom.abstractSchemas; import org.w3c.dom.DOMImplementation; public interface DOMImplementationAS extends DOMImplementation { public ASModel createAS(); public ASExternalModel createExternalAS(); }
package org.w3c.dom.abstractSchemas; import org.w3c.dom.Node; import org.w3c.dom.DOMException; public interface NodeAS extends Node { public static final short WF_CHECK = 1; public static final short NS_WF_CHECK = 2; public static final short PARTIAL_VALIDITY_CHECK = 3; public static final short STRICT_VALIDITY_CHECK = 4; public short getWfValidityCheckLevel(); public void setWfValidityCheckLevel(short wfValidityCheckLevel); 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; public boolean isValid(boolean deep) throws DOMException; }
package org.w3c.dom.abstractSchemas; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.DOMException; public interface ElementAS extends Element { public short contentType(); public ASElementDeclaration getElementDeclaration() throws DOMException; public boolean canSetAttribute(String attrname, String attrval); public boolean canSetAttributeNode(Node node); public boolean canSetAttributeNodeNS(Node node); public boolean canSetAttributeNS(String attrname, String attrval, String namespaceURI, String localName); public boolean canRemoveAttribute(String attrname); public boolean canRemoveAttributeNS(String attrname, String namespaceURI); public boolean canRemoveAttributeNode(Node node); public ASDOMStringList getChildElements(); public ASDOMStringList getParentElements(); public ASDOMStringList getAttributeList(); }
package org.w3c.dom.abstractSchemas; import org.w3c.dom.DOMException; import org.w3c.dom.CharacterData; public interface CharacterDataAS extends CharacterData { 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.abstractSchemas; import org.w3c.dom.DocumentType; public interface DocumentTypeAS extends DocumentType { public ASDOMStringList getDefinedElementTypes(); 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.abstractSchemas; import org.w3c.dom.DOMException; import org.w3c.dom.Attr; public interface AttributeAS extends Attr { public ASAttributeDeclaration getAttributeDeclaration(); public ASNotationDeclaration getNotation() throws DOMException; }
package org.w3c.dom.abstractSchemas; import org.w3c.dom.DOMSystemException; public interface DOMErrorHandler { public void warning(DOMLocator where, String how, String why) throws DOMSystemException; public void fatalError(DOMLocator where, String how, String why) throws DOMSystemException; public void error(DOMLocator where, String how, String why) throws DOMSystemException; }
package org.w3c.dom.abstractSchemas; 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.loadSave; public interface DOMImplementationLS { public DOMBuilder createDOMBuilder(); public DOMWriter createDOMWriter(); }
package org.w3c.dom.loadSave; import org.w3c.dom.CMModel; import org.w3c.dom.DOMSystemException; import org.w3c.dom.DOMException; public interface DOMCMBuilder extends DOMBuilder { public CMModel parseCMURI(String uri) throws DOMException, DOMSystemException; public CMModel parseCMInputSource(DOMInputSource is) throws DOMException, DOMSystemException; }
package org.w3c.dom.loadSave; import org.w3c.dom.Document; import org.w3c.dom.DOMSystemException; import org.w3c.dom.DOMException; import org.w3c.dom.DOMErrorHandler; 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 boolean getMimeTypeCheck(); public void setMimeTypeCheck(boolean mimeTypeCheck); 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; public interface DOMInputSource { public java.io.InputStream getByteStream(); public void setByteStream(java.io.InputStream byteStream); public java.io.Reader getCharacterStream(); public void setCharacterStream(java.io.Reader characterStream); public String getEncoding(); public void setEncoding(String encoding); public String getPublicId(); public void setPublicId(String publicId); public String getSystemId(); public void setSystemId(String 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 startElement(Element element); public boolean endElement(Element element); }
package org.w3c.dom.loadSave; import org.w3c.dom.Node; import org.w3c.dom.DOMSystemException; public interface DOMWriter { public String getEncoding(); public void setEncoding(String encoding); public String getLastEncoding(); public short getFormat(); public void setFormat(short format); public String getNewLine(); public void setNewLine(String newLine); public void writeNode(java.io.OutputStream destination, Node node) throws DOMSystemException; }
package org.w3c.dom.loadSave; import org.w3c.dom.CMModel; import org.w3c.dom.DOMSystemException; public interface DOMCMWriter extends DOMWriter { public void writeCMModel(java.io.OutputStream destination, CMModel model) throws DOMSystemException; }
package org.w3c.dom.loadSave; import org.w3c.dom.Node; import org.w3c.dom.DOMException; public interface DocumentLS { public boolean getAsync(); public void setAsync(boolean async); public void abort(); public boolean load(String url); public boolean loadXML(String source); public String saveXML(Node node) throws DOMException; }
package org.w3c.dom.loadSave; public interface ParserErrorEvent { public int getErrorCode(); public int getFilepos(); public int getLine(); public int getLinepos(); public String getReason(); public String getSrcText(); public String getUrl(); }