// injecting Resource to get the final state of its Model. Is there a better way to do this?
if (!getUriInfo().getMatchedResources().isEmpty())
{
Resource resource = (Resource)getUriInfo().getMatchedResources().get(0);
if (log.isDebugEnabled()) log.debug("Matched Resource: {}", resource);
MatchedIndividual match = (MatchedIndividual)resource;
bld.parameter("{" + GP.matchedOntClass.getNameSpace() + "}" + GP.matchedOntClass.getLocalName(), URI.create(match.getMatchedOntClass().getURI())).
parameter("{" + GP.ontModel.getNameSpace() + "}" + GP.ontModel.getLocalName(), getSource(match.getOntModel(), true)); // $ont-model from the current Resource (with imports)
}
Object contentType = headerMap.getFirst(HttpHeaders.CONTENT_TYPE);
if (contentType != null)
{