Package org.dom4j

Examples of org.dom4j.Node.selectSingleNode()


    // urlTemplate specifically when we have a URL that is a drill-through
    // link in a chart intended to drill down into the chart data.
    String outerParameterName = (String) getInputValue( ChartComponent.OUTER_PARAMETER_NAME );
    if ( ( outerParameterName == null ) || ( outerParameterName.length() == 0 ) ) {
      if ( chartAttributes.selectSingleNode( ChartComponent.OUTER_PARAMETER_NAME ) != null ) {
        outerParameterName = chartAttributes.selectSingleNode( ChartComponent.OUTER_PARAMETER_NAME ).getText();
      }
    }

    String chartType = chartAttributes.selectSingleNode( ChartDefinition.TYPE_NODE_NAME ).getText();
View Full Code Here


      if ( chartAttributes.selectSingleNode( ChartComponent.OUTER_PARAMETER_NAME ) != null ) {
        outerParameterName = chartAttributes.selectSingleNode( ChartComponent.OUTER_PARAMETER_NAME ).getText();
      }
    }

    String chartType = chartAttributes.selectSingleNode( ChartDefinition.TYPE_NODE_NAME ).getText();

    // --------------- This code allows inputs to override the chartAttributes
    // of width, height, and title
    Object widthObj = getInputValue( ChartDefinition.WIDTH_NODE_NAME );
    if ( widthObj != null ) {
View Full Code Here

    // of width, height, and title
    Object widthObj = getInputValue( ChartDefinition.WIDTH_NODE_NAME );
    if ( widthObj != null ) {
      width = Integer.parseInt( widthObj.toString() );
      if ( width != -1 ) {
        if ( chartAttributes.selectSingleNode( ChartDefinition.WIDTH_NODE_NAME ) == null ) {
          ( (Element) chartAttributes ).addElement( ChartDefinition.WIDTH_NODE_NAME );
        }
        chartAttributes.selectSingleNode( ChartDefinition.WIDTH_NODE_NAME ).setText( Integer.toString( width ) );
      }
    }
View Full Code Here

      width = Integer.parseInt( widthObj.toString() );
      if ( width != -1 ) {
        if ( chartAttributes.selectSingleNode( ChartDefinition.WIDTH_NODE_NAME ) == null ) {
          ( (Element) chartAttributes ).addElement( ChartDefinition.WIDTH_NODE_NAME );
        }
        chartAttributes.selectSingleNode( ChartDefinition.WIDTH_NODE_NAME ).setText( Integer.toString( width ) );
      }
    }
    Object heightObj = getInputValue( ChartDefinition.HEIGHT_NODE_NAME );
    if ( heightObj != null ) {
      height = Integer.parseInt( heightObj.toString() );
View Full Code Here

    }
    Object heightObj = getInputValue( ChartDefinition.HEIGHT_NODE_NAME );
    if ( heightObj != null ) {
      height = Integer.parseInt( heightObj.toString() );
      if ( height != -1 ) {
        if ( chartAttributes.selectSingleNode( ChartDefinition.HEIGHT_NODE_NAME ) == null ) {
          ( (Element) chartAttributes ).addElement( ChartDefinition.HEIGHT_NODE_NAME );
        }
        chartAttributes.selectSingleNode( ChartDefinition.HEIGHT_NODE_NAME ).setText( Integer.toString( height ) );
      }
    }
View Full Code Here

      height = Integer.parseInt( heightObj.toString() );
      if ( height != -1 ) {
        if ( chartAttributes.selectSingleNode( ChartDefinition.HEIGHT_NODE_NAME ) == null ) {
          ( (Element) chartAttributes ).addElement( ChartDefinition.HEIGHT_NODE_NAME );
        }
        chartAttributes.selectSingleNode( ChartDefinition.HEIGHT_NODE_NAME ).setText( Integer.toString( height ) );
      }
    }
    Object titleObj = getInputValue( ChartDefinition.TITLE_NODE_NAME );
    if ( titleObj != null ) {
      if ( chartAttributes.selectSingleNode( ChartDefinition.TITLE_NODE_NAME ) == null ) {
View Full Code Here

        chartAttributes.selectSingleNode( ChartDefinition.HEIGHT_NODE_NAME ).setText( Integer.toString( height ) );
      }
    }
    Object titleObj = getInputValue( ChartDefinition.TITLE_NODE_NAME );
    if ( titleObj != null ) {
      if ( chartAttributes.selectSingleNode( ChartDefinition.TITLE_NODE_NAME ) == null ) {
        ( (Element) chartAttributes ).addElement( ChartDefinition.TITLE_NODE_NAME );
      }
      chartAttributes.selectSingleNode( ChartDefinition.TITLE_NODE_NAME ).setText( titleObj.toString() );
    }
    // ----------------End of Override
View Full Code Here

    Object titleObj = getInputValue( ChartDefinition.TITLE_NODE_NAME );
    if ( titleObj != null ) {
      if ( chartAttributes.selectSingleNode( ChartDefinition.TITLE_NODE_NAME ) == null ) {
        ( (Element) chartAttributes ).addElement( ChartDefinition.TITLE_NODE_NAME );
      }
      chartAttributes.selectSingleNode( ChartDefinition.TITLE_NODE_NAME ).setText( titleObj.toString() );
    }
    // ----------------End of Override

    // ---------------Feed the Title and Subtitle information through the input substitution
    Node titleNode = chartAttributes.selectSingleNode( ChartDefinition.TITLE_NODE_NAME );
View Full Code Here

      publishersXml = publishersDocument.asXML();
      List publisherNodes = publishersDocument.selectNodes( "publishers/publisher" ); //$NON-NLS-1$
      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 );
View Full Code Here

      List publisherNodes = publishersDocument.selectNodes( "publishers/publisher" ); //$NON-NLS-1$
      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 );
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.