Examples of PentahoEntityResolver


Examples of org.pentaho.platform.engine.services.solution.PentahoEntityResolver

      String content = getPayloadAsString( request );

      IParameterProvider parameterProvider = null;
      HashMap parameters = new HashMap();
      if ( ( content != null ) && ( content.length() > 0 ) ) {
        Document doc = XmlDom4JHelper.getDocFromString( content, new PentahoEntityResolver() );
        List parameterNodes = doc.selectNodes( "//SOAP-ENV:Body/*/*" ); //$NON-NLS-1$
        for ( int i = 0; i < parameterNodes.size(); i++ ) {
          Node parameterNode = (Node) parameterNodes.get( i );
          String parameterName = parameterNode.getName();
          String parameterValue = parameterNode.getText();
View Full Code Here

Examples of org.pentaho.platform.engine.services.solution.PentahoEntityResolver

  protected Map getParameterMapFromPayload( final String xml ) {
    Map parameters = new HashMap();
    Document doc = null;
    try {
      doc = XmlDom4JHelper.getDocFromString( xml, new PentahoEntityResolver() );
    } catch ( XmlParseException e ) {
      error( Messages.getInstance().getErrorString( "HttpWebService.ERROR_0001_ERROR_DURING_WEB_SERVICE" ), e ); //$NON-NLS-1$
      return parameters;
    }
    List parameterNodes = doc.selectNodes( "//SOAP-ENV:Body/*/*" ); //$NON-NLS-1$
View Full Code Here

Examples of org.pentaho.platform.engine.services.solution.PentahoEntityResolver

    return result;
  }

  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" );
      }
View Full Code Here

Examples of org.pentaho.platform.engine.services.solution.PentahoEntityResolver

    XMLOutput pxml = new XMLOutput( sw );
    pxml.print( "<?xml version=\"1.0\"?>\n" ); //$NON-NLS-1$
    dataSources.displayXML( pxml, 0 );
    Document doc = null;
    try {
      doc = XmlDom4JHelper.getDocFromString( sw.toString(), new PentahoEntityResolver() );
    } catch ( XmlParseException e ) {
      throw new MondrianCatalogServiceException( e );
    }

    // pretty print
View Full Code Here

Examples of org.pentaho.platform.engine.services.solution.PentahoEntityResolver

    query_result.addRow( new Object[] { "Junio", 0, 0 } );
    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

Examples of org.pentaho.platform.engine.services.solution.PentahoEntityResolver

    content.append( "</filters>" ); //$NON-NLS-1$
    if ( FilterPanel.debug ) {
      logger.debug( content.toString() );
    }
    try {
      document = XmlDom4JHelper.getDocFromString( content.toString(), new PentahoEntityResolver() );
    } catch ( XmlParseException e ) {
      logger.error( Messages.getInstance().getErrorString( "FilterPanel.ERROR_0004_COULD_NOT_CREATE_CONTENT" ), e ); //$NON-NLS-1$
    }
    return document;
  }
View Full Code Here

Examples of org.pentaho.platform.engine.services.solution.PentahoEntityResolver

        //ignore
      }
      if ( settingsFromActionSequence != null ) {
        try {
          Document settingsDoc =
              XmlDom4JHelper.getDocFromString( settingsFromActionSequence, new PentahoEntityResolver() );
          componentNode = settingsDoc.getRootElement();
        } catch ( Exception e ) {
          error( "Could not get settings from action sequence document", e ); //$NON-NLS-1$
          return false;
        }
View Full Code Here

Examples of org.pentaho.platform.engine.services.solution.PentahoEntityResolver

    }

    // Realize chart attributes as an XML document
    if ( chartAttributeString != null ) {
      try {
        chartDocument = XmlDom4JHelper.getDocFromString( chartAttributeString, new PentahoEntityResolver() );
      } catch ( XmlParseException e ) {
        getLogger()
            .error( Messages.getInstance().getString( "ChartComponent.ERROR_0005_CANT_DOCUMENT_FROM_STRING" ), e ); //$NON-NLS-1$
        return false;
      }
View Full Code Here

Examples of org.pentaho.platform.engine.services.solution.PentahoEntityResolver

    when( securityHelper.runAsSystem( any( ( Callable.class ) ) ) ).thenReturn( DATASOURCE_XML );

    Document content =
        XmlDom4JHelper.getDocFromString(
            new PentahoXmlaServlet().makeContentFinder( "fakeurl" ).getContent(),
            new PentahoEntityResolver() );

    assertEquals( 2,
        content.selectNodes( "/DataSources/DataSource/Catalogs/Catalog" ).size() );
    assertNotNull( content.selectNodes(
        "/DataSources/DataSource/Catalogs/Catalog[@name='EnabledCatalog']" ) );
View Full Code Here

Examples of org.pentaho.platform.engine.services.solution.PentahoEntityResolver

      chartAttributeString = applyInputsToFormat( chartAttributeString );

      // parse the xml

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

        chartNode = chartDocument.selectSingleNode( CHART_NODE_LOC );
        if ( chartNode == null ) {
          chartNode = chartDocument.selectSingleNode( CHART_ATTRIBUTES );
        }
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.