* @param rt the rt\r
*/\r
void fillRelation(RelationsCommon relation, String documentId1, String documentType1,\r
- String documentId2, String documentType2, RelationshipType rt)\r
+ String documentId2, String documentType2, String rt)\r
{\r
relation.setDocumentId1(documentId1);\r
relation.setDocumentType1(documentType1);\r
RelationsCommon relation = new RelationsCommon();
fillRelation(relation, collectionObjectCsid, CollectionobjectsCommon.class.getSimpleName(),
intakeCsid, IntakesCommon.class.getSimpleName(),
- RelationshipType.COLLECTIONOBJECT_INTAKE);
+ RelationshipType.COLLECTIONOBJECT_INTAKE.toString());
// Create the part and fill it with the relation object
multipart = new MultipartOutput();
commonPart = multipart.addPart(relation, MediaType.APPLICATION_XML_TYPE);
//
// Now try to retrieve the Intake record of the CollectionObject.
//
- String predicate = RelationshipType.COLLECTIONOBJECT_INTAKE.value();
+ String predicate = RelationshipType.COLLECTIONOBJECT_INTAKE.toString();
ClientResponse<RelationsCommonList> resultResponse = relationClient.readList(
collectionObjectCsid,
CollectionobjectsCommon.class.getSimpleName(),
}
Assert.assertEquals(resultRelation.getDocumentId1(), collectionObjectCsid);
- Assert.assertEquals(resultRelation.getRelationshipType(), RelationshipType.COLLECTIONOBJECT_INTAKE);
+ Assert.assertEquals(resultRelation.getRelationshipType(), RelationshipType.COLLECTIONOBJECT_INTAKE.toString());
Assert.assertEquals(resultRelation.getDocumentId2(), intakeCsid);
System.out.println();
i++;
relation.setDocumentId2(documentId2);\r
relation.setDocumentType2(documentType2);\r
\r
- relation.setRelationshipType(rt);\r
+ relation.setRelationshipType(rt.toString());\r
}\r
\r
/**\r
<xs:element name="documentId2" type="xs:string" minOccurs="1"/>\r
<xs:element name="documentType2" type="xs:string" minOccurs="1"/>\r
<!-- type of relationship between two entities -->\r
- <xs:element name="relationshipType" type="rel:RelationshipType" minOccurs="1"/>\r
+ <xs:element name="relationshipType" type="xs:string" minOccurs="1"/>\r
<xs:element name="predicateDisplayName" type="xs:string" minOccurs="1"/>\r
</xs:sequence>\r
</xs:complexType>\r
</xs:element>\r
\r
<!-- enumeration defining the type of relationship between two entities -->\r
+ <!-- REM: Deprecating this type as it is too restrictive for the "relations_common:relationshipType" field and will be replaced with "xs:string" -->\r
<xs:simpleType name="RelationshipType">\r
<xs:restriction base="xs:string">\r
<!-- Added for compatibility with current default value -->\r
"SubjectType-" + identifier + "-type",
"Object-" + identifier,
"ObjectType-" + identifier + "-type",
- RelationshipType.COLLECTIONOBJECT_INTAKE,
+ RelationshipType.COLLECTIONOBJECT_INTAKE.toString(),
RelationshipType.COLLECTIONOBJECT_INTAKE + ".displayName");
}
private void fillRelation(RelationsCommon relation,
String documentId1, String documentType1,
String documentId2, String documentType2,
- RelationshipType rt,
+ String rt,
String rtDisplayName) {
relation.setDocumentId1(documentId1);
relation.setDocumentType1(documentType1);
try {\r
RelationsCommon relationsCommon = (RelationsCommon)getCommonPart();\r
assert(relationsCommon != null);\r
+ if (logger.isTraceEnabled() == true) {\r
+ logger.trace(relationsCommon.toString());\r
+ }\r
\r
assert(relationsCommon.getDocumentId1() != null);\r
assert(relationsCommon.getDocumentId1().length() != 0);\r