@Override public List<URI> getChildren(URI resource) { try (final FcrepoResponse response = client.get(resource) .accept("application/n-triples") .preferRepresentation(asList(PREFER_CONTAINMENT), emptyList()).perform()) { try (BufferedReader reader = new BufferedReader(new InputStreamReader(response.getBody(), UTF_8))) { final List<URI> children = new ArrayList<>(); for (String line = reader.readLine(); line != null; line = reader.readLine()) { final Matcher aclFinder = childPattern.matcher(line); if (aclFinder.matches()) { children.add(URI.create(aclFinder.group(1))); } } return children; } } catch (final Exception e) { throw new RuntimeException("Error getting children of " + resource, e); } } }
@Override public List<URI> getChildren(URI resource) { try (final FcrepoResponse response = client.get(resource) .accept("application/n-triples") .preferRepresentation(asList(PREFER_CONTAINMENT), emptyList()).perform()) { try (BufferedReader reader = new BufferedReader(new InputStreamReader(response.getBody(), UTF_8))) { final List<URI> children = new ArrayList<>(); for (String line = reader.readLine(); line != null; line = reader.readLine()) { final Matcher aclFinder = childPattern.matcher(line); if (aclFinder.matches()) { children.add(URI.create(aclFinder.group(1))); } } return children; } } catch (final Exception e) { throw new RuntimeException("Error getting children of " + resource, e); } } }
.preferRepresentation(include, omits) .perform()) {
.preferRepresentation(include, omits) .perform()) {
.preferRepresentation(null, omits) .perform()) {
.preferRepresentation(null, omits) .perform()) {
response = get.preferMinimal().perform(); } else if (prefer.isRepresentation()) { response = get.preferRepresentation(prefer.getInclude(), prefer.getOmit()).perform(); } else { response = get.perform(); response = get.perform(); } else { response = get.preferRepresentation(include, omit).perform();