当前位置: 首页>>代码示例>>Java>>正文


Java Cardinality类代码示例

本文整理汇总了Java中org.apache.chemistry.opencmis.commons.enums.Cardinality的典型用法代码示例。如果您正苦于以下问题:Java Cardinality类的具体用法?Java Cardinality怎么用?Java Cardinality使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Cardinality类属于org.apache.chemistry.opencmis.commons.enums包,在下文中一共展示了Cardinality类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: test_PATH

import org.apache.chemistry.opencmis.commons.enums.Cardinality; //导入依赖的package包/类
public void test_PATH() throws Exception
{
    CMISQueryOptions options = new CMISQueryOptions("SELECT * FROM cmis:folder", rootNodeRef.getStoreRef());
    options.setDefaultFTSConnective(Connective.OR);
    options.setDefaultFTSFieldConnective(Connective.OR);
    CMISResultSet rs = cmisQueryService.query(options);
    assertEquals(folder_count, rs.length());
    for (CMISResultSetRow row : rs)
    {
        Serializable sValue = row.getValue("cmis:path");
        String value = DefaultTypeConverter.INSTANCE.convert(String.class, sValue);
        assertNotNull(value);
        CMISResultSetColumn column = rs.getResultSetMetaData().getColumn("cmis:path");
        assertNotNull(column);
        assertEquals(PropertyType.STRING, column.getCMISDataType());
        assertEquals(Cardinality.SINGLE, column.getCMISPropertyDefinition().getPropertyDefinition().getCardinality());
        assertTrue(column.getCMISPropertyDefinition().getPropertyAccessor() instanceof PathProperty);
    }
    rs.close();

    testQuery("SELECT cmis:path FROM cmis:folder", folder_count, false, "cmis:path", new String(), false);
    testQuery("SELECT cmis:path FROM cmis:folder WHERE cmis:path =  'anything'", folder_count, false, "cmis:path", new String(), true);

}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:25,代码来源:OpenCmisQueryTest.java

示例2: isMultiValued

import org.apache.chemistry.opencmis.commons.enums.Cardinality; //导入依赖的package包/类
public boolean isMultiValued(String propertyName)
{
    PropertyDefinitionWrapper propDef = cmisDictionaryService.findPropertyByQueryName(propertyName);
    if (propDef == null)
    {
        throw new CmisInvalidArgumentException("Unknown column/property " + propertyName);
    }
    return propDef.getPropertyDefinition().getCardinality() == Cardinality.MULTI;
}
 
开发者ID:Alfresco,项目名称:alfresco-data-model,代码行数:10,代码来源:CmisFunctionEvaluationContext.java

示例3: addBasePropertyDefinitions

import org.apache.chemistry.opencmis.commons.enums.Cardinality; //导入依赖的package包/类
public static void addBasePropertyDefinitions(AbstractTypeDefinition type) {
    type.addPropertyDefinition(createPropDef(PropertyIds.BASE_TYPE_ID, CMISConstants.BASE_TYPE_ID_VALUE, CMISConstants.BASE_TYPE_ID_VALUE,
            PropertyType.ID, Cardinality.SINGLE, Updatability.READONLY, false, false));

    type.addPropertyDefinition(createPropDef(PropertyIds.OBJECT_ID, CMISConstants.OBJECT_ID_VALUE, CMISConstants.OBJECT_ID_VALUE, PropertyType.ID,
            Cardinality.SINGLE, Updatability.READONLY, false, false));

    type.addPropertyDefinition(createPropDef(PropertyIds.OBJECT_TYPE_ID, CMISConstants.TYPE_ID_VALUE, CMISConstants.TYPE_ID_VALUE, PropertyType.ID,
            Cardinality.SINGLE, Updatability.ONCREATE, false, true));

    type.addPropertyDefinition(createPropDef(PropertyIds.NAME, CMISConstants.NAME_VALUE, CMISConstants.NAME_VALUE, PropertyType.STRING,
            Cardinality.SINGLE, Updatability.READWRITE, false, true));

    type.addPropertyDefinition(createPropDef(PropertyIds.CREATED_BY, CMISConstants.CREATED_BY_VALUE, CMISConstants.CREATED_BY_VALUE,
            PropertyType.STRING, Cardinality.SINGLE, Updatability.READONLY, false, false));

    type.addPropertyDefinition(createPropDef(PropertyIds.CREATION_DATE, CMISConstants.CREATION_DATE_VALUE, CMISConstants.CREATION_DATE_VALUE,
            PropertyType.DATETIME, Cardinality.SINGLE, Updatability.READONLY, false, false));

    type.addPropertyDefinition(createPropDef(PropertyIds.LAST_MODIFIED_BY, CMISConstants.LAST_MODIFIED_BY_VALUE, CMISConstants.LAST_MODIFIED_BY_VALUE,
            PropertyType.STRING, Cardinality.SINGLE, Updatability.READONLY, false, false));

    type.addPropertyDefinition(createPropDef(PropertyIds.LAST_MODIFICATION_DATE, CMISConstants.LAST_MODIFIED_DATE_VALUE,
            CMISConstants.LAST_MODIFIED_DATE_VALUE, PropertyType.DATETIME, Cardinality.SINGLE, Updatability.READONLY, false, false));

    type.addPropertyDefinition(createPropDef(PropertyIds.CHANGE_TOKEN, CMISConstants.CHANGE_TOKEN_VALUE, CMISConstants.CHANGE_TOKEN_VALUE,
            PropertyType.STRING, Cardinality.SINGLE, Updatability.READONLY, false, false));
}
 
开发者ID:wso2,项目名称:carbon-registry,代码行数:29,代码来源:RegistryTypeManager.java

示例4: addFolderPropertyDefinitions

import org.apache.chemistry.opencmis.commons.enums.Cardinality; //导入依赖的package包/类
public static void addFolderPropertyDefinitions(FolderTypeDefinitionImpl type) {
    type.addPropertyDefinition(createPropDef(PropertyIds.PARENT_ID, CMISConstants.PARENT_ID_VALUE, CMISConstants.PARENT_ID_VALUE, PropertyType.ID,
            Cardinality.SINGLE, Updatability.READONLY, false, false));

    type.addPropertyDefinition(createPropDef(PropertyIds.ALLOWED_CHILD_OBJECT_TYPE_IDS,
            CMISConstants.ALLOWED_CHILD_TYPE_VALUE, CMISConstants.ALLOWED_CHILD_TYPE_VALUE, PropertyType.ID, Cardinality.MULTI,
            Updatability.READONLY, false, false));

    type.addPropertyDefinition(createPropDef(PropertyIds.PATH, CMISConstants.PATH_VALUE, CMISConstants.PATH_VALUE, PropertyType.STRING,
            Cardinality.SINGLE, Updatability.READONLY, false, false));
}
 
开发者ID:wso2,项目名称:carbon-registry,代码行数:12,代码来源:RegistryTypeManager.java

示例5: test_ALLOWED_CHILD_OBJECT_TYPES

import org.apache.chemistry.opencmis.commons.enums.Cardinality; //导入依赖的package包/类
public void test_ALLOWED_CHILD_OBJECT_TYPES() throws Exception
{
    CMISQueryOptions options = new CMISQueryOptions("SELECT * FROM cmis:folder", rootNodeRef.getStoreRef());
    options.setDefaultFTSConnective(Connective.OR);
    options.setDefaultFTSFieldConnective(Connective.OR);
    CMISResultSet rs = cmisQueryService.query(options);
    assertEquals(folder_count, rs.length());
    for (CMISResultSetRow row : rs)
    {
        Serializable sValue = row.getValue("cmis:allowedChildObjectTypeIds");
        Collection<String> values = DefaultTypeConverter.INSTANCE.getCollection(String.class, sValue);
        assertNotNull(values);
        assertEquals(0, values.size());
        CMISResultSetColumn column = rs.getResultSetMetaData().getColumn("cmis:allowedChildObjectTypeIds");
        assertNotNull(column);
        assertEquals(PropertyType.ID, column.getCMISDataType());
        assertEquals(Cardinality.MULTI, column.getCMISPropertyDefinition().getPropertyDefinition().getCardinality());
    }
    rs.close();

    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE cmis:allowedChildObjectTypeIds =  'test'", 0, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);
    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE cmis:allowedChildObjectTypeIds <> 'test'", 10, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);
    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE cmis:allowedChildObjectTypeIds <  'test'", 0, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);
    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE cmis:allowedChildObjectTypeIds <= 'test'", 0, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);
    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE cmis:allowedChildObjectTypeIds >  'test'", 0, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);
    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE cmis:allowedChildObjectTypeIds >= 'test'", 0, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);

    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE cmis:allowedChildObjectTypeIds IN     ('test')", 0, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);
    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE cmis:allowedChildObjectTypeIds NOT IN ('test')", 10, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);

    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE cmis:allowedChildObjectTypeIds     LIKE 'test'", 0, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);
    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE cmis:allowedChildObjectTypeIds NOT LIKE 'test'", 0, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);

    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE cmis:allowedChildObjectTypeIds IS NOT NULL", 0, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);
    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE cmis:allowedChildObjectTypeIds IS     NULL", 10, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);

    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE 'test' =  ANY cmis:allowedChildObjectTypeIds", 0, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);
    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE 'test' <> ANY cmis:allowedChildObjectTypeIds", 10, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);
    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE 'test' <  ANY cmis:allowedChildObjectTypeIds", 0, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);
    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE 'test' <= ANY cmis:allowedChildObjectTypeIds", 0, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);
    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE 'test' >  ANY cmis:allowedChildObjectTypeIds", 0, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);
    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE 'test' >= ANY cmis:allowedChildObjectTypeIds", 0, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);

    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE ANY cmis:allowedChildObjectTypeIds IN     ('test')", 0, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);
    testQuery("SELECT cmis:allowedChildObjectTypeIds FROM cmis:folder WHERE ANY cmis:allowedChildObjectTypeIds NOT IN ('test')", 10, false, "cmis:allowedChildObjectTypeIds",
            new String(), true);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:67,代码来源:OpenCmisQueryTest.java

示例6: test_CHECKIN_COMMENT

import org.apache.chemistry.opencmis.commons.enums.Cardinality; //导入依赖的package包/类
public void test_CHECKIN_COMMENT() throws Exception
{
    CMISQueryOptions options = new CMISQueryOptions("SELECT * FROM cmis:document", rootNodeRef.getStoreRef());
    options.setDefaultFTSConnective(Connective.OR);
    options.setDefaultFTSFieldConnective(Connective.OR);
    CMISResultSet rs = cmisQueryService.query(options);
    assertEquals(doc_count, rs.length());
    for (CMISResultSetRow row : rs)
    {
        Serializable sValue = row.getValue("cmis:checkinComment");
        String value = DefaultTypeConverter.INSTANCE.convert(String.class, sValue);
        assertNull(value);
        CMISResultSetColumn column = rs.getResultSetMetaData().getColumn("cmis:checkinComment");
        assertNotNull(column);
        assertEquals(PropertyType.STRING, column.getCMISDataType());
        assertEquals(Cardinality.SINGLE, column.getCMISPropertyDefinition().getPropertyDefinition().getCardinality());
        assertTrue(column.getCMISPropertyDefinition().getPropertyAccessor() instanceof CheckinCommentProperty);
    }
    rs.close();

    testQuery("SELECT cmis:checkinComment FROM cmis:document", doc_count, false, "cmis:objectId", new String(), false);
    
    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE cmis:checkinComment =  'admin'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE cmis:checkinComment <> 'admin'", doc_count, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE cmis:checkinComment <  'admin'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE cmis:checkinComment <= 'admin'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE cmis:checkinComment >  'admin'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE cmis:checkinComment >= 'admin'", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE cmis:checkinComment IN     ('admin')", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE cmis:checkinComment NOT IN ('admin')", doc_count, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE cmis:checkinComment     LIKE 'admin'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE cmis:checkinComment NOT LIKE 'admin'", doc_count, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE cmis:checkinComment IS NOT NULL", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE cmis:checkinComment IS     NULL", doc_count, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE 'admin' =  ANY cmis:checkinComment", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE 'admin' <> ANY cmis:checkinComment", doc_count, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE 'admin' <  ANY cmis:checkinComment", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE 'admin' <= ANY cmis:checkinComment", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE 'admin' >  ANY cmis:checkinComment", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE 'admin' >= ANY cmis:checkinComment", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE ANY cmis:checkinComment IN     ('admin')", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:checkinComment FROM cmis:document WHERE ANY cmis:checkinComment NOT IN ('admin')", doc_count, false, "cmis:objectId", new String(), true);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:49,代码来源:OpenCmisQueryTest.java

示例7: test_VERSION_SERIES_CHECKED_OUT_ID

import org.apache.chemistry.opencmis.commons.enums.Cardinality; //导入依赖的package包/类
public void test_VERSION_SERIES_CHECKED_OUT_ID() throws Exception
{
    CMISQueryOptions options = new CMISQueryOptions("SELECT * FROM cmis:document", rootNodeRef.getStoreRef());
    options.setDefaultFTSConnective(Connective.OR);
    options.setDefaultFTSFieldConnective(Connective.OR);
    CMISResultSet rs = cmisQueryService.query(options);
    assertEquals(doc_count, rs.length());
    for (CMISResultSetRow row : rs)
    {
        Serializable sValue = row.getValue("cmis:versionSeriesCheckedOutId");
        String value = DefaultTypeConverter.INSTANCE.convert(String.class, sValue);
        assertNull(value);
        CMISResultSetColumn column = rs.getResultSetMetaData().getColumn("cmis:versionSeriesCheckedOutId");
        assertNotNull(column);
        assertEquals(PropertyType.ID, column.getCMISDataType());
        assertEquals(Cardinality.SINGLE, column.getCMISPropertyDefinition().getPropertyDefinition().getCardinality());
        assertTrue(column.getCMISPropertyDefinition().getPropertyAccessor() instanceof VersionSeriesCheckedOutIdProperty);
    }
    rs.close();
    
    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document", doc_count, false, "cmis:objectId", new String(), false);

    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE cmis:versionSeriesCheckedOutId =  'admin'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE cmis:versionSeriesCheckedOutId <> 'admin'", doc_count, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE cmis:versionSeriesCheckedOutId <  'admin'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE cmis:versionSeriesCheckedOutId <= 'admin'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE cmis:versionSeriesCheckedOutId >  'admin'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE cmis:versionSeriesCheckedOutId >= 'admin'", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE cmis:versionSeriesCheckedOutId IN     ('admin')", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE cmis:versionSeriesCheckedOutId NOT IN ('admin')", doc_count, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE cmis:versionSeriesCheckedOutId     LIKE 'admin'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE cmis:versionSeriesCheckedOutId NOT LIKE 'admin'", doc_count, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE cmis:versionSeriesCheckedOutId IS NOT NULL", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE cmis:versionSeriesCheckedOutId IS     NULL", doc_count, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE 'admin' =  ANY cmis:versionSeriesCheckedOutId", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE 'admin' <> ANY cmis:versionSeriesCheckedOutId", doc_count, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE 'admin' <  ANY cmis:versionSeriesCheckedOutId", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE 'admin' <= ANY cmis:versionSeriesCheckedOutId", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE 'admin' >  ANY cmis:versionSeriesCheckedOutId", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE 'admin' >= ANY cmis:versionSeriesCheckedOutId", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE ANY cmis:versionSeriesCheckedOutId IN     ('admin')", 0, false, "cmis:objectId", new String(),
            true);
    testQuery("SELECT cmis:versionSeriesCheckedOutId FROM cmis:document WHERE ANY cmis:versionSeriesCheckedOutId NOT IN ('admin')", doc_count, false, "cmis:objectId", new String(),
            true);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:51,代码来源:OpenCmisQueryTest.java

示例8: test_VERSION_SERIES_CHECKED_OUT_BY

import org.apache.chemistry.opencmis.commons.enums.Cardinality; //导入依赖的package包/类
public void test_VERSION_SERIES_CHECKED_OUT_BY() throws Exception
{
    CMISQueryOptions options = new CMISQueryOptions("SELECT * FROM cmis:document", rootNodeRef.getStoreRef());
    options.setDefaultFTSConnective(Connective.OR);
    options.setDefaultFTSFieldConnective(Connective.OR);
    CMISResultSet rs = cmisQueryService.query(options);
    assertEquals(doc_count, rs.length());
    for (CMISResultSetRow row : rs)
    {
        Serializable sValue = row.getValue("cmis:versionSeriesCheckedOutBy");
        String value = DefaultTypeConverter.INSTANCE.convert(String.class, sValue);
        assertNull(value);
        CMISResultSetColumn column = rs.getResultSetMetaData().getColumn("cmis:versionSeriesCheckedOutBy");
        assertNotNull(column);
        assertEquals(PropertyType.STRING, column.getCMISDataType());
        assertEquals(Cardinality.SINGLE, column.getCMISPropertyDefinition().getPropertyDefinition().getCardinality());
        assertTrue(column.getCMISPropertyDefinition().getPropertyAccessor() instanceof VersionSeriesCheckedOutByProperty);
    }
    rs.close();
    
    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document", doc_count, false, "cmis:objectId", new String(), false);

    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE cmis:versionSeriesCheckedOutBy =  'admin'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE cmis:versionSeriesCheckedOutBy <> 'admin'", doc_count, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE cmis:versionSeriesCheckedOutBy <  'admin'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE cmis:versionSeriesCheckedOutBy <= 'admin'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE cmis:versionSeriesCheckedOutBy >  'admin'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE cmis:versionSeriesCheckedOutBy >= 'admin'", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE cmis:versionSeriesCheckedOutBy IN     ('admin')", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE cmis:versionSeriesCheckedOutBy NOT IN ('admin')", doc_count, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE cmis:versionSeriesCheckedOutBy     LIKE 'admin'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE cmis:versionSeriesCheckedOutBy NOT LIKE 'admin'", doc_count, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE cmis:versionSeriesCheckedOutBy IS NOT NULL", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE cmis:versionSeriesCheckedOutBy IS     NULL", doc_count, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE 'admin' =  ANY cmis:versionSeriesCheckedOutBy", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE 'admin' <> ANY cmis:versionSeriesCheckedOutBy", doc_count, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE 'admin' <  ANY cmis:versionSeriesCheckedOutBy", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE 'admin' <= ANY cmis:versionSeriesCheckedOutBy", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE 'admin' >  ANY cmis:versionSeriesCheckedOutBy", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE 'admin' >= ANY cmis:versionSeriesCheckedOutBy", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE ANY cmis:versionSeriesCheckedOutBy IN     ('admin')", 0, false, "cmis:objectId", new String(),
            true);
    testQuery("SELECT cmis:versionSeriesCheckedOutBy FROM cmis:document WHERE ANY cmis:versionSeriesCheckedOutBy NOT IN ('admin')", doc_count, false, "cmis:objectId", new String(),
            true);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:51,代码来源:OpenCmisQueryTest.java

示例9: test_IS_VERSION_SERIES_CHECKED_OUT

import org.apache.chemistry.opencmis.commons.enums.Cardinality; //导入依赖的package包/类
public void test_IS_VERSION_SERIES_CHECKED_OUT() throws Exception
{
    CMISQueryOptions options = new CMISQueryOptions("SELECT * FROM cmis:document", rootNodeRef.getStoreRef());
    options.setDefaultFTSConnective(Connective.OR);
    options.setDefaultFTSFieldConnective(Connective.OR);
    CMISResultSet rs = cmisQueryService.query(options);
    assertEquals(doc_count, rs.length());
    for (CMISResultSetRow row : rs)
    {
        Serializable sValue = row.getValue("cmis:isVersionSeriesCheckedOut");
        Boolean value = DefaultTypeConverter.INSTANCE.convert(Boolean.class, sValue);
        assertNotNull(value);
        assertEquals(Boolean.FALSE, value);
        CMISResultSetColumn column = rs.getResultSetMetaData().getColumn("cmis:isVersionSeriesCheckedOut");
        assertNotNull(column);
        assertEquals(PropertyType.BOOLEAN, column.getCMISDataType());
        assertEquals(Cardinality.SINGLE, column.getCMISPropertyDefinition().getPropertyDefinition().getCardinality());
        assertTrue(column.getCMISPropertyDefinition().getPropertyAccessor() instanceof IsVersionSeriesCheckedOutProperty);
    }
    rs.close();

    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document", doc_count, false, "cmis:objectId", new String(), false);
    
    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE cmis:isVeriesSeriesCheckedOut =  'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE cmis:isVeriesSeriesCheckedOut <> 'TRUE'", doc_count, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE cmis:isVeriesSeriesCheckedOut <  'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE cmis:isVeriesSeriesCheckedOut <= 'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE cmis:isVeriesSeriesCheckedOut >  'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE cmis:isVeriesSeriesCheckedOut >= 'TRUE'", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE cmis:isVeriesSeriesCheckedOut IN     ('TRUE')", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE cmis:isVeriesSeriesCheckedOut NOT IN ('TRUE')", doc_count, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE cmis:isVeriesSeriesCheckedOut     LIKE 'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE cmis:isVeriesSeriesCheckedOut NOT LIKE 'TRUE'", doc_count, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE cmis:isVeriesSeriesCheckedOut IS NOT NULL", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE cmis:isVeriesSeriesCheckedOut IS     NULL", doc_count, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE 'TRUE' =  ANY cmis:isVeriesSeriesCheckedOut", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE 'TRUE' <> ANY cmis:isVeriesSeriesCheckedOut", doc_count, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE 'TRUE' <  ANY cmis:isVeriesSeriesCheckedOut", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE 'TRUE' <= ANY cmis:isVeriesSeriesCheckedOut", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE 'TRUE' >  ANY cmis:isVeriesSeriesCheckedOut", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE 'TRUE' >= ANY cmis:isVeriesSeriesCheckedOut", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE ANY cmis:isVeriesSeriesCheckedOut IN     ('TRUE')", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isVersionSeriesCheckedOut FROM cmis:document WHERE ANY cmis:isVeriesSeriesCheckedOut NOT IN ('TRUE')", doc_count, false, "cmis:objectId", new String(), true);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:50,代码来源:OpenCmisQueryTest.java

示例10: test_VERSION_SERIES_ID

import org.apache.chemistry.opencmis.commons.enums.Cardinality; //导入依赖的package包/类
public void test_VERSION_SERIES_ID() throws Exception
{
    CMISQueryOptions options = new CMISQueryOptions("SELECT * FROM cmis:document", rootNodeRef.getStoreRef());
    options.setDefaultFTSConnective(Connective.OR);
    options.setDefaultFTSFieldConnective(Connective.OR);
    CMISResultSet rs = cmisQueryService.query(options);
    assertEquals(doc_count, rs.length());
    for (CMISResultSetRow row : rs)
    {
        Serializable sValue = row.getValue("cmis:versionSeriesId");
        String value = DefaultTypeConverter.INSTANCE.convert(String.class, sValue);
        assertNotNull(value);
        // objectIds returned back are always the node guid 
        assertEquals(row.getNodeRef().toString(), value);
        CMISResultSetColumn column = rs.getResultSetMetaData().getColumn("cmis:versionSeriesId");
        assertNotNull(column);
        assertEquals(PropertyType.ID, column.getCMISDataType());
        assertEquals(Cardinality.SINGLE, column.getCMISPropertyDefinition().getPropertyDefinition().getCardinality());
        assertTrue(column.getCMISPropertyDefinition().getPropertyAccessor() instanceof VersionSeriesIdProperty);
    }
    rs.close();

    testQuery("SELECT cmis:versionSeriesId FROM cmis:document", doc_count, false, "cmis:objectId", new String(), false);
    
    
    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE cmis:versionSeriesId =  'company'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE cmis:versionSeriesId <> 'company'", doc_count, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE cmis:versionSeriesId <  'company'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE cmis:versionSeriesId <= 'company'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE cmis:versionSeriesId >  'company'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE cmis:versionSeriesId >= 'company'", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE cmis:versionSeriesId IN     ('company')", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE cmis:versionSeriesId NOT IN ('company')", doc_count, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE cmis:versionSeriesId     LIKE 'company'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE cmis:versionSeriesId NOT LIKE 'company'", doc_count, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE cmis:versionSeriesId IS NOT NULL", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE cmis:versionSeriesId IS     NULL", doc_count, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE 'company' =  ANY cmis:versionSeriesId", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE 'company' <> ANY cmis:versionSeriesId", doc_count, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE 'company' <  ANY cmis:versionSeriesId", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE 'company' <= ANY cmis:versionSeriesId", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE 'company' >  ANY cmis:versionSeriesId", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE 'company' >= ANY cmis:versionSeriesId", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE ANY cmis:versionSeriesId IN     ('company')", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionSeriesId FROM cmis:document WHERE ANY cmis:versionSeriesId NOT IN ('company')", doc_count, false, "cmis:objectId", new String(), true);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:52,代码来源:OpenCmisQueryTest.java

示例11: test_VERSION_LABEL

import org.apache.chemistry.opencmis.commons.enums.Cardinality; //导入依赖的package包/类
public void test_VERSION_LABEL() throws Exception
{
    CMISQueryOptions options = new CMISQueryOptions("SELECT * FROM cmis:document", rootNodeRef.getStoreRef());
    options.setDefaultFTSConnective(Connective.OR);
    options.setDefaultFTSFieldConnective(Connective.OR);
    CMISResultSet rs = cmisQueryService.query(options);
    assertEquals(doc_count, rs.length());
    for (CMISResultSetRow row : rs)
    {
        Serializable sValue = row.getValue("cmis:versionLabel");
        String value = DefaultTypeConverter.INSTANCE.convert(String.class, sValue);
        assertNotNull(value);
        CMISResultSetColumn column = rs.getResultSetMetaData().getColumn("cmis:versionLabel");
        assertNotNull(column);
        assertEquals(PropertyType.STRING, column.getCMISDataType());
        assertEquals(Cardinality.SINGLE, column.getCMISPropertyDefinition().getPropertyDefinition().getCardinality());
        assertTrue(column.getCMISPropertyDefinition().getPropertyAccessor() instanceof VersionLabelProperty);
    }
    rs.close();
    
    testQuery("SELECT cmis:versionLabel FROM cmis:document", doc_count, false, "cmis:objectId", new String(), false);

    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE cmis:versionLabel =  'company'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE cmis:versionLabel <> 'company'", doc_count, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE cmis:versionLabel <  'company'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE cmis:versionLabel <= 'company'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE cmis:versionLabel >  'company'", 1, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE cmis:versionLabel >= 'company'", 1, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE cmis:versionLabel IN     ('company')", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE cmis:versionLabel NOT IN ('company')", doc_count, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE cmis:versionLabel     LIKE 'company'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE cmis:versionLabel NOT LIKE 'company'", doc_count, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE cmis:versionLabel IS NOT NULL", 1, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE cmis:versionLabel IS     NULL", doc_count-1, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE 'company' =  ANY cmis:versionLabel", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE 'company' <> ANY cmis:versionLabel", doc_count, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE 'company' <  ANY cmis:versionLabel", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE 'company' <= ANY cmis:versionLabel", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE 'company' >  ANY cmis:versionLabel", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE 'company' >= ANY cmis:versionLabel", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE ANY cmis:versionLabel IN     ('company')", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:versionLabel FROM cmis:document WHERE ANY cmis:versionLabel NOT IN ('company')", doc_count, false, "cmis:objectId", new String(), true);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:49,代码来源:OpenCmisQueryTest.java

示例12: test_IS_LATEST_MAJOR_VERSION

import org.apache.chemistry.opencmis.commons.enums.Cardinality; //导入依赖的package包/类
@Category(RedundantTests.class)
public void test_IS_LATEST_MAJOR_VERSION() throws Exception
{
    CMISQueryOptions options = new CMISQueryOptions("SELECT * FROM cmis:document", rootNodeRef.getStoreRef());
    options.setDefaultFTSConnective(Connective.OR);
    options.setDefaultFTSFieldConnective(Connective.OR);
    CMISResultSet rs = cmisQueryService.query(options);
    assertEquals(doc_count, rs.length());
    for (CMISResultSetRow row : rs)
    {
        Serializable sValue = row.getValue("cmis:isLatestMajorVersion");
        Boolean value = DefaultTypeConverter.INSTANCE.convert(Boolean.class, sValue);
        assertNotNull(value);
        assertEquals(Boolean.TRUE, value);
        CMISResultSetColumn column = rs.getResultSetMetaData().getColumn("cmis:isLatestMajorVersion");
        assertNotNull(column);
        assertEquals(PropertyType.BOOLEAN, column.getCMISDataType());
        assertEquals(Cardinality.SINGLE, column.getCMISPropertyDefinition().getPropertyDefinition().getCardinality());
        assertTrue(column.getCMISPropertyDefinition().getPropertyAccessor() instanceof IsLatestMajorVersionProperty);
    }
    rs.close();
    
    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document", doc_count, false, "cmis:objectId", new String(), false);

    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE cmis:isLatestMajorVersion =  'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE cmis:isLatestMajorVersion <> 'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE cmis:isLatestMajorVersion <  'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE cmis:isLatestMajorVersion <= 'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE cmis:isLatestMajorVersion >  'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE cmis:isLatestMajorVersion >= 'TRUE'", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE cmis:isLatestMajorVersion IN     ('TRUE')", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE cmis:isLatestMajorVersion NOT IN ('TRUE')", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE cmis:isLatestMajorVersion     LIKE 'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE cmis:isLatestMajorVersion NOT LIKE 'TRUE'", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE cmis:isLatestMajorVersion IS NOT NULL", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE cmis:isLatestMajorVersion IS     NULL", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE 'TRUE' =  ANY cmis:isLatestMajorVersion", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE 'TRUE' <> ANY cmis:isLatestMajorVersion", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE 'TRUE' <  ANY cmis:isLatestMajorVersion", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE 'TRUE' <= ANY cmis:isLatestMajorVersion", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE 'TRUE' >  ANY cmis:isLatestMajorVersion", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE 'TRUE' >= ANY cmis:isLatestMajorVersion", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE ANY cmis:isLatestMajorVersion IN     ('TRUE')", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestMajorVersion FROM cmis:document WHERE ANY cmis:isLatestMajorVersion NOT IN ('TRUE')", 0, false, "cmis:objectId", new String(), true);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:51,代码来源:OpenCmisQueryTest.java

示例13: test_IS_MAJOR_VERSION

import org.apache.chemistry.opencmis.commons.enums.Cardinality; //导入依赖的package包/类
public void test_IS_MAJOR_VERSION() throws Exception
{
    CMISQueryOptions options = new CMISQueryOptions("SELECT * FROM cmis:document", rootNodeRef.getStoreRef());
    options.setDefaultFTSConnective(Connective.OR);
    options.setDefaultFTSFieldConnective(Connective.OR);
    CMISResultSet rs = cmisQueryService.query(options);
    assertEquals(doc_count, rs.length());
    for (CMISResultSetRow row : rs)
    {
        Serializable sValue = row.getValue("cmis:isMajorVersion");
        Boolean value = DefaultTypeConverter.INSTANCE.convert(Boolean.class, sValue);
        assertNotNull(value);
        assertEquals(Boolean.TRUE, value);
        CMISResultSetColumn column = rs.getResultSetMetaData().getColumn("cmis:isMajorVersion");
        assertNotNull(column);
        assertEquals(PropertyType.BOOLEAN, column.getCMISDataType());
        assertEquals(Cardinality.SINGLE, column.getCMISPropertyDefinition().getPropertyDefinition().getCardinality());
        assertTrue(column.getCMISPropertyDefinition().getPropertyAccessor() instanceof IsMajorVersionProperty);
    }
    rs.close();

    testQuery("SELECT cmis:isMajorVersion FROM cmis:document", doc_count, false, "cmis:objectId", new String(), false);
    
    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE cmis:isMajorVersion =  TRUE", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE cmis:isMajorVersion =  true", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE cmis:isMajorVersion =  FALSE", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE cmis:isMajorVersion =  false", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE cmis:isMajorVersion <> 'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE cmis:isMajorVersion <  'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE cmis:isMajorVersion <= 'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE cmis:isMajorVersion >  'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE cmis:isMajorVersion >= 'TRUE'", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE cmis:isMajorVersion IN     ('TRUE')", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE cmis:isMajorVersion NOT IN ('TRUE')", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE cmis:isMajorVersion     LIKE 'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE cmis:isMajorVersion NOT LIKE 'TRUE'", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE cmis:isMajorVersion IS NOT NULL", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE cmis:isMajorVersion IS     NULL", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE 'TRUE' =  ANY cmis:isMajorVersion", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE 'TRUE' <> ANY cmis:isMajorVersion", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE 'TRUE' <  ANY cmis:isMajorVersion", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE 'TRUE' <= ANY cmis:isMajorVersion", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE 'TRUE' >  ANY cmis:isMajorVersion", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE 'TRUE' >= ANY cmis:isMajorVersion", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE ANY cmis:isMajorVersion IN     ('TRUE')", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isMajorVersion FROM cmis:document WHERE ANY cmis:isMajorVersion NOT IN ('TRUE')", 0, false, "cmis:objectId", new String(), true);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:53,代码来源:OpenCmisQueryTest.java

示例14: test_IS_LATEST_VERSION

import org.apache.chemistry.opencmis.commons.enums.Cardinality; //导入依赖的package包/类
public void test_IS_LATEST_VERSION() throws Exception
{
    CMISQueryOptions options = new CMISQueryOptions("SELECT * FROM cmis:document", rootNodeRef.getStoreRef());
    options.setDefaultFTSConnective(Connective.OR);
    options.setDefaultFTSFieldConnective(Connective.OR);
    CMISResultSet rs = cmisQueryService.query(options);
    assertEquals(doc_count, rs.length());
    for (CMISResultSetRow row : rs)
    {
        Serializable sValue = row.getValue("cmis:isLatestVersion");
        Boolean value = DefaultTypeConverter.INSTANCE.convert(Boolean.class, sValue);
        assertNotNull(value);
        assertEquals(Boolean.TRUE, value);
        CMISResultSetColumn column = rs.getResultSetMetaData().getColumn("cmis:isLatestVersion");
        assertNotNull(column);
        assertEquals(PropertyType.BOOLEAN, column.getCMISDataType());
        assertEquals(Cardinality.SINGLE, column.getCMISPropertyDefinition().getPropertyDefinition().getCardinality());
        assertTrue(column.getCMISPropertyDefinition().getPropertyAccessor() instanceof IsLatestVersionProperty);
    }
    rs.close();
    
    testQuery("SELECT cmis:isLatestVersion FROM cmis:document", doc_count, false, "cmis:objectId", new String(), false);

    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE cmis:isLatestVersion =  'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE cmis:isLatestVersion <> 'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE cmis:isLatestVersion <  'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE cmis:isLatestVersion <= 'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE cmis:isLatestVersion >  'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE cmis:isLatestVersion >= 'TRUE'", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE cmis:isLatestVersion IN     ('TRUE')", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE cmis:isLatestVersion NOT IN ('TRUE')", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE cmis:isLatestVersion     LIKE 'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE cmis:isLatestVersion NOT LIKE 'TRUE'", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE cmis:isLatestVersion IS NOT NULL", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE cmis:isLatestVersion IS     NULL", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE 'TRUE' =  ANY cmis:isLatestVersion", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE 'TRUE' <> ANY cmis:isLatestVersion", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE 'TRUE' <  ANY cmis:isLatestVersion", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE 'TRUE' <= ANY cmis:isLatestVersion", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE 'TRUE' >  ANY cmis:isLatestVersion", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE 'TRUE' >= ANY cmis:isLatestVersion", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE ANY cmis:isLatestVersion IN     ('TRUE')", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isLatestVersion FROM cmis:document WHERE ANY cmis:isLatestVersion NOT IN ('TRUE')", 0, false, "cmis:objectId", new String(), true);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:50,代码来源:OpenCmisQueryTest.java

示例15: test_IS_IMMUTABLE

import org.apache.chemistry.opencmis.commons.enums.Cardinality; //导入依赖的package包/类
public void test_IS_IMMUTABLE() throws Exception
{
    CMISQueryOptions options = new CMISQueryOptions("SELECT * FROM cmis:document", rootNodeRef.getStoreRef());
    options.setDefaultFTSConnective(Connective.OR);
    options.setDefaultFTSFieldConnective(Connective.OR);
    CMISResultSet rs = cmisQueryService.query(options);
    assertEquals(doc_count, rs.length());
    for (CMISResultSetRow row : rs)
    {
        Serializable sValue = row.getValue("cmis:isImmutable");
        Boolean value = DefaultTypeConverter.INSTANCE.convert(Boolean.class, sValue);
        assertNotNull(value);
        assertEquals(Boolean.FALSE, value);
        CMISResultSetColumn column = rs.getResultSetMetaData().getColumn("cmis:isImmutable");
        assertNotNull(column);
        assertEquals(PropertyType.BOOLEAN, column.getCMISDataType());
        assertEquals(Cardinality.SINGLE, column.getCMISPropertyDefinition().getPropertyDefinition().getCardinality());
        assertTrue(column.getCMISPropertyDefinition().getPropertyAccessor() instanceof IsImmutableProperty);
    }
    rs.close();

    testQuery("SELECT cmis:isImmutable FROM cmis:document", doc_count, false, "cmis:objectId", new String(), false);
    
    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE cmis:isImmutable =  'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE cmis:isImmutable <> 'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE cmis:isImmutable <  'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE cmis:isImmutable <= 'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE cmis:isImmutable >  'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE cmis:isImmutable >= 'TRUE'", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE cmis:isImmutable IN     ('TRUE')", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE cmis:isImmutable NOT IN ('TRUE')", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE cmis:isImmutable     LIKE 'TRUE'", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE cmis:isImmutable NOT LIKE 'TRUE'", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE cmis:isImmutable IS NOT NULL", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE cmis:isImmutable IS     NULL", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE 'TRUE' =  ANY cmis:isImmutable", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE 'TRUE' <> ANY cmis:isImmutable", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE 'TRUE' <  ANY cmis:isImmutable", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE 'TRUE' <= ANY cmis:isImmutable", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE 'TRUE' >  ANY cmis:isImmutable", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE 'TRUE' >= ANY cmis:isImmutable", 0, false, "cmis:objectId", new String(), true);

    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE ANY cmis:isImmutable IN     ('TRUE')", 0, false, "cmis:objectId", new String(), true);
    testQuery("SELECT cmis:isImmutable FROM cmis:document WHERE ANY cmis:isImmutable NOT IN ('TRUE')", 0, false, "cmis:objectId", new String(), true);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:50,代码来源:OpenCmisQueryTest.java


注:本文中的org.apache.chemistry.opencmis.commons.enums.Cardinality类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。