@Test void testBuildTrellisIdentifier() { final IRI identifier = rdf.createIRI(TRELLIS_DATA_PREFIX + "resource"); assertEquals(identifier, TrellisUtils.buildTrellisIdentifier("/resource")); assertEquals(identifier, TrellisUtils.buildTrellisIdentifier("/resource/")); assertEquals(identifier, TrellisUtils.buildTrellisIdentifier("resource")); assertEquals(identifier, TrellisUtils.buildTrellisIdentifier("resource/")); }
public static IRI buildTrellisIdentifier(final String path) { final String normalized = path.endsWith(SLASH) ? path.substring(0, path.length() - 1) : path; if (normalized.startsWith(SLASH)) { return rdf.createIRI(TRELLIS_DATA_PREFIX + normalizePath(normalized.substring(1))); } return rdf.createIRI(TRELLIS_DATA_PREFIX + normalizePath(normalized)); }
TrellisUtils { public static IRI buildTrellisIdentifier(final String path) { final String normalized = path.endsWith(SLASH) ? path.substring(0, path.length() - 1) : path; if (normalized.startsWith(SLASH)) { return rdf.createIRI(TRELLIS_DATA_PREFIX + normalizePath(normalized.substring(1))); } return rdf.createIRI(TRELLIS_DATA_PREFIX + normalizePath(normalized)); } }
TrellisUtils { public static IRI buildTrellisIdentifier(final String path) { final String normalized = path.endsWith(SLASH) ? path.substring(0, path.length() - 1) : path; if (normalized.startsWith(SLASH)) { return rdf.createIRI(TRELLIS_DATA_PREFIX + normalizePath(normalized.substring(1))); } return rdf.createIRI(TRELLIS_DATA_PREFIX + normalizePath(normalized)); } private  TrellisUtils(); }
TrellisUtils { public static IRI buildTrellisIdentifier(final String path) { final String normalized = path.endsWith(SLASH) ? path.substring(0, path.length() - 1) : path; if (normalized.startsWith(SLASH)) { return rdf.createIRI(TRELLIS_DATA_PREFIX + normalizePath(normalized.substring(1))); } return rdf.createIRI(TRELLIS_DATA_PREFIX + normalizePath(normalized)); } private  TrellisUtils(); static Optional<IRI> getContainer(final IRI identifier); static IRI normalizeIdentifier(final IRI identifier); static IRI buildTrellisIdentifier(final String path); static String normalizePath(final String path); static Collector<Triple, ?, Graph> toGraph(); static DatasetCollector toDataset(); }
TrellisUtils { public static IRI buildTrellisIdentifier(final String path) { final String normalized = path.endsWith(SLASH) ? path.substring(0, path.length() - 1) : path; if (normalized.startsWith(SLASH)) { return rdf.createIRI(TRELLIS_DATA_PREFIX + normalizePath(normalized.substring(1))); } return rdf.createIRI(TRELLIS_DATA_PREFIX + normalizePath(normalized)); } private  TrellisUtils(); static Optional<IRI> getContainer(final IRI identifier); static IRI normalizeIdentifier(final IRI identifier); static IRI buildTrellisIdentifier(final String path); static String normalizePath(final String path); static Collector<Triple, ?, Graph> toGraph(); static DatasetCollector toDataset(); static final String TRELLIS_SCHEME; static final String TRELLIS_DATA_PREFIX; static final String TRELLIS_BNODE_PREFIX; static final String TRELLIS_SESSION_PREFIX; static final String TRELLIS_ADMIN_ROLE; }