Package org.dom4j

Examples of org.dom4j.Document.selectSingleNode()


      urlTemplate =
          chartDefinition.selectSingleNode( "/chart/" + AbstractChartComponent.URLTEMPLATE_NODE_NAME ).getText(); //$NON-NLS-1$
    }

    if ( chartDefinition.selectSingleNode( "/chart/paramName" ) != null ) { //$NON-NLS-1$
      paramName = chartDefinition.selectSingleNode( "/chart/paramName" ).getText(); //$NON-NLS-1$
    }

    Element root = result.addElement( "charts" ); //$NON-NLS-1$
    XYZSeriesCollectionChartDefinition chartDataDefinition = (XYZSeriesCollectionChartDefinition) dataDefinition;
    if ( chartDataDefinition.getSeriesCount() > 0 ) {
View Full Code Here


    // to
    // accommodate it
    String chartTitle = ""; //$NON-NLS-1$
    try {
      if ( width == -1 ) {
        width = Integer.parseInt( chartDefinition.selectSingleNode( "/chart/width" ).getText() ); //$NON-NLS-1$
      }
      if ( height == -1 ) {
        height = Integer.parseInt( chartDefinition.selectSingleNode( "/chart/height" ).getText() ); //$NON-NLS-1$
      }
    } catch ( Exception e ) {
View Full Code Here

    try {
      if ( width == -1 ) {
        width = Integer.parseInt( chartDefinition.selectSingleNode( "/chart/width" ).getText() ); //$NON-NLS-1$
      }
      if ( height == -1 ) {
        height = Integer.parseInt( chartDefinition.selectSingleNode( "/chart/height" ).getText() ); //$NON-NLS-1$
      }
    } catch ( Exception e ) {
      // go with the default
    }
    if ( chartDefinition.selectSingleNode( "/chart/" + AbstractChartComponent.URLTEMPLATE_NODE_NAME ) != null ) { //$NON-NLS-1$
View Full Code Here

        height = Integer.parseInt( chartDefinition.selectSingleNode( "/chart/height" ).getText() ); //$NON-NLS-1$
      }
    } catch ( Exception e ) {
      // go with the default
    }
    if ( chartDefinition.selectSingleNode( "/chart/" + AbstractChartComponent.URLTEMPLATE_NODE_NAME ) != null ) { //$NON-NLS-1$
      urlTemplate =
          chartDefinition.selectSingleNode( "/chart/" + AbstractChartComponent.URLTEMPLATE_NODE_NAME ).getText(); //$NON-NLS-1$
    }

    if ( chartDefinition.selectSingleNode( "/chart/paramName" ) != null ) { //$NON-NLS-1$
View Full Code Here

    } catch ( Exception e ) {
      // go with the default
    }
    if ( chartDefinition.selectSingleNode( "/chart/" + AbstractChartComponent.URLTEMPLATE_NODE_NAME ) != null ) { //$NON-NLS-1$
      urlTemplate =
          chartDefinition.selectSingleNode( "/chart/" + AbstractChartComponent.URLTEMPLATE_NODE_NAME ).getText(); //$NON-NLS-1$
    }

    if ( chartDefinition.selectSingleNode( "/chart/paramName" ) != null ) { //$NON-NLS-1$
      paramName = chartDefinition.selectSingleNode( "/chart/paramName" ).getText(); //$NON-NLS-1$
    }
View Full Code Here

    if ( chartDefinition.selectSingleNode( "/chart/" + AbstractChartComponent.URLTEMPLATE_NODE_NAME ) != null ) { //$NON-NLS-1$
      urlTemplate =
          chartDefinition.selectSingleNode( "/chart/" + AbstractChartComponent.URLTEMPLATE_NODE_NAME ).getText(); //$NON-NLS-1$
    }

    if ( chartDefinition.selectSingleNode( "/chart/paramName" ) != null ) { //$NON-NLS-1$
      paramName = chartDefinition.selectSingleNode( "/chart/paramName" ).getText(); //$NON-NLS-1$
    }

    Element root = result.addElement( "charts" ); //$NON-NLS-1$
    XYSeriesCollection chartDataDefinition = (XYSeriesCollection) dataDefinition;
View Full Code Here

      urlTemplate =
          chartDefinition.selectSingleNode( "/chart/" + AbstractChartComponent.URLTEMPLATE_NODE_NAME ).getText(); //$NON-NLS-1$
    }

    if ( chartDefinition.selectSingleNode( "/chart/paramName" ) != null ) { //$NON-NLS-1$
      paramName = chartDefinition.selectSingleNode( "/chart/paramName" ).getText(); //$NON-NLS-1$
    }

    Element root = result.addElement( "charts" ); //$NON-NLS-1$
    XYSeriesCollection chartDataDefinition = (XYSeriesCollection) dataDefinition;
    if ( chartDataDefinition.getSeriesCount() > 0 ) {
View Full Code Here

      if ( xFormHtml == null ) {
        error( Messages.getInstance().getString( "InputForm.ERROR_0007_INBOX_DEFINITION_INVALID" ) + solution + path + actionName ); //$NON-NLS-1$
        return null;
      }
      Document document = DocumentHelper.parseText( xFormHtml );
      Node xFormHtmlNode = document.selectSingleNode( "//xForm" ); //$NON-NLS-1$

      setXslProperty( "xForm", xFormHtmlNode.asXML() ); //$NON-NLS-1$

      if ( ( stylesheetName != null ) && !"".equals( stylesheetName ) ) { //$NON-NLS-1$
        setXslProperty( "css", stylesheetName ); //$NON-NLS-1$
View Full Code Here

    query_result.addRow( new Object[] { "Julio", 6, 3 } );

    Document chartDocument =
        XmlDom4JHelper.getDocFromString( "<chart><chart-type>LineChart</chart-type></chart>",
            new PentahoEntityResolver() );
    Node chartNode = chartDocument.selectSingleNode( "chart" );

    String json = PentahoOFC4JChartHelper.generateChartJson( chartNode, query_result, false, null );
    System.out.println( json );
    Assert.assertTrue( json.indexOf( "\"min\":0" ) >= 0 && json.indexOf( "\"max\":6" ) >= 0 );
  }
View Full Code Here

      Document dataActionDocument = jcrHelper.getSolutionDocument( chartDefinition, RepositoryFilePermission.READ );
      if ( dataActionDocument == null ) {
        return false;
      }

      Node dataNode = dataActionDocument.selectSingleNode( "chart/data" ); //$NON-NLS-1$

      if ( dataNode == null ) {
        // No data here
        return false;
      }
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.