@Test
public void relateCollectionObjectToIntake() {
- if (true) return; //false positive -see 'FIXME' below
- //
- // FIXME: REM - This test is failing because the relationClient.readList (aka search) is returning more than 1 matching
- // relation. There should only be one.
- //
-
-
//
// First create a CollectionObject
//
}
}
-// @Test
+ @Test
public void relateCollectionObjectsToIntake() {
relateCollectionObjectsToIntake(OBJECTS_TO_INTAKE);
}
//======================= GET without csid. List, search, etc. =====================================\r
\r
@GET\r
- public AbstractCommonList getList(@Context UriInfo ui,\r
- @QueryParam(IQueryManager.SEARCH_TYPE_KEYWORDS_KW) String keywords) {\r
+ public AbstractCommonList getList(@Context UriInfo ui) {\r
MultivaluedMap<String, String> queryParams = ui.getQueryParameters();\r
+ String keywords = queryParams.getFirst(IQueryManager.SEARCH_TYPE_KEYWORDS_KW);\r
if (keywords != null) {\r
return search(queryParams, keywords);\r
} else {\r
return RelationsCommon.class;
}
+ @Override
@GET
@Produces("application/xml")
- public RelationsCommonList getRelationList(@Context UriInfo ui,
- @QueryParam(IRelationsManager.SUBJECT_QP) String subjectCsid,
- @QueryParam(IRelationsManager.SUBJECT_TYPE_QP) String subjectType,
- @QueryParam(IRelationsManager.PREDICATE_QP) String predicate,
- @QueryParam(IRelationsManager.OBJECT_QP) String objectCsid,
- @QueryParam(IRelationsManager.OBJECT_TYPE_QP) String objectType) {
+ public RelationsCommonList getList(@Context UriInfo ui) {
MultivaluedMap<String, String> queryParams = ui.getQueryParameters();
+
+ String subjectCsid = queryParams.getFirst(IRelationsManager.SUBJECT_QP);
+ String subjectType = queryParams.getFirst(IRelationsManager.SUBJECT_TYPE_QP);
+ String predicate = queryParams.getFirst(IRelationsManager.PREDICATE_QP);
+ String objectCsid = queryParams.getFirst(IRelationsManager.OBJECT_QP);
+ String objectType = queryParams.getFirst(IRelationsManager.OBJECT_TYPE_QP);
+
return this.getRelationList(queryParams, subjectCsid, subjectType, predicate, objectCsid, objectType);
}