return bt;
}
public static PublisherAssertion getPubAssertionFromJAXRAssociation(
Association association) throws JAXRException {
PublisherAssertion pa = objectFactory.createPublisherAssertion();
try {
if (association.getSourceObject().getKey() != null &&
association.getSourceObject().getKey().getId() != null) {
pa.setFromKey(association.getSourceObject().getKey().getId());
}
if (association.getTargetObject().getKey() != null &&
association.getTargetObject().getKey().getId() != null) {
pa.setToKey(association.getTargetObject().getKey().getId());
}
Concept c = association.getAssociationType();
String v = c.getValue();
KeyedReference kr = objectFactory.createKeyedReference();
Key key = c.getKey();
if (key == null) {
// TODO:Need to check this. If the concept is a predefined
// enumeration, the key can be the parent classification scheme
key = c.getClassificationScheme().getKey();
}
if (key != null && key.getId() != null) {
kr.setTModelKey(key.getId());
}
kr.setKeyName("Concept");
if (v != null) {
kr.setKeyValue(v);
}
pa.setKeyedReference(kr);
} catch (Exception ud) {
throw new JAXRException("Apache JAXR Impl:", ud);
}
return pa;
}