*
* @return the intakes common list
*/
- /*
@GET
@Path("{csid}/intakes")
@Produces("application/xml")
String objectCsid = null;
NewRelationResource relationResource = new NewRelationResource();
RelationsCommonList relationsCommonList = relationResource.getRelationList(queryParams,
- subjectCsid, predicate, objectCsid);
+ subjectCsid,
+ null, /*subjectType*/
+ predicate,
+ objectCsid,
+ null /*objectType*/);
//
// Create an array of Intake csid's
return result;
}
- *
- */
/**
* Gets the authority refs.
\r
/** The Constant RELATIONSHIP_TYPE. */\r
final static String RELATIONSHIP_TYPE = "relationshipType";\r
- \r
+ \r
+ /** The Constant RELATIONSHIP_TYPE_DISPLAYNAME. */\r
+ final static String RELATIONSHIP_TYPE_DISPLAYNAME = "predicateDisplayName";\r
}\r
\r
\r
final static String RELATIONSHIP_TYPE = "relationshipType";\r
final static String OBJECT_CSID = "objectCsid";\r
\r
+ /** The Constant RELATIONSHIP_TYPE_DISPLAYNAME. */\r
+ final static String RELATIONSHIP_TYPE_DISPLAYNAME = "predicateDisplayName";\r
+\r
/** The Constant URI. */\r
final static String URI = "url";\r
}\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="predicateDisplayName" type="xs:string" minOccurs="1"/>\r
</xs:sequence>\r
</xs:complexType>\r
</xs:element>\r
<xs:element name="csid" type="xs:string" minOccurs="1"/>\r
<xs:element name="subjectCsid" type="xs:string" minOccurs="1"/>\r
<xs:element name="relationshipType" type="xs:string" minOccurs="1"/>\r
+ <xs:element name="predicateDisplayName" type="xs:string" minOccurs="1"/>\r
<xs:element name="objectCsid" type="xs:string" minOccurs="1"/>\r
</xs:sequence>\r
</xs:complexType>\r
\r
<!-- type of relatinoship between two entities -->\r
<xs:element name="relationshipType" type="rel:RelationshipType" minOccurs="1" maxOccurs="1"/>\r
-\r
-\r
+ <xs:element name="predicateDisplayName" type="xs:string" minOccurs="1"/>\r
\r
<!-- enumeration defining the type of relationship between two entities -->\r
<xs:simpleType name="RelationshipType">\r
relation.setDocumentType1("updated-" + relation.getDocumentType1());
relation.setDocumentId2("updated-" + relation.getDocumentId2());
relation.setDocumentType2("updated-" + relation.getDocumentType2());
+ relation.setPredicateDisplayName("updated-" + relation.getPredicateDisplayName());
if(logger.isDebugEnabled()){
logger.debug("updated object");
logger.debug(objectAsXmlString(relation, RelationsCommon.class));
updatedObject.getDocumentId2(), relation.getDocumentId2(), msg);
Assert.assertEquals(
updatedObject.getDocumentType2(), relation.getDocumentType2(), msg);
+ Assert.assertEquals(
+ updatedObject.getPredicateDisplayName(), relation.getPredicateDisplayName(), msg);
}
"SubjectType-" + identifier + "-type",
"Object-" + identifier,
"ObjectType-" + identifier + "-type",
- RelationshipType.COLLECTIONOBJECT_INTAKE);
+ RelationshipType.COLLECTIONOBJECT_INTAKE,
+ RelationshipType.COLLECTIONOBJECT_INTAKE + ".displayName");
}
/**
private void fillRelation(RelationsCommon relation,
String documentId1, String documentType1,
String documentId2, String documentType2,
- RelationshipType rt) {
+ RelationshipType rt,
+ String rtDisplayName) {
relation.setDocumentId1(documentId1);
relation.setDocumentType1(documentType1);
relation.setDocumentId2(documentId2);
relation.setDocumentType2(documentType2);
relation.setRelationshipType(rt);
+ relation.setPredicateDisplayName(rtDisplayName);
}
}
*
* @param queryParams the query params
* @param subjectCsid the subject csid
+ * @param subjectType
* @param predicate the predicate
* @param objectCsid the object csid
+ * @param objectType
* @return the relation list
* @throws WebApplicationException the web application exception
*/
//
relationListItem.setRelationshipType((String) docModel.getProperty(ctx.getCommonPartLabel(),
RelationJAXBSchema.RELATIONSHIP_TYPE));
+ relationListItem.setPredicateDisplayName((String) docModel.getProperty(ctx.getCommonPartLabel(),
+ RelationJAXBSchema.RELATIONSHIP_TYPE_DISPLAYNAME));
//
// Object
//