/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @xerces.internal
*
* @author Rahul Srivastava, Sun Microsystems Inc.
* @author Sandy Gao, IBM
*
* @version $Id: SchemaDOM.java,v 1.7 2010-11-01 04:40:01 joehw Exp $
*/
// parent must be an element in this scheme
int currLoc;
int nextFreeLoc;
boolean hidden;
boolean inCDATA;
// for annotation support:
public SchemaDOM() {
reset();
}
// now the current node added, becomes the parent
return node;
}
return node;
}
}
}
// populate node
// set the attributes
attributes.getPrefix(i),
attributes.getQName(i),
attributes.getURI(i),
attributes.getValue(i));
}
// check if array needs to be resized
}
// store the current parent
//if (relations[currLoc][0] == null || relations[currLoc][0] != parent) {
currLoc = nextFreeLoc++;
}
// add the current node as child of parent
boolean foundPlace = false;
int i = 1;
foundPlace = true;
break;
}
}
if (!foundPlace) {
}
}
public void endElement() {
// the parent of current parent node becomes the parent
// for the next node.
}
// note that this will only be called within appinfo/documentation
}
}
// note that this will only be called within appinfo/documentation
}
}
// note that this will only be called within appinfo/documentation
// escape characters if necessary
if (!inCDATA) {
if (ch == '&') {
}
else if (ch == '<') {
}
// character sequence "]]>" cannot appear in content,
// therefore we should escape '>'.
else if (ch == '>') {
}
// If CR is part of the document's content, it
// must not be printed as a literal otherwise
// it would be normalized to LF when the document
// is reparsed.
else if (ch == '\r') {
}
else {
}
}
}
else {
}
}
// note that this will only be called within appinfo/documentation
}
// apparently, there is no sensible way of resetting these things
}
}
}
}
if(complete) {
// note that this is always called after endElement on <annotation>'s
// child and before endElement on annotation.
// hence, we must make this the child of the current
// parent's only child.
// apparently, there is no sensible way of resetting
// these things
} else //capturing character calls
}
void startAnnotationCDATA() {
inCDATA = true;
}
void endAnnotationCDATA() {
inCDATA = false;
}
private void resizeRelations() {
}
}
private void resizeRelations(int i) {
}
public void reset() {
// help out the garbage collector
currLoc = 0;
nextFreeLoc = 1;
inCDATA = false;
for (int i=0; i<relationsRowResizeFactor; i++) {
}
}
public void printDOM() {
/*
for (int i=0; i<relations.length; i++) {
if (relations[i][0] != null) {
for (int j=0; j<relations[i].length; j++) {
if (relations[i][j] != null) {
System.out.print(relations[i][j].nodeType+"-"+relations[i][j].parentRow+" ");
}
}
System.out.println("");
}
}
*/
//traverse(getDocumentElement(), 0);
}
// debug methods
if (node.hasAttributes()) {
}
}
if (node.hasChildNodes()) {
depth+=4;
}
depth-=4;
}
else {
}
}
for (int i = 0; i < amount; i++) {
}
}
// org.w3c.dom methods
// this returns a parent node, known to be an ElementImpl
}
return SchemaDOMImplementation.getDOMImplementation();
}
// commence the serialization of an annotation
}
// attributes are a bit of a pain. To get this right, we have to keep track
// of the namespaces we've seen declared, then examine the namespace context
// for other namespaces so that we can also include them.
// optimized for simplicity and the case that not many
// namespaces are declared on this annotation...
// if it's xmlns:* or xmlns, must be a namespace decl
}
}
// now we have to look through currently in-scope namespaces to see what
// wasn't declared here
while(currPrefixes.hasMoreElements()) {
}
// have to declare this one
}
else {
fAnnotationBuffer.append("xmlns:").append(prefix).append("=\"").append(processAttValue(uri)).append("\" ");
}
}
}
}
}
fAnnotationBuffer.append(" ").append(attributes.getQName(i)).append("=\"").append(processAttValue(aValue)).append("\"");
}
}
// normally, nothing will happen
for (int i = 0; i < length; ++i) {
return escapeAttValue(original, i);
}
}
return original;
}
int i;
if (currChar == '"') {
}
else if (currChar == '<') {
}
else if (currChar == '&') {
}
// Must escape 0x09, 0x0A and 0x0D if they appear in attribute
// value so that they may be round-tripped. They would otherwise
// be transformed to a 0x20 during attribute value normalization.
else if (currChar == 0x09) {
}
else if (currChar == 0x0A) {
}
else if (currChar == 0x0D) {
}
else {
}
}
}
}