Package org.dom4j

Examples of org.dom4j.Node.selectSingleNode()


      Iterator publisherIterator = publisherNodes.iterator();
      while ( publisherIterator.hasNext() ) {
        Node publisherNode = (Node) publisherIterator.next();
        Assert.assertNotNull( publisherNode.selectSingleNode( "name" ) ); //$NON-NLS-1$
        Assert.assertNotNull( publisherNode.selectSingleNode( "description" ) ); //$NON-NLS-1$
        Assert.assertNotNull( publisherNode.selectSingleNode( "class" ) ); //$NON-NLS-1$
        Assert.assertNotSame( "", publisherNode.selectSingleNode( "class" ).getText() ); //$NON-NLS-1$ //$NON-NLS-2$
        String publisherClass = publisherNode.selectSingleNode( "class" ).getText(); //$NON-NLS-1$
        Object publisher = PentahoSystem.createObject( publisherClass, null );
        Assert.assertNotNull( publisher );
        Assert.assertTrue( publisher instanceof IPentahoPublisher );
View Full Code Here


      while ( publisherIterator.hasNext() ) {
        Node publisherNode = (Node) publisherIterator.next();
        Assert.assertNotNull( publisherNode.selectSingleNode( "name" ) ); //$NON-NLS-1$
        Assert.assertNotNull( publisherNode.selectSingleNode( "description" ) ); //$NON-NLS-1$
        Assert.assertNotNull( publisherNode.selectSingleNode( "class" ) ); //$NON-NLS-1$
        Assert.assertNotSame( "", publisherNode.selectSingleNode( "class" ).getText() ); //$NON-NLS-1$ //$NON-NLS-2$
        String publisherClass = publisherNode.selectSingleNode( "class" ).getText(); //$NON-NLS-1$
        Object publisher = PentahoSystem.createObject( publisherClass, null );
        Assert.assertNotNull( publisher );
        Assert.assertTrue( publisher instanceof IPentahoPublisher );
      }
View Full Code Here

        Node publisherNode = (Node) publisherIterator.next();
        Assert.assertNotNull( publisherNode.selectSingleNode( "name" ) ); //$NON-NLS-1$
        Assert.assertNotNull( publisherNode.selectSingleNode( "description" ) ); //$NON-NLS-1$
        Assert.assertNotNull( publisherNode.selectSingleNode( "class" ) ); //$NON-NLS-1$
        Assert.assertNotSame( "", publisherNode.selectSingleNode( "class" ).getText() ); //$NON-NLS-1$ //$NON-NLS-2$
        String publisherClass = publisherNode.selectSingleNode( "class" ).getText(); //$NON-NLS-1$
        Object publisher = PentahoSystem.createObject( publisherClass, null );
        Assert.assertNotNull( publisher );
        Assert.assertTrue( publisher instanceof IPentahoPublisher );
      }
    } catch ( Throwable e ) {
View Full Code Here

  public String getContextParamValue( String name ) {
    String xPath = MessageFormat.format( CONTEXT_PARAM_NAME_TEMPLATE_XPATH, name );
    Node node = document.selectSingleNode( xPath );
    String value = null;
    if ( node != null ) {
      node = node.selectSingleNode( "../param-value" ); //$NON-NLS-1$
    }
    if ( node != null ) {
      value = node.getText();
    }
    return value;
View Full Code Here

  public boolean setServletMapping( String name, String value ) {
    String xPath = MessageFormat.format( SERVLET_NAME_TEMPLATE_XPATH, name );
    Node node = document.selectSingleNode( xPath );
    if ( node != null ) {
      node = node.selectSingleNode( "../jsp-file" ); //$NON-NLS-1$
    }
    if ( node != null ) {
      node.setText( value );
      return true;
    }
View Full Code Here

  public String getServletMapping( String name ) {
    String xPath = MessageFormat.format( SERVLET_NAME_TEMPLATE_XPATH, name );
    Node node = document.selectSingleNode( xPath );
    String value = null;
    if ( node != null ) {
      node = node.selectSingleNode( "../jsp-file" ); //$NON-NLS-1$
    }
    if ( node != null ) {
      value = node.getText();
    }
    return value;
View Full Code Here

      while ( intervalIterator.hasNext() ) {
        // get the interval node
        Node intervalNode = (Node) intervalIterator.next();

        // get the interval name
        String label = intervalNode.selectSingleNode( "label" ).getText(); //$NON-NLS-1$

        // get the range of the interval
        double minimum = Double.parseDouble( intervalNode.selectSingleNode( "minimum" ).getText() ); //$NON-NLS-1$
        double maximum = Double.parseDouble( intervalNode.selectSingleNode( "maximum" ).getText() ); //$NON-NLS-1$
        Range range = new Range( minimum, maximum );
View Full Code Here

        // get the interval name
        String label = intervalNode.selectSingleNode( "label" ).getText(); //$NON-NLS-1$

        // get the range of the interval
        double minimum = Double.parseDouble( intervalNode.selectSingleNode( "minimum" ).getText() ); //$NON-NLS-1$
        double maximum = Double.parseDouble( intervalNode.selectSingleNode( "maximum" ).getText() ); //$NON-NLS-1$
        Range range = new Range( minimum, maximum );

        Paint backgroundPaint = JFreeChartEngine.getPaint( intervalNode.selectSingleNode( "color" ) ); //$NON-NLS-1$
        if ( backgroundPaint == null ) {
View Full Code Here

        // get the interval name
        String label = intervalNode.selectSingleNode( "label" ).getText(); //$NON-NLS-1$

        // get the range of the interval
        double minimum = Double.parseDouble( intervalNode.selectSingleNode( "minimum" ).getText() ); //$NON-NLS-1$
        double maximum = Double.parseDouble( intervalNode.selectSingleNode( "maximum" ).getText() ); //$NON-NLS-1$
        Range range = new Range( minimum, maximum );

        Paint backgroundPaint = JFreeChartEngine.getPaint( intervalNode.selectSingleNode( "color" ) ); //$NON-NLS-1$
        if ( backgroundPaint == null ) {
          Element backgroundNode = (Element) intervalNode.selectSingleNode( "interval-background" ); //$NON-NLS-1$
View Full Code Here

        // get the range of the interval
        double minimum = Double.parseDouble( intervalNode.selectSingleNode( "minimum" ).getText() ); //$NON-NLS-1$
        double maximum = Double.parseDouble( intervalNode.selectSingleNode( "maximum" ).getText() ); //$NON-NLS-1$
        Range range = new Range( minimum, maximum );

        Paint backgroundPaint = JFreeChartEngine.getPaint( intervalNode.selectSingleNode( "color" ) ); //$NON-NLS-1$
        if ( backgroundPaint == null ) {
          Element backgroundNode = (Element) intervalNode.selectSingleNode( "interval-background" ); //$NON-NLS-1$
          if ( backgroundNode != null ) {
            String backgroundType = backgroundNode.attributeValue( "type" ); //$NON-NLS-1$
            if ( "texture".equals( backgroundType ) ) { //$NON-NLS-1$
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.