You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2020/05/19 20:10:56 UTC
svn commit: r1877931 [6/9] - in /xmlbeans:
site/src/documentation/content/xdocs/ trunk/ trunk/lib/
trunk/src/jamsupport/ trunk/src/store/org/apache/xmlbeans/impl/store/
trunk/src/xmlconfig/org/apache/xmlbeans/impl/config/
trunk/src/xpath_xquery/org/apa...
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/DomSaver.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/DomSaver.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/DomSaver.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/DomSaver.java Tue May 19 20:10:55 2020
@@ -0,0 +1,203 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+import org.apache.xmlbeans.SchemaType;
+import org.apache.xmlbeans.SchemaTypeLoader;
+import org.apache.xmlbeans.XmlDocumentProperties;
+import org.apache.xmlbeans.XmlOptions;
+import org.w3c.dom.Node;
+
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+
+final class DomSaver extends Saver {
+ private Cur _nodeCur;
+ private SchemaType _type;
+ private final SchemaTypeLoader _stl;
+ private final XmlOptions _options;
+ private final boolean _isFrag;
+
+
+ DomSaver(Cur c, boolean isFrag, XmlOptions options) {
+ super(c, options);
+
+ if (c.isUserNode()) {
+ _type = c.getUser().get_schema_type();
+ }
+
+ _stl = c._locale._schemaTypeLoader;
+ _options = options;
+ _isFrag = isFrag;
+ }
+
+ Node saveDom() {
+ Locale l = Locale.getLocale(_stl, _options);
+
+ l.enter();
+
+ try {
+ _nodeCur = l.getCur(); // Not weak or temp
+
+ // Build the tree
+
+ //noinspection StatementWithEmptyBody
+ while (process());
+
+ // Set the type
+
+ while (!_nodeCur.isRoot()) {
+ _nodeCur.toParent();
+ }
+
+ if (_type != null) {
+ _nodeCur.setType(_type);
+ }
+
+ Node node = (Node) _nodeCur.getDom();
+
+ _nodeCur.release();
+
+ _nodeCur = null;
+
+ return node;
+ } finally {
+ l.exit();
+ }
+ }
+
+ protected boolean emitElement(SaveCur c, ArrayList attrNames, ArrayList attrValues) {
+ // If there was text or comments before the frag element, I will loose them -- oh well
+ // Also, I will lose any attributes and namesapces on the fragment -- DOM can
+ // have attrs in fragments
+
+ if (Locale.isFragmentQName(c.getName())) {
+ _nodeCur.moveTo(null, Cur.NO_POS);
+ }
+
+ ensureDoc();
+
+ _nodeCur.createElement(getQualifiedName(c, c.getName()));
+ _nodeCur.next();
+
+ for (iterateMappings(); hasMapping(); nextMapping()) {
+ _nodeCur.createAttr(_nodeCur._locale.createXmlns(mappingPrefix()));
+ _nodeCur.next();
+ _nodeCur.insertString(mappingUri());
+ _nodeCur.toParent();
+ _nodeCur.skipWithAttrs();
+ }
+
+ for (int i = 0; i < attrNames.size(); i++) {
+ _nodeCur.createAttr(getQualifiedName(c, (QName) attrNames.get(i)));
+ _nodeCur.next();
+ _nodeCur.insertString((String) attrValues.get(i));
+ _nodeCur.toParent();
+ _nodeCur.skipWithAttrs();
+ }
+
+ return false;
+ }
+
+ protected void emitFinish(SaveCur c) {
+ if (!Locale.isFragmentQName(c.getName())) {
+ assert _nodeCur.isEnd();
+ _nodeCur.next();
+ }
+ }
+
+ protected void emitText(SaveCur c) {
+ ensureDoc();
+
+ Object src = c.getChars();
+
+ if (c._cchSrc > 0) {
+ _nodeCur.insertChars(src, c._offSrc, c._cchSrc);
+ _nodeCur.next();
+ }
+ }
+
+ protected void emitComment(SaveCur c) {
+ ensureDoc();
+
+ _nodeCur.createComment();
+ emitTextValue(c);
+ _nodeCur.skip();
+ }
+
+ protected void emitProcinst(SaveCur c) {
+ ensureDoc();
+
+ _nodeCur.createProcinst(c.getName().getLocalPart());
+ emitTextValue(c);
+ _nodeCur.skip();
+ }
+
+ protected void emitDocType(String docTypeName, String publicId, String systemId) {
+ ensureDoc();
+
+ XmlDocumentProperties props = Locale.getDocProps(_nodeCur, true);
+ props.setDoctypeName(docTypeName);
+ props.setDoctypePublicId(publicId);
+ props.setDoctypeSystemId(systemId);
+ }
+
+ protected void emitStartDoc(SaveCur c) {
+ ensureDoc();
+ }
+
+ protected void emitEndDoc(SaveCur c) {
+ }
+
+ private QName getQualifiedName(SaveCur c, QName name) {
+ String uri = name.getNamespaceURI();
+
+ String prefix = uri.length() > 0 ? getUriMapping(uri) : "";
+
+ if (prefix.equals(name.getPrefix())) {
+ return name;
+ }
+
+ return _nodeCur._locale.makeQName(uri, name.getLocalPart(), prefix);
+ }
+
+ private void emitTextValue(SaveCur c) {
+ c.push();
+ c.next();
+
+ if (c.isText()) {
+ _nodeCur.next();
+ _nodeCur.insertChars(c.getChars(), c._offSrc, c._cchSrc);
+ _nodeCur.toParent();
+ }
+
+ c.pop();
+ }
+
+ private void ensureDoc() {
+ if (!_nodeCur.isPositioned()) {
+ if (_isFrag) {
+ _nodeCur.createDomDocFragRoot();
+ } else {
+ _nodeCur.createDomDocumentRoot();
+ }
+
+ _nodeCur.next();
+ }
+ }
+
+}
+
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/ElementAttributes.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/ElementAttributes.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/ElementAttributes.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/ElementAttributes.java Tue May 19 20:10:55 2020
@@ -0,0 +1,60 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+final class ElementAttributes implements NamedNodeMap {
+ ElementAttributes(ElementXobj elementXobj) {
+ _elementXobj = elementXobj;
+ }
+
+ public int getLength() {
+ return DomImpl._attributes_getLength(_elementXobj);
+ }
+
+ public Node getNamedItem(String name) {
+ return DomImpl._attributes_getNamedItem(_elementXobj, name);
+ }
+
+ public Node getNamedItemNS(String namespaceURI, String localName) {
+ return DomImpl._attributes_getNamedItemNS(_elementXobj, namespaceURI, localName);
+ }
+
+ public Node item(int index) {
+ return DomImpl._attributes_item(_elementXobj, index);
+ }
+
+ public Node removeNamedItem(String name) {
+ return DomImpl._attributes_removeNamedItem(_elementXobj, name);
+ }
+
+ public Node removeNamedItemNS(String namespaceURI, String localName) {
+ return DomImpl._attributes_removeNamedItemNS(_elementXobj, namespaceURI, localName);
+ }
+
+ public Node setNamedItem(Node arg) {
+ return DomImpl._attributes_setNamedItem(_elementXobj, arg);
+ }
+
+ public Node setNamedItemNS(Node arg) {
+ return DomImpl._attributes_setNamedItemNS(_elementXobj, arg);
+ }
+
+ private ElementXobj _elementXobj;
+}
+
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/ElementXobj.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/ElementXobj.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/ElementXobj.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/ElementXobj.java Tue May 19 20:10:55 2020
@@ -0,0 +1,126 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+import org.w3c.dom.*;
+
+import javax.xml.namespace.QName;
+
+class ElementXobj extends NamedNodeXobj implements Element {
+ ElementXobj(Locale l, QName name) {
+ super(l, ELEM, DomImpl.ELEMENT);
+ _name = name;
+ }
+
+ Xobj newNode(Locale l) {
+ return new ElementXobj(l, _name);
+ }
+
+ //
+ //
+ //
+
+ public NamedNodeMap getAttributes() {
+ if (_attributes == null)
+ _attributes = new ElementAttributes(this);
+
+ return _attributes;
+ }
+
+ public String getAttribute(String name) {
+ return DomImpl._element_getAttribute(this, name);
+ }
+
+ public Attr getAttributeNode(String name) {
+ return DomImpl._element_getAttributeNode(this, name);
+ }
+
+ public Attr getAttributeNodeNS(String namespaceURI, String localName) {
+ return DomImpl._element_getAttributeNodeNS(this, namespaceURI, localName);
+ }
+
+ public String getAttributeNS(String namespaceURI, String localName) {
+ return DomImpl._element_getAttributeNS(this, namespaceURI, localName);
+ }
+
+ public NodeList getElementsByTagName(String name) {
+ return DomImpl._element_getElementsByTagName(this, name);
+ }
+
+ public NodeList getElementsByTagNameNS(String namespaceURI, String localName) {
+ return DomImpl._element_getElementsByTagNameNS(this, namespaceURI, localName);
+ }
+
+ public String getTagName() {
+ return DomImpl._element_getTagName(this);
+ }
+
+ public boolean hasAttribute(String name) {
+ return DomImpl._element_hasAttribute(this, name);
+ }
+
+ public boolean hasAttributeNS(String namespaceURI, String localName) {
+ return DomImpl._element_hasAttributeNS(this, namespaceURI, localName);
+ }
+
+ public void removeAttribute(String name) {
+ DomImpl._element_removeAttribute(this, name);
+ }
+
+ public Attr removeAttributeNode(Attr oldAttr) {
+ return DomImpl._element_removeAttributeNode(this, oldAttr);
+ }
+
+ public void removeAttributeNS(String namespaceURI, String localName) {
+ DomImpl._element_removeAttributeNS(this, namespaceURI, localName);
+ }
+
+ public void setAttribute(String name, String value) {
+ DomImpl._element_setAttribute(this, name, value);
+ }
+
+ public Attr setAttributeNode(Attr newAttr) {
+ return DomImpl._element_setAttributeNode(this, newAttr);
+ }
+
+ public Attr setAttributeNodeNS(Attr newAttr) {
+ return DomImpl._element_setAttributeNodeNS(this, newAttr);
+ }
+
+ public void setAttributeNS(String namespaceURI, String qualifiedName, String value) {
+ DomImpl._element_setAttributeNS(this, namespaceURI, qualifiedName, value);
+ }
+
+ // DOM Level 3
+ public TypeInfo getSchemaTypeInfo() {
+ throw new RuntimeException("DOM Level 3 Not implemented");
+ }
+
+ public void setIdAttribute(String name, boolean isId) {
+ throw new RuntimeException("DOM Level 3 Not implemented");
+ }
+
+ public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) {
+ throw new RuntimeException("DOM Level 3 Not implemented");
+ }
+
+ public void setIdAttributeNode(Attr idAttr, boolean isId) {
+ throw new RuntimeException("DOM Level 3 Not implemented");
+ }
+
+ private ElementAttributes _attributes;
+}
+
Modified: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Jsr173.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Jsr173.java?rev=1877931&r1=1877930&r2=1877931&view=diff
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Jsr173.java (original)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Jsr173.java Tue May 19 20:10:55 2020
@@ -44,12 +44,12 @@ public class Jsr173
Jsr173GateWay gw = (Jsr173GateWay) xs;
Locale l = gw._l;
-
+
if (l.noSync()) { l.enter(); try { return nodeFromStreamImpl( gw ); } finally { l.exit(); } }
else synchronized ( l ) { l.enter(); try { return nodeFromStreamImpl( gw ); } finally { l.exit(); } }
-
+
}
-
+
public static Node nodeFromStreamImpl ( Jsr173GateWay gw )
{
Cur c = gw._xs.getStreamCur();
@@ -60,25 +60,25 @@ public class Jsr173
public static XMLStreamReader newXmlStreamReader ( Cur c, Object src, int off, int cch )
{
XMLStreamReaderBase xs = new XMLStreamReaderForString( c, src, off, cch );
-
+
if (c._locale.noSync())
return new UnsyncedJsr173( c._locale, xs );
else
return new SyncedJsr173( c._locale, xs );
}
-
+
public static XMLStreamReader newXmlStreamReader ( Cur c, XmlOptions options )
{
options = XmlOptions.maskNull( options );
-
- boolean inner =
+
+ boolean inner =
options.hasOption( XmlOptions.SAVE_INNER ) &&
!options.hasOption( XmlOptions.SAVE_OUTER );
XMLStreamReaderBase xs;
int k = c.kind();
-
+
if (k == Cur.TEXT || k < 0)
{
xs = new XMLStreamReaderForString( c, c.getChars( -1 ), c._offSrc, c._cchSrc );
@@ -95,23 +95,23 @@ public class Jsr173
}
else
xs = new XMLStreamReaderForNode( c, false );
-
+
if (c._locale.noSync())
return new UnsyncedJsr173( c._locale, xs );
else
return new SyncedJsr173( c._locale, xs );
}
-
+
//
//
//
-
+
private static final class XMLStreamReaderForNode extends XMLStreamReaderBase
{
public XMLStreamReaderForNode ( Cur c, boolean inner )
{
super( c );
-
+
assert c.isContainer() || c.isComment() || c.isProcinst() || c.isAttr();
// Iterate over everything *between* _cur and _end. Do
@@ -120,12 +120,12 @@ public class Jsr173
if (inner)
{
assert c.isContainer();
-
+
_cur = c.weakCur( this );
if (!_cur.toFirstAttr())
_cur.next();
-
+
_end = c.weakCur( this );
_end.toEnd();
}
@@ -155,9 +155,9 @@ public class Jsr173
if (!_wholeDoc)
{
// Set the _done bit properly
-
+
_cur.push();
-
+
try
{
next();
@@ -166,7 +166,7 @@ public class Jsr173
{
throw new RuntimeException( e.getMessage(), e );
}
-
+
_cur.pop();
}
@@ -240,7 +240,7 @@ public class Jsr173
_cur.next();
assert _wholeDoc || _end != null;
-
+
_done = _wholeDoc ? _cur.kind() == -Cur.ROOT : _cur.isSamePos( _end );
}
@@ -260,7 +260,7 @@ public class Jsr173
return _cur.getValueAsString();
if (k == Cur.TEXT)
- return _cur.getCharsAsString( -1 );
+ return _cur.getCharsAsString();
throw new IllegalStateException();
}
@@ -373,7 +373,7 @@ public class Jsr173
return ca;
}
-
+
public String getAttributeValue ( String uri, String local )
{
Cur ca = toAttr( _cur, uri, local );
@@ -429,11 +429,11 @@ public class Jsr173
public int getAttributeCount ( )
{
int n = 0;
-
+
if (_cur.isElem())
{
Cur ca = _cur.tempCur();
-
+
if (ca.toFirstAttr())
{
do
@@ -503,7 +503,7 @@ public class Jsr173
// Go to attr to force index check
Cur ca = toAttr( _cur, index );
ca.release();
-
+
return false;
}
@@ -550,7 +550,7 @@ public class Jsr173
{
if (c.kind() == -Cur.ELEM)
ca.toParent();
-
+
if (ca.toFirstAttr())
{
do
@@ -613,7 +613,7 @@ public class Jsr173
throw new IllegalStateException();
Object src = cText.getChars( -1 );
-
+
ensureCharBufLen( cText._cchSrc );
CharUtil.getChars(
@@ -625,7 +625,7 @@ public class Jsr173
_textFetched = true;
}
}
-
+
private void ensureCharBufLen ( int cch )
{
if (_chars == null || _chars.length < cch)
@@ -634,7 +634,7 @@ public class Jsr173
while ( l < cch )
l *= 2;
-
+
_chars = new char [ l ];
}
}
@@ -694,14 +694,14 @@ public class Jsr173
cText = _cur;
else
throw new IllegalStateException();
-
+
_src = cText.getChars( -1 );
_offSrc = cText._offSrc;
_cchSrc = cText._cchSrc;
-
+
if (cText != _cur)
cText.release();
-
+
_srcFetched = true;
}
@@ -712,14 +712,14 @@ public class Jsr173
length = _cchSrc - sourceStart;
CharUtil.getChars( target, targetStart, _src, _offSrc, length );
-
+
return length;
}
public boolean hasText ( )
{
int k = _cur.kind();
-
+
return k == Cur.COMMENT || k == Cur.TEXT;
}
@@ -768,7 +768,7 @@ public class Jsr173
private boolean _wholeDoc;
private boolean _done;
-
+
private Cur _cur;
private Cur _end;
@@ -776,13 +776,13 @@ public class Jsr173
private Object _src;
private int _offSrc;
private int _cchSrc;
-
+
private boolean _textFetched;
private char[] _chars;
private int _offChars;
private int _cchChars;
}
-
+
//
//
//
@@ -857,7 +857,7 @@ public class Jsr173
throw new IllegalArgumentException( "Property name is null" );
// BUGBUG - I should implement some perperties here
-
+
return null;
}
@@ -924,7 +924,7 @@ public class Jsr173
public int getColumnNumber ( ) { return _column; }
public int getLineNumber ( ) { return _line; }
public String getLocationURI ( ) { return _uri; }
-
+
public String getPublicId ( ) { return null; }
public String getSystemId ( ) { return null; }
@@ -943,7 +943,7 @@ public class Jsr173
if (!c.isContainer())
c.toParent();
-
+
String ns = c.namespaceForPrefix( prefix, true );
c.pop();
@@ -961,9 +961,9 @@ public class Jsr173
if (!c.isContainer())
c.toParent();
-
+
String prefix = c.prefixForNamespace( namespaceURI, null, false );
-
+
c.pop();
return prefix;
@@ -994,14 +994,14 @@ public class Jsr173
private Locale _locale;
private long _version;
-
+
String _uri;
-
+
int _line = -1;
int _column = -1;
int _offset = -1;
}
-
+
//
//
//
@@ -1034,7 +1034,7 @@ public class Jsr173
return CharUtil.getString( _src, _off, _cch );
}
-
+
public char[] getTextCharacters ( )
{
checkChanged();
@@ -1057,20 +1057,20 @@ public class Jsr173
return _cch;
}
-
+
public int getTextCharacters ( int sourceStart, char[] target, int targetStart, int length )
{
checkChanged();
if (length < 0)
throw new IndexOutOfBoundsException();
-
+
if (sourceStart > _cch)
throw new IndexOutOfBoundsException();
if (sourceStart + length > _cch)
length = _cch - sourceStart;
-
+
CharUtil.getChars( target, targetStart, _src, _off + sourceStart, length );
return length;
@@ -1125,7 +1125,7 @@ public class Jsr173
private static abstract class Jsr173GateWay
{
public Jsr173GateWay ( Locale l, XMLStreamReaderBase xs ) { _l = l; _xs = xs; }
-
+
Locale _l;
XMLStreamReaderBase _xs;
}
@@ -1133,7 +1133,7 @@ public class Jsr173
private static final class SyncedJsr173 extends Jsr173GateWay implements XMLStreamReader, Location, NamespaceContext
{
public SyncedJsr173 ( Locale l, XMLStreamReaderBase xs ) { super( l, xs ); }
-
+
public Object getProperty ( java.lang.String name ) { synchronized ( _l ) { _l.enter(); try { return _xs.getProperty( name ); } finally { _l.exit(); } } }
public int next ( ) throws XMLStreamException { synchronized ( _l ) { _l.enter(); try { return _xs.next(); } finally { _l.exit(); } } }
public void require ( int type, String namespaceURI, String localName ) throws XMLStreamException { synchronized ( _l ) { _l.enter(); try { _xs.require( type, namespaceURI, localName ); } finally { _l.exit(); } } }
@@ -1192,7 +1192,7 @@ public class Jsr173
private static final class UnsyncedJsr173 extends Jsr173GateWay implements XMLStreamReader, Location, NamespaceContext
{
public UnsyncedJsr173 ( Locale l, XMLStreamReaderBase xs ) { super( l, xs ); }
-
+
public Object getProperty ( java.lang.String name ) { try { _l.enter(); return _xs.getProperty( name ); } finally { _l.exit(); } }
public int next ( ) throws XMLStreamException { try { _l.enter(); return _xs.next(); } finally { _l.exit(); } }
public void require ( int type, String namespaceURI, String localName ) throws XMLStreamException { try { _l.enter(); _xs.require( type, namespaceURI, localName ); } finally { _l.exit(); } }
@@ -1249,4 +1249,3 @@ public class Jsr173
}
}
-
\ No newline at end of file
Modified: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Locale.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Locale.java?rev=1877931&r1=1877930&r2=1877931&view=diff
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Locale.java (original)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/Locale.java Tue May 19 20:10:55 2020
@@ -15,96 +15,33 @@
package org.apache.xmlbeans.impl.store;
-import org.xml.sax.Locator;
-import org.xml.sax.Attributes;
-import org.xml.sax.ContentHandler;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.ext.LexicalHandler;
+import org.apache.xmlbeans.*;
+import org.apache.xmlbeans.XmlCursor.XmlBookmark;
+import org.apache.xmlbeans.impl.common.*;
+import org.apache.xmlbeans.impl.store.Cur.Locations;
+import org.apache.xmlbeans.impl.store.DomImpl.Dom;
+import org.apache.xmlbeans.impl.store.Saaj.SaajCallback;
+import org.apache.xmlbeans.impl.values.TypeStore;
+import org.apache.xmlbeans.xml.stream.CharacterData;
+import org.apache.xmlbeans.xml.stream.ProcessingInstruction;
+import org.apache.xmlbeans.xml.stream.*;
+import org.w3c.dom.*;
+import org.xml.sax.*;
import org.xml.sax.ext.DeclHandler;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.SAXException;
-import org.xml.sax.DTDHandler;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import java.lang.ref.ReferenceQueue;
-import java.lang.ref.Reference;
-import java.lang.ref.PhantomReference;
-import java.lang.ref.SoftReference;
+import org.xml.sax.ext.LexicalHandler;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.io.StringReader;
-import java.io.IOException;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamException;
-
-import org.apache.xmlbeans.xml.stream.Attribute;
-import org.apache.xmlbeans.xml.stream.AttributeIterator;
-import org.apache.xmlbeans.xml.stream.CharacterData;
-import org.apache.xmlbeans.xml.stream.ProcessingInstruction;
-import org.apache.xmlbeans.xml.stream.Space;
-import org.apache.xmlbeans.xml.stream.StartDocument;
-import org.apache.xmlbeans.xml.stream.StartElement;
-import org.apache.xmlbeans.xml.stream.XMLEvent;
-import org.apache.xmlbeans.xml.stream.XMLInputStream;
-import org.apache.xmlbeans.xml.stream.XMLName;
-
-import org.apache.xmlbeans.impl.common.SAXHelper;
-import org.apache.xmlbeans.impl.common.XMLNameHelper;
-import org.apache.xmlbeans.impl.common.QNameHelper;
-import org.apache.xmlbeans.impl.common.XmlLocale;
-import org.apache.xmlbeans.impl.common.ResolverUtil;
-import org.apache.xmlbeans.impl.common.SystemCache;
-import org.apache.xmlbeans.impl.common.XBLogger;
-import org.apache.xmlbeans.impl.common.XBLogFactory;
-
-import org.apache.xmlbeans.impl.store.Saaj.SaajCallback;
-
-import org.apache.xmlbeans.impl.store.DomImpl.Dom;
-import org.apache.xmlbeans.impl.store.DomImpl.TextNode;
-import org.apache.xmlbeans.impl.store.DomImpl.CdataNode;
-import org.apache.xmlbeans.impl.store.DomImpl.SaajTextNode;
-import org.apache.xmlbeans.impl.store.DomImpl.SaajCdataNode;
-
-import org.apache.xmlbeans.impl.store.Cur.Locations;
-
-import org.apache.xmlbeans.CDataBookmark;
-import org.apache.xmlbeans.XmlBeans;
-import org.apache.xmlbeans.XmlLineNumber;
-import org.apache.xmlbeans.XmlCursor;
-import org.apache.xmlbeans.XmlCursor.XmlBookmark;
-import org.apache.xmlbeans.XmlErrorCodes;
-import org.apache.xmlbeans.XmlException;
-import org.apache.xmlbeans.XmlObject;
-import org.apache.xmlbeans.XmlOptions;
-import org.apache.xmlbeans.XmlOptionsBean;
-import org.apache.xmlbeans.XmlSaxHandler;
-import org.apache.xmlbeans.SchemaType;
-import org.apache.xmlbeans.SchemaTypeLoader;
-import org.apache.xmlbeans.XmlTokenSource;
-import org.apache.xmlbeans.QNameSet;
-import org.apache.xmlbeans.QNameCache;
-import org.apache.xmlbeans.XmlError;
-import org.apache.xmlbeans.XmlRuntimeException;
-import org.apache.xmlbeans.XmlDocumentProperties;
-
-import org.apache.xmlbeans.impl.values.TypeStore;
-import org.apache.xmlbeans.impl.values.TypeStoreUser;
-import org.apache.xmlbeans.impl.values.TypeStoreUserFactory;
-
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Node;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Element;
+import java.lang.ref.PhantomReference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.SoftReference;
+import java.util.HashMap;
+import java.util.Map;
public final class Locale
implements DOMImplementation, SaajCallback, XmlLocale
@@ -150,7 +87,7 @@ public final class Locale
//
// Also - have a thread local setting for thread safety? .. Perhaps something
// in the type loader which defines whether ot not sync is on????
-
+
_noSync = options.hasOption(XmlOptions.UNSYNCHRONIZED);
_tempFrames = new Cur[_numTempFramesLeft = 8];
@@ -158,10 +95,10 @@ public final class Locale
// BUGBUG - this cannot be thread local ....
// BUGBUG - this cannot be thread local ....
// BUGBUG - this cannot be thread local .... uhh what, again?
- //
+ //
// Lazy create this (loading up a locale should use the thread locale one)
// same goes for the qname factory .. use thread local for hte most part when loading
-
+
_qnameFactory = new DefaultQNameFactory(); //new LocalDocumentQNameFactory();
_locations = new Locations(this);
@@ -169,11 +106,11 @@ public final class Locale
_schemaTypeLoader = stl;
_validateOnSet = options.hasOption(XmlOptions.VALIDATE_ON_SET);
-
+
//
// Check for Saaj implementation request
//
-
+
Object saajObj = options.get(Saaj.SAAJ_IMPL);
if (saajObj != null)
@@ -246,7 +183,7 @@ public final class Locale
//
//
//
-
+
static void associateSourceName(Cur c, XmlOptions options)
{
String sourceName = (String) XmlOptions.safeGet(options,
@@ -259,7 +196,7 @@ public final class Locale
//
//
//
-
+
static void autoTypeDocument(Cur c, SchemaType requestedType,
XmlOptions options)
throws XmlException
@@ -298,7 +235,7 @@ public final class Locale
}
// Look for a document element to establish type
-
+
if (type == null &&
(requestedType == null || requestedType.isDocumentType()))
{
@@ -554,7 +491,7 @@ public final class Locale
if (k == ATTR)
break;
- if (k == TEXT && !isWhiteSpace(start.getCharsAsString(-1)))
+ if (k == TEXT && !isWhiteSpace(start.getCharsAsString()))
{
isFrag = true;
break;
@@ -581,11 +518,11 @@ public final class Locale
return isFrag || numDocElems != 1;
}
-
+
//
//
//
-
+
public static XmlObject newInstance(SchemaTypeLoader stl, SchemaType type,
XmlOptions options)
{
@@ -634,7 +571,7 @@ public final class Locale
else
c.createRoot();
c.setType(sType);
-
+
XmlObject x = (XmlObject) c.getUser();
c.release();
@@ -2470,18 +2407,18 @@ public final class Locale
//
//
//
-
+
Dom findDomNthChild ( Dom parent, int n )
{
assert n >= 0;
-
+
if (parent == null)
return null;
-
+
int da = _domNthCache_A.distance(parent, n);
int db = _domNthCache_B.distance(parent, n);
-
-
+
+
// the "better" cache should never walk more than 1/2 len
Dom x = null;
boolean bInvalidate = (db - _domNthCache_B._len / 2 > 0) &&
@@ -2510,33 +2447,33 @@ public final class Locale
_domNthCache_A = _domNthCache_B;
_domNthCache_B = temp;
}
-
+
return x;
}
-
+
int domLength ( Dom parent )
{
if (parent == null)
return 0;
-
+
int da = _domNthCache_A.distance( parent, 0 );
int db = _domNthCache_B.distance( parent, 0 );
-
+
int len =
da <= db
? _domNthCache_A.length( parent )
: _domNthCache_B.length( parent );
-
+
if (da == db)
{
domNthCache temp = _domNthCache_A;
_domNthCache_A = _domNthCache_B;
_domNthCache_B = temp;
}
-
+
return len;
}
-
+
void invalidateDomCaches ( Dom d )
{
if (_domNthCache_A._parent == d)
@@ -2544,28 +2481,28 @@ public final class Locale
if (_domNthCache_B._parent == d)
_domNthCache_B._version = -1;
}
-
+
boolean isDomCached ( Dom d )
{
return _domNthCache_A._parent == d || _domNthCache_B._parent == d;
}
-
+
class domNthCache
{
-
+
int distance ( Dom parent, int n )
{
assert n >= 0;
-
+
if (_version != Locale.this.version())
return Integer.MAX_VALUE - 1;
-
+
if (parent != _parent)
return Integer.MAX_VALUE;
-
+
return n > _n ? n - _n : _n - n;
}
-
+
int length ( Dom parent )
{
if (_version != Locale.this.version() || _parent != parent)
@@ -2576,11 +2513,11 @@ public final class Locale
_n = -1;
_len = -1;
}
-
+
if (_len == -1)
{
Dom x = null;
-
+
if (_child != null && _n != -1)
{
x = _child;
@@ -2590,26 +2527,26 @@ public final class Locale
{
x = DomImpl.firstChild(_parent);
_len = 0;
-
+
// cache the 0th child
_child = x;
_n = 0;
}
-
+
for (; x != null; x = DomImpl.nextSibling(x) )
{
_len++;
}
}
-
-
+
+
return _len;
}
-
+
Dom fetch ( Dom parent, int n )
{
assert n >= 0;
-
+
if (_version != Locale.this.version() || _parent != parent)
{
_parent = parent;
@@ -2617,7 +2554,7 @@ public final class Locale
_child = null;
_n = -1;
_len = -1;
-
+
for (Dom x = DomImpl.firstChild(_parent); x != null; x = DomImpl.nextSibling(x) )
{
_n++;
@@ -2627,13 +2564,13 @@ public final class Locale
break;
}
}
-
+
return _child;
}
-
+
if (_n < 0)
return null;
-
+
if (n > _n)
{
while ( n > _n )
@@ -2642,10 +2579,10 @@ public final class Locale
{
if (x == null)
return null;
-
+
_child = x;
_n++;
-
+
break;
}
}
@@ -2658,18 +2595,18 @@ public final class Locale
{
if (x == null)
return null;
-
+
_child = x;
_n--;
-
+
break;
}
}
}
-
+
return _child;
}
-
+
public static final int BLITZ_BOUNDARY = 40; //walk small lists
private long _version;
private Dom _parent;
@@ -2677,9 +2614,9 @@ public final class Locale
private int _n;
private int _len;
}
-
+
+ //
//
- //
//
CharUtil getCharUtil()
@@ -3070,7 +3007,7 @@ public final class Locale
xr = SAXHelper.newXMLReader(new XmlOptionsBean(options));
} catch(Exception e) {
throw new XmlException("Problem creating XMLReader", e);
- }
+ }
}
SaxLoader sl = new XmlReaderSaxLoader(xr);
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/NamedNodeXobj.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/NamedNodeXobj.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/NamedNodeXobj.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/NamedNodeXobj.java Tue May 19 20:10:55 2020
@@ -0,0 +1,30 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+abstract class NamedNodeXobj extends NodeXobj {
+ NamedNodeXobj(Locale l, int kind, int domType) {
+ super(l, kind, domType);
+ _canHavePrefixUri = true;
+ }
+
+ public boolean nodeCanHavePrefixUri() {
+ return _canHavePrefixUri;
+ }
+
+ boolean _canHavePrefixUri;
+}
+
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/NodeXobj.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/NodeXobj.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/NodeXobj.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/NodeXobj.java Tue May 19 20:10:55 2020
@@ -0,0 +1,194 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+import org.w3c.dom.*;
+
+abstract class NodeXobj extends Xobj implements DomImpl.Dom, Node, NodeList {
+ NodeXobj(Locale l, int kind, int domType) {
+ super(l, kind, domType);
+ }
+
+ DomImpl.Dom getDom() {
+ return this;
+ }
+
+ //
+ //
+ //
+
+ public int getLength() {
+ return DomImpl._childNodes_getLength(this);
+ }
+
+ public Node item(int i) {
+ return DomImpl._childNodes_item(this, i);
+ }
+
+ public Node appendChild(Node newChild) {
+ return DomImpl._node_appendChild(this, newChild);
+ }
+
+ public Node cloneNode(boolean deep) {
+ return DomImpl._node_cloneNode(this, deep);
+ }
+
+ public NamedNodeMap getAttributes() {
+ return null;
+ }
+
+ public NodeList getChildNodes() {
+ return this;
+ }
+
+ public Node getParentNode() {
+ return DomImpl._node_getParentNode(this);
+ }
+
+ public Node removeChild(Node oldChild) {
+ return DomImpl._node_removeChild(this, oldChild);
+ }
+
+ public Node getFirstChild() {
+ return DomImpl._node_getFirstChild(this);
+ }
+
+ public Node getLastChild() {
+ return DomImpl._node_getLastChild(this);
+ }
+
+ public String getLocalName() {
+ return DomImpl._node_getLocalName(this);
+ }
+
+ public String getNamespaceURI() {
+ return DomImpl._node_getNamespaceURI(this);
+ }
+
+ public Node getNextSibling() {
+ return DomImpl._node_getNextSibling(this);
+ }
+
+ public String getNodeName() {
+ return DomImpl._node_getNodeName(this);
+ }
+
+ public short getNodeType() {
+ return DomImpl._node_getNodeType(this);
+ }
+
+ public String getNodeValue() {
+ return DomImpl._node_getNodeValue(this);
+ }
+
+ public Document getOwnerDocument() {
+ return DomImpl._node_getOwnerDocument(this);
+ }
+
+ public String getPrefix() {
+ return DomImpl._node_getPrefix(this);
+ }
+
+ public Node getPreviousSibling() {
+ return DomImpl._node_getPreviousSibling(this);
+ }
+
+ public boolean hasAttributes() {
+ return DomImpl._node_hasAttributes(this);
+ }
+
+ public boolean hasChildNodes() {
+ return DomImpl._node_hasChildNodes(this);
+ }
+
+ public Node insertBefore(Node newChild, Node refChild) {
+ return DomImpl._node_insertBefore(this, newChild, refChild);
+ }
+
+ public boolean isSupported(String feature, String version) {
+ return DomImpl._node_isSupported(this, feature, version);
+ }
+
+ public void normalize() {
+ DomImpl._node_normalize(this);
+ }
+
+ public Node replaceChild(Node newChild, Node oldChild) {
+ return DomImpl._node_replaceChild(this, newChild, oldChild);
+ }
+
+ public void setNodeValue(String nodeValue) {
+ DomImpl._node_setNodeValue(this, nodeValue);
+ }
+
+ public void setPrefix(String prefix) {
+ DomImpl._node_setPrefix(this, prefix);
+ }
+
+ public boolean nodeCanHavePrefixUri() {
+ return false;
+ }
+
+ // DOM Level 3
+ public Object getUserData(String key) {
+ return DomImpl._node_getUserData(this, key);
+ }
+
+ public Object setUserData(String key, Object data, UserDataHandler handler) {
+ return DomImpl._node_setUserData(this, key, data, handler);
+ }
+
+ public Object getFeature(String feature, String version) {
+ return DomImpl._node_getFeature(this, feature, version);
+ }
+
+ public boolean isEqualNode(Node arg) {
+ return DomImpl._node_isEqualNode(this, arg);
+ }
+
+ public boolean isSameNode(Node arg) {
+ return DomImpl._node_isSameNode(this, arg);
+ }
+
+ public String lookupNamespaceURI(String prefix) {
+ return DomImpl._node_lookupNamespaceURI(this, prefix);
+ }
+
+ public String lookupPrefix(String namespaceURI) {
+ return DomImpl._node_lookupPrefix(this, namespaceURI);
+ }
+
+ public boolean isDefaultNamespace(String namespaceURI) {
+ return DomImpl._node_isDefaultNamespace(this, namespaceURI);
+ }
+
+ public void setTextContent(String textContent) {
+ DomImpl._node_setTextContent(this, textContent);
+ }
+
+ public String getTextContent() {
+ return DomImpl._node_getTextContent(this);
+ }
+
+ public short compareDocumentPosition(Node other) {
+ return DomImpl._node_compareDocumentPosition(this, other);
+ }
+
+ public String getBaseURI() {
+ return DomImpl._node_getBaseURI(this);
+ }
+}
+
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/ProcInstXobj.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/ProcInstXobj.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/ProcInstXobj.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/ProcInstXobj.java Tue May 19 20:10:55 2020
@@ -0,0 +1,51 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.ProcessingInstruction;
+
+class ProcInstXobj extends NodeXobj implements ProcessingInstruction {
+ ProcInstXobj(Locale l, String target) {
+ super(l, PROCINST, DomImpl.PROCINST);
+ _name = _locale.makeQName(null, target);
+ }
+
+ Xobj newNode(Locale l) {
+ return new ProcInstXobj(l, _name.getLocalPart());
+ }
+
+ public int getLength() {
+ return 0;
+ }
+
+ public Node getFirstChild() {
+ return null;
+ }
+
+ public String getData() {
+ return DomImpl._processingInstruction_getData(this);
+ }
+
+ public String getTarget() {
+ return DomImpl._processingInstruction_getTarget(this);
+ }
+
+ public void setData(String data) {
+ DomImpl._processingInstruction_setData(this, data);
+ }
+}
+
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SaajCdataNode.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SaajCdataNode.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SaajCdataNode.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SaajCdataNode.java Tue May 19 20:10:55 2020
@@ -0,0 +1,53 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+import org.apache.xmlbeans.impl.soap.SOAPElement;
+
+class SaajCdataNode extends CdataNode implements org.apache.xmlbeans.impl.soap.Text {
+ public SaajCdataNode(Locale l) {
+ super(l);
+ }
+
+ public boolean isComment() {
+ return DomImpl._soapText_isComment(this);
+ }
+
+ public void detachNode() {
+ DomImpl._soapNode_detachNode(this);
+ }
+
+ public void recycleNode() {
+ DomImpl._soapNode_recycleNode(this);
+ }
+
+ public String getValue() {
+ return DomImpl._soapNode_getValue(this);
+ }
+
+ public void setValue(String value) {
+ DomImpl._soapNode_setValue(this, value);
+ }
+
+ public SOAPElement getParentElement() {
+ return DomImpl._soapNode_getParentElement(this);
+ }
+
+ public void setParentElement(SOAPElement p) {
+ DomImpl._soapNode_setParentElement(this, p);
+ }
+}
+
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SaajTextNode.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SaajTextNode.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SaajTextNode.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SaajTextNode.java Tue May 19 20:10:55 2020
@@ -0,0 +1,53 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+import org.apache.xmlbeans.impl.soap.SOAPElement;
+
+class SaajTextNode extends TextNode implements org.apache.xmlbeans.impl.soap.Text {
+ SaajTextNode(Locale l) {
+ super(l);
+ }
+
+ public boolean isComment() {
+ return DomImpl._soapText_isComment(this);
+ }
+
+ public void detachNode() {
+ DomImpl._soapNode_detachNode(this);
+ }
+
+ public void recycleNode() {
+ DomImpl._soapNode_recycleNode(this);
+ }
+
+ public String getValue() {
+ return DomImpl._soapNode_getValue(this);
+ }
+
+ public void setValue(String value) {
+ DomImpl._soapNode_setValue(this, value);
+ }
+
+ public SOAPElement getParentElement() {
+ return DomImpl._soapNode_getParentElement(this);
+ }
+
+ public void setParentElement(SOAPElement p) {
+ DomImpl._soapNode_setParentElement(this, p);
+ }
+}
+
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapBodyElementXobj.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapBodyElementXobj.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapBodyElementXobj.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapBodyElementXobj.java Tue May 19 20:10:55 2020
@@ -0,0 +1,30 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+import org.apache.xmlbeans.impl.soap.SOAPBodyElement;
+
+import javax.xml.namespace.QName;
+
+class SoapBodyElementXobj extends SoapElementXobj implements SOAPBodyElement {
+ SoapBodyElementXobj(Locale l, QName name) {
+ super(l, name);
+ }
+
+ Xobj newNode(Locale l) {
+ return new SoapBodyElementXobj(l, _name);
+ }
+}
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapBodyXobj.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapBodyXobj.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapBodyXobj.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapBodyXobj.java Tue May 19 20:10:55 2020
@@ -0,0 +1,59 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+import org.apache.xmlbeans.impl.soap.*;
+import org.w3c.dom.Document;
+
+import javax.xml.namespace.QName;
+
+class SoapBodyXobj extends SoapElementXobj implements SOAPBody {
+ SoapBodyXobj(Locale l, QName name) {
+ super(l, name);
+ }
+
+ Xobj newNode(Locale l) {
+ return new SoapBodyXobj(l, _name);
+ }
+
+ public boolean hasFault() {
+ return DomImpl.soapBody_hasFault(this);
+ }
+
+ public SOAPFault addFault() throws SOAPException {
+ return DomImpl.soapBody_addFault(this);
+ }
+
+ public SOAPFault getFault() {
+ return DomImpl.soapBody_getFault(this);
+ }
+
+ public SOAPBodyElement addBodyElement(Name name) {
+ return DomImpl.soapBody_addBodyElement(this, name);
+ }
+
+ public SOAPBodyElement addDocument(Document document) {
+ return DomImpl.soapBody_addDocument(this, document);
+ }
+
+ public SOAPFault addFault(Name name, String s) throws SOAPException {
+ return DomImpl.soapBody_addFault(this, name, s);
+ }
+
+ public SOAPFault addFault(Name faultCode, String faultString, java.util.Locale locale) throws SOAPException {
+ return DomImpl.soapBody_addFault(this, faultCode, faultString, locale);
+ }
+}
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapElementXobj.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapElementXobj.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapElementXobj.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapElementXobj.java Tue May 19 20:10:55 2020
@@ -0,0 +1,142 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+import org.apache.xmlbeans.impl.soap.Name;
+import org.apache.xmlbeans.impl.soap.SOAPElement;
+import org.apache.xmlbeans.impl.soap.SOAPException;
+
+import javax.xml.namespace.QName;
+import java.util.Iterator;
+
+class SoapElementXobj extends ElementXobj implements SOAPElement, org.apache.xmlbeans.impl.soap.Node {
+ SoapElementXobj(Locale l, QName name) {
+ super(l, name);
+ }
+
+ Xobj newNode(Locale l) {
+ return new SoapElementXobj(l, _name);
+ }
+
+ public void detachNode() {
+ DomImpl._soapNode_detachNode(this);
+ }
+
+ public void recycleNode() {
+ DomImpl._soapNode_recycleNode(this);
+ }
+
+ public String getValue() {
+ return DomImpl._soapNode_getValue(this);
+ }
+
+ public void setValue(String value) {
+ DomImpl._soapNode_setValue(this, value);
+ }
+
+ public SOAPElement getParentElement() {
+ return DomImpl._soapNode_getParentElement(this);
+ }
+
+ public void setParentElement(SOAPElement p) {
+ DomImpl._soapNode_setParentElement(this, p);
+ }
+
+ public void removeContents() {
+ DomImpl._soapElement_removeContents(this);
+ }
+
+ public String getEncodingStyle() {
+ return DomImpl._soapElement_getEncodingStyle(this);
+ }
+
+ public void setEncodingStyle(String encodingStyle) {
+ DomImpl._soapElement_setEncodingStyle(this, encodingStyle);
+ }
+
+ public boolean removeNamespaceDeclaration(String prefix) {
+ return DomImpl._soapElement_removeNamespaceDeclaration(this, prefix);
+ }
+
+ public Iterator getAllAttributes() {
+ return DomImpl._soapElement_getAllAttributes(this);
+ }
+
+ public Iterator getChildElements() {
+ return DomImpl._soapElement_getChildElements(this);
+ }
+
+ public Iterator getNamespacePrefixes() {
+ return DomImpl._soapElement_getNamespacePrefixes(this);
+ }
+
+ public SOAPElement addAttribute(Name name, String value) throws SOAPException {
+ return DomImpl._soapElement_addAttribute(this, name, value);
+ }
+
+ public SOAPElement addChildElement(SOAPElement oldChild) throws SOAPException {
+ return DomImpl._soapElement_addChildElement(this, oldChild);
+ }
+
+ public SOAPElement addChildElement(Name name) throws SOAPException {
+ return DomImpl._soapElement_addChildElement(this, name);
+ }
+
+ public SOAPElement addChildElement(String localName) throws SOAPException {
+ return DomImpl._soapElement_addChildElement(this, localName);
+ }
+
+ public SOAPElement addChildElement(String localName, String prefix) throws SOAPException {
+ return DomImpl._soapElement_addChildElement(this, localName, prefix);
+ }
+
+ public SOAPElement addChildElement(String localName, String prefix, String uri) throws SOAPException {
+ return DomImpl._soapElement_addChildElement(this, localName, prefix, uri);
+ }
+
+ public SOAPElement addNamespaceDeclaration(String prefix, String uri) {
+ return DomImpl._soapElement_addNamespaceDeclaration(this, prefix, uri);
+ }
+
+ public SOAPElement addTextNode(String data) {
+ return DomImpl._soapElement_addTextNode(this, data);
+ }
+
+ public String getAttributeValue(Name name) {
+ return DomImpl._soapElement_getAttributeValue(this, name);
+ }
+
+ public Iterator getChildElements(Name name) {
+ return DomImpl._soapElement_getChildElements(this, name);
+ }
+
+ public Name getElementName() {
+ return DomImpl._soapElement_getElementName(this);
+ }
+
+ public String getNamespaceURI(String prefix) {
+ return DomImpl._soapElement_getNamespaceURI(this, prefix);
+ }
+
+ public Iterator getVisibleNamespacePrefixes() {
+ return DomImpl._soapElement_getVisibleNamespacePrefixes(this);
+ }
+
+ public boolean removeAttribute(Name name) {
+ return DomImpl._soapElement_removeAttribute(this, name);
+ }
+}
+
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapEnvelopeXobj.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapEnvelopeXobj.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapEnvelopeXobj.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapEnvelopeXobj.java Tue May 19 20:10:55 2020
@@ -0,0 +1,54 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+import org.apache.xmlbeans.impl.soap.*;
+
+import javax.xml.namespace.QName;
+
+class SoapEnvelopeXobj extends SoapElementXobj implements SOAPEnvelope {
+ SoapEnvelopeXobj(Locale l, QName name) {
+ super(l, name);
+ }
+
+ Xobj newNode(Locale l) {
+ return new SoapEnvelopeXobj(l, _name);
+ }
+
+ public SOAPBody addBody() throws SOAPException {
+ return DomImpl._soapEnvelope_addBody(this);
+ }
+
+ public SOAPBody getBody() throws SOAPException {
+ return DomImpl._soapEnvelope_getBody(this);
+ }
+
+ public SOAPHeader getHeader() throws SOAPException {
+ return DomImpl._soapEnvelope_getHeader(this);
+ }
+
+ public SOAPHeader addHeader() throws SOAPException {
+ return DomImpl._soapEnvelope_addHeader(this);
+ }
+
+ public Name createName(String localName) {
+ return DomImpl._soapEnvelope_createName(this, localName);
+ }
+
+ public Name createName(String localName, String prefix, String namespaceURI) {
+ return DomImpl._soapEnvelope_createName(this, localName, prefix, namespaceURI);
+ }
+}
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapFaultElementXobj.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapFaultElementXobj.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapFaultElementXobj.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapFaultElementXobj.java Tue May 19 20:10:55 2020
@@ -0,0 +1,30 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+import org.apache.xmlbeans.impl.soap.SOAPFaultElement;
+
+import javax.xml.namespace.QName;
+
+class SoapFaultElementXobj extends SoapElementXobj implements SOAPFaultElement {
+ SoapFaultElementXobj(Locale l, QName name) {
+ super(l, name);
+ }
+
+ Xobj newNode(Locale l) {
+ return new SoapFaultElementXobj(l, _name);
+ }
+}
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapFaultXobj.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapFaultXobj.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapFaultXobj.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapFaultXobj.java Tue May 19 20:10:55 2020
@@ -0,0 +1,81 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+import org.apache.xmlbeans.impl.soap.Detail;
+import org.apache.xmlbeans.impl.soap.Name;
+import org.apache.xmlbeans.impl.soap.SOAPException;
+import org.apache.xmlbeans.impl.soap.SOAPFault;
+
+import javax.xml.namespace.QName;
+
+class SoapFaultXobj extends SoapBodyElementXobj implements SOAPFault {
+ SoapFaultXobj(Locale l, QName name) {
+ super(l, name);
+ }
+
+ Xobj newNode(Locale l) {
+ return new SoapFaultXobj(l, _name);
+ }
+
+ public void setFaultString(String faultString) {
+ DomImpl.soapFault_setFaultString(this, faultString);
+ }
+
+ public void setFaultString(String faultString, java.util.Locale locale) {
+ DomImpl.soapFault_setFaultString(this, faultString, locale);
+ }
+
+ public void setFaultCode(Name faultCodeName) throws SOAPException {
+ DomImpl.soapFault_setFaultCode(this, faultCodeName);
+ }
+
+ public void setFaultActor(String faultActorString) {
+ DomImpl.soapFault_setFaultActor(this, faultActorString);
+ }
+
+ public String getFaultActor() {
+ return DomImpl.soapFault_getFaultActor(this);
+ }
+
+ public String getFaultCode() {
+ return DomImpl.soapFault_getFaultCode(this);
+ }
+
+ public void setFaultCode(String faultCode) throws SOAPException {
+ DomImpl.soapFault_setFaultCode(this, faultCode);
+ }
+
+ public java.util.Locale getFaultStringLocale() {
+ return DomImpl.soapFault_getFaultStringLocale(this);
+ }
+
+ public Name getFaultCodeAsName() {
+ return DomImpl.soapFault_getFaultCodeAsName(this);
+ }
+
+ public String getFaultString() {
+ return DomImpl.soapFault_getFaultString(this);
+ }
+
+ public Detail addDetail() throws SOAPException {
+ return DomImpl.soapFault_addDetail(this);
+ }
+
+ public Detail getDetail() {
+ return DomImpl.soapFault_getDetail(this);
+ }
+}
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapHeaderElementXobj.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapHeaderElementXobj.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapHeaderElementXobj.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapHeaderElementXobj.java Tue May 19 20:10:55 2020
@@ -0,0 +1,46 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+import org.apache.xmlbeans.impl.soap.SOAPHeaderElement;
+
+import javax.xml.namespace.QName;
+
+class SoapHeaderElementXobj extends SoapElementXobj implements SOAPHeaderElement {
+ SoapHeaderElementXobj(Locale l, QName name) {
+ super(l, name);
+ }
+
+ Xobj newNode(Locale l) {
+ return new SoapHeaderElementXobj(l, _name);
+ }
+
+ public void setMustUnderstand(boolean mustUnderstand) {
+ DomImpl.soapHeaderElement_setMustUnderstand(this, mustUnderstand);
+ }
+
+ public boolean getMustUnderstand() {
+ return DomImpl.soapHeaderElement_getMustUnderstand(this);
+ }
+
+ public void setActor(String actor) {
+ DomImpl.soapHeaderElement_setActor(this, actor);
+ }
+
+ public String getActor() {
+ return DomImpl.soapHeaderElement_getActor(this);
+ }
+}
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapHeaderXobj.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapHeaderXobj.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapHeaderXobj.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapHeaderXobj.java Tue May 19 20:10:55 2020
@@ -0,0 +1,57 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+import org.apache.xmlbeans.impl.soap.Name;
+import org.apache.xmlbeans.impl.soap.SOAPHeader;
+import org.apache.xmlbeans.impl.soap.SOAPHeaderElement;
+
+import javax.xml.namespace.QName;
+import java.util.Iterator;
+
+class SoapHeaderXobj extends SoapElementXobj implements SOAPHeader {
+ SoapHeaderXobj(Locale l, QName name) {
+ super(l, name);
+ }
+
+ Xobj newNode(Locale l) {
+ return new SoapHeaderXobj(l, _name);
+ }
+
+ public Iterator examineAllHeaderElements() {
+ return DomImpl.soapHeader_examineAllHeaderElements(this);
+ }
+
+ public Iterator extractAllHeaderElements() {
+ return DomImpl.soapHeader_extractAllHeaderElements(this);
+ }
+
+ public Iterator examineHeaderElements(String actor) {
+ return DomImpl.soapHeader_examineHeaderElements(this, actor);
+ }
+
+ public Iterator examineMustUnderstandHeaderElements(String mustUnderstandString) {
+ return DomImpl.soapHeader_examineMustUnderstandHeaderElements(this, mustUnderstandString);
+ }
+
+ public Iterator extractHeaderElements(String actor) {
+ return DomImpl.soapHeader_extractHeaderElements(this, actor);
+ }
+
+ public SOAPHeaderElement addHeaderElement(Name name) {
+ return DomImpl.soapHeader_addHeaderElement(this, name);
+ }
+}
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapPartDocXobj.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapPartDocXobj.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapPartDocXobj.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapPartDocXobj.java Tue May 19 20:10:55 2020
@@ -0,0 +1,35 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+class SoapPartDocXobj extends DocumentXobj {
+ SoapPartDocXobj(Locale l) {
+ super(l);
+ //super( l, ROOT, DomImpl.DOCUMENT );
+ _soapPartDom = new SoapPartDom(this);
+ }
+
+ DomImpl.Dom getDom() {
+ return _soapPartDom;
+ }
+
+ Xobj newNode(Locale l) {
+ return new SoapPartDocXobj(l);
+ }
+
+ SoapPartDom _soapPartDom;
+}
+
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapPartDom.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapPartDom.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapPartDom.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/SoapPartDom.java Tue May 19 20:10:55 2020
@@ -0,0 +1,395 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+import org.apache.xmlbeans.impl.soap.SOAPEnvelope;
+import org.apache.xmlbeans.impl.soap.SOAPPart;
+import org.w3c.dom.*;
+
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+import java.io.PrintStream;
+import java.util.Iterator;
+
+class SoapPartDom extends SOAPPart implements DomImpl.Dom, Document, NodeList {
+ SoapPartDom(SoapPartDocXobj docXobj) {
+ _docXobj = docXobj;
+ }
+
+ public int nodeType() {
+ return DomImpl.DOCUMENT;
+ }
+
+ public Locale locale() {
+ return _docXobj._locale;
+ }
+
+ public Cur tempCur() {
+ return _docXobj.tempCur();
+ }
+
+ public QName getQName() {
+ return _docXobj._name;
+ }
+
+ public void dump() {
+ dump(System.out);
+ }
+
+ public void dump(PrintStream o) {
+ _docXobj.dump(o);
+ }
+
+ public void dump(PrintStream o, Object ref) {
+ _docXobj.dump(o, ref);
+ }
+
+ public String name() {
+ return "#document";
+ }
+
+ public Node appendChild(Node newChild) {
+ return DomImpl._node_appendChild(this, newChild);
+ }
+
+ public Node cloneNode(boolean deep) {
+ return DomImpl._node_cloneNode(this, deep);
+ }
+
+ public NamedNodeMap getAttributes() {
+ return null;
+ }
+
+ public NodeList getChildNodes() {
+ return this;
+ }
+
+ public Node getParentNode() {
+ return DomImpl._node_getParentNode(this);
+ }
+
+ public Node removeChild(Node oldChild) {
+ return DomImpl._node_removeChild(this, oldChild);
+ }
+
+ public Node getFirstChild() {
+ return DomImpl._node_getFirstChild(this);
+ }
+
+ public Node getLastChild() {
+ return DomImpl._node_getLastChild(this);
+ }
+
+ public String getLocalName() {
+ return DomImpl._node_getLocalName(this);
+ }
+
+ public String getNamespaceURI() {
+ return DomImpl._node_getNamespaceURI(this);
+ }
+
+ public Node getNextSibling() {
+ return DomImpl._node_getNextSibling(this);
+ }
+
+ public String getNodeName() {
+ return DomImpl._node_getNodeName(this);
+ }
+
+ public short getNodeType() {
+ return DomImpl._node_getNodeType(this);
+ }
+
+ public String getNodeValue() {
+ return DomImpl._node_getNodeValue(this);
+ }
+
+ public Document getOwnerDocument() {
+ return DomImpl._node_getOwnerDocument(this);
+ }
+
+ public String getPrefix() {
+ return DomImpl._node_getPrefix(this);
+ }
+
+ public Node getPreviousSibling() {
+ return DomImpl._node_getPreviousSibling(this);
+ }
+
+ public boolean hasAttributes() {
+ return DomImpl._node_hasAttributes(this);
+ }
+
+ public boolean hasChildNodes() {
+ return DomImpl._node_hasChildNodes(this);
+ }
+
+ public Node insertBefore(Node newChild, Node refChild) {
+ return DomImpl._node_insertBefore(this, newChild, refChild);
+ }
+
+ public boolean isSupported(String feature, String version) {
+ return DomImpl._node_isSupported(this, feature, version);
+ }
+
+ public void normalize() {
+ DomImpl._node_normalize(this);
+ }
+
+ public Node replaceChild(Node newChild, Node oldChild) {
+ return DomImpl._node_replaceChild(this, newChild, oldChild);
+ }
+
+ public void setNodeValue(String nodeValue) {
+ DomImpl._node_setNodeValue(this, nodeValue);
+ }
+
+ public void setPrefix(String prefix) {
+ DomImpl._node_setPrefix(this, prefix);
+ }
+
+ // DOM Level 3
+ public Object getUserData(String key) {
+ return DomImpl._node_getUserData(this, key);
+ }
+
+ public Object setUserData(String key, Object data, UserDataHandler handler) {
+ return DomImpl._node_setUserData(this, key, data, handler);
+ }
+
+ public Object getFeature(String feature, String version) {
+ return DomImpl._node_getFeature(this, feature, version);
+ }
+
+ public boolean isEqualNode(Node arg) {
+ return DomImpl._node_isEqualNode(this, arg);
+ }
+
+ public boolean isSameNode(Node arg) {
+ return DomImpl._node_isSameNode(this, arg);
+ }
+
+ public String lookupNamespaceURI(String prefix) {
+ return DomImpl._node_lookupNamespaceURI(this, prefix);
+ }
+
+ public String lookupPrefix(String namespaceURI) {
+ return DomImpl._node_lookupPrefix(this, namespaceURI);
+ }
+
+ public boolean isDefaultNamespace(String namespaceURI) {
+ return DomImpl._node_isDefaultNamespace(this, namespaceURI);
+ }
+
+ public void setTextContent(String textContent) {
+ DomImpl._node_setTextContent(this, textContent);
+ }
+
+ public String getTextContent() {
+ return DomImpl._node_getTextContent(this);
+ }
+
+ public short compareDocumentPosition(Node other) {
+ return DomImpl._node_compareDocumentPosition(this, other);
+ }
+
+ public String getBaseURI() {
+ return DomImpl._node_getBaseURI(this);
+ }
+
+ public Node adoptNode(Node source) {
+ throw new RuntimeException("DOM Level 3 Not implemented");
+ }
+
+ public String getDocumentURI() {
+ throw new RuntimeException("DOM Level 3 Not implemented");
+ }
+
+ public DOMConfiguration getDomConfig() {
+ throw new RuntimeException("DOM Level 3 Not implemented");
+ }
+
+ public String getInputEncoding() {
+ throw new RuntimeException("DOM Level 3 Not implemented");
+ }
+
+ public boolean getStrictErrorChecking() {
+ throw new RuntimeException("DOM Level 3 Not implemented");
+ }
+
+ public String getXmlEncoding() {
+ throw new RuntimeException("DOM Level 3 Not implemented");
+ }
+
+ public boolean getXmlStandalone() {
+ throw new RuntimeException("DOM Level 3 Not implemented");
+ }
+
+ public String getXmlVersion() {
+ throw new RuntimeException("DOM Level 3 Not implemented");
+ }
+
+ public void normalizeDocument() {
+ throw new RuntimeException("DOM Level 3 Not implemented");
+ }
+
+ public Node renameNode(Node n, String namespaceURI, String qualifiedName) {
+ throw new RuntimeException("DOM Level 3 Not implemented");
+ }
+
+ public void setDocumentURI(String documentURI) {
+ throw new RuntimeException("DOM Level 3 Not implemented");
+ }
+
+ public void setStrictErrorChecking(boolean strictErrorChecking) {
+ throw new RuntimeException("DOM Level 3 Not implemented");
+ }
+
+ public void setXmlStandalone(boolean xmlStandalone) {
+ throw new RuntimeException("DOM Level 3 Not implemented");
+ }
+
+ public void setXmlVersion(String xmlVersion) {
+ throw new RuntimeException("DOM Level 3 Not implemented");
+ }
+
+ public Attr createAttribute(String name) {
+ return DomImpl._document_createAttribute(this, name);
+ }
+
+ public Attr createAttributeNS(String namespaceURI, String qualifiedName) {
+ return DomImpl._document_createAttributeNS(this, namespaceURI, qualifiedName);
+ }
+
+ public CDATASection createCDATASection(String data) {
+ return DomImpl._document_createCDATASection(this, data);
+ }
+
+ public Comment createComment(String data) {
+ return DomImpl._document_createComment(this, data);
+ }
+
+ public DocumentFragment createDocumentFragment() {
+ return DomImpl._document_createDocumentFragment(this);
+ }
+
+ public Element createElement(String tagName) {
+ return DomImpl._document_createElement(this, tagName);
+ }
+
+ public Element createElementNS(String namespaceURI, String qualifiedName) {
+ return DomImpl._document_createElementNS(this, namespaceURI, qualifiedName);
+ }
+
+ public EntityReference createEntityReference(String name) {
+ return DomImpl._document_createEntityReference(this, name);
+ }
+
+ public ProcessingInstruction createProcessingInstruction(String target, String data) {
+ return DomImpl._document_createProcessingInstruction(this, target, data);
+ }
+
+ public Text createTextNode(String data) {
+ return DomImpl._document_createTextNode(this, data);
+ }
+
+ public DocumentType getDoctype() {
+ return DomImpl._document_getDoctype(this);
+ }
+
+ public Element getDocumentElement() {
+ return DomImpl._document_getDocumentElement(this);
+ }
+
+ public Element getElementById(String elementId) {
+ return DomImpl._document_getElementById(this, elementId);
+ }
+
+ public NodeList getElementsByTagName(String tagname) {
+ return DomImpl._document_getElementsByTagName(this, tagname);
+ }
+
+ public NodeList getElementsByTagNameNS(String namespaceURI, String localName) {
+ return DomImpl._document_getElementsByTagNameNS(this, namespaceURI, localName);
+ }
+
+ public DOMImplementation getImplementation() {
+ return DomImpl._document_getImplementation(this);
+ }
+
+ public Node importNode(Node importedNode, boolean deep) {
+ return DomImpl._document_importNode(this, importedNode, deep);
+ }
+
+ public int getLength() {
+ return DomImpl._childNodes_getLength(this);
+ }
+
+ public Node item(int i) {
+ return DomImpl._childNodes_item(this, i);
+ }
+
+ public void removeAllMimeHeaders() {
+ DomImpl._soapPart_removeAllMimeHeaders(this);
+ }
+
+ public void removeMimeHeader(String name) {
+ DomImpl._soapPart_removeMimeHeader(this, name);
+ }
+
+ public Iterator getAllMimeHeaders() {
+ return DomImpl._soapPart_getAllMimeHeaders(this);
+ }
+
+ public SOAPEnvelope getEnvelope() {
+ return DomImpl._soapPart_getEnvelope(this);
+ }
+
+ public Source getContent() {
+ return DomImpl._soapPart_getContent(this);
+ }
+
+ public void setContent(Source source) {
+ DomImpl._soapPart_setContent(this, source);
+ }
+
+ public String[] getMimeHeader(String name) {
+ return DomImpl._soapPart_getMimeHeader(this, name);
+ }
+
+ public void addMimeHeader(String name, String value) {
+ DomImpl._soapPart_addMimeHeader(this, name, value);
+ }
+
+ public void setMimeHeader(String name, String value) {
+ DomImpl._soapPart_setMimeHeader(this, name, value);
+ }
+
+ public Iterator getMatchingMimeHeaders(String[] names) {
+ return DomImpl._soapPart_getMatchingMimeHeaders(this, names);
+ }
+
+ public Iterator getNonMatchingMimeHeaders(String[] names) {
+ return DomImpl._soapPart_getNonMatchingMimeHeaders(this, names);
+ }
+
+ public boolean nodeCanHavePrefixUri() {
+ return true;
+ }
+
+ SoapPartDocXobj _docXobj;
+}
+
Added: xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/TextNode.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/TextNode.java?rev=1877931&view=auto
==============================================================================
--- xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/TextNode.java (added)
+++ xmlbeans/trunk/src/store/org/apache/xmlbeans/impl/store/TextNode.java Tue May 19 20:10:55 2020
@@ -0,0 +1,48 @@
+/* Copyright 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+package org.apache.xmlbeans.impl.store;
+
+import org.w3c.dom.Text;
+
+class TextNode extends CharNode implements Text {
+ TextNode(Locale l) {
+ super(l);
+ }
+
+ public int nodeType() {
+ return DomImpl.TEXT;
+ }
+
+ public String name() {
+ return "#text";
+ }
+
+ public Text splitText(int offset) {
+ return DomImpl._text_splitText(this, offset);
+ }
+
+ public String getWholeText() {
+ return DomImpl._text_getWholeText(this);
+ }
+
+ public boolean isElementContentWhitespace() {
+ return DomImpl._text_isElementContentWhitespace(this);
+ }
+
+ public Text replaceWholeText(String content) {
+ return DomImpl._text_replaceWholeText(this, content);
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org