Package org.dom4j

Examples of org.dom4j.Node.valueOf()


        //org.dom4j.Node attribute = document.selectSingleNode("//DATA-ACCESS/ATTRIBUTE");
        List<Node> attributes = document.selectNodes("//DATA-ACCESS/ATTRIBUTE");
        if (attributes != null) {
          for (Iterator<Node> iterator = attributes.iterator(); iterator.hasNext();) {
            Node attribute = iterator.next();
            String attributeName = attribute.valueOf("@name");
            if (attributeName != null) {
              // if no value is found put null
              String value = profile.getUserAttribute(attributeName) != null ? profile.getUserAttribute(attributeName).toString() : null;
              logger.debug("add profile attribute "+attributeName+ " with value "+value);
              // put attribute not with filter name but with attribute name!
View Full Code Here


    SAXReader reader = new SAXReader();
    Document document = null;
    try{
      document = reader.read(getClass().getResourceAsStream("/security-config.xml"));
      Node publicKeyNode = document.selectSingleNode( "//SECURITY-CONFIGURATION/KEYS/SPAGOBI_PUBLIC_KEY_DSA");
      String namePubKey =  publicKeyNode.valueOf("@keyname");
        InputStream publicKeyIs = this.getClass().getClassLoader().getResourceAsStream(namePubKey);     
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        byte[] buffer = new byte[1024];
        int len;
        while ((len = publicKeyIs.read(buffer)) >= 0)
View Full Code Here

        labelList = node.selectNodes("label");
        for (int j = 0; j < labelList.size(); j++) {
          labelNode = labelList.get(j);
          // Insert text to database
          try {
            saveText(documentName, id, labelNode.valueOf("@lang"),
                con, tsCreated,
                labelNode.getText()
                .replaceAll("\n", " ")
                .replaceAll("\t", "")
                .replaceAll("&lt;", "<")
View Full Code Here

            );
            nrText++;
          } catch (Exception e) {
            log.log(Level.ERROR, e);
            log.log(Level.ERROR, "Storing of text:" + id
                + "lang: " + labelNode.valueOf("@lang") + " failed!");
          }
          log.log(Level.DEBUG, orderNr + " " + labelNode.getText());
        }
        orderNr++;
      }
View Full Code Here

    } else {
      lb.setSelected(Integer.valueOf(0));
    }
    interval = elementNode.selectSingleNode("intervals/interval");
    // Validfrom
    lb.setValidfrom(Converter.stringToSqlDate(interval.valueOf("@start")));
    // Validto
    if (interval.valueOf("@stop") != null
        && !interval.valueOf("@stop").equals("")) {
      lb.setValidto(Converter.stringToSqlDate(interval.valueOf("@stop")));
    }
View Full Code Here

    }
    interval = elementNode.selectSingleNode("intervals/interval");
    // Validfrom
    lb.setValidfrom(Converter.stringToSqlDate(interval.valueOf("@start")));
    // Validto
    if (interval.valueOf("@stop") != null
        && !interval.valueOf("@stop").equals("")) {
      lb.setValidto(Converter.stringToSqlDate(interval.valueOf("@stop")));
    }

    lb.setTscreated(ts);
View Full Code Here

    interval = elementNode.selectSingleNode("intervals/interval");
    // Validfrom
    lb.setValidfrom(Converter.stringToSqlDate(interval.valueOf("@start")));
    // Validto
    if (interval.valueOf("@stop") != null
        && !interval.valueOf("@stop").equals("")) {
      lb.setValidto(Converter.stringToSqlDate(interval.valueOf("@stop")));
    }

    lb.setTscreated(ts);
    lb.setCreatedby(SYSTEM);
View Full Code Here

    // Validfrom
    lb.setValidfrom(Converter.stringToSqlDate(interval.valueOf("@start")));
    // Validto
    if (interval.valueOf("@stop") != null
        && !interval.valueOf("@stop").equals("")) {
      lb.setValidto(Converter.stringToSqlDate(interval.valueOf("@stop")));
    }

    lb.setTscreated(ts);
    lb.setCreatedby(SYSTEM);
    lb.setTsupdated(ts);
View Full Code Here

        {
            final Node node = nodeIterator.next();
            getSink().tableRow();
            // getSink().tableCell();
            // getSink().tableCell_();
            tableCellHelper( node.valueOf( "name" ) );
            tableCellHelper( node.valueOf( NCSS ) );
            tableCellHelper( node.valueOf( "ccn" ) );
            getSink().tableRow_();
        }
        getSink().table_();
View Full Code Here

            final Node node = nodeIterator.next();
            getSink().tableRow();
            // getSink().tableCell();
            // getSink().tableCell_();
            tableCellHelper( node.valueOf( "name" ) );
            tableCellHelper( node.valueOf( NCSS ) );
            tableCellHelper( node.valueOf( "ccn" ) );
            getSink().tableRow_();
        }
        getSink().table_();
        getSink().paragraph_();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.