This appendix contains the complete Java [Java] bindings for the Level 3 Document Object Model Validation.
The Java files are also available as http://www.w3.org/TR/2004/REC-DOM-Level-3-Val-20040127/java-binding.zip
package org.w3c.dom.validation;
public class ExceptionVAL extends RuntimeException {
public ExceptionVAL(short code, String message) {
super(message);
this.code = code;
}
public short code;
// ExceptionVALCode
public static final short NO_SCHEMA_AVAILABLE_ERR = 71;
}
package org.w3c.dom.validation;
import org.w3c.dom.DOMConfiguration;
import org.w3c.dom.DOMException;
import org.w3c.dom.NameList;
public interface DocumentEditVAL extends NodeEditVAL {
public boolean getContinuousValidityChecking();
public void setContinuousValidityChecking(boolean continuousValidityChecking)
throws DOMException, ExceptionVAL, DOMException;
public DOMConfiguration getDomConfig();
public NameList getDefinedElements(String namespaceURI);
public short validateDocument();
}
package org.w3c.dom.validation;
import org.w3c.dom.Node;
import org.w3c.dom.DOMStringList;
public interface NodeEditVAL {
// validationType
public static final short VAL_WF = 1;
public static final short VAL_NS_WF = 2;
public static final short VAL_INCOMPLETE = 3;
public static final short VAL_SCHEMA = 4;
// validationState
public static final short VAL_TRUE = 5;
public static final short VAL_FALSE = 6;
public static final short VAL_UNKNOWN = 7;
public String getDefaultValue();
public DOMStringList getEnumeratedValues();
public short canInsertBefore(Node newChild,
Node refChild);
public short canRemoveChild(Node oldChild);
public short canReplaceChild(Node newChild,
Node oldChild);
public short canAppendChild(Node newChild);
public short nodeValidity(short valType);
}
package org.w3c.dom.validation;
import org.w3c.dom.Node;
import org.w3c.dom.Attr;
import org.w3c.dom.NameList;
public interface ElementEditVAL extends NodeEditVAL {
// ContentTypeVAL
public static final short VAL_EMPTY_CONTENTTYPE = 1;
public static final short VAL_ANY_CONTENTTYPE = 2;
public static final short VAL_MIXED_CONTENTTYPE = 3;
public static final short VAL_ELEMENTS_CONTENTTYPE = 4;
public static final short VAL_SIMPLE_CONTENTTYPE = 5;
public NameList getAllowedChildren();
public NameList getAllowedFirstChildren();
public NameList getAllowedParents();
public NameList getAllowedNextSiblings();
public NameList getAllowedPreviousSiblings();
public NameList getAllowedAttributes();
public NameList getRequiredAttributes();
public short getContentType();
public short canSetTextContent(String possibleTextContent);
public short canSetAttribute(String attrname,
String attrval);
public short canSetAttributeNode(Attr attrNode);
public short canSetAttributeNS(String namespaceURI,
String qualifiedName,
String value);
public short canRemoveAttribute(String attrname);
public short canRemoveAttributeNS(String namespaceURI,
String localName);
public short canRemoveAttributeNode(Node attrNode);
public short isElementDefined(String name);
public short isElementDefinedNS(String namespaceURI,
String name);
}
package org.w3c.dom.validation;
import org.w3c.dom.DOMException;
public interface CharacterDataEditVAL extends NodeEditVAL {
public short isWhitespaceOnly();
public short canSetData(String arg);
public short canAppendData(String arg);
public short canReplaceData(int offset,
int count,
String arg)
throws DOMException;
public short canInsertData(int offset,
String arg)
throws DOMException;
public short canDeleteData(int offset,
int count)
throws DOMException;
}