Package org.pentaho.platform.api.repository2.unified.data.node

Examples of org.pentaho.platform.api.repository2.unified.data.node.DataProperty


    // copy doesn't increase version number
    assertTrue( versionSummaries.size() >= 1 );
    assertEquals( USERNAME_SUZY, versionSummaries.get( 0 ).getAuthor() );

    logger.info( "getVersionSummary" );
    VersionSummary versionSummary = repo.getVersionSummary( file1.getId(), null );
    assertNotNull( versionSummary );
    assertNotNull( versionSummary.getId() );

    logger.info( "getFileAtVersion" );
    RepositoryFile file1AtVersion = repo.getFileAtVersion( file1.getId(), versionSummary.getId() );
    assertNotNull( file1AtVersion );
    assertEquals( versionSummary.getId(), file1AtVersion.getVersionId() );

    logger.info( "getTree" );
    RepositoryFileTree tree = repo.getTree( new RepositoryRequest( ClientRepositoryPaths.getRootFolderPath(), true, -1, null ) );
    assertNotNull( tree.getFile().getId() );
View Full Code Here


        RepositoryFile metadata =
          unifiedRepository.getFile( etcMondrian + RepositoryFile.SEPARATOR + catalogName + RepositoryFile.SEPARATOR
            + "metadata" ); //$NON-NLS-1$

        if ( metadata != null ) {
          DataNode metadataNode =
            unifiedRepository.getDataForRead( metadata.getId(), NodeRepositoryFileData.class ).getNode();
          String datasourceInfo = metadataNode.getProperty( "datasourceInfo" ).getString(); //$NON-NLS-1$
          String definition = metadataNode.getProperty( "definition" ).getString(); //$NON-NLS-1$

          datasourcesXML.append( "<Catalog name=\"" + encoder.encodeForXML( catalogName ) + "\">\n" ); //$NON-NLS-1$ //$NON-NLS-2$
          datasourcesXML
            .append( "<DataSourceInfo>" + encoder.encodeForXML( datasourceInfo ) + "</DataSourceInfo>\n" ); //$NON-NLS-1$ //$NON-NLS-2$
          datasourcesXML.append( "<Definition>" + encoder.encodeForXML( definition ) + "</Definition>\n" ); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

    final TimeZone defaultTimeZone = TimeZone.getDefault();
    final String DATE_PROPERTY = "date"; //$NON-NLS-1$

    NodeRepositoryFileDataAdapter adapter = new NodeRepositoryFileDataAdapter();
    Date date = new Date();
    DataNode node = new DataNode( "" ); //$NON-NLS-1$
    node.setProperty( DATE_PROPERTY, date );
    NodeRepositoryFileData data = new NodeRepositoryFileData( node );
    NodeRepositoryFileData result;

    // Convert using the provided locale
    try {
View Full Code Here

    logger.info( "getReservedChars" );
    assertFalse( repo.getReservedChars().isEmpty() );
  }

  private NodeRepositoryFileData makeNodeRepositoryFileData1() {
    DataNode node = new DataNode( "testNode" );
    node.setProperty( "prop1", "hello world" );
    node.setProperty( "prop2", false );
    node.setProperty( "prop3", 12L );
    return new NodeRepositoryFileData( node );
  }
View Full Code Here

    } finally {
      Locale.setDefault( defaultLocale );
      TimeZone.setDefault( defaultTimeZone );
    }

    DataProperty property = result.getNode().getProperty( DATE_PROPERTY );
    assertNotNull( property );
    assertEquals( date, property.getDate() );
  }
View Full Code Here

      this.name = data.getNode().getProperty( "name" ).getString();
      this.className = data.getNode().getProperty( "className" ).getString();
      this.URL = data.getNode().getProperty( "URL" ).getString();

      final DataProperty userProp = data.getNode().getProperty( "user" );
      this.user = userProp == null ? null : userProp.getString();

      final DataProperty passwordProp = data.getNode().getProperty( "password" );
      this.password = passwordProp == null ? null : passwordProp.getString();

      this.properties = new Properties();

      final String propertiesXml =
          data.getNode().getProperty( "properties" ).getString();
View Full Code Here

   * Factory for {@link PathPropertyPair} instances.
   */
  public static PathPropertyPair pathPropertyPair( final String path, final String value ) {
    checkPath( path );
    String[] pathSegments = path.split( "/" );
    return new PathPropertyPair( path, new DataProperty( pathSegments[pathSegments.length - 1], value,
        DataPropertyType.STRING ) );
  }
View Full Code Here

   * Factory for {@link PathPropertyPair} instances.
   */
  public static PathPropertyPair pathPropertyPair( final String path, final boolean value ) {
    checkPath( path );
    String[] pathSegments = path.split( "/" );
    return new PathPropertyPair( path, new DataProperty( pathSegments[pathSegments.length - 1], value,
        DataPropertyType.BOOLEAN ) );
  }
View Full Code Here

   * Factory for {@link PathPropertyPair} instances.
   */
  public static PathPropertyPair pathPropertyPair( final String path, final long value ) {
    checkPath( path );
    String[] pathSegments = path.split( "/" );
    return new PathPropertyPair( path, new DataProperty( pathSegments[pathSegments.length - 1], value,
        DataPropertyType.LONG ) );
  }
View Full Code Here

   * Factory for {@link PathPropertyPair} instances.
   */
  public static PathPropertyPair pathPropertyPair( final String path, final double value ) {
    checkPath( path );
    String[] pathSegments = path.split( "/" );
    return new PathPropertyPair( path, new DataProperty( pathSegments[pathSegments.length - 1], value,
        DataPropertyType.DOUBLE ) );
  }
View Full Code Here

TOP

Related Classes of org.pentaho.platform.api.repository2.unified.data.node.DataProperty

Copyright © 2018 www.massapicom. 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.