Package KFM.GUI

Examples of KFM.GUI.RequestUrl


     {
         // The currently worked parameter (called path because we use here the parameter's
         // dot-syntax that represents the path in the tree from the root down to the leaf.
         String tCurrentPath;

         RequestUrl tParams = new HttpParams();

         String tElementValue = null;
         String tNewPath = null;
         String tXPathExpression = null;
         for (int i = 0; i < mKeyOrder.size(); i++) {
             tCurrentPath = (String)mKeyOrder.get(i);

             // map mKeyPrefix to aDocPrefix in aCurrentPath
             // e.g. "KB.community.sponsor$2.url" -> "KnowledgeBean.sponsor$2.url"
             tNewPath = aDocPrefix + "." + tCurrentPath.substring(mKeyPrefix.length() + 1);
             tXPathExpression = constructXPathFromParam(tNewPath);
             tElementValue = DOM.applyXPath(aDocument, tXPathExpression);

             // Value exists corresponding to the possible Key.
             // (null means: element is missing, "" means: empty element)
             if (! (tElementValue == null || "".equals(tElementValue))) {
                 tParams.addParam(tCurrentPath, tElementValue);
                 // System.out.println("* " + tCurrentPath + " = " + tElementValue);
             }
         }

         return tParams;
View Full Code Here


         XmlWithSchemaMapper tMapper = new XmlWithSchemaMapper(tSchemaLocation, "KB.community");

         // Test 1: buildXmlWithSchema
         System.out.println("buildXmlWithSchema:\n-------------------");

         RequestUrl tParams = new HttpParams();
         tParams.addParam("KB.community.membershipPolicy", "restricted");
         tParams.addParam("KB.community.communication", "FaceToFace");
         tParams.addParam("KB.community.contact.name", "Hans");
         //tParams.addParam("KB.community.contact.email", "a@siemens.com");
         tParams.addParam("KB.community.contact.email", "a@siemens.com");
         tParams.addParam("KB.community.sponsor$1.name", "ICM");
         tParams.addParam("KB.community.sponsor$1.url", "http://www.icm.de");
         tParams.addParam("KB.community.sponsor$2.name", "CIO");
         tParams.addParam("KB.community.sponsor$2.url", "http://www.cio.com");
         tParams.addParam("KB.community.hasSubCoPs$1", "subCoP1");
         tParams.addParam("KB.community.hasSubCoPs$2", "subCoP2");
         tParams.addParam("KB.community.hasSubCoPs$3", "subCoP3");
         tParams.addParam("KB.community.since", "20x02-12-02");

         Document tGenDoc = tMapper.buildXmlWithSchema(tParams, true /*complete*/, false /*CDATA as text*/);
         System.out.println(DOM.serializeToString(tGenDoc, "ISO-8859-1"));

         KFMSystem.log.setLogLevel(KFMLog.DEBUG_LEVEL);
View Full Code Here

TOP

Related Classes of KFM.GUI.RequestUrl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.