You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by as...@apache.org on 2004/10/20 07:07:31 UTC
svn commit: rev 55128 - in webservices/axis/trunk/java/dev/scratch/alek: . axiom axiom/infoset_api/org/apache/axis/om
Author: aslom
Date: Tue Oct 19 22:07:30 2004
New Revision: 55128
Added:
webservices/axis/trunk/java/dev/scratch/alek/axiom/build.xml
webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/Iterable.java
webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMAttribute.java
webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMComment.java
webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMContained.java
webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMContainer.java
webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMDocument.java
webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMElement.java
webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMException.java
webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMNamespace.java
webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMText.java
Removed:
webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/XmlElement.java
Modified:
webservices/axis/trunk/java/dev/scratch/alek/README.txt
Log:
revised OM API (see README for details)
Modified: webservices/axis/trunk/java/dev/scratch/alek/README.txt
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/alek/README.txt (original)
+++ webservices/axis/trunk/java/dev/scratch/alek/README.txt Tue Oct 19 22:07:30 2004
@@ -1 +1,22 @@
-test space
\ No newline at end of file
+This is reviewed version of existing OM APIs modified
+to make it more lightweight in particular to allow String
+to be a direct child of OMElement and to have as many
+as possible immutable objects.
+
+The biggest difference is that OMNode is removed and there is
+no one superclass for all XML Information Items.
+This allows to store String directly as child of OMElement.
+
+Iterable was used instead of Iterator to ease future transition
+to JDK5 and to support foreach.
+
+When DOM API wrapper is done over OM API it will have to use
+Node super interface but this should be deferred defer to situations
+only when DOM API is *requested* by some handlers and may be possible
+to contain it only for some XML sub-tree. There may be still some
+more changes depending on how much of DOM API we are required to implement.
+
+The issue that is not clear to me is how OM API can be used to
+access event stream for SOAP:Body content
+(and avoid building OM elements for its content)
+- how isComplete() method should be used in this context?
Added: webservices/axis/trunk/java/dev/scratch/alek/axiom/build.xml
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/alek/axiom/build.xml Tue Oct 19 22:07:30 2004
@@ -0,0 +1,130 @@
+<?xml version="1.0"?>
+
+<!-- Author: Alek -->
+
+<project name="AXIOM" default="compile" basedir=".">
+
+<!-- set global properties for this build -->
+
+ <property environment="env" />
+ <property name="JAVA_HOME" value="${env.JAVA_HOME}" />
+ <property name="PROJECT" value="${ant.project.name}" />
+ <property name="VERSION" value="1.0-b2" />
+
+ <!-- Parent source directory -->
+ <property name="src" value=""/>
+ <property name="src_api" value="infoset_api"/>
+
+ <!-- Lib directory -->
+ <property name="lib" value="lib" />
+
+ <!-- Build directory -->
+ <property name="build" value="build" />
+ <property name="build_classes" value="build/classes" />
+
+ <!-- The base directory -->
+ <property name="basedir" value="." />
+
+ <target name="help">
+ <echo message="Re-run with arg -projecthelp to find out available targets."/>
+ <echo message="Here are the basic target"/>
+ <echo message="ant all will re-compile the project"/>
+ <echo message="ant junit will run unit tests"/>
+ </target>
+
+ <!-- Initialization stuff -->
+ <target name="init">
+ <!-- Create the time stamp -->
+ <tstamp />
+ <echo message="Project: ${ant.project.name} (${VERSION})"/>
+ <echo message="${ant.version}"/>
+ <echo message="${JAVA_HOME}"/>
+ <echo message="Java version: ${ant.java.version}"/>
+ <mkdir dir="${build_classes}"/>
+ <mkdir dir="${lib}"/>
+ <available property="junit_present" classname="junit.framework.TestCase" />
+ </target>
+
+ <target name="check_junit" unless="junit_present" depends="init">
+ <echo message="Warning: JUnit dependencies were not resolved."/>
+ </target>
+
+ <path id="common_libraries">
+ <fileset dir="${lib}">
+ <include name="xpp3/*.jar" />
+ </fileset>
+ <pathelement path="${build_classes}"/>
+ </path>
+
+ <path id="all_libraries">
+ <fileset dir="${lib}">
+ <include name="**/*.jar" />
+ </fileset>
+ <dirset dir="${build_classes}">
+ <include name="*" />
+ </dirset>
+ </path>
+
+
+ <!--- COMPILING -->
+
+ <target name="all" depends="clean,compile" />
+ <target name="compile" depends="api" />
+
+ <target name="api" depends="init">
+ <mkdir dir="${build_classes}"/>
+ <touch file="${build_classes}/axiom-${VERSION}" />
+ <javac srcdir="${src_api}" destdir="${build_classes}" debug="on" source="1.4">
+ <classpath refid="common_libraries"/>
+ </javac>
+ </target>
+
+ <target name="jar" depends="compile">
+ <jar jarfile="${om_jar}">
+ <fileset dir="${build_classes}"/>
+ </jar>
+ </target>
+
+
+
+ <!-- Clean up -->
+ <target name="clean">
+ <!-- Delete the ${build} directory trees -->
+ <delete dir="${build}" />
+ <delete>
+ <fileset dir="${src}" defaultexcludes="no">
+ <include name="**/*~" />
+ </fileset>
+ </delete>
+ </target>
+
+ <!-- SAMPLES -->
+ <target name="samples" depends="jar">
+ <mkdir dir="${build_samples}"/>
+ <javac srcdir="${src_samples}" destdir="${build_samples}" debug="on" source="1.4"
+ excludes="xsul_sample_wsa/**"
+ >
+ <classpath refid="all_libraries"/>
+ </javac>
+ </target>
+
+ <!-- TESTS -->
+ <target name="tests" depends="check_junit,compile" if="junit_present">
+ <mkdir dir="${build_tests}"/>
+ <javac srcdir="${src_tests}" destdir="${build_tests}" debug="on" source="1.4">
+ <classpath refid="all_libraries"/>
+ </javac>
+ </target>
+
+
+ <target name="junit" depends="tests" if="junit_present">
+ <java classname="AllTests"
+ classpathref="all_libraries"
+ fork="yes"
+ failonerror="true"
+ >
+ </java>
+ </target>
+
+
+</project>
Added: webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/Iterable.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/Iterable.java Tue Oct 19 22:07:30 2004
@@ -0,0 +1,28 @@
+/*
+ * 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.axis.om;
+
+import java.util.Iterator;
+
+//JDK15 remove and replace usage with real Iterable
+/**
+ * Use java.lang.Iterable instead when JDK 1.5 comes out ...*
+ */
+public interface Iterable
+{
+ public Iterator iterator();
+}
+
Added: webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMAttribute.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMAttribute.java Tue Oct 19 22:07:30 2004
@@ -0,0 +1,76 @@
+/*
+ * 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.axis.om;
+
+/**
+ * This is <b>immutable</b> value object that represents
+ * <a href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">Attribute
+ * Information Item</a>
+ * with exception of <b>references</b> property.
+ * <br />NOTE: this interface has no parent property to make easy classes implementing this interface
+ * immutable and very lightweight.
+ * <br />NOTE: namespace and prefix properties are folded into XmlNamespace value object.
+ */
+public interface OMAttribute extends Cloneable
+{
+ /**
+ * Method clone
+ *
+ * @return the clone of attribute
+ *
+ * @exception CloneNotSupportedException
+ *
+ */
+ public Object clone() throws CloneNotSupportedException;
+
+ /**
+ * XML Infoset [owner element] property
+ */
+ //public XmlElement getOwner();
+ //public XmlElement setOwner(XmlElement newOwner);
+
+ /**
+ * return XML Infoset [namespace name] property (namespaceName from getNamespace()
+ * or null if attribute has no namespace
+ */
+ public String getNamespaceName();
+
+ /**
+ * Combination of XML Infoset [namespace name] and [prefix] properties
+ */
+ public OMNamespace getNamespace();
+
+ /**
+ * XML Infoset [local name] property
+ */
+ public String getName();
+
+
+ /**
+ * XML Infoset [normalized value] property
+ */
+ public String getValue();
+
+ /**
+ * XML Infoset [attribute type]
+ */
+
+ public String getType();
+ /**
+ * XML Infoset [specified] flag
+ */
+ public boolean isSpecified();
+}
Added: webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMComment.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMComment.java Tue Oct 19 22:07:30 2004
@@ -0,0 +1,29 @@
+/*
+ * 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.axis.om;
+
+/**
+ * Represents
+ * <a href="http://www.w3.org/TR/xml-infoset/#infoitem.comment">Comment Information Item</a>.
+ */
+
+public interface OMComment extends Cloneable
+{
+ /**
+ * A string representing the content of the comment.
+ */
+ public String getContent();
+}
Added: webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMContained.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMContained.java Tue Oct 19 22:07:30 2004
@@ -0,0 +1,27 @@
+/*
+ * 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.axis.om;
+
+import java.io.IOException;
+
+/**
+ * Common abstraction to represent XML infoset item that are contained in other infoet items
+ * This is useful so parent can be updated on contained items when container is cloned ...
+ */
+public interface OMContained {
+ public OMContainer getParent();
+ public void setParent(OMContainer el);
+}
Added: webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMContainer.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMContainer.java Tue Oct 19 22:07:30 2004
@@ -0,0 +1,26 @@
+/*
+ * 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.axis.om;
+
+import java.io.IOException;
+
+/**
+ * Common abstraction shared between OMElement, OMDocument and OMDoctype
+ * to represent XML infoset item that can contain other infoset items
+ * This is useful so getParent() operation will return this instead of Object ...
+ */
+public interface OMContainer {
+}
Added: webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMDocument.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMDocument.java Tue Oct 19 22:07:30 2004
@@ -0,0 +1,61 @@
+/*
+ * 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.axis.om;
+
+import java.io.OutputStream;
+
+/**
+ * Represents
+ * <a href="http://www.w3.org/TR/xml-infoset/#infoitem.document">Document Information Item</a>
+ * .
+ *
+ * @version $Revision: 1.5 $
+ * @author <a href="http://www.extreme.indiana.edu/~aslom/">Aleksander Slominski</a>
+ */
+public interface OMDocument extends OMContainer, Cloneable
+{
+ //JDK15 covariant public XmlDocument clone() throws CloneNotSupportedException
+ public Object clone() throws CloneNotSupportedException;
+
+ /**
+ * An ordered list of child information items, in document order.
+ * The list contains exactly one element information item.
+ * The list also contains one processing instruction information item
+ * for each processing instruction outside the document element,
+ * and one comment information item for each comment outside the document element.
+ * Processing instructions and comments within the DTD are excluded.
+ * If there is a document type declaration,
+ * the list also contains a document type declaration information item.
+ */
+ public Iterable children();
+
+ /**
+ * top level document element
+ */
+ public OMElement getDocumentElement();
+ // manipulate children
+ public void setDocumentElement(OMElement rootElement);
+
+ public String getBaseUri();
+ public String getCharacterEncodingScheme();
+ public void setCharacterEncodingScheme(String characterEncoding);
+ public Boolean isStandalone();
+ public String getVersion();
+ //public String setVersion();
+ public boolean isAllDeclarationsProcessed();
+
+
+}
Added: webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMElement.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMElement.java Tue Oct 19 22:07:30 2004
@@ -0,0 +1,239 @@
+/*
+ * 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.axis.om;
+
+import org.apache.xml.utils.QName;
+
+/**
+ * Represents
+ * <a href="http://www.w3.org/TR/xml-infoset/#infoitem.element">Element Information Item</a>
+ * except for in-scope namespaces that can be reconstructed by visiting this element parent,
+ * checking its namespaces, then grandparent and so on. For convenience there are
+ * methods to resolve namespace prefix for given namespace name.
+ *
+ * <br />NOTE: this representaiton is optimized for streaming - iterator approach that
+ * allows gradual visiting of nodes is preferred over indexed access.
+ *
+ * @version $Revision: 1.23 $
+ * @author <a href="http://www.extreme.indiana.edu/~aslom/">Aleksander Slominski</a>
+ */
+public interface OMElement extends OMContainer, OMContained, Cloneable{
+ public static final String NO_NAMESPACE = "";
+
+ //JDK15 covariant public OMElement clone() throws CloneNotSupportedException
+ /**
+ * Method clone
+ *
+ * @return an Object
+ *
+ * @exception CloneNotSupportedException
+ *
+ */
+ public Object clone() throws CloneNotSupportedException;
+
+ //----------------------------------------------------------------------------------------------
+ // general properties
+
+ /**
+ * XML Infoset [base URI] property
+ *
+ * @return a String
+ *
+ */
+ public String getBaseUri();
+
+ /**
+ * XML Infoset [base URI] property
+ *
+ * @param baseUri a String
+ *
+ */
+ public void setBaseUri(String baseUri);
+
+ /**
+ * Get top most container that is either XmlDocument or XmlElement (may be event this element!!!)
+ */
+ public OMContainer getRoot();
+
+ /**
+ * XML Infoset [parent] property.
+ * If current element is not child of containing parent XmlElement or XmlDocument
+ * then builder exception will be thrown
+ */
+ public OMContainer getParent();
+
+ /**
+ * Method setParent
+ *
+ * @param parent a XmlContainer
+ *
+ */
+ public void setParent(OMContainer parent);
+
+ /**
+ * Return namespace of current element
+ * (XML Infoset [namespace name] and [prefix] properties combined)
+ * null is only returned if
+ * element was created without namespace
+ * */
+ public OMNamespace getNamespace();
+
+ /**
+ * Return namespace name (XML Infoset [namespace name]property
+ * or null if element has no namespace
+ */
+ public String getNamespaceName();
+
+ /**
+ * Set namespace ot use for theis element.
+ * Note: namespace prefix is <b>always</b> ignored.
+ */
+ public void setNamespace(OMNamespace namespace);
+
+ // public String getPrefix();
+ // public void setPrefix(String prefix);
+
+ /**
+ * XML Infoset [local name] property.
+ *
+ * @return a String
+ *
+ */
+ public String getLocalName();
+
+ /**
+ * XML Infoset [local name] property.
+ *
+ * @param name a String
+ *
+ */
+ public void setLocalName(String name);
+
+
+
+ /**
+ * This will add child to the element. One must preserve the order of children, in this operation
+ * Tip : appending the new child is prefered
+ * @param omNode
+ */
+ public void addChild(Object child);
+
+ /**
+ * This will search for children with a given QName and will return an iterator to traverse through
+ * the OMNodes.
+ * This QName can contain any combination of prefix, localname and URI
+ * @param elementQName
+ * @return
+ * @throws OMException
+ */
+ public Iterable getChildrenWithName(QName elementQName) throws OMException;
+
+ /**
+ * This returns a collection of this element.
+ * Children can be of types OMElement, OMText.
+ */
+ public Iterable getChildren();
+
+ //----------------------------------------------------------------------------------------------
+ // namespaces
+
+ /**
+ * Add namespace to current element (both prefix and namespace name must be not null)
+ */
+ public void declareNamespace(OMNamespace namespace);
+
+ /**
+ * Method hasNamespaceDeclarations
+ *
+ * @return a boolean
+ */
+ public boolean hasNamespaceDeclarations();
+
+ /**
+ * This will find a namespace with the given uri and prefix, in the scope of the docuemnt.
+ * Find namespace corresponding to namespace prefix and namespace name (at least one must be not null)
+ * checking first current elemen and if not found continue in parent (if element has parent)
+ * and so on.
+ */
+ public OMNamespace resolveNamespace(String uri, String prefix) throws OMException;
+
+ /**
+ * Create new unattached namespace with null prefix (namespace name must be not null).
+ */
+ public OMNamespace newNamespace(String namespaceName);
+
+ /**
+ * Create new namespace with prefix and namespace name (both must be not null).
+ */
+ public OMNamespace newNamespace(String prefix, String namespaceName);
+
+ /**
+ * Method removeAllNamespaceDeclarations
+ *
+ */
+ public void removeAllNamespaceDeclarations();
+
+
+ //----------------------------------------------------------------------------------------------
+ // attributes
+
+ /**
+ * This return an attribute with a given QName within this Element or null of none found.
+ * @param qname
+ * @return
+ * @throws OMException
+ */
+ public OMAttribute getAttribute(QName attributeName) throws OMException;
+
+ /**
+ * This will return a List of OMAttributes
+ *
+ * @return
+ */
+ public Iterable getAttributes();
+
+ /**
+ * Check if this element has any attributes.
+ *
+ * @return a boolean
+ *
+ */
+ public boolean hasAttributes();
+
+ /**
+ * This will insert attribute to this element
+ * (note attributes order is undefined in XML Infoset!).
+ *
+ * @param attr
+ */
+ public void setAttribute(OMAttribute attr);
+
+ /**
+ * Remove attribute
+ *
+ * @param attr
+ */
+ public void removeAttribute(OMAttribute attr);
+ public void removeAttribute(QName attributeName);
+
+ /**
+ * Method removeAllAttributes
+ *
+ */
+ public void removeAllAttributes();
+}
+
+
Added: webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMException.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMException.java Tue Oct 19 22:07:30 2004
@@ -0,0 +1,33 @@
+/*
+ * 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.axis.om;
+
+public class OMException extends RuntimeException {
+ public OMException() {
+ }
+
+ public OMException(String message) {
+ super(message);
+ }
+
+ public OMException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public OMException(Throwable cause) {
+ super(cause);
+ }
+}
Added: webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMNamespace.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMNamespace.java Tue Oct 19 22:07:30 2004
@@ -0,0 +1,40 @@
+/*
+ * 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.axis.om;
+
+
+/**
+ * Represents
+ * <a href="http://www.w3.org/TR/xml-infoset/#infoitem.namespace">Namespace Information Item</a>.
+ */
+public interface OMNamespace {
+ /**
+ * Prefix can be null.
+ * In this case it will be looked up from XML tree
+ * and used if available
+ * otherwise it will be automatically created only for serializaiton.
+ * TODO: If prefix is empty string it will be used to indicate default namespace.
+ */
+ public String getPrefix();
+
+ /**
+ * Namespace name.
+ * Never null.
+ * Only allowed to be empty string if prefix is also empty string
+ * (used to undeclare default namespace)
+ */
+ public String getNamespaceName();
+}
Added: webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMText.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/alek/axiom/infoset_api/org/apache/axis/om/OMText.java Tue Oct 19 22:07:30 2004
@@ -0,0 +1,31 @@
+/*
+ * 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.axis.om;
+
+/**
+ * Represents otrdered colection of
+ * <a href="http://www.w3.org/TR/xml-infoset/#infoitem.character">Character Information Items</a>
+ * where character code properties are put together into Java String.
+ * <br />NOTE: this interface is designed to be immutable and very lightweight wrapper around Java String.
+ *
+ * @version $Revision: 1.4 $
+ * @author <a href="http://www.extreme.indiana.edu/~aslom/">Aleksander Slominski</a>
+ */
+public interface OMText
+{
+ public String getText();
+ public Boolean isWhitespaceContent();
+}