Justin,
I got JET working. (That was scary-easy.)
I did however get a few differences in the generated code. The NL
definitions became public (they were protected). I have attached a diff.
What is your JET version? I suspect this might be the cause. I am using
JET 1.0.1.v200908201022.
Or did I miss a step?
Kind regards,
Ben.
On 16/12/09 15:52, Ben Caradoc-Davies wrote:
Justin,
I am tinkering with xmlcodegen, and have discovered the code
(schema.javajet) that writes the code (SchemaClassTemplate.java) that
writes the code (GMLSchema.java). :-)
Is there maven support for JET, or are JET operations performed manually
in Eclipse?
What is your workflow? I expect I need to add a JET Nature. Is it
documented?
I am trying some alternative strategies to overcome the GMLSchema 64kB
method limit, as well as restoring the old static members for backwards
compatibility.
Kind regards,
--
Ben Caradoc-Davies <[email protected]>
Software Engineer, CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre
26 Dick Perry Ave, Kensington WA 6151, Australia
Index:
build/maven/xmlcodegen/src/main/java/org/geotools/maven/xmlcodegen/templates/BindingTestClass.java
===================================================================
---
build/maven/xmlcodegen/src/main/java/org/geotools/maven/xmlcodegen/templates/BindingTestClass.java
(revision 34676)
+++
build/maven/xmlcodegen/src/main/java/org/geotools/maven/xmlcodegen/templates/BindingTestClass.java
(working copy)
@@ -18,7 +18,7 @@
return result;
}
- protected final String NL = nl == null ?
(System.getProperties().getProperty("line.separator")) : nl;
+ public final String NL = nl == null ?
(System.getProperties().getProperty("line.separator")) : nl;
protected final String TEXT_1 = NL + "import org.geotools.xml.Binding;" + NL
+ "" + NL + "/**" + NL + " * Binding test case for ";
protected final String TEXT_2 = ":";
protected final String TEXT_3 = "." + NL + " *" + NL + " * <p>" + NL + " *
<pre>" + NL + " * <code>";
Index:
build/maven/xmlcodegen/src/main/java/org/geotools/maven/xmlcodegen/templates/SchemaClassTemplate.java
===================================================================
---
build/maven/xmlcodegen/src/main/java/org/geotools/maven/xmlcodegen/templates/SchemaClassTemplate.java
(revision 34676)
+++
build/maven/xmlcodegen/src/main/java/org/geotools/maven/xmlcodegen/templates/SchemaClassTemplate.java
(working copy)
@@ -25,7 +25,7 @@
return result;
}
- protected final String NL = nl == null ?
(System.getProperties().getProperty("line.separator")) : nl;
+ public final String NL = nl == null ?
(System.getProperties().getProperty("line.separator")) : nl;
protected final String TEXT_1 = "";
protected final String TEXT_2 = NL + NL + "import java.util.ArrayList;" + NL
+ "import java.util.Collections;" + NL + "import java.util.List;" + NL + "" +
NL + "import org.opengis.feature.type.AttributeType;" + NL + "import
org.opengis.feature.type.ComplexType;" + NL + "" + NL + "import
org.geotools.feature.NameImpl;" + NL + "import
org.geotools.feature.type.AttributeDescriptorImpl;" + NL + "import
org.geotools.feature.type.AttributeTypeImpl;" + NL + "import
org.geotools.feature.type.ComplexTypeImpl;" + NL + "import
org.geotools.feature.type.SchemaImpl;" + NL;
protected final String TEXT_3 = NL + "import ";
Index:
build/maven/xmlcodegen/src/main/java/org/geotools/maven/xmlcodegen/templates/ConfigurationTemplate.java
===================================================================
---
build/maven/xmlcodegen/src/main/java/org/geotools/maven/xmlcodegen/templates/ConfigurationTemplate.java
(revision 34676)
+++
build/maven/xmlcodegen/src/main/java/org/geotools/maven/xmlcodegen/templates/ConfigurationTemplate.java
(working copy)
@@ -16,7 +16,7 @@
return result;
}
- protected final String NL = nl == null ?
(System.getProperties().getProperty("line.separator")) : nl;
+ public final String NL = nl == null ?
(System.getProperties().getProperty("line.separator")) : nl;
protected final String TEXT_1 = "import
org.eclipse.xsd.util.XSDSchemaLocationResolver;\t" + NL + "import
org.geotools.xml.Configuration;" + NL + "import
org.picocontainer.MutablePicoContainer;" + NL + "" + NL + "/**" + NL + " *
Parser configuration for the ";
protected final String TEXT_2 = " schema." + NL + " *" + NL + " *
@generated" + NL + " */" + NL + "public class ";
protected final String TEXT_3 = "Configuration extends Configuration {" + NL
+ "" + NL + " /**" + NL + " * Creates a new configuration." + NL + "
* " + NL + " * @generated" + NL + " */ " + NL + " public ";
Index:
build/maven/xmlcodegen/src/main/java/org/geotools/maven/xmlcodegen/templates/CLASS.java
===================================================================
---
build/maven/xmlcodegen/src/main/java/org/geotools/maven/xmlcodegen/templates/CLASS.java
(revision 34676)
+++
build/maven/xmlcodegen/src/main/java/org/geotools/maven/xmlcodegen/templates/CLASS.java
(working copy)
@@ -18,7 +18,7 @@
return result;
}
- protected final String NL = nl == null ?
(System.getProperties().getProperty("line.separator")) : nl;
+ public final String NL = nl == null ?
(System.getProperties().getProperty("line.separator")) : nl;
protected final String TEXT_1 = NL + "import org.geotools.xml.*;" + NL +
"import ";
protected final String TEXT_2 = ";" + NL;
protected final String TEXT_3 = NL + "import ";
Index:
build/maven/xmlcodegen/src/main/java/org/geotools/maven/xmlcodegen/templates/XSDTemplate.java
===================================================================
---
build/maven/xmlcodegen/src/main/java/org/geotools/maven/xmlcodegen/templates/XSDTemplate.java
(revision 34676)
+++
build/maven/xmlcodegen/src/main/java/org/geotools/maven/xmlcodegen/templates/XSDTemplate.java
(working copy)
@@ -17,7 +17,7 @@
return result;
}
- protected final String NL = nl == null ?
(System.getProperties().getProperty("line.separator")) : nl;
+ public final String NL = nl == null ?
(System.getProperties().getProperty("line.separator")) : nl;
protected final String TEXT_1 = NL + "import java.util.Set;" + NL + "import
javax.xml.namespace.QName;" + NL + "import org.geotools.xml.XSD;" + NL + "" +
NL + "/**" + NL + " * This interface contains the qualified names of all the
types,elements, and " + NL + " * attributes in the ";
protected final String TEXT_2 = " schema." + NL + " *" + NL + " *
@generated" + NL + " */" + NL + "public final class ";
protected final String TEXT_3 = " extends XSD {" + NL + "" + NL + " /**
singleton instance */" + NL + " private static final ";
Index:
build/maven/xmlcodegen/src/main/java/org/geotools/maven/xmlcodegen/templates/BindingTestSupportClass.java
===================================================================
---
build/maven/xmlcodegen/src/main/java/org/geotools/maven/xmlcodegen/templates/BindingTestSupportClass.java
(revision 34676)
+++
build/maven/xmlcodegen/src/main/java/org/geotools/maven/xmlcodegen/templates/BindingTestSupportClass.java
(working copy)
@@ -16,7 +16,7 @@
return result;
}
- protected final String NL = nl == null ?
(System.getProperties().getProperty("line.separator")) : nl;
+ public final String NL = nl == null ?
(System.getProperties().getProperty("line.separator")) : nl;
protected final String TEXT_1 = NL + "import
org.geotools.xml.Configuration;" + NL + "import
org.geotools.xml.test.XMLTestSupport;" + NL + "" + NL + "/**" + NL + " * Base
test class for the ";
protected final String TEXT_2 = " schema." + NL + " *" + NL + " *
@generated" + NL + " */" + NL + "public class ";
protected final String TEXT_3 = "TestSupport extends XMLTestSupport {" + NL
+ "" + NL + " protected Configuration createConfiguration() {" + NL + "
return new ";
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel