@Test void testProfile() { final List<MediaType> types = asList(APPLICATION_JSON_TYPE, TEXT_XML_TYPE, new MediaType("application", "ld+json", singletonMap("profile", compacted.getIRIString()))); assertEquals(compacted, HttpUtils.getProfile(types, JSONLD), "Incorrect json-ld profile!"); }
public static IRI getProfile(final List<MediaType> acceptableTypes, final RDFSyntax syntax) { for (final MediaType type : acceptableTypes) { if (RDFSyntax.byMediaType(type.toString()).filter(isEqual(syntax)).isPresent() && type.getParameters().containsKey("profile")) { return rdf.createIRI(strip(type.getParameters().get("profile"), "\"").split(" ")[0].trim()); } } return null; }
HttpUtils { public static IRI getProfile(final List<MediaType> acceptableTypes, final RDFSyntax syntax) { for (final MediaType type : acceptableTypes) { if (RDFSyntax.byMediaType(type.toString()).filter(isEqual(syntax)).isPresent() && type.getParameters().containsKey("profile")) { return rdf.createIRI(strip(type.getParameters().get("profile"), "\"").split(" ")[0].trim()); } } return null; } }
HttpUtils { public static IRI getProfile(final List<MediaType> acceptableTypes, final RDFSyntax syntax) { for (final MediaType type : acceptableTypes) { if (RDFSyntax.byMediaType(type.toString()).filter(isEqual(syntax)).isPresent() && type.getParameters().containsKey("profile")) { return rdf.createIRI(strip(type.getParameters().get("profile"), "\"").split(" ")[0].trim()); } } return null; } private  HttpUtils(); }
HttpUtils { public static IRI getProfile(final List<MediaType> acceptableTypes, final RDFSyntax syntax) { for (final MediaType type : acceptableTypes) { if (RDFSyntax.byMediaType(type.toString()).filter(isEqual(syntax)).isPresent() && type.getParameters().containsKey("profile")) { return rdf.createIRI(strip(type.getParameters().get("profile"), "\"").split(" ")[0].trim()); } } return null; } private  HttpUtils(); static Stream<IRI> ldpResourceTypes(final IRI ixnModel); static boolean matchIdentifier(final BlankNodeOrIRI subject, final IRI identifier); static Set<IRI> triplePreferences(final Prefer prefer); static Function<Triple, Triple> unskolemizeTriples(final ResourceService svc, final String baseUrl); static Function<Triple, Triple> skolemizeTriples(final ResourceService svc, final String baseUrl); static Function<Quad, Quad> skolemizeQuads(final ResourceService svc, final String baseUrl); static RDFSyntax getSyntax(final IOService ioService, final List<MediaType> acceptableTypes,
            final String mimeType); static IRI getProfile(final List<MediaType> acceptableTypes, final RDFSyntax syntax); static IRI getDefaultProfile(final RDFSyntax syntax, final String identifier,
            final String defaultJsonLdProfile); static IRI getDefaultProfile(final RDFSyntax syntax, final IRI identifier,
            final String defaultJsonLdProfile); static boolean isContainer(final IRI ldpType); static void checkIfModifiedSince(final String method, final String ifModifiedSince,
            final Instant modified); static void checkIfUnmodifiedSince(final String ifUnmodifiedSince, final Instant modified); static void checkIfMatch(final String ifMatch, final EntityTag etag); static void checkIfNoneMatch(final String method, final String ifNoneMatch, final EntityTag etag); static void checkRequiredPreconditions(final boolean required, final String ifMatch,
            final String ifUnmodifiedSince); static boolean exists(final Resource resource); static void closeDataset(final Dataset dataset); static String buildResourceUrl(final TrellisRequest req, final String baseUrl); }
HttpUtils { public static IRI getProfile(final List<MediaType> acceptableTypes, final RDFSyntax syntax) { for (final MediaType type : acceptableTypes) { if (RDFSyntax.byMediaType(type.toString()).filter(isEqual(syntax)).isPresent() && type.getParameters().containsKey("profile")) { return rdf.createIRI(strip(type.getParameters().get("profile"), "\"").split(" ")[0].trim()); } } return null; } private  HttpUtils(); static Stream<IRI> ldpResourceTypes(final IRI ixnModel); static boolean matchIdentifier(final BlankNodeOrIRI subject, final IRI identifier); static Set<IRI> triplePreferences(final Prefer prefer); static Function<Triple, Triple> unskolemizeTriples(final ResourceService svc, final String baseUrl); static Function<Triple, Triple> skolemizeTriples(final ResourceService svc, final String baseUrl); static Function<Quad, Quad> skolemizeQuads(final ResourceService svc, final String baseUrl); static RDFSyntax getSyntax(final IOService ioService, final List<MediaType> acceptableTypes,
            final String mimeType); static IRI getProfile(final List<MediaType> acceptableTypes, final RDFSyntax syntax); static IRI getDefaultProfile(final RDFSyntax syntax, final String identifier,
            final String defaultJsonLdProfile); static IRI getDefaultProfile(final RDFSyntax syntax, final IRI identifier,
            final String defaultJsonLdProfile); static boolean isContainer(final IRI ldpType); static void checkIfModifiedSince(final String method, final String ifModifiedSince,
            final Instant modified); static void checkIfUnmodifiedSince(final String ifUnmodifiedSince, final Instant modified); static void checkIfMatch(final String ifMatch, final EntityTag etag); static void checkIfNoneMatch(final String method, final String ifNoneMatch, final EntityTag etag); static void checkRequiredPreconditions(final boolean required, final String ifMatch,
            final String ifUnmodifiedSince); static boolean exists(final Resource resource); static void closeDataset(final Dataset dataset); static String buildResourceUrl(final TrellisRequest req, final String baseUrl);  }