protected String getURIFragment(Resource containingResource, EObject object)
{
if (roots != null && containingResource == resource && !EcoreUtil.isAncestor(roots, object))
{
URI uriResult = handleDanglingHREF(object);
return uriResult == null || !uriResult.hasFragment() ? null : uriResult.fragment();
}
else
{
String result = containingResource.getURIFragment(object);
if (result.length() > 0 && result.charAt(0) != '/')