rspace-client-java-model

Java classes for RSpace API entities

License

License

Categories

Categories

Java Languages CLI User Interface Search Business Logic Libraries
GroupId

GroupId

com.researchspace
ArtifactId

ArtifactId

rspace-client-java-model
Last Version

Last Version

1.5.0
Release Date

Release Date

Type

Type

jar
Description

Description

rspace-client-java-model
Java classes for RSpace API entities
Project URL

Project URL

https://github.com/rspace-os/rspace-client-java-model
Source Code Management

Source Code Management

https://github.com/rspace-os/rspace-client-java-model

Download rspace-client-java-model

How to add to project

<!-- https://jarcasting.com/artifacts/com.researchspace/rspace-client-java-model/ -->
<dependency>
    <groupId>com.researchspace</groupId>
    <artifactId>rspace-client-java-model</artifactId>
    <version>1.5.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.researchspace/rspace-client-java-model/
implementation 'com.researchspace:rspace-client-java-model:1.5.0'
// https://jarcasting.com/artifacts/com.researchspace/rspace-client-java-model/
implementation ("com.researchspace:rspace-client-java-model:1.5.0")
'com.researchspace:rspace-client-java-model:jar:1.5.0'
<dependency org="com.researchspace" name="rspace-client-java-model" rev="1.5.0">
  <artifact name="rspace-client-java-model" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.researchspace', module='rspace-client-java-model', version='1.5.0')
)
libraryDependencies += "com.researchspace" % "rspace-client-java-model" % "1.5.0"
[com.researchspace/rspace-client-java-model "1.5.0"]

Dependencies

compile (7)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.21
commons-lang : commons-lang jar 2.6
com.fasterxml.jackson.core : jackson-annotations jar 2.6.7
com.fasterxml.jackson.core : jackson-databind jar 2.6.7
org.projectlombok : lombok jar 1.16.16
javax.validation : validation-api jar 1.1.0.Final
com.fasterxml.jackson.core : jackson-core jar 2.6.7

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.slf4j : slf4j-simple jar 1.7.21

Project Modules

There are no modules declared in this project.

RSpace API client model

Java classes to model RSpace API entities to facilitate JVM-based clients using the RSpace API. These classes provide type-safe creation of RSpace API entities. For creating objects to post, there are useful builder methods to construct the request bodies.

E.g. to create a document to post:

DocumentPost post = DocumentPost.builder().name("myDocument").tags("a,b,c")
  .field(new FieldPost("content1"))
  .field(new FieldPost("content2"))
  .field(new FieldPost("content3"))
  .field(FieldPost.emptyField())
  .form(new FormRef(23))
  .build();

Using this project

Binaries are available in Maven Central as

<dependency>
  <groupId>com.researchspace</groupId>
  <artifactId>rspace-client-java-model</artifactId>
  <version>1.5.0</version>
</dependency>

or as Gradle:

compile 'com.researchspace:rspace-client-java-model:1.5.0'

To build from source:

./gradlew clean test build

will run tests and build a jar in the build folder of this project. You don't need to install anything for this to work.

Versioning

Version numbering follows the RSpace API version. E.g.. 1.1.x versions will all support API 1.1. This library should be backwards compatible with earlier versions.

Design

This project uses Project Lombok which adds getters/setters and constructors through bytecode manipulation. If you want to see these methods in your IDE, please consult the Lombok website for how to do this.

There are minimal dependencies on Jackson libraries, leaving you free to choose your own JSON converter to convert these objects to/from JSON. JSON serialisation has been tested using Jackson 2.8. If you do use Jackson, please configure your ObjectMapper to convert Enum classes as follows:

  ObjectMapper mapper = new ObjectMapper();
	mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
	mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
com.researchspace

ResearchSpace

Open-source libraries for RSpace API and Repositories

Versions

Version
1.5.0
1.2.0
1.1.1
1.1.0