EObject object = context.getContext();
String linkText=context.getLinkText();
if(object instanceof ResourceRef){
//unlinked prefix
if(context.getReference()==XturtlePackage.Literals.QNAME_REF__PREFIX){
return new DiagnosticMessage("no @prefix-Definition for "+linkText+" up to this point", Severity.ERROR, XturtleJavaValidator.UNKNOWN_PREFIX,linkText);
}
Severity severity=null;
if(object instanceof UriRef){
severity= levels.getUnresolvedUriRefLevel();
} else if(object instanceof QNameRef){
//if the prefix is unknown the qualified name will be null
//an unresolved prefix is dealt with separately
if(service.getQualifiedName(object)!=null){
severity = levels.getUnresolvedQNameLevel();
}
}
if(severity!=null){
return new DiagnosticMessage("could not find definition for "+service.getUriString(object), severity, Diagnostic.LINKING_DIAGNOSTIC);
}else{
return null;
}
} else if(object instanceof QNameDef){
return new DiagnosticMessage("no @prefix-Definition for "+linkText+" up to this point", Severity.ERROR, XturtleJavaValidator.UNKNOWN_PREFIX,linkText);
}
return super.getUnresolvedProxyMessage(context);
}