From 5bc5964bd6224a3a066fa5abd139c77d9df3b243 Mon Sep 17 00:00:00 2001 From: administrateur Date: Wed, 7 Feb 2007 07:30:24 +0100 Subject: [PATCH] small fix. --- build/classes/xid/Presenter.class | Bin 21985 -> 22345 bytes demo/Demo.java | 18 +-- demo/Demo.java~ | 84 ++-------- src/xid/Presenter.java | 249 +++++++++++++++++------------- test/xid/test/Test.java | 8 +- 5 files changed, 173 insertions(+), 186 deletions(-) diff --git a/build/classes/xid/Presenter.class b/build/classes/xid/Presenter.class index 04637d29fe4fd6c90a93528e4ee78a86b452f800..1ac5e3f3cc40af277a21167aed2881fd65277337 100644 GIT binary patch literal 22345 zcmc(H349bq_Wyg;-7`It&cQ%{L5^_9k%Is#YJez&0KpIt0*I(EBm<0wBqkF9?*m=$ z`vQ+uTsNrefkz;MimQSv>%HE`uE%<;=XxKj{JyWcXEHfZ*T4JuyPNLn>Z(_-UcL8y zuU_@=*pK(#Peh~D_d$AvuMW_Qe2rYLmCNtta$S(G=k;>AA&AF6`1!^l1^8;Y{4qco z+$^OHe!eM)hnsD_B}n=FC+T`?kZu$ciViA%`H;gB$v%Ly(afo zo9_+MINoCOR-5m$`F@)puz8!GAC&4p2WcojBn=;y%Oi5x?&lpc;>~INDF4Og$I^Hw z|5Y9y_wy4$8pBV@<*77&nx9GIXZde(dCt!-q|tu-qP%;_&o9fvEAsHF&0u95zb?f8 zE|jkpV*g0vH~3AP-;(>=Qu9xn-wD#O{H~whleX_m+kXYJHM{?_L2Z2sQn|JeM4box=o+GQ)k zgJN4L8S^E-GUVCxD=SDbtL>{q3>ni8ZxN^z>KrUmIHDV7E4Pinfb zaFDIag~J&(FP3`+)I!aKEY&QVSIYfhxy-iJ9Ffduxm4O}uC3kR1SBC}ZAyJ8){H9#q_N&9wXb10-%j5FyRb12&GWSLD_>x?nveja&xQf_niM*+@ zRkhrswpuD9ER%=jeiaLgsN$T5+^nn>-k!a4DVSnVsAy_uB&QV5v`4bh;MwXHWn{NyWu0|F_|TG z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t{1p0IdaN$zg-?|()a0MNS z@?`63nrdA`v#oWo`DPG-AI>MH_@ZkMtaQJM6X$G^oDgSeP-QGf3vpGch*)8 zSod(YbsvwmwsE7iotv#4e5>^!-(l_4iY42Dd>qeR%$LBK^ufX9r7%Sc-{YL85B+^K z8y^eEQNM*RH?H>TpkxUxN6E7(lw>=Af5DR5v?Un`r*GiPaO7zs5ZvNX83LUbOL0dS zic@NrE=peeE6_e5zh?FKJLgR*=J#ofKsPA{k0)d&eJtS3lWPXmIVg_xfM?7jp{+Cw9(S7?;=8XaoAnF1b% zV+$=_M8QY8UL**Vx>8TH7dF^eL0kf}5&juUCK$My5?{rR!UW{M^xm|monF~azqyC9 zBr0S27*}oNkhz0z1{MDtH3~<;zr}q3NWLc7q%0f%lIe@QpD(~4;$Qo`<;d{=17Hkx A)c^nh diff --git a/demo/Demo.java b/demo/Demo.java index de01306..4d43a2f 100644 --- a/demo/Demo.java +++ b/demo/Demo.java @@ -60,7 +60,7 @@ class Demo datas.setContent ("name", "Superman"); errorMessage = new StringBuffer (); - html = Presenter.doXid ("
a name
", datas, "", errorMessage); + html = Presenter.doXid ("
a name
", datas, errorMessage); System.out.println ("datas = new Data ();"); System.out.println ("datas.setContent (\"name\", \"Superman\");"); @@ -80,7 +80,7 @@ class Demo errorMessage = new StringBuffer (); - html = Presenter.doXid ("
a last name
", datas, "", errorMessage); + html = Presenter.doXid ("
a last name
", datas, errorMessage); System.out.println ("datas = new Data ();"); System.out.println ("datas.setContent (\"lastname\", \"Spiderman\");"); @@ -105,7 +105,7 @@ class Demo errorMessage = new StringBuffer (); - html = Presenter.doXid ("
    \n
  • a word
  • \n
", datas, "", errorMessage); + html = Presenter.doXid ("
    \n
  • a word
  • \n
", datas, errorMessage); System.out.println ("datas = new Data ();"); System.out.println ("datas.setContent (\"words\", 0, \"alpha\");"); @@ -139,7 +139,7 @@ class Demo source.append (" noidun nomun prenom\n"); source.append (""); htmlSource = source.toString (); - html = Presenter.doXid (htmlSource, datas, "", errorMessage); + html = Presenter.doXid (htmlSource, datas, errorMessage); System.out.println ("datas = new Data ();"); System.out.println ("datas.setContent (\"identity\", 0, \"nom\", \"Jemba\");"); @@ -194,22 +194,22 @@ class Demo datas.setIterationStrategy ("identity", IdsDataByIndex.IterationStrategy.ONLY_FIRST_ROW); System.out.println ("ONLY_FIRST_ROW:"); - html = Presenter.doXid (htmlSource, datas, "", errorMessage); + html = Presenter.doXid (htmlSource, datas, errorMessage); System.out.println (html); datas.setIterationStrategy ("identity", IdsDataByIndex.IterationStrategy.ONLY_ROWS_WITH_ID); System.out.println ("ONLY_ROWS_WITH_ID:"); - html = Presenter.doXid (htmlSource, datas, "", errorMessage); + html = Presenter.doXid (htmlSource, datas, errorMessage); System.out.println (html); datas.setIterationStrategy ("identity", IdsDataByIndex.IterationStrategy.ONLY_ROWS_WITHOUT_ID); System.out.println ("ONLY_ROWS_WITHOUT_ID:"); - html = Presenter.doXid (htmlSource, datas, "", errorMessage); + html = Presenter.doXid (htmlSource, datas, errorMessage); System.out.println (html); datas.setIterationStrategy ("identity", IdsDataByIndex.IterationStrategy.ALL_ROWS); System.out.println ("ALL_ROWS:"); - html = Presenter.doXid (htmlSource, datas, "", errorMessage); + html = Presenter.doXid (htmlSource, datas, errorMessage); System.out.println (html); @@ -230,7 +230,7 @@ class Demo source.append ("

three

\n"); source.append (""); htmlSource = source.toString (); - html = Presenter.doXid (htmlSource, datas, "", errorMessage); + html = Presenter.doXid (htmlSource, datas, errorMessage); System.out.println (htmlSource); System.out.println ("+"); diff --git a/demo/Demo.java~ b/demo/Demo.java~ index 4b6e3bc..de01306 100644 --- a/demo/Demo.java~ +++ b/demo/Demo.java~ @@ -1,5 +1,3 @@ -package xid.test; - import java.util.*; import java.io.*; import xid.*; @@ -7,7 +5,7 @@ import xid.*; /** * */ -class Test +class Demo { static private org.apache.log4j.Logger log; @@ -33,21 +31,21 @@ class Test log.info ("... done."); log.debug ("Exit"); - log = org.apache.log4j.Logger.getLogger (Test.class.getName ()); + log = org.apache.log4j.Logger.getLogger (Demo.class.getName ()); } /** * */ - public static void main(String[] args) + public static void main (String[] args) { System.out.println("Hello World!"); //test (); // - IdsData datas; + Data datas; IdData tag; @@ -58,33 +56,13 @@ class Test // Populate attributes of Test 03. System.out.println ("----------------------------"); - datas = new IdsData (); - tag = new IdData (); - tag.setContent ("Superman"); - datas.put ("name", tag); - - errorMessage = new StringBuffer (); - html = Presenter.doXid ("
a name
", datas, "", errorMessage); - - System.out.println ("datas = new IdsData ();"); - System.out.println ("tag = new IdData ();"); - System.out.println ("tag.setContent (\"Superman\");"); - System.out.println ("datas.put (\"name\", tag););"); - System.out.println ("+"); - System.out.println ("
a name
"); - System.out.println ("=>"); - System.out.println (html); - - - // Populate attributes of Test 03. - System.out.println ("----------------------------"); - datas = new IdsData (); + datas = new Data (); datas.setContent ("name", "Superman"); errorMessage = new StringBuffer (); html = Presenter.doXid ("
a name
", datas, "", errorMessage); - System.out.println ("datas = new IdsData ();"); + System.out.println ("datas = new Data ();"); System.out.println ("datas.setContent (\"name\", \"Superman\");"); System.out.println ("+"); System.out.println ("
a name
"); @@ -94,34 +72,7 @@ class Test // Populate attributes of Test 03. System.out.println ("----------------------------"); - datas = new IdsData (); - tag = new IdData (); - tag.setContent ("Spiderman"); - tag.getAttributes ().appendAttribute ("style", "background: blue;"); - tag.getAttributes ().appendAttribute ("style", "foreground: red;"); - tag.getAttributes ().setAttribute ("class", "nameClass"); - datas.put ("lastname", tag); - - - errorMessage = new StringBuffer (); - html = Presenter.doXid ("
a last name
", datas, "", errorMessage); - - System.out.println ("datas = new IdsData ();"); - System.out.println ("tag = new IdData ();"); - System.out.println ("tag.getAttributes ().setAttribute (\"class\", \"lastnameClass\");"); - System.out.println ("tag.getAttributes ().appendAttribute (\"style\", \"background: blue;\");"); - System.out.println ("tag.getAttributes ().appendAttribute (\"style\", \"foreground: red;\");"); - System.out.println ("tag.setContent (\"Spiderman\");"); - System.out.println ("datas.put (\"lastname\", tag););"); - System.out.println ("+"); - System.out.println ("
a last name
"); - System.out.println ("=>"); - System.out.println (html); - - - // Populate attributes of Test 03. - System.out.println ("----------------------------"); - datas = new IdsData (); + datas = new Data (); datas.setContent ("lastname", "Spiderman"); datas.appendAttribute ("lastname", "style", "background: blue;"); datas.appendAttribute ("lastname", "style", "foreground: red;"); @@ -131,7 +82,7 @@ class Test errorMessage = new StringBuffer (); html = Presenter.doXid ("
a last name
", datas, "", errorMessage); - System.out.println ("datas = new IdsData ();"); + System.out.println ("datas = new Data ();"); System.out.println ("datas.setContent (\"lastname\", \"Spiderman\");"); System.out.println ("datas.appendAttribute (\"lastname\", \"style\", \"background: blue;\");"); System.out.println ("datas.appendAttribute (\"lastname\", \"style\", \"foreground: red;\");"); @@ -144,7 +95,7 @@ class Test // Populate attributes of Test 03. System.out.println ("----------------------------"); - datas = new IdsData (); + datas = new Data (); datas.setContent ("words", 0, "alpha"); datas.setContent ("words", 1, "bravo"); datas.setContent ("words", 2, "charlie"); @@ -156,7 +107,7 @@ class Test errorMessage = new StringBuffer (); html = Presenter.doXid ("
    \n
  • a word
  • \n
", datas, "", errorMessage); - System.out.println ("datas = new IdsData ();"); + System.out.println ("datas = new Data ();"); System.out.println ("datas.setContent (\"words\", 0, \"alpha\");"); System.out.println ("datas.setContent (\"words\", 1, \"bravo\");"); System.out.println ("datas.setContent (\"words\", 2, \"charlie\");"); @@ -173,7 +124,7 @@ class Test // Populate attributes of Test 03. System.out.println ("----------------------------"); - datas = new IdsData (); + datas = new Data (); datas.setContent ("identity", 0, "nom", "Jemba"); datas.setContent ("identity", 0, "prenom", "Epo"); datas.setContent ("identity", 1, "nom", "Momon"); @@ -190,7 +141,7 @@ class Test htmlSource = source.toString (); html = Presenter.doXid (htmlSource, datas, "", errorMessage); - System.out.println ("datas = new IdsData ();"); + System.out.println ("datas = new Data ();"); System.out.println ("datas.setContent (\"identity\", 0, \"nom\", \"Jemba\");"); System.out.println ("datas.setContent (\"identity\", 0, \"prenom\", \"Epo\");"); System.out.println ("datas.setContent (\"identity\", 1, \"nom\", \"Momon\");"); @@ -206,7 +157,7 @@ class Test // Populate attributes of Test 03. System.out.println ("----------------------------"); - datas = new IdsData (); + datas = new Data (); datas.setContent ("identity", 0, "nom", "Jemba"); datas.setContent ("identity", 0, "prenom", "Epo"); datas.setContent ("identity", 1, "nom", "Momon"); @@ -228,7 +179,7 @@ class Test source.append (""); htmlSource = source.toString (); - System.out.println ("datas = new IdsData ();"); + System.out.println ("datas = new Data ();"); System.out.println ("datas.setContent (\"identity\", 0, \"nom\", \"Jemba\");"); System.out.println ("datas.setContent (\"identity\", 0, \"prenom\", \"Epo\");"); System.out.println ("datas.setContent (\"identity\", 1, \"nom\", \"Momon\");"); @@ -264,14 +215,12 @@ class Test // Populate attributes of Test 03. - /* System.out.println ("----------------------------"); - datas = new IdsData (); + datas = new Data (); datas.setAttribute ("
", "class", "aDivClass"); datas.setAttribute ("
", "style", "background-color: #000000;"); datas.setAttribute ("number", "style", "background-color: #0000FF;"); - errorMessage = new StringBuffer (); source = new StringBuffer (); source.append ("
\n"); @@ -285,13 +234,12 @@ class Test System.out.println (htmlSource); System.out.println ("+"); - System.out.println ("datas = new IdsData ();"); + System.out.println ("datas = new Data ();"); System.out.println ("datas.setAttribute (\"
\", \"class\", \"aDivClass\");"); System.out.println ("datas.setAttribute (\"
\", \"style\", \"background-color: #000000;\");"); System.out.println ("datas.setAttribute (\"number\", \"style\", \"background-color: #0000FF;\");"); System.out.println ("=>"); System.out.println (html); - */ } } diff --git a/src/xid/Presenter.java b/src/xid/Presenter.java index 941fcae..edbb1e8 100644 --- a/src/xid/Presenter.java +++ b/src/xid/Presenter.java @@ -91,9 +91,9 @@ public class Presenter /* * */ - public StringBuffer doXid (IdsDataById datas, StringBuffer errorOutput) + public StringBuffer doXid (Data datas, StringBuffer errorOutput) { - return (doXid (datas, null, errorOutput)); + return (doXid (datas.getIdsDataById (), datas.getTagsDataById (), errorOutput)); } /* @@ -168,6 +168,15 @@ public class Presenter + /* + * + */ + static public StringBuffer doXid (String html, Data datas, StringBuffer errorOutput) + { + return (doXid (html, datas.getIdsDataById (), datas.getTagsDataById (), "", errorOutput)); + } + + /* * */ @@ -529,7 +538,13 @@ public class Presenter * @param attrMap * @param idAttr */ - static protected StringBuffer processObjectTag (Node node, NamedNodeMap attrMap, Node idAttr, IdsDataById datas, TagsDataById tagsData, String webappPath, StringBuffer errorOutput) + static protected StringBuffer processObjectTag (Node node, + NamedNodeMap attrMap, + Node idAttr, + IdsDataById datas, + TagsDataById tagsData, + String webappPath, + StringBuffer errorOutput) { StringBuffer result; @@ -550,7 +565,6 @@ public class Presenter codetype = attrMap.getNamedItem ("codetype").getNodeValue (); } - // Check tag requirements. if ((attrMap == null) || (codetype == null) || @@ -577,7 +591,7 @@ public class Presenter } catch (Exception ex) { - result.append ("unable to build the file tree"); + errorOutput.append ("unable to build the file tree"); log.debug ("unable to build the file tree"); } @@ -589,7 +603,7 @@ public class Presenter if (nodes.getLength () == 0) { - result.append ("no body tag in include html"); + errorOutput.append ("no body tag in include html"); log.debug ("no body tag in include html"); } else @@ -599,19 +613,26 @@ public class Presenter } catch (Exception e) { - result.append ("error getting child"); + errorOutput.append ("error getting child"); log.debug ("error getting child"); } // Process the body child as part of the primary tree. - NodeList bodyChildren = body.getChildNodes (); - - if (bodyChildren != null) + if (body == null) { - int childCount = bodyChildren.getLength (); - for (int childCounter = 0; childCounter < childCount; childCounter++) + errorOutput.append ("xid object body empty."); + } + else + { + NodeList bodyChildren = body.getChildNodes (); + + if (bodyChildren != null) { - result.append (process (bodyChildren.item (childCounter), datas, tagsData, webappPath, errorOutput)); + int childCount = bodyChildren.getLength (); + for (int childCounter = 0; childCounter < childCount; childCounter++) + { + result.append (process (bodyChildren.item (childCounter), datas, tagsData, webappPath, errorOutput)); + } } } @@ -677,98 +698,41 @@ public class Presenter result = new StringBuffer (); String tag = node.getNodeName(); - String idValue = idAttr.getNodeValue(); - log.debug ("tag=" + tag); - - // Get data of this id. - IdDataCore dataCore = datas.get (idAttr.getNodeValue ()); - - if (dataCore == null) + if (tag.equals ("object")) { - result.append (Presenter.processElementBasically (node, datas, tagsData, webappPath, suffix, errorOutput)); + result.append (processObjectTag (node, attrs, idAttr, datas, tagsData, webappPath, errorOutput)); } - else if (dataCore instanceof IdData) + else { - IdData data = (IdData) dataCore; + String idValue = idAttr.getNodeValue(); - String theClass; - if (data == null) - { - theClass = null; - } - else - { - theClass = data.getAttributes ().getAttribute ("class"); - } + log.debug ("tag=" + tag); - if ((theClass == null) || - (!theClass.equals ("xid:nodisplay"))) + // Get data of this id. + IdDataCore dataCore = datas.get (idAttr.getNodeValue ()); + + if (dataCore == null) { - // Open the tag. - result.append ("<"); - result.append (node.getNodeName()); + result.append (Presenter.processElementBasically (node, datas, tagsData, webappPath, suffix, errorOutput)); + } + else if (dataCore instanceof IdData) + { + IdData data = (IdData) dataCore; - // Build attributes. - Attributes tagAttributes; - if (tagsData == null) + String theClass; + if (data == null) { - tagAttributes = null; + theClass = null; } else { - TagData tagData = tagsData.getId (node.getNodeName ()); - if (tagData == null) - { - tagAttributes = null; - } - else - { - tagAttributes = tagData.getAttributes (); - } + theClass = data.getAttributes ().getAttribute ("class"); } - - result.append (processAttributes (attrs, data.getAttributes (), tagAttributes, suffix)); - if ((node.getChildNodes () == null) && - ((data == null) || data.display ().equals (""))) + if ((theClass == null) || + (!theClass.equals ("xid:nodisplay"))) { - // Close the tag. - result.append (" />"); - } - else - { - result.append ('>'); - - // Insert data. - if ((data == null) || - (data.display ().equals (""))) - { - result.append (processChildren (node, datas, tagsData, webappPath, suffix, errorOutput)); - } - else - { - result.append (data.display ()); - } - - // Close the tag. - result.append ("'); - } - } - } - else if (dataCore instanceof IdsDataByIndex) - { - IdsDataByIndex tags = (IdsDataByIndex) dataCore; - - int nbLines = tags.size (); - for (int nLine = 0; nLine < nbLines; nLine++) - { - if (tags.elementAt (nLine) instanceof IdData) - { - IdData data = (IdData) tags.elementAt (nLine); - // Open the tag. result.append ("<"); result.append (node.getNodeName()); @@ -791,14 +755,14 @@ public class Presenter tagAttributes = tagData.getAttributes (); } } - - result.append (processAttributes (attrs, data.getAttributes (), tagAttributes, Integer.toString (nLine))); + + result.append (processAttributes (attrs, data.getAttributes (), tagAttributes, suffix)); if ((node.getChildNodes () == null) && ((data == null) || data.display ().equals (""))) { // Close the tag. - result.append (" />\n"); + result.append (" />"); } else { @@ -818,22 +782,87 @@ public class Presenter // Close the tag. result.append ("\n"); + result.append ('>'); } } - else + } + else if (dataCore instanceof IdsDataByIndex) + { + IdsDataByIndex tags = (IdsDataByIndex) dataCore; + + int nbLines = tags.size (); + for (int nLine = 0; nLine < nbLines; nLine++) { - // Manage a Hashmap. - IdsDataById data = (IdsDataById) tags.elementAt (nLine); - - result.append (Presenter.processElementWithId (node, attrs, idAttr, data, tagsData, webappPath, Integer.toString (nLine), errorOutput)); - result.append ('\n'); + if (tags.elementAt (nLine) instanceof IdData) + { + IdData data = (IdData) tags.elementAt (nLine); + + // Open the tag. + result.append ("<"); + result.append (node.getNodeName()); + + // Build attributes. + Attributes tagAttributes; + if (tagsData == null) + { + tagAttributes = null; + } + else + { + TagData tagData = tagsData.getId (node.getNodeName ()); + if (tagData == null) + { + tagAttributes = null; + } + else + { + tagAttributes = tagData.getAttributes (); + } + } + + result.append (processAttributes (attrs, data.getAttributes (), tagAttributes, Integer.toString (nLine))); + + if ((node.getChildNodes () == null) && + ((data == null) || data.display ().equals (""))) + { + // Close the tag. + result.append (" />\n"); + } + else + { + result.append ('>'); + + // Insert data. + if ((data == null) || + (data.display ().equals (""))) + { + result.append (processChildren (node, datas, tagsData, webappPath, suffix, errorOutput)); + } + else + { + result.append (data.display ()); + } + + // Close the tag. + result.append ("\n"); + } + } + else + { + // Manage a Hashmap. + IdsDataById data = (IdsDataById) tags.elementAt (nLine); + + result.append (Presenter.processElementWithId (node, attrs, idAttr, data, tagsData, webappPath, Integer.toString (nLine), errorOutput)); + result.append ('\n'); + } } } - } - else - { - log.warn ("Unknow type of IdDataId"); + else + { + log.warn ("Unknow type of IdDataId"); + } } // @@ -930,7 +959,17 @@ public class Presenter } else { - result.append (Presenter.processElementBasically (node, datas, tagsData, webappPath, suffix, errorOutput)); + + String tag = node.getNodeName(); + + if (tag.equals ("object")) + { + result.append (processObjectTag (node, attrs, idAttr, datas, tagsData, webappPath, errorOutput)); + } + else + { + result.append (Presenter.processElementBasically (node, datas, tagsData, webappPath, suffix, errorOutput)); + } } break; diff --git a/test/xid/test/Test.java b/test/xid/test/Test.java index 7184856..5ec5b99 100644 --- a/test/xid/test/Test.java +++ b/test/xid/test/Test.java @@ -83,7 +83,7 @@ class Test datas.setContent ("name", "Superman"); errorMessage = new StringBuffer (); - html = Presenter.doXid ("
a name
", datas, "", errorMessage); + html = Presenter.doXid ("
a name
", datas, errorMessage); System.out.println (check ("only content change", html, "
Superman
")); @@ -97,7 +97,7 @@ class Test datas.setAttribute ("lastname", "class", "nameClass"); errorMessage = new StringBuffer (); - html = Presenter.doXid ("
a last name
", datas, "", errorMessage); + html = Presenter.doXid ("
a last name
", datas, errorMessage); System.out.println (check ("content and attributes", html, "
Spiderman
")); // Populate attributes of Test 03. @@ -112,7 +112,7 @@ class Test errorMessage = new StringBuffer (); - html = Presenter.doXid ("
    \n
  • a word
  • \n
", datas, "", errorMessage); + html = Presenter.doXid ("
    \n
  • a word
  • \n
", datas, errorMessage); System.out.println (check ("list assertion 1", html, "
  • alpha
  • ")); System.out.println (check ("list assertion 2", html, "
  • bravo
  • ")); @@ -138,7 +138,7 @@ class Test source.append (" noidun nomun prenom\n"); source.append (""); htmlSource = source.toString (); - html = Presenter.doXid (htmlSource, datas, "", errorMessage); + html = Presenter.doXid (htmlSource, datas, errorMessage); System.out.println (check ("table 1 assertion 1", html, "noidJembaEpo")); System.out.println (check ("table 1 assertion 2", html, "noidMomonChristian"));