Package org.dom4j

Examples of org.dom4j.Node.selectSingleNode()


        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$
              backgroundPaint = JFreeChartEngine.getTexturePaint( backgroundNode, width, height, session );
            } else if ( "gradient".equals( backgroundType ) ) { //$NON-NLS-1$
View Full Code Here


            }
          }
        }

        // get the text color of the interval
        String textColor = intervalNode.selectSingleNode( "text-color" ).getText(); //$NON-NLS-1$
        Stroke outlineStroke;
        if ( intervalNode.selectSingleNode( "stroke-width" ) != null ) { //$NON-NLS-1$
          outlineStroke =
              new BasicStroke( Float.parseFloat( intervalNode.selectSingleNode( "stroke-width" ).getText() ) ); //$NON-NLS-1$
        } else {
View Full Code Here

        }

        // get the text color of the interval
        String textColor = intervalNode.selectSingleNode( "text-color" ).getText(); //$NON-NLS-1$
        Stroke outlineStroke;
        if ( intervalNode.selectSingleNode( "stroke-width" ) != null ) { //$NON-NLS-1$
          outlineStroke =
              new BasicStroke( Float.parseFloat( intervalNode.selectSingleNode( "stroke-width" ).getText() ) ); //$NON-NLS-1$
        } else {
          outlineStroke = new BasicStroke();
        }
View Full Code Here

        // get the text color of the interval
        String textColor = intervalNode.selectSingleNode( "text-color" ).getText(); //$NON-NLS-1$
        Stroke outlineStroke;
        if ( intervalNode.selectSingleNode( "stroke-width" ) != null ) { //$NON-NLS-1$
          outlineStroke =
              new BasicStroke( Float.parseFloat( intervalNode.selectSingleNode( "stroke-width" ).getText() ) ); //$NON-NLS-1$
        } else {
          outlineStroke = new BasicStroke();
        }
        Paint outlinePaint = JFreeChartEngine.getPaint( textColor );
View Full Code Here

      try {
        // attempt to get the chart type and possibly data type from the xml doc
        ActionSequenceJCRHelper jcrHelper = new ActionSequenceJCRHelper( userSession );
        Document chartDefinition = jcrHelper.getSolutionDocument( actionPath, RepositoryFilePermission.READ );
        Node chartAttributes = chartDefinition.selectSingleNode( "//" + AbstractChartComponent.CHART_NODE_NAME ); //$NON-NLS-1$
        chartTypeStr = chartAttributes.selectSingleNode( ChartDefinition.TYPE_NODE_NAME ).getText();
        Node datasetTypeNode = chartAttributes.selectSingleNode( ChartDefinition.DATASET_TYPE_NODE_NAME );
        if ( datasetTypeNode != null ) {
          datasetType = datasetTypeNode.getText();
        }
View Full Code Here

    }
    // get the chart node from the document
    Node chartAttributes = doc.selectSingleNode( "//" + AbstractChartComponent.CHART_NODE_NAME ); //$NON-NLS-1$
    // create the definition

    String chType = chartAttributes.selectSingleNode( "chart-type" ).getText(); //$NON-NLS-1$
    CategoryDatasetChartDefinition chartDefinition = null;

    if ( ChartDefinition.BAR_LINE_CHART_STR.equalsIgnoreCase( chType ) ) {
      chartDefinition = new BarLineChartDefinition( (IPentahoResultSet) values, byRow, chartAttributes, getSession() );
    } else {
View Full Code Here

          dbRoute.setSize(Integer.parseInt(database.valueOf("@size")));
          routeSize += dbRoute.getSize();
        } catch (NumberFormatException e) {
          throw new Config.ConfigException();
        }
        dbRoute.setExpression(ExpressionFactory.create(database.selectSingleNode("*")));
        config.setDatabaseRoute(dbRoute);
      }
     
      Node table = route.selectSingleNode("table");
      if(table != null) {
View Full Code Here

          tableRoute.setSize(Integer.parseInt(table.valueOf("@size")));
          routeSize += tableRoute.getSize();
        } catch (NumberFormatException e) {
          throw new Config.ConfigException();
        }
        tableRoute.setExpression(ExpressionFactory.create(table.selectSingleNode("*")));
        config.setTablerRoute(tableRoute);
      }
     
      if (config.isOverFlowCheck() && routeSize > 8) {
        throw new Config.ConfigException("ɢ��ɢ����Ϣ��ռ�õ�idλ��(ʮ����)���ܳ���8");
View Full Code Here

        final ArrayList<ExecutionDetail> list = new ArrayList<ExecutionDetail>();
        if (null != items && items.size() > 0) {
            for (final Object o : items) {
                final Node node1 = (Node) o;
                ExecutionDetailImpl detail = new ExecutionDetailImpl();
                String url = node1.selectSingleNode("@href").getStringValue();
                url = makeAbsoluteURL(url);
                detail.setId(stringNodeValue(node1, "@id", null));
                try {
                    detail.setStatus(ExecutionState.valueOf(stringNodeValue(node1, "@status", null)));
                } catch (IllegalArgumentException e) {
View Full Code Here

        final List items = node.selectNodes("execution");
        final ArrayList<QueuedItem> list = new ArrayList<QueuedItem>();
        if (null != items && items.size() > 0) {
            for (final Object o : items) {
                final Node node1 = (Node) o;
                final String id = node1.selectSingleNode("@id").getStringValue();
                final Node jobname = node1.selectSingleNode("job/name");
                final Node desc = node1.selectSingleNode("description");
                final String name;
                if (null != jobname) {
                    name = jobname.getStringValue();
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.