<html>
<head>
<style><!--
  body {background-color:#ffffff;}
  .file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
  .pathname {font-family:monospace; float:right;}
  .fileheader {margin-bottom:.5em;}
  .diff {margin:0;}
  .tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
  .tasklist ul {margin-top:0;margin-bottom:0;}
  tr.alt {background-color:#eeeeee}
  #added {background-color:#ddffdd;}
  #addedchars {background-color:#99ff99;font-weight:bolder;}
  tr.alt #added {background-color:#ccf7cc;}
  #removed {background-color:#ffdddd;}
  #removedchars {background-color:#ff9999;font-weight:bolder;}
  tr.alt #removed {background-color:#f7cccc;}
  #copied {background-color:#ccccff;}
  tr.alt #copied {background-color:#bbbbf7;}
  #info {color:#888888;}
  #context {background-color:#eeeeee;}
  td {padding-left:.3em;padding-right:.3em;}
  tr.head {border-bottom-width:1px;border-bottom-style:solid;}
  tr.head td {padding:0;padding-top:.2em;}
  .task {background-color:#ffff00;}
  .comment {white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd}
  .error {color:red;}
  hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="5">Commit in <b><tt>asxsd/trunk/src/main/java/uk/co/badgersinfoil/asxsd</tt></b></td></tr>
<tr><td><tt><a href="#file1">MarshalBuilder.java</a></tt> </td><td></td><td align="right" id="added">+7</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">141 -&gt; 142</td></tr>
<tr class="alt"><td><tt><a href="#file2">UnmarshalBuilder.java</a></tt> </td><td></td><td align="right" id="added">+2</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">141 -&gt; 142</td></tr>
<tr><td><tt>components/<a href="#file3">AbstractSimpleTypeComponent.java</a></tt> </td><td></td><td align="right" id="added">+2</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">141 -&gt; 142</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file4">ArrayElementDeclarationComponent.java</a></tt> </td><td></td><td align="right" id="added">+1</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">141 -&gt; 142</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file5">ArrayTypeDeclarationComponent.java</a></tt> </td><td></td><td align="right" id="added">+1</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">141 -&gt; 142</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file6">ElementDeclarationComponent.java</a></tt> </td><td></td><td align="right" id="added">+4</td><td align="right" id="removed">-4</td><td nowrap="nowrap" align="center">141 -&gt; 142</td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file7">StringSimpleTypeComponent.java</a></tt> </td><td></td><td align="right" id="added">+2</td><td align="right" id="removed">-10</td><td nowrap="nowrap" align="center">141 -&gt; 142</td></tr>
<tr><td></td><td></td><td align="right" id="added">+19</td><td align="right" id="removed">-22</td><td></td></tr>
</table>
<small id="info">7 modified files</small><br />
<pre class="comment">
centralise the construction of BasicMappingFunction objects
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">asxsd/trunk/src/main/java/uk/co/badgersinfoil/asxsd</span><br />
<div class="fileheader"><big><b>MarshalBuilder.java</b></big> <small id="info">141 -&gt; 142</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/asxsd/MarshalBuilder.java        2007-09-05 22:01:45 UTC (rev 141)
+++ trunk/src/main/java/uk/co/badgersinfoil/asxsd/MarshalBuilder.java        2007-09-05 22:52:19 UTC (rev 142)
@@ -56,6 +56,11 @@
</small></pre><pre class="diff" id="context">                                 conversionMethodFor(ctype);
                         }
                 }
</pre><pre class="diff" id="added">+//                List elements = schema.getElementDeclarations();
+//                for (Iterator i = elements.iterator(); i.hasNext(); ) {
+//                        XSDElementDeclaration elementDecl = (XSDElementDeclaration)i.next();
+//                        conversionMethodFor(elementDecl);
+//                }
</pre><pre class="diff" id="context">         }
 
         private ASMethod createMethodForType(XSDTypeDefinition typeDef) {
</pre><pre class="diff"><small id="info">@@ -159,7 +164,7 @@
</small></pre><pre class="diff" id="context">                 context.setAttribute(KEY_MARSHAL_CURRENT_TARGET_PARENTELEMENT_EXPR, expr);
         }
 
</pre><pre class="diff" id="removed">-        public <span id="removedchars">String</span> conversionMethodFor(XSDNamedComponent namedComponent) {
</pre><pre class="diff" id="added">+        public <span id="addedchars">MappingFunction</span> conversionMethodFor(XSDNamedComponent namedComponent) {
</pre><pre class="diff" id="context">                 MappingFunctionStore mappingFunctions = context.getMappingFunctionStore();
                 ASMethod convert = mappingFunctions.get(CodegenRole.MARSHAL, namedComponent);
                 ASCompilationUnit unit = getClassForNamespace(namedComponent.getTargetNamespace());
</pre><pre class="diff"><small id="info">@@ -175,7 +180,7 @@
</small></pre><pre class="diff" id="context">                         context.generateCode(namedComponent);
                         context.popAttrScope();
                 }
</pre><pre class="diff" id="removed">-                return qualifiedMethodName(unit, convert);
</pre><pre class="diff" id="added">+                return new BasicMappingFunction(qualifiedMethodName(unit, convert));
</pre><pre class="diff" id="context">         }
 
         private ASMethod createMethodFor(XSDNamedComponent namedComponent) {
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">asxsd/trunk/src/main/java/uk/co/badgersinfoil/asxsd</span><br />
<div class="fileheader"><big><b>UnmarshalBuilder.java</b></big> <small id="info">141 -&gt; 142</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/asxsd/UnmarshalBuilder.java        2007-09-05 22:01:45 UTC (rev 141)
+++ trunk/src/main/java/uk/co/badgersinfoil/asxsd/UnmarshalBuilder.java        2007-09-05 22:52:19 UTC (rev 142)
@@ -137,7 +137,7 @@
</small></pre><pre class="diff" id="context">                 context.setAttribute(KEY_UNMARSHAL_CURRENT_SOURCE_EXPR, expr);
         }
 
</pre><pre class="diff" id="removed">-        public <span id="removedchars">String</span> conversionMethodFor(XSDNamedComponent namedComponent) {
</pre><pre class="diff" id="added">+        public <span id="addedchars">MappingFunction</span> conversionMethodFor(XSDNamedComponent namedComponent) {
</pre><pre class="diff" id="context">                 MappingFunctionStore mappingFunctions = context.getMappingFunctionStore();
                 ASMethod convert = mappingFunctions.get(CodegenRole.UNMARSHAL, namedComponent);
                 ASCompilationUnit unit = getClassForNamespace(namedComponent.getTargetNamespace());
</pre><pre class="diff"><small id="info">@@ -153,7 +153,7 @@
</small></pre><pre class="diff" id="context">                         context.generateCode(namedComponent);
                         context.popAttrScope();
                 }
</pre><pre class="diff" id="removed">-                return qualifiedMethodName(unit, convert);
</pre><pre class="diff" id="added">+                return new BasicMappingFunction(qualifiedMethodName(unit, convert));
</pre><pre class="diff" id="context">         }
 
         private ASMethod createMethodFor(XSDNamedComponent namedComponent) {
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname">asxsd/trunk/src/main/java/uk/co/badgersinfoil/asxsd/components</span><br />
<div class="fileheader"><big><b>AbstractSimpleTypeComponent.java</b></big> <small id="info">141 -&gt; 142</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/asxsd/components/AbstractSimpleTypeComponent.java        2007-09-05 22:01:45 UTC (rev 141)
+++ trunk/src/main/java/uk/co/badgersinfoil/asxsd/components/AbstractSimpleTypeComponent.java        2007-09-05 22:52:19 UTC (rev 142)
@@ -55,11 +55,11 @@
</small></pre><pre class="diff" id="context">                 CodegenRole role = context.getCurrentRole();
                 if (role == CodegenRole.UNMARSHAL) {
                         UnmarshalBuilder builder = context.getUnmarshalBuilder();
</pre><pre class="diff" id="removed">-                        return new BasicMappingFunction(builder.conversionMethodFor(simpleType));
</pre><pre class="diff" id="added">+                        return builder.conversionMethodFor(simpleType);
</pre><pre class="diff" id="context">                 }
                 if (role == CodegenRole.MARSHAL) {
                         MarshalBuilder builder = context.getMarshalBuilder();
</pre><pre class="diff" id="removed">-                        return new BasicMappingFunction(builder.conversionMethodFor(simpleType));
</pre><pre class="diff" id="added">+                        return builder.conversionMethodFor(simpleType);
</pre><pre class="diff" id="context">                 }
                 throw new IllegalArgumentException(getClass().getName() + " does not support role "+role);
         }
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname">asxsd/trunk/src/main/java/uk/co/badgersinfoil/asxsd/components</span><br />
<div class="fileheader"><big><b>ArrayElementDeclarationComponent.java</b></big> <small id="info">141 -&gt; 142</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/asxsd/components/ArrayElementDeclarationComponent.java        2007-09-05 22:01:45 UTC (rev 141)
+++ trunk/src/main/java/uk/co/badgersinfoil/asxsd/components/ArrayElementDeclarationComponent.java        2007-09-05 22:52:19 UTC (rev 142)
@@ -83,7 +83,7 @@
</small></pre><pre class="diff" id="context">                 if (role == CodegenRole.UNMARSHAL) {
                         XSDElementDeclaration elementDecl = (XSDElementDeclaration)component;
                         UnmarshalBuilder builder = context.getUnmarshalBuilder();
</pre><pre class="diff" id="removed">-                        return new BasicMappingFunction(builder.conversionMethodFor(elementDecl));
</pre><pre class="diff" id="added">+                        return builder.conversionMethodFor(elementDecl);
</pre><pre class="diff" id="context">                 }
                 throw new IllegalArgumentException(getClass().getName() + " does not support role "+role);
         }
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname">asxsd/trunk/src/main/java/uk/co/badgersinfoil/asxsd/components</span><br />
<div class="fileheader"><big><b>ArrayTypeDeclarationComponent.java</b></big> <small id="info">141 -&gt; 142</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/asxsd/components/ArrayTypeDeclarationComponent.java        2007-09-05 22:01:45 UTC (rev 141)
+++ trunk/src/main/java/uk/co/badgersinfoil/asxsd/components/ArrayTypeDeclarationComponent.java        2007-09-05 22:52:19 UTC (rev 142)
@@ -89,7 +89,7 @@
</small></pre><pre class="diff" id="context">                 if (role == CodegenRole.UNMARSHAL) {
                         XSDTypeDefinition typeDef = (XSDTypeDefinition)component;
                         UnmarshalBuilder builder = context.getUnmarshalBuilder();
</pre><pre class="diff" id="removed">-                        return new BasicMappingFunction(builder.conversionMethodFor(typeDef));
</pre><pre class="diff" id="added">+                        return builder.conversionMethodFor(typeDef);
</pre><pre class="diff" id="context">                 }
                 throw new IllegalArgumentException(getClass().getName() + " does not support role "+role);
         }
</pre></div>
<hr /><a name="file6" /><div class="file">
<span class="pathname">asxsd/trunk/src/main/java/uk/co/badgersinfoil/asxsd/components</span><br />
<div class="fileheader"><big><b>ElementDeclarationComponent.java</b></big> <small id="info">141 -&gt; 142</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/asxsd/components/ElementDeclarationComponent.java        2007-09-05 22:01:45 UTC (rev 141)
+++ trunk/src/main/java/uk/co/badgersinfoil/asxsd/components/ElementDeclarationComponent.java        2007-09-05 22:52:19 UTC (rev 142)
@@ -119,17 +119,17 @@
</small></pre><pre class="diff" id="context">                         UnmarshalBuilder builder = context.getUnmarshalBuilder();
                         XSDTypeDefinition typeDef = elementDecl.getType();
                         if (XSDUtils.isAnonymous(typeDef)) {
</pre><pre class="diff" id="removed">-                                return new BasicMappingFunction(builder.conversionMethodFor(elementDecl));
</pre><pre class="diff" id="added">+                                return builder.conversionMethodFor(elementDecl);
</pre><pre class="diff" id="context">                         }
</pre><pre class="diff" id="removed">-                        return new BasicMappingFunction(builder.conversionMethodFor(typeDef));
</pre><pre class="diff" id="added">+                        return builder.conversionMethodFor(typeDef);
</pre><pre class="diff" id="context">                 }
                 if (role == CodegenRole.MARSHAL) {
                         MarshalBuilder builder = context.getMarshalBuilder();
                         XSDTypeDefinition typeDef = elementDecl.getType();
                         if (XSDUtils.isAnonymous(typeDef)) {
</pre><pre class="diff" id="removed">-                                return new BasicMappingFunction(builder.conversionMethodFor(elementDecl));
</pre><pre class="diff" id="added">+                                return builder.conversionMethodFor(elementDecl);
</pre><pre class="diff" id="context">                         }
</pre><pre class="diff" id="removed">-                        return new BasicMappingFunction(builder.conversionMethodFor(typeDef));
</pre><pre class="diff" id="added">+                        return builder.conversionMethodFor(typeDef);
</pre><pre class="diff" id="context">                 }
                 throw new IllegalArgumentException(getClass().getName() + " does not support role "+role);
         }
</pre></div>
<hr /><a name="file7" /><div class="file">
<span class="pathname">asxsd/trunk/src/main/java/uk/co/badgersinfoil/asxsd/components</span><br />
<div class="fileheader"><big><b>StringSimpleTypeComponent.java</b></big> <small id="info">141 -&gt; 142</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/asxsd/components/StringSimpleTypeComponent.java        2007-09-05 22:01:45 UTC (rev 141)
+++ trunk/src/main/java/uk/co/badgersinfoil/asxsd/components/StringSimpleTypeComponent.java        2007-09-05 22:52:19 UTC (rev 142)
@@ -56,17 +56,9 @@
</small></pre><pre class="diff" id="context">         protected MappingFunction functionFor(CodegenContext context, XSDSimpleTypeDefinition component) {
                 CodegenRole role = context.getCurrentRole();
                 if (role == CodegenRole.UNMARSHAL) {
</pre><pre class="diff" id="removed">-                        return new MappingFunction() {
-                                public String appliedTo(String accessExpr) {
-                                        return accessExpr;
-                                }
-                        };
</pre><pre class="diff" id="added">+                        return IdentityMappingFunction.INSTANCE;
</pre><pre class="diff" id="context">                 } else if (role == CodegenRole.MARSHAL) {
</pre><pre class="diff" id="removed">-                        return new MappingFunction() {
-                                public String appliedTo(String accessExpr) {
-                                        return accessExpr;
-                                }
-                        };
</pre><pre class="diff" id="added">+                        return IdentityMappingFunction.INSTANCE;
</pre><pre class="diff" id="context">                 }
                 return super.functionFor(context, (XSDConcreteComponent)component);
         }
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -&gt; email">CVSspam</a> 0.2.12</small></center>
</body></html>