<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">TypeNameGenerator.java</a></tt> </td><td></td><td></td><td align="right" id="removed">-72</td><td nowrap="nowrap" align="center">155 -&gt; 156</td></tr>
</table>
<pre class="comment">
remove some dead code
</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>TypeNameGenerator.java</b></big> <small id="info">155 -&gt; 156</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/asxsd/TypeNameGenerator.java        2007-09-17 21:42:39 UTC (rev 155)
+++ trunk/src/main/java/uk/co/badgersinfoil/asxsd/TypeNameGenerator.java        2007-09-18 20:52:26 UTC (rev 156)
@@ -10,34 +10,14 @@
</small></pre><pre class="diff" id="context"> import org.eclipse.xsd.XSDComplexTypeDefinition;
 import org.eclipse.xsd.XSDConcreteComponent;
 import org.eclipse.xsd.XSDElementDeclaration;
</pre><pre class="diff" id="removed">-import org.eclipse.xsd.XSDNamedComponent;
</pre><pre class="diff" id="context"> import org.eclipse.xsd.XSDSchema;
</pre><pre class="diff" id="removed">-import org.eclipse.xsd.XSDSimpleTypeDefinition;
</pre><pre class="diff" id="context"> import org.eclipse.xsd.XSDTypeDefinition;
 
 
 public class TypeNameGenerator {
         private Map names = new HashMap();
 
</pre><pre class="diff" id="removed">-        /**
-         * returns the name of the AS type that holds data for the given
-         * component of the schema
-         */
-        private String typeName(XSDNamedComponent named) {
-                if (named instanceof XSDSimpleTypeDefinition) {
-                        XSDSimpleTypeDefinition simpleType = (XSDSimpleTypeDefinition)named;
-                        return lookupTypeName(simpleType);
-                }
-                if (XSDUtils.isXSDAnyType(named)) {
-                        return "XML";
-                }
-                return getNameFor(new QName(named.getTargetNamespace(), named.getName()));
-        }
-
</pre><pre class="diff" id="context">         public String typeName(XSDTypeDefinition type) {
</pre><pre class="diff" id="removed">-                if (type instanceof XSDSimpleTypeDefinition) {
-                        return lookupTypeName((XSDSimpleTypeDefinition)type);
-                }
</pre><pre class="diff" id="context">                 if (type instanceof XSDComplexTypeDefinition) {
                         if (type.getName() == null) {
                                 throw new IllegalArgumentException("Can't get type name for anonymous complex type: "+type+", contained within: "+type.getContainer());
</pre><pre class="diff"><small id="info">@@ -47,58 +27,6 @@
</small></pre><pre class="diff" id="context">                 throw new IllegalArgumentException("unhandled type: "+type.getClass().getName());
         }
 
</pre><pre class="diff" id="removed">-        private String typeName(XSDSimpleTypeDefinition simpleType) {
-                return lookupTypeName(simpleType);
-        }
-
-        /**
-         * tries to map XML Schema standard types to AS types
-         */
-        private String lookupTypeName(XSDSimpleTypeDefinition simpleType) {
-                if (simpleType == null) {
-                        return null;
-                }
-                if (simpleType.getTargetNamespace().equals(XSDUtils.SCHEMA_NAMESPACE)) {
-                        if (simpleType.getName().equals("string")) {
-                                return "String";
-                        }
-                        if (simpleType.getName().equals("NMTOKEN")) {
-                                return "String";
-                        }
-                        if (simpleType.getName().equals("double")) {
-                                // too big for Flash's Number type, so treat as a String
-                                return "String";
-                        }
-                        if (simpleType.getName().equals("decimal")) {
-                                // too big for Flash's Number type, so treat as a String
-                                return "String";
-                        }
-                        if (simpleType.getName().equals("boolean")) {
-                                return "Boolean";
-                        }
-                        if (simpleType.getName().equals("int")) {
-                                return "int";
-                        }
-                        if (simpleType.getName().equals("float")) {
-                                return "Number";
-                        }
-                        if (simpleType.getName().equals("long")) {
-                                // too big for Flash's Number type, so treat as a String
-                                return "String";
-                        }
-                        if (simpleType.getName().equals("dateTime")) {
-                                // too big for Flash's Number type, so treat as a String
-                                return "Date";
-                        }
-                        if (simpleType.getName().equals("short")) {
-                                return "int";
-                        }
-System.err.println("Unhandled type "+simpleType.getURI());
-                        return null;
-                }
-                return lookupTypeName(simpleType.getBaseTypeDefinition());
-        }
-
</pre><pre class="diff" id="context">         private String getNameFor(QName name) {
                 String existing = (String)names.get(name);
                 if (existing != null) {
</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>