Package org.dom4j

Examples of org.dom4j.Document.selectSingleNode()


        info.setAuthor( node.getText() );
      } else {
        info.setAuthor( "" ); //$NON-NLS-1$
      }
      info.setDisplayType( "HTML" ); //$NON-NLS-1$
      node = doc.selectSingleNode( "state-file/documentation/title" ); //$NON-NLS-1$
      if ( node != null ) {
        info.setTitle( node.getText() );
      } else {
        info.setTitle( "" ); //$NON-NLS-1$
      }
View Full Code Here


      if ( node != null ) {
        info.setTitle( node.getText() );
      } else {
        info.setTitle( "" ); //$NON-NLS-1$
      }
      node = doc.selectSingleNode( "state-file/documentation/description" ); //$NON-NLS-1$
      if ( node != null ) {
        info.setDescription( node.getText() );
      } else {
        info.setDescription( "" ); //$NON-NLS-1$
      }
View Full Code Here

      if ( node != null ) {
        info.setDescription( node.getText() );
      } else {
        info.setDescription( "" ); //$NON-NLS-1$
      }
      node = doc.selectSingleNode( "state-file/documentation/icon" ); //$NON-NLS-1$
      if ( node != null ) {
        info.setIcon( node.getText() );
      } else {
        info.setIcon( "" ); //$NON-NLS-1$
      }
View Full Code Here

  public static Node getChartNode( String xml ) {
    try {
      Document chartDocument = XmlDom4JHelper.getDocFromString( xml, new PentahoEntityResolver() );

      Node chartNode = chartDocument.selectSingleNode( "chart" );
      if ( chartNode == null ) {
        chartNode = chartDocument.selectSingleNode( "chart-attributes" );
      }
      return chartNode;
View Full Code Here

    try {
      Document chartDocument = XmlDom4JHelper.getDocFromString( xml, new PentahoEntityResolver() );

      Node chartNode = chartDocument.selectSingleNode( "chart" );
      if ( chartNode == null ) {
        chartNode = chartDocument.selectSingleNode( "chart-attributes" );
      }
      return chartNode;

    } catch ( XmlParseException e ) {
      e.printStackTrace();
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$
    XYZSeriesCollectionChartDefinition chartDataDefinition = (XYZSeriesCollectionChartDefinition) dataDefinition;
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.