Skip to content
This repository was archived by the owner on May 24, 2020. It is now read-only.

Commit ea1ddd5

Browse files
adds tests
removes non-trellis related methods
1 parent d189164 commit ea1ddd5

File tree

94 files changed

+310
-46042
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+310
-46042
lines changed

build.gradle

+17-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ ext {
3434
logbackVersion = '1.2.3'
3535
jaxrsVersion = '2.1'
3636
kafkaVersion = '1.0.0_1'
37-
mustacheVersion = '0.9.5_1'
37+
mustacheVersion = '0.9.5'
3838
slf4jVersion = '1.7.25'
39-
servicemixXercesVersion = '2.11.0_1'
4039
thriftVersion = '0.11.0'
4140
trellisVersion = '0.7.0-SNAPSHOT'
4241

@@ -93,6 +92,22 @@ allprojects { subproj ->
9392
configurations {
9493
all {
9594
resolutionStrategy {
95+
force("org.trellisldp:trellis-agent-jpms:$trellisVersion")
96+
force("org.trellisldp:trellis-api-jpms:$trellisVersion")
97+
force("org.trellisldp:trellis-app-jpms:$trellisVersion")
98+
force("org.trellisldp:trellis-app-triplestore-jpms:$trellisVersion")
99+
force("org.trellisldp:trellis-audit-jpms:$trellisVersion")
100+
force("org.trellisldp:trellis-constraint-rules-jpms:$trellisVersion")
101+
force("org.trellisldp:trellis-event-serialization-jpms:$trellisVersion")
102+
force("org.trellisldp:trellis-file-jpms:$trellisVersion")
103+
force("org.trellisldp:trellis-id-jpms:$trellisVersion")
104+
force("org.trellisldp:trellis-io-jena-jpms:$trellisVersion")
105+
force("org.trellisldp:trellis-http-jpms:$trellisVersion")
106+
force("org.trellisldp:trellis-namespaces-jpms:$trellisVersion")
107+
force("org.trellisldp:trellis-rdfa-jpms:$trellisVersion")
108+
force("org.trellisldp:trellis-triplestore-jpms:$trellisVersion")
109+
force("org.trellisldp:trellis-vocabulary-jpms:$trellisVersion")
110+
force("org.trellisldp:trellis-webac-jpms:$trellisVersion")
96111
force "de.ubleipzig:jena.arq-jpms:$jenaVersion"
97112
force "de.ubleipzig:jena.base-jpms:$jenaVersion"
98113
force "de.ubleipzig:jena.core-jpms:$jenaVersion"

client/build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ dependencies {
5454
testImplementation("org.apache.commons:commons-collections4:$commonsCollectionsVersion")
5555
testImplementation("org.apache.httpcomponents:httpclient-cache:$httpclientVersion")
5656
testImplementation("org.apache.servicemix.bundles:org.apache.servicemix.bundles.kafka-clients:$kafkaVersion")
57-
testImplementation("org.apache.servicemix.bundles:org.apache.servicemix.bundles.mustache-compiler:$mustacheVersion")
57+
testImplementation("com.github.spullara.mustache.java:compiler:$mustacheVersion")
5858
testImplementation("org.apache.thrift:libthrift:$thriftVersion")
5959
testImplementation("org.eclipse.jetty:jetty-alpn-java-server:$jettyAlpnVersion")
6060
testImplementation("org.trellisldp:trellis-agent-jpms:$trellisVersion")
@@ -69,6 +69,7 @@ dependencies {
6969
testImplementation("org.trellisldp:trellis-io-jena-jpms:$trellisVersion")
7070
testImplementation("org.trellisldp:trellis-http-jpms:$trellisVersion")
7171
testImplementation("org.trellisldp:trellis-namespaces-jpms:$trellisVersion")
72+
testImplementation("org.trellisldp:trellis-rdfa-jpms:$trellisVersion")
7273
testImplementation("org.trellisldp:trellis-triplestore-jpms:$trellisVersion")
7374
testImplementation("org.trellisldp:trellis-vocabulary-jpms:$trellisVersion")
7475
testImplementation("org.trellisldp:trellis-webac-jpms:$trellisVersion")

client/src/main/java/org/trellisldp/client/LdpClient.java

+30-12
Original file line numberDiff line numberDiff line change
@@ -285,13 +285,22 @@ String getJsonProfileLDF(IRI identifier, String profile, String subject, String
285285
/**
286286
* getResponse.
287287
*
288+
* @param identifier identifier
289+
* @return HttpResponse response
290+
* @throws LdpClientException an URISyntaxException, IOException or InterruptedException
291+
*/
292+
HttpResponse getResponse(final IRI identifier) throws LdpClientException;
293+
294+
/**
295+
* getResponseWithHeaders.
296+
*
288297
* @param identifier a resource identifier
289298
* @param metadata a {@link Map} of headers
290299
* @return body and headers as a {@link Map}
291300
* @throws LdpClientException an URISyntaxException, IOException or InterruptedException
292301
*/
293-
Map<String, Map<String, List<String>>> getResponse(final IRI identifier, final Map<String, String> metadata)
294-
throws LdpClientException;
302+
Map<String, Map<String, List<String>>> getResponseWithHeaders(final IRI identifier, final Map<String, String>
303+
metadata) throws LdpClientException;
295304

296305
/**
297306
* options.
@@ -360,27 +369,36 @@ void postSlug(final IRI identifier, final String slug, final InputStream stream,
360369
void postBinaryWithDigest(final IRI identifier, final InputStream stream, final String contentType, String
361370
digest) throws LdpClientException;
362371

372+
373+
/**
374+
* createBasicContainer.
375+
*
376+
* @param identifier a resource identifier
377+
* @throws LdpClientException an URISyntaxException, IOException or InterruptedException
378+
*/
379+
void createBasicContainer(final IRI identifier) throws LdpClientException;
380+
363381
/**
364-
* newLdpDc.
382+
* createDirectContainer.
365383
*
366384
* @param identifier a resource identifier
367385
* @param slug a resource name as a {@link String}
368386
* @param membershipObj a membership Object identifier
369387
* @throws LdpClientException an URISyntaxException, IOException or InterruptedException
370388
*/
371-
void newLdpDc(final IRI identifier, final String slug, IRI membershipObj) throws LdpClientException;
389+
void createDirectContainer(final IRI identifier, final String slug, IRI membershipObj) throws LdpClientException;
372390

373391
/**
374-
* newLdpDcWithAuth.
392+
* createDirectContainerWithAuth.
375393
*
376394
* @param identifier a resource identifier
377395
* @param slug a resource name as a {@link String}
378396
* @param membershipObj a membership Object identifier
379397
* @param authorization an authorization token
380398
* @throws LdpClientException an URISyntaxException, IOException or InterruptedException
381399
*/
382-
void newLdpDcWithAuth(final IRI identifier, final String slug, IRI membershipObj, String authorization) throws
383-
LdpClientException;
400+
void createDirectContainerWithAuth(final IRI identifier, final String slug, IRI membershipObj, String
401+
authorization) throws LdpClientException;
384402

385403
/**
386404
* put.
@@ -486,9 +504,10 @@ void putIfUnmodified(final IRI identifier, final InputStream stream, final Strin
486504
*
487505
* @param identifier a resource identifier
488506
* @param stream an {@link InputStream}
507+
* @return Boolean boolean
489508
* @throws LdpClientException an URISyntaxException
490509
*/
491-
void asyncPut(final IRI identifier, final InputStream stream) throws LdpClientException;
510+
Boolean asyncPut(final IRI identifier, final InputStream stream) throws LdpClientException;
492511

493512
/**
494513
* multiSubscriberAsyncGet.
@@ -497,16 +516,15 @@ void putIfUnmodified(final IRI identifier, final InputStream stream, final Strin
497516
* @return an {@link Map}
498517
* @throws LdpClientException an URISyntaxException
499518
*/
500-
Map<HttpRequest, CompletableFuture<HttpResponse<String>>> multiSubscriberAsyncGet(
501-
final IRI identifier) throws LdpClientException;
519+
Map<HttpRequest, CompletableFuture<HttpResponse<String>>> multiSubscriberAsyncGet(final IRI identifier) throws
520+
LdpClientException;
502521

503522
/**
504523
* joiningCompleteableFuturePut.
505524
*
506525
* @param bodies a Map of URI keys with InputStream values
507526
* @param contentType a content Type
508527
*/
509-
void joiningCompletableFuturePut(Map<URI, InputStream> bodies, final String
510-
contentType);
528+
void joiningCompletableFuturePut(Map<URI, InputStream> bodies, final String contentType);
511529

512530
}

0 commit comments

Comments
 (0)