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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
请发表评论