You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by he...@apache.org on 2004/09/15 14:35:33 UTC
svn commit: rev 46113 - in webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath: . axiom axiom/src axiom/src/java axiom/src/java/org axiom/src/java/org/apache axiom/src/java/org/apache/axis axiom/src/java/org/apache/axis/axiom axiom/src/java/org/apache/axis/axiom/infoset axiom/src/java/org/apache/axis/axiom/util
Author: hemapani
Date: Wed Sep 15 05:35:32 2004
New Revision: 46113
Added:
webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/
webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/
webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/
webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/
webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/
webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/
webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/
webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/axiom/
webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/axiom/OMAttributeImpl.java
webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/axiom/OMElementImpl.java
webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/axiom/infoset/
webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/axiom/infoset/OMElement.java
webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/axiom/infoset/OmAttribute.java
webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/axiom/util/
webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/axiom/util/QName.java
Log:
Added: webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/axiom/OMAttributeImpl.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/axiom/OMAttributeImpl.java Wed Sep 15 05:35:32 2004
@@ -0,0 +1,47 @@
+package org.apache.axis.axiom;
+
+import org.apache.xml.utils.QName;
+import org.apache.axis.axiom.infoset.OmAttribute;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * 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.
+ *
+ * Date: 15-Sep-2004
+ * Time: 14:32:27
+ */
+public class OMAttributeImpl implements OmAttribute {
+ private QName qname;
+ private String value;
+ //do we need a qname here as the value???????????
+ //how weird! But it seems that there are cases
+
+ public QName getQname() {
+ return qname;
+ }
+
+ public void setQname(QName qname) {
+ this.qname = qname;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+
+}
\ No newline at end of file
Added: webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/axiom/OMElementImpl.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/axiom/OMElementImpl.java Wed Sep 15 05:35:32 2004
@@ -0,0 +1,128 @@
+package org.apache.axis.axiom;
+
+import org.apache.axis.axiom.infoset.OMElement;
+
+import java.util.List;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * 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.
+ *
+ *
+ *
+ * Date: 15-Sep-2004
+ * Time: 13:46:46
+ * To change this template use Options | File Templates.
+ */
+public class OMElementImpl implements OMElement {
+ private String namespaceName;
+ private String localName;
+ private String prefix;
+ private String text;
+ private List children;
+ private List attributes;
+ private OMElement parent; //OMElementImpl????? what about the root that needs the document object as the parent???
+
+ public String getNamespaceName() {
+ return namespaceName;
+ }
+
+ public void setNamespaceName(String namespaceName) {
+ this.namespaceName = namespaceName;
+ }
+
+ public String getLocalName() {
+ return localName;
+ }
+
+ public void setLocalName(String localName) {
+ this.localName = localName;
+ }
+
+ public String getPrefix() {
+ return prefix;
+ }
+
+ public void setPrefix(String prefix) {
+ this.prefix = prefix;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ public List getChildren() {
+ // we throw an unsupported operation exception since we
+ // dont want to parse the whole thing
+ throw new UnsupportedOperationException();
+ }
+
+ public void setChildren(List children) {
+ this.children = children;
+ }
+
+ /**
+ * This returns a list of OMAttributes
+ * @return
+ */
+ public List getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(List attributes) {
+ this.attributes = attributes;
+ }
+
+ public OMElement getParent() {
+ return parent;
+ }
+
+ public void setParent(OMElement parent) {
+ this.parent = parent;
+ }
+
+ //newly introduced methods
+
+ /**
+ * Get the next child of this element. The parser will proceed from the
+ * current cursor position
+ * @return
+ */
+ public OMElement getNextChild(){
+ return null;
+ }
+
+ /**
+ * returns the particular element with the given local name and the namespace
+ * which is the next child in the
+ * @param namespace
+ * @param localName
+ * @return
+ */
+ public OMElement getNextChild(String namespace,String localName){
+ return null;
+ }
+
+ /**
+ * This will add a child element to the list of children
+ * @param child
+ */
+ public void addChild(OMElement child){
+
+ }
+}
Added: webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/axiom/infoset/OMElement.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/axiom/infoset/OMElement.java Wed Sep 15 05:35:32 2004
@@ -0,0 +1,134 @@
+package org.apache.axis.axiom.infoset;
+
+
+import java.util.List;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * 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.
+ *
+ *
+ * Date: Sep 15, 2004
+ * Time: 5:09:34 PM
+ * The intention of this information item is to have a formal interface to the
+ * Element. This contains a stripped down set of properties from the XML info set
+ * specification
+ */
+public interface OMElement {
+ /**
+ *
+ * @return
+ */
+ String getNamespaceName();
+
+ /**
+ *
+ * @param namespaceName
+ */
+ void setNamespaceName(String namespaceName);
+
+ /**
+ *
+ * @return
+ */
+ String getLocalName();
+
+ /**
+ *
+ * @param localName
+ */
+ void setLocalName(String localName);
+
+ /**
+ *
+ * @return
+ */
+ String getPrefix();
+
+ /**
+ *
+ * @param prefix
+ */
+ void setPrefix(String prefix);
+
+ /**
+ *
+ * @return
+ */
+ String getText();
+
+ /**
+ *
+ * @param text
+ */
+ void setText(String text);
+
+ /**
+ * The actual implementation may not need to
+ * do this since it may casue the document to
+ * be parsed in an unwanted manner
+ * @return a child element list
+ */
+ List getChildren();
+
+ /**
+ *
+ * @param children a list of child elements
+ */
+ void setChildren(List children);
+
+ /**
+ *
+ * @return List of OMattribute objects
+ */
+ List getAttributes();
+
+ /**
+ *
+ * @param attributes
+ */
+ void setAttributes(List attributes);
+
+ /**
+ * @return The parent OMelement as described in the info set specification
+ */
+ OMElement getParent();
+
+ /**
+ * @param parent OMelement as described in the info set specification
+ */
+ void setParent(OMElement parent);
+
+ /**
+ * Get the next child of this element. The parser will proceed from the
+ * current cursor position
+ * @return
+ */
+ OMElement getNextChild();
+
+ /**
+ * returns the particular element with the given local name and the namespace
+ * which is the next child in the
+ * @param namespace
+ * @param localName
+ * @return
+ */
+ OMElement getNextChild(String namespace,String localName);
+
+ /**
+ * This will add a child element to the list of children
+ * @param child
+ */
+ void addChild(OMElement child);
+}
Added: webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/axiom/infoset/OmAttribute.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/axiom/infoset/OmAttribute.java Wed Sep 15 05:35:32 2004
@@ -0,0 +1,33 @@
+package org.apache.axis.axiom.infoset;
+
+import org.apache.xml.utils.QName;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * 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.
+ *
+ * @author Ajith Ranabahu
+ * Date: Sep 15, 2004
+ * Time: 5:11:24 PM
+
+ */
+public interface OmAttribute {
+ QName getQname();
+
+ void setQname(QName qname);
+
+ String getValue();
+
+ void setValue(String value);
+}
Added: webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/axiom/util/QName.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/ajith_deepal_srinath/axiom/src/java/org/apache/axis/axiom/util/QName.java Wed Sep 15 05:35:32 2004
@@ -0,0 +1,26 @@
+package org.apache.axis.axiom.util;
+
+/**
+ *Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * 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.
+ *
+ * Date: 15-Sep-2004
+ * Time: 14:29:21
+ * To change this template use Options | File Templates.
+ */
+public class QName {
+ //implementation awaits. We have to think whether this
+ //needs the standard Qname implementation or one of our
+ //own. Experts need to comment on this :-)
+}