Resource source = model.getResource(sourceURLString);
String targetTypeString = body.getParameter("targetType");
String targetURLString = body.getParameter("target");
boolean inline = "on".equals(body.getParameter("inline"));
if (targetURLString.equals("http://") || targetURLString.equals("")) {
throw new HandlerException("Must specify a target");
}
Resource target;
try {
target = getTarget(targetTypeString, targetURLString, new URL(
source.getURI()));
} catch (MalformedURLException e) {
throw new HandlerException(e);
}
removeExisting(source, target);
Resource newRelation = model.createResource(KNOBOT.Relation);