You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by aj...@apache.org on 2007/07/25 08:30:17 UTC
svn commit: r559329 [15/38] - in /webservices/commons/site/XmlSchema: ./
apidocs/ apidocs/org/apache/ws/commons/schema/
apidocs/org/apache/ws/commons/schema/class-use/
apidocs/org/apache/ws/commons/schema/constants/
apidocs/org/apache/ws/commons/schema...
Added: webservices/commons/site/XmlSchema/xref-test/tests/customext/attrib/CustomExtensionSerializerTest.html
URL: http://svn.apache.org/viewvc/webservices/commons/site/XmlSchema/xref-test/tests/customext/attrib/CustomExtensionSerializerTest.html?view=auto&rev=559329
==============================================================================
--- webservices/commons/site/XmlSchema/xref-test/tests/customext/attrib/CustomExtensionSerializerTest.html (added)
+++ webservices/commons/site/XmlSchema/xref-test/tests/customext/attrib/CustomExtensionSerializerTest.html Tue Jul 24 23:29:55 2007
@@ -0,0 +1,101 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+<title>CustomExtensionSerializerTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a> <em class="jxr_comment">/*</em>
+<a name="2" href="#2">2</a> <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one</em>
+<a name="3" href="#3">3</a> <em class="jxr_comment"> * or more contributor license agreements. See the NOTICE file</em>
+<a name="4" href="#4">4</a> <em class="jxr_comment"> * distributed with this work for additional information</em>
+<a name="5" href="#5">5</a> <em class="jxr_comment"> * regarding copyright ownership. The ASF licenses this file</em>
+<a name="6" href="#6">6</a> <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the</em>
+<a name="7" href="#7">7</a> <em class="jxr_comment"> * "License"); you may not use this file except in compliance</em>
+<a name="8" href="#8">8</a> <em class="jxr_comment"> * with the License. You may obtain a copy of the License at</em>
+<a name="9" href="#9">9</a> <em class="jxr_comment"> *</em>
+<a name="10" href="#10">10</a> <em class="jxr_comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="11" href="#11">11</a> <em class="jxr_comment"> *</em>
+<a name="12" href="#12">12</a> <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,</em>
+<a name="13" href="#13">13</a> <em class="jxr_comment"> * software distributed under the License is distributed on an</em>
+<a name="14" href="#14">14</a> <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</em>
+<a name="15" href="#15">15</a> <em class="jxr_comment"> * KIND, either express or implied. See the License for the</em>
+<a name="16" href="#16">16</a> <em class="jxr_comment"> * specific language governing permissions and limitations</em>
+<a name="17" href="#17">17</a> <em class="jxr_comment"> * under the License.</em>
+<a name="18" href="#18">18</a> <em class="jxr_comment"> */</em>
+<a name="19" href="#19">19</a> <strong class="jxr_keyword">package</strong> tests.customext.attrib;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> junit.framework.TestCase;
+<a name="22" href="#22">22</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.XmlSchema;
+<a name="23" href="#23">23</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.XmlSchemaCollection;
+<a name="24" href="#24">24</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.XmlSchemaElement;
+<a name="25" href="#25">25</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.constants.Constants;
+<a name="26" href="#26">26</a> <strong class="jxr_keyword">import</strong> org.w3c.dom.Document;
+<a name="27" href="#27">27</a> <strong class="jxr_keyword">import</strong> tests.Resources;
+<a name="28" href="#28">28</a>
+<a name="29" href="#29">29</a> <strong class="jxr_keyword">import</strong> javax.xml.parsers.DocumentBuilderFactory;
+<a name="30" href="#30">30</a> <strong class="jxr_keyword">import</strong> java.io.ByteArrayInputStream;
+<a name="31" href="#31">31</a> <strong class="jxr_keyword">import</strong> java.io.ByteArrayOutputStream;
+<a name="32" href="#32">32</a> <strong class="jxr_keyword">import</strong> java.util.Iterator;
+<a name="33" href="#33">33</a> <strong class="jxr_keyword">import</strong> java.util.Map;
+<a name="34" href="#34">34</a>
+<a name="35" href="#35">35</a> <em class="jxr_javadoccomment">/**</em>
+<a name="36" href="#36">36</a> <em class="jxr_javadoccomment"> * Test class to do a full parsing run with the extensions</em>
+<a name="37" href="#37">37</a> <em class="jxr_javadoccomment"> */</em>
+<a name="38" href="#38">38</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../tests/customext/attrib/CustomExtensionSerializerTest.html">CustomExtensionSerializerTest</a> <strong class="jxr_keyword">extends</strong> TestCase {
+<a name="39" href="#39">39</a>
+<a name="40" href="#40">40</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSerialization() <strong class="jxr_keyword">throws</strong> Exception {
+<a name="41" href="#41">41</a> <em class="jxr_comment">//set the system property for the custom extension registry</em>
+<a name="42" href="#42">42</a> System.setProperty(Constants.SystemConstants.EXTENSION_REGISTRY_KEY,
+<a name="43" href="#43">43</a> CustomExtensionRegistry.<strong class="jxr_keyword">class</strong>.getName());
+<a name="44" href="#44">44</a>
+<a name="45" href="#45">45</a> <em class="jxr_comment">//create a DOM document</em>
+<a name="46" href="#46">46</a> DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+<a name="47" href="#47">47</a> documentBuilderFactory.setNamespaceAware(<strong class="jxr_keyword">true</strong>);
+<a name="48" href="#48">48</a> Document doc1 = documentBuilderFactory.newDocumentBuilder().
+<a name="49" href="#49">49</a> parse(Resources.asURI(<span class="jxr_string">"/external/externalAnnotations.xsd"</span>));
+<a name="50" href="#50">50</a>
+<a name="51" href="#51">51</a> XmlSchemaCollection schemaCol = <strong class="jxr_keyword">new</strong> XmlSchemaCollection();
+<a name="52" href="#52">52</a> XmlSchema schema = schemaCol.read(doc1,<strong class="jxr_keyword">null</strong>);
+<a name="53" href="#53">53</a> assertNotNull(schema);
+<a name="54" href="#54">54</a>
+<a name="55" href="#55">55</a> <em class="jxr_comment">//now serialize it to a byte stream</em>
+<a name="56" href="#56">56</a> <em class="jxr_comment">//and build a new document out of it</em>
+<a name="57" href="#57">57</a> ByteArrayOutputStream baos = <strong class="jxr_keyword">new</strong> ByteArrayOutputStream();
+<a name="58" href="#58">58</a> schema.write(baos);
+<a name="59" href="#59">59</a>
+<a name="60" href="#60">60</a>
+<a name="61" href="#61">61</a> Document doc2 = documentBuilderFactory.newDocumentBuilder().
+<a name="62" href="#62">62</a> parse(<strong class="jxr_keyword">new</strong> ByteArrayInputStream(baos.toByteArray()));
+<a name="63" href="#63">63</a>
+<a name="64" href="#64">64</a> schema = schemaCol.read(doc2,<strong class="jxr_keyword">null</strong>);
+<a name="65" href="#65">65</a> assertNotNull(schema);
+<a name="66" href="#66">66</a>
+<a name="67" href="#67">67</a> <em class="jxr_comment">// get the elements and check whether their annotations are properly</em>
+<a name="68" href="#68">68</a> <em class="jxr_comment">// populated</em>
+<a name="69" href="#69">69</a> Iterator values = schema.getElements().getValues();
+<a name="70" href="#70">70</a> <strong class="jxr_keyword">while</strong> (values.hasNext()) {
+<a name="71" href="#71">71</a> XmlSchemaElement elt = (XmlSchemaElement) values.next();
+<a name="72" href="#72">72</a> assertNotNull(elt);
+<a name="73" href="#73">73</a> Map metaInfoMap = elt.getMetaInfoMap();
+<a name="74" href="#74">74</a> assertNotNull(metaInfoMap);
+<a name="75" href="#75">75</a>
+<a name="76" href="#76">76</a> <a href="../../../tests/customext/attrib/CustomAttribute.html">CustomAttribute</a> customAttrib = (CustomAttribute)metaInfoMap.get(CustomAttribute.CUSTOM_ATTRIBUTE_QNAME);
+<a name="77" href="#77">77</a> assertNotNull(customAttrib);
+<a name="78" href="#78">78</a>
+<a name="79" href="#79">79</a> }
+<a name="80" href="#80">80</a>
+<a name="81" href="#81">81</a>
+<a name="82" href="#82">82</a> <em class="jxr_comment">//remove our system property</em>
+<a name="83" href="#83">83</a> System.getProperties().remove(Constants.SystemConstants.EXTENSION_REGISTRY_KEY);
+<a name="84" href="#84">84</a>
+<a name="85" href="#85">85</a> }
+<a name="86" href="#86">86</a>
+<a name="87" href="#87">87</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Added: webservices/commons/site/XmlSchema/xref-test/tests/customext/attrib/package-frame.html
URL: http://svn.apache.org/viewvc/webservices/commons/site/XmlSchema/xref-test/tests/customext/attrib/package-frame.html?view=auto&rev=559329
==============================================================================
--- webservices/commons/site/XmlSchema/xref-test/tests/customext/attrib/package-frame.html (added)
+++ webservices/commons/site/XmlSchema/xref-test/tests/customext/attrib/package-frame.html Tue Jul 24 23:29:55 2007
@@ -0,0 +1,39 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+ <title>XmlSchema 1.3.2 Reference Package tests.customext.attrib</title>
+ <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="style" />
+ </head>
+ <body>
+
+ <h3>
+ <a href="package-summary.html" target="classFrame">tests.customext.attrib</a>
+ </h3>
+
+ <h3>Classes</h3>
+
+ <ul>
+ <li>
+ <a href="CustomAttribute.html" target="classFrame">CustomAttribute</a>
+ </li>
+ <li>
+ <a href="CustomAttributeDeserializer.html" target="classFrame">CustomAttributeDeserializer</a>
+ </li>
+ <li>
+ <a href="CustomAttributeSerializer.html" target="classFrame">CustomAttributeSerializer</a>
+ </li>
+ <li>
+ <a href="CustomExtDeserializerTest.html" target="classFrame">CustomExtDeserializerTest</a>
+ </li>
+ <li>
+ <a href="CustomExtensionRegistry.html" target="classFrame">CustomExtensionRegistry</a>
+ </li>
+ <li>
+ <a href="CustomExtensionSerializerTest.html" target="classFrame">CustomExtensionSerializerTest</a>
+ </li>
+ </ul>
+
+ </body>
+</html>
\ No newline at end of file
Added: webservices/commons/site/XmlSchema/xref-test/tests/customext/attrib/package-summary.html
URL: http://svn.apache.org/viewvc/webservices/commons/site/XmlSchema/xref-test/tests/customext/attrib/package-summary.html?view=auto&rev=559329
==============================================================================
--- webservices/commons/site/XmlSchema/xref-test/tests/customext/attrib/package-summary.html (added)
+++ webservices/commons/site/XmlSchema/xref-test/tests/customext/attrib/package-summary.html Tue Jul 24 23:29:55 2007
@@ -0,0 +1,92 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+ <title>XmlSchema 1.3.2 Reference Package tests.customext.attrib</title>
+ <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="style" />
+ </head>
+ <body>
+ <div class="overview">
+ <ul>
+ <li>
+ <a href="../../../overview-summary.html">Overview</a>
+ </li>
+ <li class="selected">Package</li>
+ </ul>
+ </div>
+ <div class="framenoframe">
+ <ul>
+ <li>
+ <a href="../../../index.html" target="_top">FRAMES</a>
+ </li>
+ <li>
+ <a href="package-summary.html" target="_top">NO FRAMES</a>
+ </li>
+ </ul>
+ </div>
+
+ <h2>Package tests.customext.attrib</h2>
+
+ <table class="summary">
+ <thead>
+ <tr>
+ <th>Class Summary</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <a href="CustomAttribute.html" target="classFrame">CustomAttribute</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="CustomAttributeDeserializer.html" target="classFrame">CustomAttributeDeserializer</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="CustomAttributeSerializer.html" target="classFrame">CustomAttributeSerializer</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="CustomExtDeserializerTest.html" target="classFrame">CustomExtDeserializerTest</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="CustomExtensionRegistry.html" target="classFrame">CustomExtensionRegistry</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="CustomExtensionSerializerTest.html" target="classFrame">CustomExtensionSerializerTest</a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <div class="overview">
+ <ul>
+ <li>
+ <a href="../../../overview-summary.html">Overview</a>
+ </li>
+ <li class="selected">Package</li>
+ </ul>
+ </div>
+ <div class="framenoframe">
+ <ul>
+ <li>
+ <a href="../../../index.html" target="_top">FRAMES</a>
+ </li>
+ <li>
+ <a href="package-summary.html" target="_top">NO FRAMES</a>
+ </li>
+ </ul>
+ </div>
+ <hr />
+ Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.
+ </body>
+</html>
\ No newline at end of file
Added: webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomElement.html
URL: http://svn.apache.org/viewvc/webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomElement.html?view=auto&rev=559329
==============================================================================
--- webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomElement.html (added)
+++ webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomElement.html Tue Jul 24 23:29:55 2007
@@ -0,0 +1,66 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+<title>CustomElement xref</title>
+<link type="text/css" rel="stylesheet" href="../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a> <em class="jxr_comment">/*</em>
+<a name="2" href="#2">2</a> <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one</em>
+<a name="3" href="#3">3</a> <em class="jxr_comment"> * or more contributor license agreements. See the NOTICE file</em>
+<a name="4" href="#4">4</a> <em class="jxr_comment"> * distributed with this work for additional information</em>
+<a name="5" href="#5">5</a> <em class="jxr_comment"> * regarding copyright ownership. The ASF licenses this file</em>
+<a name="6" href="#6">6</a> <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the</em>
+<a name="7" href="#7">7</a> <em class="jxr_comment"> * "License"); you may not use this file except in compliance</em>
+<a name="8" href="#8">8</a> <em class="jxr_comment"> * with the License. You may obtain a copy of the License at</em>
+<a name="9" href="#9">9</a> <em class="jxr_comment"> *</em>
+<a name="10" href="#10">10</a> <em class="jxr_comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="11" href="#11">11</a> <em class="jxr_comment"> *</em>
+<a name="12" href="#12">12</a> <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,</em>
+<a name="13" href="#13">13</a> <em class="jxr_comment"> * software distributed under the License is distributed on an</em>
+<a name="14" href="#14">14</a> <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</em>
+<a name="15" href="#15">15</a> <em class="jxr_comment"> * KIND, either express or implied. See the License for the</em>
+<a name="16" href="#16">16</a> <em class="jxr_comment"> * specific language governing permissions and limitations</em>
+<a name="17" href="#17">17</a> <em class="jxr_comment"> * under the License.</em>
+<a name="18" href="#18">18</a> <em class="jxr_comment"> */</em>
+<a name="19" href="#19">19</a> <strong class="jxr_keyword">package</strong> tests.customext.elt;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> javax.xml.namespace.QName;
+<a name="22" href="#22">22</a>
+<a name="23" href="#23">23</a> <em class="jxr_javadoccomment">/**</em>
+<a name="24" href="#24">24</a> <em class="jxr_javadoccomment"> * Custom Element class</em>
+<a name="25" href="#25">25</a> <em class="jxr_javadoccomment"> * The is will be with reference to the <a href="http://customattrib.org" target="alexandria_uri">http://customattrib.org</a></em>
+<a name="26" href="#26">26</a> <em class="jxr_javadoccomment"> * namespace and will have 'customElt' as the name and the</em>
+<a name="27" href="#27">27</a> <em class="jxr_javadoccomment"> * value will have two attributes , prefix and a suffix</em>
+<a name="28" href="#28">28</a> <em class="jxr_javadoccomment"> * see the externalAnnotationsElt.xsd for an example schema.</em>
+<a name="29" href="#29">29</a> <em class="jxr_javadoccomment"> */</em>
+<a name="30" href="#30">30</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../tests/customext/elt/CustomElement.html">CustomElement</a> {
+<a name="31" href="#31">31</a>
+<a name="32" href="#32">32</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> QName CUSTOM_ELT_QNAME = <strong class="jxr_keyword">new</strong> QName(<span class="jxr_string">"http://customattrib.org"</span>,<span class="jxr_string">"customElt"</span>);
+<a name="33" href="#33">33</a> <strong class="jxr_keyword">private</strong> String prefix;
+<a name="34" href="#34">34</a> <strong class="jxr_keyword">private</strong> String suffix;
+<a name="35" href="#35">35</a>
+<a name="36" href="#36">36</a> <strong class="jxr_keyword">public</strong> String getPrefix() {
+<a name="37" href="#37">37</a> <strong class="jxr_keyword">return</strong> prefix;
+<a name="38" href="#38">38</a> }
+<a name="39" href="#39">39</a>
+<a name="40" href="#40">40</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setPrefix(String prefix) {
+<a name="41" href="#41">41</a> <strong class="jxr_keyword">this</strong>.prefix = prefix;
+<a name="42" href="#42">42</a> }
+<a name="43" href="#43">43</a>
+<a name="44" href="#44">44</a> <strong class="jxr_keyword">public</strong> String getSuffix() {
+<a name="45" href="#45">45</a> <strong class="jxr_keyword">return</strong> suffix;
+<a name="46" href="#46">46</a> }
+<a name="47" href="#47">47</a>
+<a name="48" href="#48">48</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setSuffix(String suffix) {
+<a name="49" href="#49">49</a> <strong class="jxr_keyword">this</strong>.suffix = suffix;
+<a name="50" href="#50">50</a> }
+<a name="51" href="#51">51</a>
+<a name="52" href="#52">52</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Added: webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomElementDeserializer.html
URL: http://svn.apache.org/viewvc/webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomElementDeserializer.html?view=auto&rev=559329
==============================================================================
--- webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomElementDeserializer.html (added)
+++ webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomElementDeserializer.html Tue Jul 24 23:29:55 2007
@@ -0,0 +1,69 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+<title>CustomElementDeserializer xref</title>
+<link type="text/css" rel="stylesheet" href="../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a> <em class="jxr_comment">/*</em>
+<a name="2" href="#2">2</a> <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one</em>
+<a name="3" href="#3">3</a> <em class="jxr_comment"> * or more contributor license agreements. See the NOTICE file</em>
+<a name="4" href="#4">4</a> <em class="jxr_comment"> * distributed with this work for additional information</em>
+<a name="5" href="#5">5</a> <em class="jxr_comment"> * regarding copyright ownership. The ASF licenses this file</em>
+<a name="6" href="#6">6</a> <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the</em>
+<a name="7" href="#7">7</a> <em class="jxr_comment"> * "License"); you may not use this file except in compliance</em>
+<a name="8" href="#8">8</a> <em class="jxr_comment"> * with the License. You may obtain a copy of the License at</em>
+<a name="9" href="#9">9</a> <em class="jxr_comment"> *</em>
+<a name="10" href="#10">10</a> <em class="jxr_comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="11" href="#11">11</a> <em class="jxr_comment"> *</em>
+<a name="12" href="#12">12</a> <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,</em>
+<a name="13" href="#13">13</a> <em class="jxr_comment"> * software distributed under the License is distributed on an</em>
+<a name="14" href="#14">14</a> <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</em>
+<a name="15" href="#15">15</a> <em class="jxr_comment"> * KIND, either express or implied. See the License for the</em>
+<a name="16" href="#16">16</a> <em class="jxr_comment"> * specific language governing permissions and limitations</em>
+<a name="17" href="#17">17</a> <em class="jxr_comment"> * under the License.</em>
+<a name="18" href="#18">18</a> <em class="jxr_comment"> */</em>
+<a name="19" href="#19">19</a> <strong class="jxr_keyword">package</strong> tests.customext.elt;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.XmlSchemaObject;
+<a name="22" href="#22">22</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.extensions.ExtensionDeserializer;
+<a name="23" href="#23">23</a> <strong class="jxr_keyword">import</strong> org.w3c.dom.Element;
+<a name="24" href="#24">24</a> <strong class="jxr_keyword">import</strong> org.w3c.dom.Node;
+<a name="25" href="#25">25</a>
+<a name="26" href="#26">26</a> <strong class="jxr_keyword">import</strong> javax.xml.namespace.QName;
+<a name="27" href="#27">27</a>
+<a name="28" href="#28">28</a> <em class="jxr_javadoccomment">/**</em>
+<a name="29" href="#29">29</a> <em class="jxr_javadoccomment"> * Custom element deserializer</em>
+<a name="30" href="#30">30</a> <em class="jxr_javadoccomment"> */</em>
+<a name="31" href="#31">31</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../tests/customext/elt/CustomElementDeserializer.html">CustomElementDeserializer</a> implements ExtensionDeserializer {
+<a name="32" href="#32">32</a> <em class="jxr_javadoccomment">/**</em>
+<a name="33" href="#33">33</a> <em class="jxr_javadoccomment"> * deserialize the given element</em>
+<a name="34" href="#34">34</a> <em class="jxr_javadoccomment"> *</em>
+<a name="35" href="#35">35</a> <em class="jxr_javadoccomment"> * @param schemaObject - Parent schema element</em>
+<a name="36" href="#36">36</a> <em class="jxr_javadoccomment"> * @param name - the QName of the element/attribute to be deserialized.</em>
+<a name="37" href="#37">37</a> <em class="jxr_javadoccomment"> * in the case where a deserializer is used to handle multiple elements/attributes</em>
+<a name="38" href="#38">38</a> <em class="jxr_javadoccomment"> * this may be useful to determine the correct deserialization</em>
+<a name="39" href="#39">39</a> <em class="jxr_javadoccomment"> * @param domNode - the raw DOM Node read from the source. This will be the</em>
+<a name="40" href="#40">40</a> <em class="jxr_javadoccomment"> * extension element itself if for an element or the extension attribute object if</em>
+<a name="41" href="#41">41</a> <em class="jxr_javadoccomment"> * it is an attribute</em>
+<a name="42" href="#42">42</a> <em class="jxr_javadoccomment"> */</em>
+<a name="43" href="#43">43</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> deserialize(XmlSchemaObject schemaObject, QName name, Node domNode) {
+<a name="44" href="#44">44</a> <strong class="jxr_keyword">if</strong> (CustomElement.CUSTOM_ELT_QNAME.equals(name)){
+<a name="45" href="#45">45</a> Element elt = (Element)domNode;
+<a name="46" href="#46">46</a>
+<a name="47" href="#47">47</a> <a href="../../../tests/customext/elt/CustomElement.html">CustomElement</a> customElement = <strong class="jxr_keyword">new</strong> <a href="../../../tests/customext/elt/CustomElement.html">CustomElement</a>();
+<a name="48" href="#48">48</a> customElement.setPrefix(elt.getAttribute(<span class="jxr_string">"prefix"</span>));
+<a name="49" href="#49">49</a> customElement.setSuffix(elt.getAttribute(<span class="jxr_string">"suffix"</span>));
+<a name="50" href="#50">50</a>
+<a name="51" href="#51">51</a> <em class="jxr_comment">//put this in the schema object meta info map</em>
+<a name="52" href="#52">52</a> schemaObject.addMetaInfo(CustomElement.CUSTOM_ELT_QNAME,customElement);
+<a name="53" href="#53">53</a> }
+<a name="54" href="#54">54</a> }
+<a name="55" href="#55">55</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Added: webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomElementSerializer.html
URL: http://svn.apache.org/viewvc/webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomElementSerializer.html?view=auto&rev=559329
==============================================================================
--- webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomElementSerializer.html (added)
+++ webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomElementSerializer.html Tue Jul 24 23:29:55 2007
@@ -0,0 +1,68 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+<title>CustomElementSerializer xref</title>
+<link type="text/css" rel="stylesheet" href="../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a> <em class="jxr_comment">/*</em>
+<a name="2" href="#2">2</a> <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one</em>
+<a name="3" href="#3">3</a> <em class="jxr_comment"> * or more contributor license agreements. See the NOTICE file</em>
+<a name="4" href="#4">4</a> <em class="jxr_comment"> * distributed with this work for additional information</em>
+<a name="5" href="#5">5</a> <em class="jxr_comment"> * regarding copyright ownership. The ASF licenses this file</em>
+<a name="6" href="#6">6</a> <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the</em>
+<a name="7" href="#7">7</a> <em class="jxr_comment"> * "License"); you may not use this file except in compliance</em>
+<a name="8" href="#8">8</a> <em class="jxr_comment"> * with the License. You may obtain a copy of the License at</em>
+<a name="9" href="#9">9</a> <em class="jxr_comment"> *</em>
+<a name="10" href="#10">10</a> <em class="jxr_comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="11" href="#11">11</a> <em class="jxr_comment"> *</em>
+<a name="12" href="#12">12</a> <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,</em>
+<a name="13" href="#13">13</a> <em class="jxr_comment"> * software distributed under the License is distributed on an</em>
+<a name="14" href="#14">14</a> <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</em>
+<a name="15" href="#15">15</a> <em class="jxr_comment"> * KIND, either express or implied. See the License for the</em>
+<a name="16" href="#16">16</a> <em class="jxr_comment"> * specific language governing permissions and limitations</em>
+<a name="17" href="#17">17</a> <em class="jxr_comment"> * under the License.</em>
+<a name="18" href="#18">18</a> <em class="jxr_comment"> */</em>
+<a name="19" href="#19">19</a> <strong class="jxr_keyword">package</strong> tests.customext.elt;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.XmlSchemaObject;
+<a name="22" href="#22">22</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.extensions.ExtensionSerializer;
+<a name="23" href="#23">23</a> <strong class="jxr_keyword">import</strong> org.w3c.dom.Element;
+<a name="24" href="#24">24</a> <strong class="jxr_keyword">import</strong> org.w3c.dom.Node;
+<a name="25" href="#25">25</a>
+<a name="26" href="#26">26</a> <strong class="jxr_keyword">import</strong> java.util.Map;
+<a name="27" href="#27">27</a>
+<a name="28" href="#28">28</a> <em class="jxr_javadoccomment">/**</em>
+<a name="29" href="#29">29</a> <em class="jxr_javadoccomment"> * Custom element serializer</em>
+<a name="30" href="#30">30</a> <em class="jxr_javadoccomment"> */</em>
+<a name="31" href="#31">31</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../tests/customext/elt/CustomElementSerializer.html">CustomElementSerializer</a> implements ExtensionSerializer {
+<a name="32" href="#32">32</a> <em class="jxr_javadoccomment">/**</em>
+<a name="33" href="#33">33</a> <em class="jxr_javadoccomment"> * serialize the given element</em>
+<a name="34" href="#34">34</a> <em class="jxr_javadoccomment"> *</em>
+<a name="35" href="#35">35</a> <em class="jxr_javadoccomment"> * @param schemaObject - Parent schema object.contains the extension</em>
+<a name="36" href="#36">36</a> <em class="jxr_javadoccomment"> * to be serialized</em>
+<a name="37" href="#37">37</a> <em class="jxr_javadoccomment"> * @param classOfType - The class of type to be serialized</em>
+<a name="38" href="#38">38</a> <em class="jxr_javadoccomment"> * @param domNode - the parent DOM Node that will ultimately be serialized. The XMLSchema</em>
+<a name="39" href="#39">39</a> <em class="jxr_javadoccomment"> * serialization mechanism is to create a DOM tree first and serialize it</em>
+<a name="40" href="#40">40</a> <em class="jxr_javadoccomment"> */</em>
+<a name="41" href="#41">41</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> serialize(XmlSchemaObject schemaObject, Class classOfType, Node domNode) {
+<a name="42" href="#42">42</a> Map metaInfoMap = schemaObject.getMetaInfoMap();
+<a name="43" href="#43">43</a> <a href="../../../tests/customext/elt/CustomElement.html">CustomElement</a> customElt = (CustomElement)metaInfoMap.get(CustomElement.CUSTOM_ELT_QNAME);
+<a name="44" href="#44">44</a>
+<a name="45" href="#45">45</a> Element elt = (Element)domNode;
+<a name="46" href="#46">46</a> Element extElt = elt.getOwnerDocument().createElementNS(CustomElement.CUSTOM_ELT_QNAME.getNamespaceURI(),
+<a name="47" href="#47">47</a> CustomElement.CUSTOM_ELT_QNAME.getLocalPart());
+<a name="48" href="#48">48</a> extElt.setAttribute(<span class="jxr_string">"prefix"</span>,customElt.getPrefix());
+<a name="49" href="#49">49</a> extElt.setAttribute(<span class="jxr_string">"suffix"</span>,customElt.getSuffix());
+<a name="50" href="#50">50</a>
+<a name="51" href="#51">51</a> elt.appendChild(extElt);
+<a name="52" href="#52">52</a>
+<a name="53" href="#53">53</a> }
+<a name="54" href="#54">54</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Added: webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomExtElementDeserializerTest.html
URL: http://svn.apache.org/viewvc/webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomExtElementDeserializerTest.html?view=auto&rev=559329
==============================================================================
--- webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomExtElementDeserializerTest.html (added)
+++ webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomExtElementDeserializerTest.html Tue Jul 24 23:29:55 2007
@@ -0,0 +1,86 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+<title>CustomExtElementDeserializerTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a> <em class="jxr_comment">/*</em>
+<a name="2" href="#2">2</a> <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one</em>
+<a name="3" href="#3">3</a> <em class="jxr_comment"> * or more contributor license agreements. See the NOTICE file</em>
+<a name="4" href="#4">4</a> <em class="jxr_comment"> * distributed with this work for additional information</em>
+<a name="5" href="#5">5</a> <em class="jxr_comment"> * regarding copyright ownership. The ASF licenses this file</em>
+<a name="6" href="#6">6</a> <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the</em>
+<a name="7" href="#7">7</a> <em class="jxr_comment"> * "License"); you may not use this file except in compliance</em>
+<a name="8" href="#8">8</a> <em class="jxr_comment"> * with the License. You may obtain a copy of the License at</em>
+<a name="9" href="#9">9</a> <em class="jxr_comment"> *</em>
+<a name="10" href="#10">10</a> <em class="jxr_comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="11" href="#11">11</a> <em class="jxr_comment"> *</em>
+<a name="12" href="#12">12</a> <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,</em>
+<a name="13" href="#13">13</a> <em class="jxr_comment"> * software distributed under the License is distributed on an</em>
+<a name="14" href="#14">14</a> <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</em>
+<a name="15" href="#15">15</a> <em class="jxr_comment"> * KIND, either express or implied. See the License for the</em>
+<a name="16" href="#16">16</a> <em class="jxr_comment"> * specific language governing permissions and limitations</em>
+<a name="17" href="#17">17</a> <em class="jxr_comment"> * under the License.</em>
+<a name="18" href="#18">18</a> <em class="jxr_comment"> */</em>
+<a name="19" href="#19">19</a> <strong class="jxr_keyword">package</strong> tests.customext.elt;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> junit.framework.TestCase;
+<a name="22" href="#22">22</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.XmlSchema;
+<a name="23" href="#23">23</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.XmlSchemaCollection;
+<a name="24" href="#24">24</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.XmlSchemaElement;
+<a name="25" href="#25">25</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.constants.Constants;
+<a name="26" href="#26">26</a> <strong class="jxr_keyword">import</strong> org.w3c.dom.Document;
+<a name="27" href="#27">27</a> <strong class="jxr_keyword">import</strong> tests.Resources;
+<a name="28" href="#28">28</a>
+<a name="29" href="#29">29</a> <strong class="jxr_keyword">import</strong> javax.xml.parsers.DocumentBuilderFactory;
+<a name="30" href="#30">30</a> <strong class="jxr_keyword">import</strong> java.util.Iterator;
+<a name="31" href="#31">31</a> <strong class="jxr_keyword">import</strong> java.util.Map;
+<a name="32" href="#32">32</a>
+<a name="33" href="#33">33</a> <em class="jxr_javadoccomment">/**</em>
+<a name="34" href="#34">34</a> <em class="jxr_javadoccomment"> * Test class to run through the full cycle of build-check</em>
+<a name="35" href="#35">35</a> <em class="jxr_javadoccomment"> */</em>
+<a name="36" href="#36">36</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../tests/customext/elt/CustomExtElementDeserializerTest.html">CustomExtElementDeserializerTest</a> <strong class="jxr_keyword">extends</strong> TestCase {
+<a name="37" href="#37">37</a>
+<a name="38" href="#38">38</a>
+<a name="39" href="#39">39</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testDeserialization() <strong class="jxr_keyword">throws</strong> Exception {
+<a name="40" href="#40">40</a> <em class="jxr_comment">//set the system property for the custom extension registry</em>
+<a name="41" href="#41">41</a> System.setProperty(Constants.SystemConstants.EXTENSION_REGISTRY_KEY,
+<a name="42" href="#42">42</a> CustomExtensionRegistry.<strong class="jxr_keyword">class</strong>.getName());
+<a name="43" href="#43">43</a>
+<a name="44" href="#44">44</a> <em class="jxr_comment">//create a DOM document</em>
+<a name="45" href="#45">45</a> DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+<a name="46" href="#46">46</a> documentBuilderFactory.setNamespaceAware(<strong class="jxr_keyword">true</strong>);
+<a name="47" href="#47">47</a> Document doc = documentBuilderFactory.newDocumentBuilder().
+<a name="48" href="#48">48</a> parse(Resources.asURI(<span class="jxr_string">"/external/externalElementAnnotations.xsd"</span>));
+<a name="49" href="#49">49</a>
+<a name="50" href="#50">50</a> XmlSchemaCollection schemaCol = <strong class="jxr_keyword">new</strong> XmlSchemaCollection();
+<a name="51" href="#51">51</a> XmlSchema schema = schemaCol.read(doc,<strong class="jxr_keyword">null</strong>);
+<a name="52" href="#52">52</a> assertNotNull(schema);
+<a name="53" href="#53">53</a>
+<a name="54" href="#54">54</a> <em class="jxr_comment">// get the elements and check whether their annotations are properly</em>
+<a name="55" href="#55">55</a> <em class="jxr_comment">// populated</em>
+<a name="56" href="#56">56</a> Iterator values = schema.getElements().getValues();
+<a name="57" href="#57">57</a> <strong class="jxr_keyword">while</strong> (values.hasNext()) {
+<a name="58" href="#58">58</a> XmlSchemaElement elt = (XmlSchemaElement) values.next();
+<a name="59" href="#59">59</a> assertNotNull(elt);
+<a name="60" href="#60">60</a> Map metaInfoMap = elt.getMetaInfoMap();
+<a name="61" href="#61">61</a> assertNotNull(metaInfoMap);
+<a name="62" href="#62">62</a>
+<a name="63" href="#63">63</a> <a href="../../../tests/customext/elt/CustomElement.html">CustomElement</a> customElt = (CustomElement)metaInfoMap.get(CustomElement.CUSTOM_ELT_QNAME);
+<a name="64" href="#64">64</a> assertNotNull(customElt);
+<a name="65" href="#65">65</a>
+<a name="66" href="#66">66</a> }
+<a name="67" href="#67">67</a>
+<a name="68" href="#68">68</a> <em class="jxr_comment">//remove our system property</em>
+<a name="69" href="#69">69</a> System.getProperties().remove(Constants.SystemConstants.EXTENSION_REGISTRY_KEY);
+<a name="70" href="#70">70</a>
+<a name="71" href="#71">71</a> }
+<a name="72" href="#72">72</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Added: webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomExtElementSerializerTest.html
URL: http://svn.apache.org/viewvc/webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomExtElementSerializerTest.html?view=auto&rev=559329
==============================================================================
--- webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomExtElementSerializerTest.html (added)
+++ webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomExtElementSerializerTest.html Tue Jul 24 23:29:55 2007
@@ -0,0 +1,98 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+<title>CustomExtElementSerializerTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a> <em class="jxr_comment">/*</em>
+<a name="2" href="#2">2</a> <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one</em>
+<a name="3" href="#3">3</a> <em class="jxr_comment"> * or more contributor license agreements. See the NOTICE file</em>
+<a name="4" href="#4">4</a> <em class="jxr_comment"> * distributed with this work for additional information</em>
+<a name="5" href="#5">5</a> <em class="jxr_comment"> * regarding copyright ownership. The ASF licenses this file</em>
+<a name="6" href="#6">6</a> <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the</em>
+<a name="7" href="#7">7</a> <em class="jxr_comment"> * "License"); you may not use this file except in compliance</em>
+<a name="8" href="#8">8</a> <em class="jxr_comment"> * with the License. You may obtain a copy of the License at</em>
+<a name="9" href="#9">9</a> <em class="jxr_comment"> *</em>
+<a name="10" href="#10">10</a> <em class="jxr_comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="11" href="#11">11</a> <em class="jxr_comment"> *</em>
+<a name="12" href="#12">12</a> <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,</em>
+<a name="13" href="#13">13</a> <em class="jxr_comment"> * software distributed under the License is distributed on an</em>
+<a name="14" href="#14">14</a> <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</em>
+<a name="15" href="#15">15</a> <em class="jxr_comment"> * KIND, either express or implied. See the License for the</em>
+<a name="16" href="#16">16</a> <em class="jxr_comment"> * specific language governing permissions and limitations</em>
+<a name="17" href="#17">17</a> <em class="jxr_comment"> * under the License.</em>
+<a name="18" href="#18">18</a> <em class="jxr_comment"> */</em>
+<a name="19" href="#19">19</a> <strong class="jxr_keyword">package</strong> tests.customext.elt;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> junit.framework.TestCase;
+<a name="22" href="#22">22</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.XmlSchema;
+<a name="23" href="#23">23</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.XmlSchemaCollection;
+<a name="24" href="#24">24</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.XmlSchemaElement;
+<a name="25" href="#25">25</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.constants.Constants;
+<a name="26" href="#26">26</a> <strong class="jxr_keyword">import</strong> org.w3c.dom.Document;
+<a name="27" href="#27">27</a> <strong class="jxr_keyword">import</strong> tests.Resources;
+<a name="28" href="#28">28</a>
+<a name="29" href="#29">29</a> <strong class="jxr_keyword">import</strong> javax.xml.parsers.DocumentBuilderFactory;
+<a name="30" href="#30">30</a> <strong class="jxr_keyword">import</strong> java.io.ByteArrayInputStream;
+<a name="31" href="#31">31</a> <strong class="jxr_keyword">import</strong> java.io.ByteArrayOutputStream;
+<a name="32" href="#32">32</a> <strong class="jxr_keyword">import</strong> java.util.Iterator;
+<a name="33" href="#33">33</a> <strong class="jxr_keyword">import</strong> java.util.Map;
+<a name="34" href="#34">34</a>
+<a name="35" href="#35">35</a> <em class="jxr_javadoccomment">/**</em>
+<a name="36" href="#36">36</a> <em class="jxr_javadoccomment"> * Test class to run through the full cycle of build-serialize-build-check</em>
+<a name="37" href="#37">37</a> <em class="jxr_javadoccomment"> */</em>
+<a name="38" href="#38">38</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../tests/customext/elt/CustomExtElementSerializerTest.html">CustomExtElementSerializerTest</a> <strong class="jxr_keyword">extends</strong> TestCase {
+<a name="39" href="#39">39</a>
+<a name="40" href="#40">40</a>
+<a name="41" href="#41">41</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSerialization() <strong class="jxr_keyword">throws</strong> Exception {
+<a name="42" href="#42">42</a> <em class="jxr_comment">//set the system property for the custom extension registry</em>
+<a name="43" href="#43">43</a> System.setProperty(Constants.SystemConstants.EXTENSION_REGISTRY_KEY,
+<a name="44" href="#44">44</a> CustomExtensionRegistry.<strong class="jxr_keyword">class</strong>.getName());
+<a name="45" href="#45">45</a>
+<a name="46" href="#46">46</a> <em class="jxr_comment">//create a DOM document</em>
+<a name="47" href="#47">47</a> DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+<a name="48" href="#48">48</a> documentBuilderFactory.setNamespaceAware(<strong class="jxr_keyword">true</strong>);
+<a name="49" href="#49">49</a> Document doc = documentBuilderFactory.newDocumentBuilder().
+<a name="50" href="#50">50</a> parse(Resources.asURI(<span class="jxr_string">"/external/externalElementAnnotations.xsd"</span>));
+<a name="51" href="#51">51</a>
+<a name="52" href="#52">52</a> XmlSchemaCollection schemaCol = <strong class="jxr_keyword">new</strong> XmlSchemaCollection();
+<a name="53" href="#53">53</a> XmlSchema schema = schemaCol.read(doc,<strong class="jxr_keyword">null</strong>);
+<a name="54" href="#54">54</a> assertNotNull(schema);
+<a name="55" href="#55">55</a>
+<a name="56" href="#56">56</a> <em class="jxr_comment">//now serialize it to a byte stream</em>
+<a name="57" href="#57">57</a> <em class="jxr_comment">//and build a new document out of it</em>
+<a name="58" href="#58">58</a> ByteArrayOutputStream baos = <strong class="jxr_keyword">new</strong> ByteArrayOutputStream();
+<a name="59" href="#59">59</a> schema.write(baos);
+<a name="60" href="#60">60</a> Document doc2 = documentBuilderFactory.newDocumentBuilder().
+<a name="61" href="#61">61</a> parse(<strong class="jxr_keyword">new</strong> ByteArrayInputStream(baos.toByteArray()));
+<a name="62" href="#62">62</a>
+<a name="63" href="#63">63</a> schema = schemaCol.read(doc2,<strong class="jxr_keyword">null</strong>);
+<a name="64" href="#64">64</a> assertNotNull(schema);
+<a name="65" href="#65">65</a>
+<a name="66" href="#66">66</a> <em class="jxr_comment">// get the elements and check whether their annotations are properly</em>
+<a name="67" href="#67">67</a> <em class="jxr_comment">// populated</em>
+<a name="68" href="#68">68</a> Iterator values = schema.getElements().getValues();
+<a name="69" href="#69">69</a> <strong class="jxr_keyword">while</strong> (values.hasNext()) {
+<a name="70" href="#70">70</a> XmlSchemaElement elt = (XmlSchemaElement) values.next();
+<a name="71" href="#71">71</a> assertNotNull(elt);
+<a name="72" href="#72">72</a> Map metaInfoMap = elt.getMetaInfoMap();
+<a name="73" href="#73">73</a> assertNotNull(metaInfoMap);
+<a name="74" href="#74">74</a>
+<a name="75" href="#75">75</a> <a href="../../../tests/customext/elt/CustomElement.html">CustomElement</a> customElt = (CustomElement)metaInfoMap.get(CustomElement.CUSTOM_ELT_QNAME);
+<a name="76" href="#76">76</a> assertNotNull(customElt);
+<a name="77" href="#77">77</a>
+<a name="78" href="#78">78</a> }
+<a name="79" href="#79">79</a>
+<a name="80" href="#80">80</a> <em class="jxr_comment">//remove our system property</em>
+<a name="81" href="#81">81</a> System.getProperties().remove(Constants.SystemConstants.EXTENSION_REGISTRY_KEY);
+<a name="82" href="#82">82</a>
+<a name="83" href="#83">83</a> }
+<a name="84" href="#84">84</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Added: webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomExtensionRegistry.html
URL: http://svn.apache.org/viewvc/webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomExtensionRegistry.html?view=auto&rev=559329
==============================================================================
--- webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomExtensionRegistry.html (added)
+++ webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/CustomExtensionRegistry.html Tue Jul 24 23:29:55 2007
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+<title>CustomExtensionRegistry xref</title>
+<link type="text/css" rel="stylesheet" href="../../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a> <em class="jxr_comment">/*</em>
+<a name="2" href="#2">2</a> <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one</em>
+<a name="3" href="#3">3</a> <em class="jxr_comment"> * or more contributor license agreements. See the NOTICE file</em>
+<a name="4" href="#4">4</a> <em class="jxr_comment"> * distributed with this work for additional information</em>
+<a name="5" href="#5">5</a> <em class="jxr_comment"> * regarding copyright ownership. The ASF licenses this file</em>
+<a name="6" href="#6">6</a> <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the</em>
+<a name="7" href="#7">7</a> <em class="jxr_comment"> * "License"); you may not use this file except in compliance</em>
+<a name="8" href="#8">8</a> <em class="jxr_comment"> * with the License. You may obtain a copy of the License at</em>
+<a name="9" href="#9">9</a> <em class="jxr_comment"> *</em>
+<a name="10" href="#10">10</a> <em class="jxr_comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="11" href="#11">11</a> <em class="jxr_comment"> *</em>
+<a name="12" href="#12">12</a> <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,</em>
+<a name="13" href="#13">13</a> <em class="jxr_comment"> * software distributed under the License is distributed on an</em>
+<a name="14" href="#14">14</a> <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</em>
+<a name="15" href="#15">15</a> <em class="jxr_comment"> * KIND, either express or implied. See the License for the</em>
+<a name="16" href="#16">16</a> <em class="jxr_comment"> * specific language governing permissions and limitations</em>
+<a name="17" href="#17">17</a> <em class="jxr_comment"> * under the License.</em>
+<a name="18" href="#18">18</a> <em class="jxr_comment"> */</em>
+<a name="19" href="#19">19</a> <strong class="jxr_keyword">package</strong> tests.customext.elt;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.extensions.ExtensionRegistry;
+<a name="22" href="#22">22</a>
+<a name="23" href="#23">23</a> <em class="jxr_javadoccomment">/**</em>
+<a name="24" href="#24">24</a> <em class="jxr_javadoccomment"> * Custom extension registry</em>
+<a name="25" href="#25">25</a> <em class="jxr_javadoccomment"> */</em>
+<a name="26" href="#26">26</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../tests/customext/elt/CustomExtensionRegistry.html">CustomExtensionRegistry</a> <strong class="jxr_keyword">extends</strong> ExtensionRegistry {
+<a name="27" href="#27">27</a>
+<a name="28" href="#28">28</a> <strong class="jxr_keyword">public</strong> <a href="../../../tests/customext/elt/CustomExtensionRegistry.html">CustomExtensionRegistry</a>() {
+<a name="29" href="#29">29</a> <em class="jxr_comment">//register our custom type</em>
+<a name="30" href="#30">30</a> registerDeserializer(CustomElement.CUSTOM_ELT_QNAME,<strong class="jxr_keyword">new</strong> <a href="../../../tests/customext/elt/CustomElementDeserializer.html">CustomElementDeserializer</a>());
+<a name="31" href="#31">31</a> registerSerializer(CustomElement.<strong class="jxr_keyword">class</strong>,<strong class="jxr_keyword">new</strong> <a href="../../../tests/customext/elt/CustomElementSerializer.html">CustomElementSerializer</a>());
+<a name="32" href="#32">32</a> }
+<a name="33" href="#33">33</a>
+<a name="34" href="#34">34</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Added: webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/package-frame.html
URL: http://svn.apache.org/viewvc/webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/package-frame.html?view=auto&rev=559329
==============================================================================
--- webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/package-frame.html (added)
+++ webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/package-frame.html Tue Jul 24 23:29:55 2007
@@ -0,0 +1,39 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+ <title>XmlSchema 1.3.2 Reference Package tests.customext.elt</title>
+ <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="style" />
+ </head>
+ <body>
+
+ <h3>
+ <a href="package-summary.html" target="classFrame">tests.customext.elt</a>
+ </h3>
+
+ <h3>Classes</h3>
+
+ <ul>
+ <li>
+ <a href="CustomElement.html" target="classFrame">CustomElement</a>
+ </li>
+ <li>
+ <a href="CustomElementDeserializer.html" target="classFrame">CustomElementDeserializer</a>
+ </li>
+ <li>
+ <a href="CustomElementSerializer.html" target="classFrame">CustomElementSerializer</a>
+ </li>
+ <li>
+ <a href="CustomExtElementDeserializerTest.html" target="classFrame">CustomExtElementDeserializerTest</a>
+ </li>
+ <li>
+ <a href="CustomExtElementSerializerTest.html" target="classFrame">CustomExtElementSerializerTest</a>
+ </li>
+ <li>
+ <a href="CustomExtensionRegistry.html" target="classFrame">CustomExtensionRegistry</a>
+ </li>
+ </ul>
+
+ </body>
+</html>
\ No newline at end of file
Added: webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/package-summary.html
URL: http://svn.apache.org/viewvc/webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/package-summary.html?view=auto&rev=559329
==============================================================================
--- webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/package-summary.html (added)
+++ webservices/commons/site/XmlSchema/xref-test/tests/customext/elt/package-summary.html Tue Jul 24 23:29:55 2007
@@ -0,0 +1,92 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+ <title>XmlSchema 1.3.2 Reference Package tests.customext.elt</title>
+ <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="style" />
+ </head>
+ <body>
+ <div class="overview">
+ <ul>
+ <li>
+ <a href="../../../overview-summary.html">Overview</a>
+ </li>
+ <li class="selected">Package</li>
+ </ul>
+ </div>
+ <div class="framenoframe">
+ <ul>
+ <li>
+ <a href="../../../index.html" target="_top">FRAMES</a>
+ </li>
+ <li>
+ <a href="package-summary.html" target="_top">NO FRAMES</a>
+ </li>
+ </ul>
+ </div>
+
+ <h2>Package tests.customext.elt</h2>
+
+ <table class="summary">
+ <thead>
+ <tr>
+ <th>Class Summary</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <a href="CustomElement.html" target="classFrame">CustomElement</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="CustomElementDeserializer.html" target="classFrame">CustomElementDeserializer</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="CustomElementSerializer.html" target="classFrame">CustomElementSerializer</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="CustomExtElementDeserializerTest.html" target="classFrame">CustomExtElementDeserializerTest</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="CustomExtElementSerializerTest.html" target="classFrame">CustomExtElementSerializerTest</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="CustomExtensionRegistry.html" target="classFrame">CustomExtensionRegistry</a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <div class="overview">
+ <ul>
+ <li>
+ <a href="../../../overview-summary.html">Overview</a>
+ </li>
+ <li class="selected">Package</li>
+ </ul>
+ </div>
+ <div class="framenoframe">
+ <ul>
+ <li>
+ <a href="../../../index.html" target="_top">FRAMES</a>
+ </li>
+ <li>
+ <a href="package-summary.html" target="_top">NO FRAMES</a>
+ </li>
+ </ul>
+ </div>
+ <hr />
+ Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.
+ </body>
+</html>
\ No newline at end of file
Added: webservices/commons/site/XmlSchema/xref-test/tests/ext/PlainExtensionDeserializerTest.html
URL: http://svn.apache.org/viewvc/webservices/commons/site/XmlSchema/xref-test/tests/ext/PlainExtensionDeserializerTest.html?view=auto&rev=559329
==============================================================================
--- webservices/commons/site/XmlSchema/xref-test/tests/ext/PlainExtensionDeserializerTest.html (added)
+++ webservices/commons/site/XmlSchema/xref-test/tests/ext/PlainExtensionDeserializerTest.html Tue Jul 24 23:29:55 2007
@@ -0,0 +1,102 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+<title>PlainExtensionDeserializerTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a> <em class="jxr_comment">/*</em>
+<a name="2" href="#2">2</a> <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one</em>
+<a name="3" href="#3">3</a> <em class="jxr_comment"> * or more contributor license agreements. See the NOTICE file</em>
+<a name="4" href="#4">4</a> <em class="jxr_comment"> * distributed with this work for additional information</em>
+<a name="5" href="#5">5</a> <em class="jxr_comment"> * regarding copyright ownership. The ASF licenses this file</em>
+<a name="6" href="#6">6</a> <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the</em>
+<a name="7" href="#7">7</a> <em class="jxr_comment"> * "License"); you may not use this file except in compliance</em>
+<a name="8" href="#8">8</a> <em class="jxr_comment"> * with the License. You may obtain a copy of the License at</em>
+<a name="9" href="#9">9</a> <em class="jxr_comment"> *</em>
+<a name="10" href="#10">10</a> <em class="jxr_comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="11" href="#11">11</a> <em class="jxr_comment"> *</em>
+<a name="12" href="#12">12</a> <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,</em>
+<a name="13" href="#13">13</a> <em class="jxr_comment"> * software distributed under the License is distributed on an</em>
+<a name="14" href="#14">14</a> <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</em>
+<a name="15" href="#15">15</a> <em class="jxr_comment"> * KIND, either express or implied. See the License for the</em>
+<a name="16" href="#16">16</a> <em class="jxr_comment"> * specific language governing permissions and limitations</em>
+<a name="17" href="#17">17</a> <em class="jxr_comment"> * under the License.</em>
+<a name="18" href="#18">18</a> <em class="jxr_comment"> */</em>
+<a name="19" href="#19">19</a> <strong class="jxr_keyword">package</strong> tests.ext;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> junit.framework.TestCase;
+<a name="22" href="#22">22</a>
+<a name="23" href="#23">23</a> <strong class="jxr_keyword">import</strong> java.util.Map;
+<a name="24" href="#24">24</a> <strong class="jxr_keyword">import</strong> java.util.Iterator;
+<a name="25" href="#25">25</a>
+<a name="26" href="#26">26</a> <strong class="jxr_keyword">import</strong> tests.Resources;
+<a name="27" href="#27">27</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.XmlSchemaCollection;
+<a name="28" href="#28">28</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.XmlSchema;
+<a name="29" href="#29">29</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.XmlSchemaElement;
+<a name="30" href="#30">30</a> <strong class="jxr_keyword">import</strong> org.w3c.dom.Document;
+<a name="31" href="#31">31</a>
+<a name="32" href="#32">32</a> <strong class="jxr_keyword">import</strong> javax.xml.parsers.DocumentBuilderFactory;
+<a name="33" href="#33">33</a>
+<a name="34" href="#34">34</a> <em class="jxr_javadoccomment">/**</em>
+<a name="35" href="#35">35</a> <em class="jxr_javadoccomment"> * Test the custom extension dserialization without any specialized</em>
+<a name="36" href="#36">36</a> <em class="jxr_javadoccomment"> * hooks</em>
+<a name="37" href="#37">37</a> <em class="jxr_javadoccomment"> */</em>
+<a name="38" href="#38">38</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../tests/ext/PlainExtensionDeserializerTest.html">PlainExtensionDeserializerTest</a> <strong class="jxr_keyword">extends</strong> TestCase {
+<a name="39" href="#39">39</a>
+<a name="40" href="#40">40</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testDeserialization() <strong class="jxr_keyword">throws</strong> Exception {
+<a name="41" href="#41">41</a>
+<a name="42" href="#42">42</a> <em class="jxr_comment">//create a DOM document</em>
+<a name="43" href="#43">43</a> DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+<a name="44" href="#44">44</a> documentBuilderFactory.setNamespaceAware(<strong class="jxr_keyword">true</strong>);
+<a name="45" href="#45">45</a> Document doc = documentBuilderFactory.newDocumentBuilder().
+<a name="46" href="#46">46</a> parse(Resources.asURI(<span class="jxr_string">"/external/externalAnnotations.xsd"</span>));
+<a name="47" href="#47">47</a>
+<a name="48" href="#48">48</a> XmlSchemaCollection schemaCol = <strong class="jxr_keyword">new</strong> XmlSchemaCollection();
+<a name="49" href="#49">49</a> XmlSchema schema = schemaCol.read(doc,<strong class="jxr_keyword">null</strong>);
+<a name="50" href="#50">50</a> assertNotNull(schema);
+<a name="51" href="#51">51</a>
+<a name="52" href="#52">52</a> <em class="jxr_comment">// get the elements and check whether their annotations are properly</em>
+<a name="53" href="#53">53</a> <em class="jxr_comment">// populated</em>
+<a name="54" href="#54">54</a> Iterator values = schema.getElements().getValues();
+<a name="55" href="#55">55</a> <strong class="jxr_keyword">while</strong> (values.hasNext()) {
+<a name="56" href="#56">56</a> XmlSchemaElement elt = (XmlSchemaElement) values.next();
+<a name="57" href="#57">57</a> assertNotNull(elt);
+<a name="58" href="#58">58</a> Map metaInfoMap = elt.getMetaInfoMap();
+<a name="59" href="#59">59</a> assertNotNull(metaInfoMap);
+<a name="60" href="#60">60</a>
+<a name="61" href="#61">61</a> }
+<a name="62" href="#62">62</a> }
+<a name="63" href="#63">63</a>
+<a name="64" href="#64">64</a>
+<a name="65" href="#65">65</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testDeserialization1() <strong class="jxr_keyword">throws</strong> Exception {
+<a name="66" href="#66">66</a>
+<a name="67" href="#67">67</a> <em class="jxr_comment">//create a DOM document</em>
+<a name="68" href="#68">68</a> DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+<a name="69" href="#69">69</a> documentBuilderFactory.setNamespaceAware(<strong class="jxr_keyword">true</strong>);
+<a name="70" href="#70">70</a> Document doc = documentBuilderFactory.newDocumentBuilder().
+<a name="71" href="#71">71</a> parse(Resources.asURI(<span class="jxr_string">"/external/externalElementAnnotations.xsd"</span>));
+<a name="72" href="#72">72</a>
+<a name="73" href="#73">73</a> XmlSchemaCollection schemaCol = <strong class="jxr_keyword">new</strong> XmlSchemaCollection();
+<a name="74" href="#74">74</a> XmlSchema schema = schemaCol.read(doc,<strong class="jxr_keyword">null</strong>);
+<a name="75" href="#75">75</a> assertNotNull(schema);
+<a name="76" href="#76">76</a>
+<a name="77" href="#77">77</a> <em class="jxr_comment">// get the elements and check whether their annotations are properly</em>
+<a name="78" href="#78">78</a> <em class="jxr_comment">// populated</em>
+<a name="79" href="#79">79</a> Iterator values = schema.getElements().getValues();
+<a name="80" href="#80">80</a> <strong class="jxr_keyword">while</strong> (values.hasNext()) {
+<a name="81" href="#81">81</a> XmlSchemaElement elt = (XmlSchemaElement) values.next();
+<a name="82" href="#82">82</a> assertNotNull(elt);
+<a name="83" href="#83">83</a> Map metaInfoMap = elt.getMetaInfoMap();
+<a name="84" href="#84">84</a> assertNotNull(metaInfoMap);
+<a name="85" href="#85">85</a>
+<a name="86" href="#86">86</a> }
+<a name="87" href="#87">87</a> }
+<a name="88" href="#88">88</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Added: webservices/commons/site/XmlSchema/xref-test/tests/ext/PlainExtensionSerializerTest.html
URL: http://svn.apache.org/viewvc/webservices/commons/site/XmlSchema/xref-test/tests/ext/PlainExtensionSerializerTest.html?view=auto&rev=559329
==============================================================================
--- webservices/commons/site/XmlSchema/xref-test/tests/ext/PlainExtensionSerializerTest.html (added)
+++ webservices/commons/site/XmlSchema/xref-test/tests/ext/PlainExtensionSerializerTest.html Tue Jul 24 23:29:55 2007
@@ -0,0 +1,84 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+<title>PlainExtensionSerializerTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../stylesheet.css" />
+</head>
+<body>
+<pre>
+
+<a name="1" href="#1">1</a> <em class="jxr_comment">/*</em>
+<a name="2" href="#2">2</a> <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one</em>
+<a name="3" href="#3">3</a> <em class="jxr_comment"> * or more contributor license agreements. See the NOTICE file</em>
+<a name="4" href="#4">4</a> <em class="jxr_comment"> * distributed with this work for additional information</em>
+<a name="5" href="#5">5</a> <em class="jxr_comment"> * regarding copyright ownership. The ASF licenses this file</em>
+<a name="6" href="#6">6</a> <em class="jxr_comment"> * to you under the Apache License, Version 2.0 (the</em>
+<a name="7" href="#7">7</a> <em class="jxr_comment"> * "License"); you may not use this file except in compliance</em>
+<a name="8" href="#8">8</a> <em class="jxr_comment"> * with the License. You may obtain a copy of the License at</em>
+<a name="9" href="#9">9</a> <em class="jxr_comment"> *</em>
+<a name="10" href="#10">10</a> <em class="jxr_comment"> * <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="11" href="#11">11</a> <em class="jxr_comment"> *</em>
+<a name="12" href="#12">12</a> <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing,</em>
+<a name="13" href="#13">13</a> <em class="jxr_comment"> * software distributed under the License is distributed on an</em>
+<a name="14" href="#14">14</a> <em class="jxr_comment"> * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</em>
+<a name="15" href="#15">15</a> <em class="jxr_comment"> * KIND, either express or implied. See the License for the</em>
+<a name="16" href="#16">16</a> <em class="jxr_comment"> * specific language governing permissions and limitations</em>
+<a name="17" href="#17">17</a> <em class="jxr_comment"> * under the License.</em>
+<a name="18" href="#18">18</a> <em class="jxr_comment"> */</em>
+<a name="19" href="#19">19</a> <strong class="jxr_keyword">package</strong> tests.ext;
+<a name="20" href="#20">20</a>
+<a name="21" href="#21">21</a> <strong class="jxr_keyword">import</strong> junit.framework.TestCase;
+<a name="22" href="#22">22</a>
+<a name="23" href="#23">23</a> <strong class="jxr_keyword">import</strong> javax.xml.parsers.DocumentBuilderFactory;
+<a name="24" href="#24">24</a>
+<a name="25" href="#25">25</a> <strong class="jxr_keyword">import</strong> org.w3c.dom.Document;
+<a name="26" href="#26">26</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.XmlSchemaCollection;
+<a name="27" href="#27">27</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.XmlSchema;
+<a name="28" href="#28">28</a> <strong class="jxr_keyword">import</strong> org.apache.ws.commons.schema.XmlSchemaElement;
+<a name="29" href="#29">29</a> <strong class="jxr_keyword">import</strong> tests.Resources;
+<a name="30" href="#30">30</a>
+<a name="31" href="#31">31</a> <strong class="jxr_keyword">import</strong> java.util.Iterator;
+<a name="32" href="#32">32</a> <strong class="jxr_keyword">import</strong> java.util.Map;
+<a name="33" href="#33">33</a> <strong class="jxr_keyword">import</strong> java.io.ByteArrayOutputStream;
+<a name="34" href="#34">34</a>
+<a name="35" href="#35">35</a> <em class="jxr_javadoccomment">/**</em>
+<a name="36" href="#36">36</a> <em class="jxr_javadoccomment"> * try writing the schemas after they are built</em>
+<a name="37" href="#37">37</a> <em class="jxr_javadoccomment"> */</em>
+<a name="38" href="#38">38</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../tests/ext/PlainExtensionSerializerTest.html">PlainExtensionSerializerTest</a> <strong class="jxr_keyword">extends</strong> TestCase {
+<a name="39" href="#39">39</a>
+<a name="40" href="#40">40</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSerialization() <strong class="jxr_keyword">throws</strong> Exception {
+<a name="41" href="#41">41</a>
+<a name="42" href="#42">42</a> <em class="jxr_comment">//create a DOM document</em>
+<a name="43" href="#43">43</a> DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+<a name="44" href="#44">44</a> documentBuilderFactory.setNamespaceAware(<strong class="jxr_keyword">true</strong>);
+<a name="45" href="#45">45</a> Document doc = documentBuilderFactory.newDocumentBuilder().
+<a name="46" href="#46">46</a> parse(Resources.asURI(<span class="jxr_string">"/external/externalAnnotations.xsd"</span>));
+<a name="47" href="#47">47</a>
+<a name="48" href="#48">48</a> XmlSchemaCollection schemaCol = <strong class="jxr_keyword">new</strong> XmlSchemaCollection();
+<a name="49" href="#49">49</a> XmlSchema schema = schemaCol.read(doc,<strong class="jxr_keyword">null</strong>);
+<a name="50" href="#50">50</a> assertNotNull(schema);
+<a name="51" href="#51">51</a>
+<a name="52" href="#52">52</a> schema.write(<strong class="jxr_keyword">new</strong> ByteArrayOutputStream());
+<a name="53" href="#53">53</a> }
+<a name="54" href="#54">54</a>
+<a name="55" href="#55">55</a>
+<a name="56" href="#56">56</a> <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSerialization1() <strong class="jxr_keyword">throws</strong> Exception {
+<a name="57" href="#57">57</a>
+<a name="58" href="#58">58</a> <em class="jxr_comment">//create a DOM document</em>
+<a name="59" href="#59">59</a> DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+<a name="60" href="#60">60</a> documentBuilderFactory.setNamespaceAware(<strong class="jxr_keyword">true</strong>);
+<a name="61" href="#61">61</a> Document doc = documentBuilderFactory.newDocumentBuilder().
+<a name="62" href="#62">62</a> parse(Resources.asURI(<span class="jxr_string">"/external/externalElementAnnotations.xsd"</span>));
+<a name="63" href="#63">63</a>
+<a name="64" href="#64">64</a> XmlSchemaCollection schemaCol = <strong class="jxr_keyword">new</strong> XmlSchemaCollection();
+<a name="65" href="#65">65</a> XmlSchema schema = schemaCol.read(doc,<strong class="jxr_keyword">null</strong>);
+<a name="66" href="#66">66</a> assertNotNull(schema);
+<a name="67" href="#67">67</a>
+<a name="68" href="#68">68</a> schema.write(<strong class="jxr_keyword">new</strong> ByteArrayOutputStream());
+<a name="69" href="#69">69</a> }
+<a name="70" href="#70">70</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+
Added: webservices/commons/site/XmlSchema/xref-test/tests/ext/package-frame.html
URL: http://svn.apache.org/viewvc/webservices/commons/site/XmlSchema/xref-test/tests/ext/package-frame.html?view=auto&rev=559329
==============================================================================
--- webservices/commons/site/XmlSchema/xref-test/tests/ext/package-frame.html (added)
+++ webservices/commons/site/XmlSchema/xref-test/tests/ext/package-frame.html Tue Jul 24 23:29:55 2007
@@ -0,0 +1,27 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+ <title>XmlSchema 1.3.2 Reference Package tests.ext</title>
+ <link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="style" />
+ </head>
+ <body>
+
+ <h3>
+ <a href="package-summary.html" target="classFrame">tests.ext</a>
+ </h3>
+
+ <h3>Classes</h3>
+
+ <ul>
+ <li>
+ <a href="PlainExtensionDeserializerTest.html" target="classFrame">PlainExtensionDeserializerTest</a>
+ </li>
+ <li>
+ <a href="PlainExtensionSerializerTest.html" target="classFrame">PlainExtensionSerializerTest</a>
+ </li>
+ </ul>
+
+ </body>
+</html>
\ No newline at end of file
Added: webservices/commons/site/XmlSchema/xref-test/tests/ext/package-summary.html
URL: http://svn.apache.org/viewvc/webservices/commons/site/XmlSchema/xref-test/tests/ext/package-summary.html?view=auto&rev=559329
==============================================================================
--- webservices/commons/site/XmlSchema/xref-test/tests/ext/package-summary.html (added)
+++ webservices/commons/site/XmlSchema/xref-test/tests/ext/package-summary.html Tue Jul 24 23:29:55 2007
@@ -0,0 +1,72 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+ <title>XmlSchema 1.3.2 Reference Package tests.ext</title>
+ <link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="style" />
+ </head>
+ <body>
+ <div class="overview">
+ <ul>
+ <li>
+ <a href="../../overview-summary.html">Overview</a>
+ </li>
+ <li class="selected">Package</li>
+ </ul>
+ </div>
+ <div class="framenoframe">
+ <ul>
+ <li>
+ <a href="../../index.html" target="_top">FRAMES</a>
+ </li>
+ <li>
+ <a href="package-summary.html" target="_top">NO FRAMES</a>
+ </li>
+ </ul>
+ </div>
+
+ <h2>Package tests.ext</h2>
+
+ <table class="summary">
+ <thead>
+ <tr>
+ <th>Class Summary</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <a href="PlainExtensionDeserializerTest.html" target="classFrame">PlainExtensionDeserializerTest</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="PlainExtensionSerializerTest.html" target="classFrame">PlainExtensionSerializerTest</a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <div class="overview">
+ <ul>
+ <li>
+ <a href="../../overview-summary.html">Overview</a>
+ </li>
+ <li class="selected">Package</li>
+ </ul>
+ </div>
+ <div class="framenoframe">
+ <ul>
+ <li>
+ <a href="../../index.html" target="_top">FRAMES</a>
+ </li>
+ <li>
+ <a href="package-summary.html" target="_top">NO FRAMES</a>
+ </li>
+ </ul>
+ </div>
+ <hr />
+ Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.
+ </body>
+</html>
\ No newline at end of file
Modified: webservices/commons/site/XmlSchema/xref-test/tests/package-frame.html
URL: http://svn.apache.org/viewvc/webservices/commons/site/XmlSchema/xref-test/tests/package-frame.html?view=diff&rev=559329&r1=559328&r2=559329
==============================================================================
--- webservices/commons/site/XmlSchema/xref-test/tests/package-frame.html (original)
+++ webservices/commons/site/XmlSchema/xref-test/tests/package-frame.html Tue Jul 24 23:29:55 2007
@@ -3,7 +3,7 @@
<html xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
- <title>XmlSchema 1.3.1 Reference Package tests</title>
+ <title>XmlSchema 1.3.2 Reference Package tests</title>
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="style" />
</head>
<body>
@@ -28,9 +28,15 @@
<a href="AnyTest.html" target="classFrame">AnyTest</a>
</li>
<li>
+ <a href="AppInfoMarkupTest.html" target="classFrame">AppInfoMarkupTest</a>
+ </li>
+ <li>
<a href="AttributeGroupTest.html" target="classFrame">AttributeGroupTest</a>
</li>
<li>
+ <a href="AttributeRefTest.html" target="classFrame">AttributeRefTest</a>
+ </li>
+ <li>
<a href="BlockTest.html" target="classFrame">BlockTest</a>
</li>
<li>
@@ -77,6 +83,9 @@
</li>
<li>
<a href="Resources.html" target="classFrame">Resources</a>
+ </li>
+ <li>
+ <a href="SequenceTest.html" target="classFrame">SequenceTest</a>
</li>
<li>
<a href="SimpleContentExtensionTest.html" target="classFrame">SimpleContentExtensionTest</a>
Modified: webservices/commons/site/XmlSchema/xref-test/tests/package-summary.html
URL: http://svn.apache.org/viewvc/webservices/commons/site/XmlSchema/xref-test/tests/package-summary.html?view=diff&rev=559329&r1=559328&r2=559329
==============================================================================
--- webservices/commons/site/XmlSchema/xref-test/tests/package-summary.html (original)
+++ webservices/commons/site/XmlSchema/xref-test/tests/package-summary.html Tue Jul 24 23:29:55 2007
@@ -3,7 +3,7 @@
<html xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
- <title>XmlSchema 1.3.1 Reference Package tests</title>
+ <title>XmlSchema 1.3.2 Reference Package tests</title>
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="style" />
</head>
<body>
@@ -57,11 +57,21 @@
</tr>
<tr>
<td>
+ <a href="AppInfoMarkupTest.html" target="classFrame">AppInfoMarkupTest</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
<a href="AttributeGroupTest.html" target="classFrame">AttributeGroupTest</a>
</td>
</tr>
<tr>
<td>
+ <a href="AttributeRefTest.html" target="classFrame">AttributeRefTest</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
<a href="BlockTest.html" target="classFrame">BlockTest</a>
</td>
</tr>
@@ -138,6 +148,11 @@
<tr>
<td>
<a href="Resources.html" target="classFrame">Resources</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="SequenceTest.html" target="classFrame">SequenceTest</a>
</td>
</tr>
<tr>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org