From 4d7001f0b81bfaa011c2f98c88533c041cbd1e2a Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Sun, 8 Aug 2010 10:47:00 +0200 Subject: [PATCH] Cleaning. --- src/fr/devinsy/xid/Data.java | 11 +++++------ src/fr/devinsy/xid/IdData.java | 21 ++++++++++++--------- src/fr/devinsy/xid/Presenter.java | 10 +++++----- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/fr/devinsy/xid/Data.java b/src/fr/devinsy/xid/Data.java index 24ab8ee..2c28212 100644 --- a/src/fr/devinsy/xid/Data.java +++ b/src/fr/devinsy/xid/Data.java @@ -1,7 +1,6 @@ package fr.devinsy.xid; - /* * */ @@ -217,7 +216,7 @@ public class Data { IdData tag = this.getIdData (id); - tag.getAttributes ().setAttribute (label, value); + tag.attributes ().setAttribute (label, value); } @@ -237,7 +236,7 @@ public class Data { IdData tag = this.getIdData (id, line); - tag.getAttributes ().setAttribute (label, value); + tag.attributes ().setAttribute (label, value); } @@ -257,7 +256,7 @@ public class Data { IdData tag = this.getIdData (id, line, column); - tag.getAttributes ().setAttribute (label, value); + tag.attributes ().setAttribute (label, value); } @@ -277,7 +276,7 @@ public class Data { IdData tag = this.getIdData (id, line, column); - tag.getAttributes ().appendAttribute (label, value); + tag.attributes ().appendAttribute (label, value); } @@ -288,7 +287,7 @@ public class Data { IdData tag = this.getIdData (id); - tag.getAttributes ().appendAttribute (label, value); + tag.attributes ().appendAttribute (label, value); } diff --git a/src/fr/devinsy/xid/IdData.java b/src/fr/devinsy/xid/IdData.java index 612119c..d7fbde8 100644 --- a/src/fr/devinsy/xid/IdData.java +++ b/src/fr/devinsy/xid/IdData.java @@ -1,6 +1,7 @@ package fr.devinsy.xid; -import java.io.*; +import java.io.Serializable; + /** * IdData class is used to hold application data and @@ -21,9 +22,6 @@ public class IdData implements Serializable, IdDataCore public enum IterationStrategy {ONLY_FIRST_ROW, ONLY_FIRST_TWO_ROWS, ONLY_ROWS_WITH_ID, ONLY_ROWS_WITHOUT_ID, ALL_ROWS} - - - public enum MODE {REPLACE, APPEND, IGNORE}; protected IterationStrategy iterationStrategy; @@ -109,7 +107,7 @@ public class IdData implements Serializable, IdDataCore /* * */ - public MODE getDisplayMode() + public MODE displayMode() { MODE result; @@ -122,7 +120,7 @@ public class IdData implements Serializable, IdDataCore /* * */ - public Attributes getAttributes () + public Attributes attributes () { Attributes result; @@ -150,9 +148,14 @@ public class IdData implements Serializable, IdDataCore /* * */ - public boolean getExcludeSection() + public boolean excludeSection() { - return excludeSection; + boolean result; + + result = excludeSection; + + // + return(result); } @@ -168,7 +171,7 @@ public class IdData implements Serializable, IdDataCore /** * */ - public IterationStrategy getIterationStrategy () + public IterationStrategy iterationStrategy () { IterationStrategy result; diff --git a/src/fr/devinsy/xid/Presenter.java b/src/fr/devinsy/xid/Presenter.java index 89d6dc4..cf22d66 100644 --- a/src/fr/devinsy/xid/Presenter.java +++ b/src/fr/devinsy/xid/Presenter.java @@ -164,7 +164,7 @@ public class Presenter else if (dataCore instanceof IdData) { IdData data = (IdData) dataCore; - strategy = data.getIterationStrategy (); + strategy = data.iterationStrategy (); } else { @@ -316,7 +316,7 @@ public class Presenter { IdData data = (IdData) dataCore; - String theClass = data.getAttributes ().getAttribute ("class"); + String theClass = data.attributes ().getAttribute ("class"); if ((theClass == null) || (!theClass.equals ("xid:nodisplay"))) @@ -326,7 +326,7 @@ public class Presenter result.append (node.getNodeName()); // Build attributes. - result.append (processAttributes (attrs, data.getAttributes (), suffix)); + result.append (processAttributes (attrs, data.attributes (), suffix)); if ((node.getChildNodes () == null) && ((data == null) || (data.display () == null))) @@ -373,7 +373,7 @@ public class Presenter result.append ("<"); result.append (node.getNodeName()); - result.append (processAttributes (attrs, data.getAttributes (), Integer.toString (nLine))); + result.append (processAttributes (attrs, data.attributes (), Integer.toString (nLine))); if ((node.getChildNodes () == null) && ((data == null) || (data.display () == null))) @@ -1030,7 +1030,7 @@ public class Presenter /* - * Define in Presnter cause needs this possibility. + * Define in Presenter cause needs this possibility. */ static protected Document fileToTree (String fileName) throws Exception {