Search in sources :

Example 21 with DataProperty

use of org.pentaho.platform.api.repository2.unified.data.node.DataProperty in project pentaho-platform by pentaho.

the class UnifiedRepositoryTestUtils method pathPropertyPair.

/**
 * 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));
}
Also used : DataProperty(org.pentaho.platform.api.repository2.unified.data.node.DataProperty)

Example 22 with DataProperty

use of org.pentaho.platform.api.repository2.unified.data.node.DataProperty in project pentaho-platform by pentaho.

the class UnifiedRepositoryTestUtils method pathPropertyPair.

/**
 * Factory for {@link PathPropertyPair} instances.
 */
public static PathPropertyPair pathPropertyPair(final String path, final Serializable value) {
    checkPath(path);
    String[] pathSegments = path.split("/");
    return new PathPropertyPair(path, new DataProperty(pathSegments[pathSegments.length - 1], value, DataPropertyType.REF));
}
Also used : DataProperty(org.pentaho.platform.api.repository2.unified.data.node.DataProperty)

Aggregations

DataProperty (org.pentaho.platform.api.repository2.unified.data.node.DataProperty)22 DataNode (org.pentaho.platform.api.repository2.unified.data.node.DataNode)13 NodeRepositoryFileData (org.pentaho.platform.api.repository2.unified.data.node.NodeRepositoryFileData)4 Date (java.util.Date)3 Test (org.junit.Test)3 RepositoryFile (org.pentaho.platform.api.repository2.unified.RepositoryFile)3 ArrayList (java.util.ArrayList)2 Matchers.anyString (org.mockito.Matchers.anyString)2 ObjectId (org.pentaho.di.repository.ObjectId)2 StringObjectId (org.pentaho.di.repository.StringObjectId)2 ITenant (org.pentaho.platform.api.mt.ITenant)2 DataNodeRef (org.pentaho.platform.api.repository2.unified.data.node.DataNodeRef)2 Calendar (java.util.Calendar)1 HashMap (java.util.HashMap)1 Locale (java.util.Locale)1 Map (java.util.Map)1 TimeZone (java.util.TimeZone)1 Node (javax.jcr.Node)1 DatabaseConnection (org.pentaho.database.model.DatabaseConnection)1 IDatabaseConnection (org.pentaho.database.model.IDatabaseConnection)1