From 5456caece200cbdc6b1fa5aab8eb42db21b525e5 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Tue, 23 Feb 2010 17:41:58 +0100 Subject: [PATCH] Remove include functionality by 18687 bytes src/fr/devinsy/xid/Presenter.java | 288 +++++-------------- 2 files changed, 78 insertions(+), 210 deletions(-) diff --git a/build/classes/fr/devinsy/xid/Presenter.class b/build/classes/fr/devinsy/xid/Presenter.class index caeba96b94a9658fb93d3890f73b05cc123c1dac..11a8694b17edff21f49e6bcd112cae5e88044c6d 100644 GIT binary patch delta 7110 zcmaJ_3w%_?)&HNlH@ln7&5~pjl1pA22!XtL2C^ZEArDB%LwSV=5|(5M(XfFeARuP7 zDq{Uw)Uo=ZR>7*VKE4uc7a~>DR?%u(AFZ|4;#X^ZYkkz#7m%L0yFhHePkvG z&YU^_|2cE-zn#XeC+E|r9)1+SEU{)9D1^O#`pvEx9ZHXg+kOH_4Mp;Vi=zrSb#4G>CN{(E1HSrBC)_mMpj>>yqb~OK z1ss$whZEb4IfSU%z<|HcK_xORDUIgK(xjl*ONeH-SVvIK{-y;6N-)ns6}(1=uix)c z2UJwkQoW+7wt0Dbb4yLFoz5X7%JW2`GlnW@p+VJDBmbFH6kSJ)?X-xHqB={Lvuy^| zpFZhxx32H$?x^pKp*mV(P~++LWjp!@{F_vJB{dt=Lg&hz6KB#=`M|_fS}vcOm`y9? z2NSc*Rcz~mtku;uRm-bZJLr5qhzl;LaL^h#E!kshH)tLCWK(iAb;#?Jr>6PUkyJX- zLR|)JRA*r8@dvsFHah4+`9ktD(c5Udoh~L!ms#mqGA`X7WzY`VDSw+%S-*{T8FVQP za^&>;2Uhxex;uRXd>-u8>F4LJbka7u%%IDaf}0iUy8^xHxT+A9Ncd)uryT+hzs~(f5solQW7wF_;>K@p!)W5;s=MON@l-7S4 z^d0)He8#M#>txKN9M@iWoFwUccDj*}rFOv9-$XY{|D-t%N&5`Cg>IDxCe29tK1XkV z$437qA0O}_-JybZzkJ#?!>J~?)1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J4(^J zDNBDIc=RGo&|fiMF3U)~$x1}=Gz>+Yg1Z!)KyERkrVkFPU-Tn7yo|t9kzBlAHrDKy zO*OuKa@#(+J*QLdL_PIiilqOjkyJD%P*Pt_G)TpS{w{XzJpj=Al&60{WAqQHFhT!_ zChMPC<}X6%V0PJJJ~2Hjh*CtA7"); - - // Build the file name. - String htmlFileName = webappPath + attrMap.getNamedItem ("data").getNodeValue (); - - - // Load file in tree. - Document childDoc = null; - try - { - childDoc = fileToTree (htmlFileName, errorOutput); - } - catch (Exception ex) - { - errorOutput.append ("unable to build the file tree"); - logger.debug ("unable to build the file tree"); - } - - // Extract the 'body' section. - Node body = null; - try - { - NodeList nodes = childDoc.getElementsByTagName ("body"); - - if (nodes.getLength () == 0) - { - errorOutput.append ("no body tag in include html"); - logger.debug ("no body tag in include html"); - } - else - { - body = nodes.item(0); - } - } - catch (Exception e) - { - errorOutput.append ("error getting child"); - logger.debug ("error getting child"); - } - - // Process the body child as part of the primary tree. - if (body == null) - { - errorOutput.append ("xid object body empty."); - } - else - { - NodeList bodyChildren = body.getChildNodes (); - - if (bodyChildren != null) - { - int childCount = bodyChildren.getLength (); - for (int childCounter = 0; childCounter < childCount; childCounter++) - { - result.append (process (bodyChildren.item (childCounter), datas, webappPath, errorOutput)); - } - } - } - - // - result.append (""); - } - logger.debug ("end of object action"); - // - return (result); - } - - - /** * Processes a node that has dynamic content. Calls the appropriate code * generator method, depending on the tag. @@ -468,62 +353,103 @@ public class Presenter String tag = node.getNodeName(); - if (tag.equals ("object")) + String idValue = idAttr.getNodeValue(); + + logger.debug ("tag=" + tag); + + // Get data of this id. + IdDataCore dataCore = datas.get (idAttr.getNodeValue ()); + + if (dataCore == null) { - result.append (processObjectTag (node, attrs, idAttr, datas, webappPath, errorOutput)); + result.append (Presenter.processElementBasically (node, datas, webappPath, suffix, errorOutput)); } - else + else if (dataCore instanceof IdData) { - String idValue = idAttr.getNodeValue(); + IdData data = (IdData) dataCore; - logger.debug ("tag=" + tag); - - // Get data of this id. - IdDataCore dataCore = datas.get (idAttr.getNodeValue ()); - - if (dataCore == null) + String theClass; + if (data == null) { - result.append (Presenter.processElementBasically (node, datas, webappPath, suffix, errorOutput)); + theClass = null; } - else if (dataCore instanceof IdData) + else { - IdData data = (IdData) dataCore; + theClass = data.getAttributes ().getAttribute ("class"); + } - String theClass; - if (data == null) + if ((theClass == null) || + (!theClass.equals ("xid:nodisplay"))) + { + // Open the tag. + result.append ("<"); + result.append (node.getNodeName()); + + // Build attributes. + result.append (processAttributes (attrs, data.getAttributes (), suffix)); + + if ((node.getChildNodes () == null) && + ((data == null) || (data.display () == null))) { - theClass = null; + // Close the tag. + result.append (" />"); } else { - theClass = data.getAttributes ().getAttribute ("class"); - } + result.append ('>'); - if ((theClass == null) || - (!theClass.equals ("xid:nodisplay"))) + // CHANGED, cpm: + + // Insert data. + if ((data == null) || + (data.display () == null)) + { + result.append (processChildren (node, datas, 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()); - // Build attributes. - result.append (processAttributes (attrs, data.getAttributes (), suffix)); + result.append (processAttributes (attrs, data.getAttributes (), Integer.toString (nLine))); if ((node.getChildNodes () == null) && ((data == null) || (data.display () == null))) { // Close the tag. - result.append (" />"); + result.append (" />\n"); } else { result.append ('>'); - // CHANGED, cpm: + + // CHANGED, cpm // Insert data. - if ((data == null) || - (data.display () == null)) + if ((data == null) || (data.display () == null)) { result.append (processChildren (node, datas, webappPath, suffix, errorOutput)); } @@ -535,70 +461,22 @@ public class Presenter // Close the tag. result.append ("'); + result.append (">\n"); } } - } - else if (dataCore instanceof IdsDataByIndex) - { - IdsDataByIndex tags = (IdsDataByIndex) dataCore; - - int nbLines = tags.size (); - for (int nLine = 0; nLine < nbLines; nLine++) + else { - if (tags.elementAt (nLine) instanceof IdData) - { - IdData data = (IdData) tags.elementAt (nLine); + // Manage a Hashmap. + IdsDataById data = (IdsDataById) tags.elementAt (nLine); - // Open the tag. - result.append ("<"); - result.append (node.getNodeName()); - - result.append (processAttributes (attrs, data.getAttributes (), Integer.toString (nLine))); - - if ((node.getChildNodes () == null) && - ((data == null) || (data.display () == null))) - { - // Close the tag. - result.append (" />\n"); - } - else - { - result.append ('>'); - - - // CHANGED, cpm - - // Insert data. - if ((data == null) || (data.display () == null)) - { - result.append (processChildren (node, datas, 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, webappPath, Integer.toString (nLine), errorOutput)); - result.append ('\n'); - } + result.append (Presenter.processElementWithId (node, attrs, idAttr, data, webappPath, Integer.toString (nLine), errorOutput)); + result.append ('\n'); } } - else - { - logger.warn ("Unknow type of IdDataId"); - } + } + else + { + logger.warn ("Unknow type of IdDataId"); } // @@ -694,17 +572,7 @@ public class Presenter } else { - - String tag = node.getNodeName(); - - if (tag.equals ("object")) - { - result.append (processObjectTag (node, attrs, idAttr, datas, webappPath, errorOutput)); - } - else - { - result.append (Presenter.processElementBasically (node, datas, webappPath, suffix, errorOutput)); - } + result.append (Presenter.processElementBasically (node, datas, webappPath, suffix, errorOutput)); } break;