public Association toAssociation(AssociationType1 assocType) throws XDSException { Association assoc = new Association(); toPersistenceObj(assocType, assoc); log.debug("######assocType.getAssociationType():{}",assocType.getAssociationType()); assoc.setAssocType((ClassificationNode) getRegistryObject(assocType.getAssociationType())); assoc.setSourceObject(getCheckedRegistryObject(assocType.getSourceObject(), "Associaton! targetObject not found!", assocType)); assoc.setTargetObject(getCheckedRegistryObject(assocType.getTargetObject(), "Associaton! sourceObject not found!", assocType)); XDSValidator.checkSamePatient(assoc); return assoc; }