Revision: 4437 http://sourceforge.net/p/jump-pilot/code/4437 Author: michaudm Date: 2015-05-14 15:44:56 +0000 (Thu, 14 May 2015) Log Message: ----------- FR 218 : implement new attribute types in RandomTrianglesPlugIn
Modified Paths: -------------- core/trunk/ChangeLog core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/test/RandomTrianglesPlugIn.java Modified: core/trunk/ChangeLog =================================================================== --- core/trunk/ChangeLog 2015-05-14 12:28:54 UTC (rev 4436) +++ core/trunk/ChangeLog 2015-05-14 15:44:56 UTC (rev 4437) @@ -3,6 +3,7 @@ 2015-05-14 mmichaud <m.michael.mich...@orange.fr> * #393 : SimpleQueryPlugIn : the bug was not completely fixed : features must be cloned to be added to new Layer but not for Selection or InfoPanel + * FR 218 : implement new attribute types in RandomTrianglesPlugIn 2015-05-11 bertaz * Sextante raster layers: added ability to handle rasters with different x and y cell sizes. Modified: core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/test/RandomTrianglesPlugIn.java =================================================================== --- core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/test/RandomTrianglesPlugIn.java 2015-05-14 12:28:54 UTC (rev 4436) +++ core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/test/RandomTrianglesPlugIn.java 2015-05-14 15:44:56 UTC (rev 4437) @@ -158,26 +158,26 @@ FeatureSchema featureSchema = new FeatureSchema(); featureSchema.addAttribute("Geometry", AttributeType.GEOMETRY); featureSchema.addAttribute("City", AttributeType.STRING); - featureSchema.addAttribute("A Code", AttributeType.DATE); + featureSchema.addAttribute("A_Date", AttributeType.DATE); //Put GEOMETRY in this unusual position to test robustness of //AttributeTableModel [Jon Aquino] // featureSchema.addAttribute("Geometry", AttributeType.GEOMETRY); - featureSchema.addAttribute("B Code", AttributeType.INTEGER); - featureSchema.addAttribute("C Code", AttributeType.DOUBLE); - featureSchema.addAttribute("D Code", AttributeType.STRING); - featureSchema.addAttribute("E Code", AttributeType.STRING); - featureSchema.addAttribute("F Code", AttributeType.STRING); - featureSchema.addAttribute("G Code", AttributeType.STRING); - featureSchema.addAttribute("H Code", AttributeType.STRING); - featureSchema.addAttribute("I Code", AttributeType.STRING); - featureSchema.addAttribute("J Code", AttributeType.STRING); - featureSchema.addAttribute("K Code", AttributeType.STRING); - featureSchema.addAttribute("L Code", AttributeType.STRING); - featureSchema.addAttribute("M Code", AttributeType.STRING); - featureSchema.addAttribute("N Code", AttributeType.STRING); - featureSchema.addAttribute("O Code", AttributeType.STRING); - featureSchema.addAttribute("P Code", AttributeType.STRING); + featureSchema.addAttribute("B_Integer", AttributeType.INTEGER); + featureSchema.addAttribute("C_Double", AttributeType.DOUBLE); + featureSchema.addAttribute("D_Long", AttributeType.LONG); + featureSchema.addAttribute("E_Boolean", AttributeType.BOOLEAN); + featureSchema.addAttribute("F_Code", AttributeType.STRING); + featureSchema.addAttribute("G_Code", AttributeType.STRING); + featureSchema.addAttribute("H_Code", AttributeType.STRING); + featureSchema.addAttribute("I_Code", AttributeType.STRING); + featureSchema.addAttribute("J_Code", AttributeType.STRING); + featureSchema.addAttribute("K_Code", AttributeType.STRING); + featureSchema.addAttribute("L_Code", AttributeType.STRING); + featureSchema.addAttribute("M_Code", AttributeType.STRING); + featureSchema.addAttribute("N_Code", AttributeType.STRING); + featureSchema.addAttribute("O_Code", AttributeType.STRING); + featureSchema.addAttribute("P_Code", AttributeType.STRING); FeatureCollection featureCollection = new FeatureDataset(featureSchema); addFeature(cornerSquare(), featureCollection); @@ -205,32 +205,29 @@ Feature feature = new BasicFeature(featureCollection.getFeatureSchema()); feature.setAttribute("Geometry", geometry); - feature.setAttribute( - "City", - cities.get((int) Math.floor(Math.random() * cities.size()))); - feature.setAttribute("A Code", new Date()); - feature.setAttribute( - "B Code", - new Integer((int) (Math.random() * 100000))); - feature.setAttribute("C Code", new Double(Math.random() * 100000)); - feature.setAttribute( - "D Code", - new Date((int) Math.pow(Math.random() * 100000, 20)).toString()); - feature.setAttribute("E Code", "" + (int) (Math.random() * 100000)); - feature.setAttribute("F Code", "" + (int) (Math.random() * 100000)); - feature.setAttribute("G Code", "" + (int) (Math.random() * 100000)); - feature.setAttribute("H Code", "" + (int) (Math.random() * 100000)); - feature.setAttribute("I Code", "" + (int) (Math.random() * 100000)); - feature.setAttribute("J Code", "" + (int) (Math.random() * 100000)); - feature.setAttribute("K Code", "" + (int) (Math.random() * 100000)); - feature.setAttribute("L Code", "" + (int) (Math.random() * 100000)); - feature.setAttribute("M Code", "" + (int) (Math.random() * 100000)); - feature.setAttribute("N Code", "" + (int) (Math.random() * 100000)); - feature.setAttribute("O Code", "" + (int) (Math.random() * 100000)); - feature.setAttribute("P Code", "" + (int) (Math.random() * 100000)); + feature.setAttribute("City", cities.get((int) Math.floor(Math.random() * cities.size()))); + feature.setAttribute("A_Date", new Date()); + feature.setAttribute("B_Integer", (int)(Math.random() * 100000)); + feature.setAttribute("C_Double", Math.random() * 100000); + feature.setAttribute("D_Long", (long)(Math.random() * 1000000000000L)); + feature.setAttribute("E_Boolean", Math.random() > 0.5); + feature.setAttribute("F_Code", "" + (int)(Math.random() * 100000)); + feature.setAttribute("G_Code", "" + (int)(Math.random() * 100000)); + feature.setAttribute("H_Code", "" + (int)(Math.random() * 100000)); + feature.setAttribute("I_Code", "" + (int)(Math.random() * 100000)); + feature.setAttribute("J_Code", "" + (int)(Math.random() * 100000)); + feature.setAttribute("K_Code", "" + (int)(Math.random() * 100000)); + feature.setAttribute("L_Code", "" + (int)(Math.random() * 100000)); + feature.setAttribute("M_Code", "" + (int)(Math.random() * 100000)); + feature.setAttribute("N_Code", "" + (int)(Math.random() * 100000)); + feature.setAttribute("O_Code", "" + (int)(Math.random() * 100000)); + feature.setAttribute("P_Code", "" + (int)(Math.random() * 100000)); + if (Math.random() > 0.8) { + feature.setAttribute("E_Boolean", null); + } if (Math.random() > 0.8) { - feature.setAttribute("E Code", null); + feature.setAttribute("F_Code", null); } featureCollection.add(feature); ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel