cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r614641 - in /incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis: AegisContext.java AegisElementDataWriter.java databinding/AegisDatabinding.java
Date Wed, 23 Jan 2008 19:51:56 GMT
Author: bimargulies
Date: Wed Jan 23 11:51:54 2008
New Revision: 614641

URL: http://svn.apache.org/viewvc?rev=614641&view=rev
Log:
Fill in a little more of the 'standalone' aegis API.

Added:
    incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisElementDataWriter.java
  (with props)
Modified:
    incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisContext.java
    incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisContext.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisContext.java?rev=614641&r1=614640&r2=614641&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisContext.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisContext.java
Wed Jan 23 11:51:54 2008
@@ -25,6 +25,7 @@
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
 
 import org.apache.cxf.aegis.type.Configuration;
 import org.apache.cxf.aegis.type.DefaultTypeMappingRegistry;
@@ -119,6 +120,16 @@
     public AegisReader<XMLStreamReader>
     createXMLStreamReader() {
         return new AegisXMLStreamDataReader(this);
+    }
+    
+    public AegisWriter<org.w3c.dom.Element>
+    createDomElementWriter() {
+        return new AegisElementDataWriter(this);
+    }
+    
+    public AegisWriter<XMLStreamWriter>
+    createXMLStreamWriter() {
+        return new AegisXMLStreamDataWriter(this);
     }
     
     /**

Added: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisElementDataWriter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisElementDataWriter.java?rev=614641&view=auto
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisElementDataWriter.java
(added)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisElementDataWriter.java
Wed Jan 23 11:51:54 2008
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.cxf.aegis;
+
+import javax.xml.namespace.QName;
+import org.w3c.dom.Element;
+
+import org.apache.cxf.aegis.type.Type;
+import org.apache.cxf.staxutils.W3CDOMStreamWriter;
+
+/**
+ * 
+ */
+public class AegisElementDataWriter extends AbstractAegisIoImpl 
+       implements AegisWriter<Element> {
+    
+    protected AegisXMLStreamDataWriter writer;
+
+    public AegisElementDataWriter(AegisContext globalContext) {
+        super(globalContext);
+        writer = new AegisXMLStreamDataWriter(globalContext);
+    }
+
+    public void write(Object obj, QName elementName, boolean optional, Element output, Type
aegisType)
+        throws Exception {
+        W3CDOMStreamWriter swriter = new W3CDOMStreamWriter(output);
+        writer.write(obj, elementName, optional, swriter, aegisType);
+    }
+}

Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisElementDataWriter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisElementDataWriter.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java?rev=614641&r1=614640&r2=614641&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
Wed Jan 23 11:51:54 2008
@@ -50,10 +50,9 @@
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.SOAPConstants;
 import org.apache.cxf.common.xmlschema.SchemaCollection;
-import org.apache.cxf.databinding.DataBinding;
+import org.apache.cxf.databinding.AbstractDataBinding;
 import org.apache.cxf.databinding.DataReader;
 import org.apache.cxf.databinding.DataWriter;
-import org.apache.cxf.databinding.source.AbstractDataBinding;
 import org.apache.cxf.frontend.MethodDispatcher;
 import org.apache.cxf.frontend.SimpleMethodDispatcher;
 import org.apache.cxf.helpers.CastUtils;
@@ -81,7 +80,7 @@
 /**
  * CXF databinding object for Aegis. 
  */
-public class AegisDatabinding extends AbstractDataBinding implements DataBinding {
+public class AegisDatabinding extends AbstractDataBinding {
     
     // these are here only for compatibility.
     /**



Mime
View raw message