throws ResourceException
{
setDimensions(ServerUtil.VARY_ACCEPT);
if (variant.getMediaType().equals(MediaType.TEXT_PLAIN, true)) {
ServerConnection connection = getConnection();
ValueFactory vf = connection.getValueFactory();
StatementPatternParams spParams = new StatementPatternParams(getRequest(), vf);
Resource subj = spParams.getSubject();
URI pred = spParams.getPredicate();
Value obj = spParams.getObject();
Resource[] contexts = spParams.getContext();
boolean includeInferred = spParams.isIncludeInferred();
try {
long size = connection.sizeMatch(subj, pred, obj, includeInferred, contexts);
return new StringRepresentation(String.valueOf(size));
}
catch (StoreException e) {
throw new ResourceException(e);
}