@Override
public String generateXLink(String connectorId, String context, Object modelObject) {
StringBuilder sb = new StringBuilder(xLinkBaseUrl);
appendXLinkProperty(sb, '?', XLinkConstants.XLINK_CONTEXTID_KEY, context);
ModelDescription modelDescription = ModelWrapper.wrap(modelObject).getModelDescription();
appendXLinkProperty(sb, '&', XLinkConstants.XLINK_MODELCLASS_KEY, modelDescription.getModelClassName());
appendXLinkProperty(sb, '&', XLinkConstants.XLINK_VERSION_KEY, modelDescription.getVersionString());
ObjectMapper mapper = new ObjectMapper();
String objectString = null;
try {
objectString = mapper.writeValueAsString(modelObject);