Giter Club home page Giter Club logo

fcrepo-java-client's People

Contributors

acoburn avatar ajs6f avatar andyundso avatar bbpennel avatar dbernstein avatar dependabot[bot] avatar emetsger avatar escowles avatar mikedurbin avatar mikejritter avatar mohideen avatar ruebot avatar tomcbe avatar whikloj avatar yinlinchen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fcrepo-java-client's Issues

Add support for api headers

Currently the client doesn't provide a way to add the following allowed headers:

  • Content-Disposition
  • Content-Type
  • digest
  • slug
  • if-match
  • if-none-match
  • if-unmodified-since
  • if-modified-since
  • Range

I would like to add support for all of the headers expected for basic object creation or retrieval.

In terms of implementation, the approach so far has been additional parameters to the post/put/get/patch methods, which may get unwieldy with the full set of options. I would favor a method override of the form:

public FcrepoResponse post(final URI url, final InputStream body, final Map headers)

Possibly with restrictions in each method so that it can only set allowed headers, but that may be iffy since some methods cover multiple endpoints with different headers allowed.

I'm not all that informed about camel, but I believe this would work there too?

Connection management responsiblities of FcrepoClient are unclear

It is unclear whom is responsible for managing HTTP connections that are created by the FcrepoClient on behalf of the user. Presumably the FcrepoClient is, but in my environment I'm running across the following issues:

  1. Connections are only released if the user of FcrepoClient reads the response body. Eventually the FcrepoClient will block waiting for a free connection.
  2. If an FcrepoOperationFailedException is thrown, the user of FcrepoClient has no access to the response body, and cannot free the connection. Eventually the FcrepoClient will block waiting for free connections.

A PR demonstrating the issue follows.

how to add new container with properties using json-ld file

I try to create a new container with properties using json-ld file.
If i add json-ld file i always get 400 issue.
If file is empty, it creates an empty container without properties.

File file = new File("test.json");
try (FcrepoResponse response = new PostBuilder(uri, client).slug("test")
                .body(file, "text/turtle").filename("test")
                .perform();) {
            URI location = response.getLocation();
            System.out.println(response.getStatusCode());

Here small json-ld file

{
  "@context": "https://json-ld.org/contexts/person.jsonld",
  "@id": "http://dbpedia.org/resource/John_Lennon",
  "name": "John Lennon",
  "born": "1940-10-09"
}

If it's not possible to use json-ld, how should the other format look like?

how to build 0.5 version with maven

when I try to build source code into jar with maven and 0.5 verson fcrepo, it show me some errors:
G:\fcrepo-java-client-master\fcrepo-java-client-master>mvn clean install
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.fcrepo.client:fcrepo-java-client:0.5.0-SNAPSHOT: Failure to find org.fcrepo:fcrepo-parent:pom:5.0.0-SNAPSHOT in http://oss.sonatype.org/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of snapshots-repo has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 6, column 11
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.fcrepo.client:fcrepo-java-client:0.5.0-SNAPSHOT (G:\fcrepo-java-client-master\fcrepo-java-client-master\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.fcrepo.client:fcrepo-java-client:0.5.0-SNAPSHOT: Failure to find org.fcrepo:fcrepo-parent:pom:5.0.0-SNAPSHOT in http://oss.sonatype.org/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of snapshots-repo has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 6, column 11 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

Next release

Once #1 is merged, I would like there to be a new release of the fcrepo-java-client. The current release version is 0.1.0, and the next release should be 0.1.1. I am happy to manage the release itself.

@mikedurbin, @daniel-dgi, as project maintainers, do you have any thoughts on this? +1 if you agree, -1 if not.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.