Package org.xmlpull.v1.builder

Examples of org.xmlpull.v1.builder.XmlDocument


  public int getPropertyAsStringHashCode(String inheritedPageComponentsXML, Integer componentId, String propertyName, Integer siteNodeId, Integer languageId) throws Exception
  {
    Map property = null;
   
        XmlInfosetBuilder builder = XmlInfosetBuilder.newInstance();
        XmlDocument doc = builder.parseReader(new StringReader( inheritedPageComponentsXML ) );
       
    String propertyXPath = "//component[@id=" + componentId + "]/properties/property[@name='" + propertyName + "']";
   
    Xb1XPath xpathObject = (Xb1XPath)cachedXPathObjects.get(propertyXPath);
        if(xpathObject == null)
View Full Code Here


  public static int getPropertyAsStringHashCode(String inheritedPageComponentsXML, Integer componentId, String propertyName, Integer siteNodeId, Integer languageId) throws Exception
  {
    Map property = null;
   
        XmlInfosetBuilder builder = XmlInfosetBuilder.newInstance();
        XmlDocument doc = builder.parseReader(new StringReader( inheritedPageComponentsXML ) );
       
    String propertyXPath = "//component[@id=" + componentId + "]/properties/property[@name='" + propertyName + "']";
   
    Xb1XPath xpathObject = new Xb1XPath( propertyXPath );
View Full Code Here

  }
 
  public static int getComponentsAsStringHashCode(String inheritedPageComponentsXML, String componentXPath) throws Exception
  {
        XmlInfosetBuilder builder = XmlInfosetBuilder.newInstance();
        XmlDocument doc = builder.parseReader(new StringReader( inheritedPageComponentsXML ) );

    Xb1XPath xpathObject = new Xb1XPath( componentXPath );

        //This keeps track of the cached inherited components.
        StringBuilder sb = new StringBuilder();
       
        List componentNodeList = xpathObject.selectNodes( doc.getDocumentElement() );
    Iterator componentNodeListIterator = componentNodeList.iterator();
    while(componentNodeListIterator.hasNext())
    {
      XmlElement child   = (XmlElement)componentNodeListIterator.next();
     
View Full Code Here

        RequestAnalyser.getRequestAnalyser().registerComponentStatistics("getPageComponentsWithDOM4j", t.getElapsedTime());
        logger.info("pageComponents:" + pageComponents.size());
           */
           //XPP3
            XmlInfosetBuilder builder = XmlInfosetBuilder.newInstance();
            XmlDocument doc = builder.parseReader(new StringReader( componentXML ) );
        //RequestAnalyser.getRequestAnalyser().registerComponentStatistics("document with XPP3", t.getElapsedTime());
 
        List pageComponents = getPageComponentsWithXPP3(getDatabase(), componentXML, doc.getDocumentElement(), "base", this.getTemplateController(), null, unsortedPageComponents);
        //RequestAnalyser.getRequestAnalyser().registerComponentStatistics("getPageComponentsWithXPP3", t.getElapsedTime());
       
        //logger.info("pageComponents:" + pageComponents.size());
        preProcessComponents(nodeDeliveryController, repositoryId, unsortedPageComponents, pageComponents);
       
View Full Code Here

        RequestAnalyser.getRequestAnalyser().registerComponentStatistics("INHERITING COMPONENTS WITH DOM4J", t.getElapsedTime());
        */
       
           //XPP3
            XmlInfosetBuilder builder = XmlInfosetBuilder.newInstance();
            XmlDocument doc = builder.parseReader(new StringReader( componentXML ) );
        components = getComponentWithXPP3(db, builder, doc.getDocumentElement(), id, templateController, component);
        RequestAnalyser.getRequestAnalyser().registerComponentStatistics("INHERITING COMPONENTS WITH XPP3", t.getElapsedTime());
       
        //System.out.println("components:" + components);
        String hashCode = "" + components.get(id + "_hashCode");
        String path = "" + components.get(id + "_xpath");
View Full Code Here

    String componentXML = this.getPageComponentsString(db, templateController, siteNodeId, templateController.getLanguageId(), component.getContentId());
    //logger.info("componentXML:" + componentXML);

        XmlInfosetBuilder builder = XmlInfosetBuilder.newInstance();
        XmlDocument doc = builder.parseReader(new StringReader( componentXML ) );
     
    Map components = getComponentWithXPP3(db, builder, doc.getDocumentElement(), id, templateController, component);
   
    InfoGlueComponent infoGlueComponent = (InfoGlueComponent)components.get(id);
    //logger.info("infoGlueComponent:" + infoGlueComponent);
         
    SiteNodeVO parentSiteNodeVO = nodeDeliveryController.getParentSiteNode(db, siteNodeId);
    //logger.info("parentSiteNodeVO:" + parentSiteNodeVO);

    while(infoGlueComponent == null && parentSiteNodeVO != null)
    {
      componentXML = this.getPageComponentsString(db, templateController, parentSiteNodeVO.getId(), templateController.getLanguageId(), component.getContentId());
      //logger.info("componentXML:" + componentXML);
   
          builder = XmlInfosetBuilder.newInstance();
          doc = builder.parseReader(new StringReader( componentXML ) );
           
      components = getComponentWithXPP3(db, builder, doc.getDocumentElement(), id, templateController, component);
     
      infoGlueComponent = (InfoGlueComponent)components.get(id);
      //logger.info("infoGlueComponent:" + infoGlueComponent);
      if(infoGlueComponent != null)
        infoGlueComponent.setIsInherited(true);
View Full Code Here

 
      String componentStructureXML = this.getPageComponentsString(db, templateController, siteNodeId, templateController.getLanguageId(), component.getContentId());
      //logger.info("componentStructureXML:" + componentStructureXML);
 
          XmlInfosetBuilder builder = XmlInfosetBuilder.newInstance();
          XmlDocument doc = builder.parseReader(new StringReader( componentStructureXML ) );
 
      Map components = getComponentWithXPP3(db, builder, doc.getDocumentElement(), id, templateController, component);
     
      if(components.containsKey(id))
        subComponents = (List)components.get(id);
     
      SiteNodeVO parentSiteNodeVO = nodeDeliveryController.getParentSiteNode(db, siteNodeId);
      //logger.info("parentSiteNodeVO:" + parentSiteNodeVO);
 
      while((subComponents == null || subComponents.size() == 0) && parentSiteNodeVO != null)
      {
        //logger.info("parentSiteNodeVO:" + parentSiteNodeVO);
        //logger.info("component:" + component);
        componentStructureXML = this.getPageComponentsString(db, templateController, parentSiteNodeVO.getId(), templateController.getLanguageId(), component.getContentId());
        //logger.info("componentStructureXML:" + componentStructureXML);
     
            builder = XmlInfosetBuilder.newInstance();
            doc = builder.parseReader(new StringReader( componentStructureXML ) );
             
        components = getComponentWithXPP3(db, builder, doc.getDocumentElement(), id, templateController, component);
       
        if(components.containsKey(id))
          subComponents = (List)components.get(id);
         
        if(subComponents != null)
View Full Code Here

         List unsortedPageComponents = new ArrayList();

         try
        {
            XmlInfosetBuilder builder = XmlInfosetBuilder.newInstance();
            XmlDocument doc = builder.parseReader(new StringReader( componentXML ) );
        List pageComponents = getPageComponentsWithXPP3(getDatabase(), componentXML, doc.getDocumentElement(), "base", this.getTemplateController(), null, unsortedPageComponents);
       
        preProcessComponents(nodeDeliveryController, repositoryId, unsortedPageComponents, pageComponents);
        if(pageComponents.size() > 0)
        {
          baseComponent = (InfoGlueComponent)pageComponents.get(0);
View Full Code Here

        List pageComponents = getPageComponentsWithDOM4j(getDatabase(), componentXML, document.getRootElement(), "base", this.getTemplateController(), null, unsortedPageComponents);
        */
          
           //XPP3
            XmlInfosetBuilder builder = XmlInfosetBuilder.newInstance();
            XmlDocument doc = builder.parseReader(new StringReader( componentXML ) );
        List pageComponents = getPageComponentsWithXPP3(getDatabase(), componentXML, doc.getDocumentElement(), "base", this.getTemplateController(), null, unsortedPageComponents);

        preProcessComponents(nodeDeliveryController, repositoryId, unsortedPageComponents, pageComponents);
       
        if(pageComponents.size() > 0)
        {
View Full Code Here

                QName type = ((WSIFMessageElement) this.inputMessage).getPartType(name);
                if (LEADTypes.isArrayType(type)) {
                    // split string into items using " " as separator
                    Pattern pattern = Pattern.compile("[,\\s]+");
                    String[] result = pattern.split((String) value);
                    XmlElement arrayEl = XmlConstants.BUILDER.newFragment(name);
                    for (int i = 0; i < result.length; i++) {
                        logger.debug("split=" + result[i]);
                        arrayEl.addElement("value").addChild(result[i]);
                    }
                    this.inputMessage.setObjectPart(name, arrayEl);
                    value = null; // no need to set string value below
                }
View Full Code Here

TOP

Related Classes of org.xmlpull.v1.builder.XmlDocument

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.