use of org.collectionspace.chain.csp.schema.Instance in project application by collectionspace.
the class ServiceBindingsGeneration method doAuthorityInstanceList.
private void doAuthorityInstanceList(Record r, Element el, Namespace nsservices2) {
Instance[] allInstances = r.getAllInstances();
if (r.getID().equalsIgnoreCase(RECORD_ID_TERMLIST) == true) {
//
// Records "termlist" and "vocab" have special relationship, so we need to do things a little differently.
//
Record vocabRecord = this.spec.getRecord(RECORD_ID_VOCAB);
allInstances = vocabRecord.getAllInstances();
}
if (allInstances.length > 0) {
Element authorityInstanceList = el.addElement(new QName("AuthorityInstanceList", nsservices2));
for (Instance instance : allInstances) {
Element authorityInstance = authorityInstanceList.addElement(new QName("AuthorityInstance", nsservices2));
doAuthorityInstance(instance, r, authorityInstance, nsservices2);
}
}
}
Aggregations