Java reference implementation for uploading files to TriplyDB using the TUS resumable upload protocol.
- Java 11+
- Maven 3.6+
# Build the executable JAR
./build.shThis compiles the source and creates target/triplydb-uploader-1.0.0.jar with all dependencies bundled.
./upload.sh \
--file path/to/data.ttl \
--account your-account \
--dataset your-dataset \
--token YOUR_API_TOKENjava -jar target/triplydb-uploader-1.0.0.jar \
--file path/to/data.ttl \
--account your-account \
--dataset your-dataset \
--token YOUR_API_TOKEN./upload.sh \
--file path/to/data.nt \
--account your-account \
--dataset your-dataset \
--token YOUR_API_TOKEN \
--api-url http://api.triplydb.local \
--default-graph "http://example.org/my-graph" \
--overwrite-all| Parameter | Required | Description |
|---|---|---|
--file |
Yes | Path to the file to upload |
--account |
Yes | TriplyDB account name |
--dataset |
Yes | TriplyDB dataset name |
--token |
Yes | TriplyDB API token |
--api-url |
No | API URL (default: https://api.triplydb.com) |
--default-graph |
No | Default graph name for imported triples |
--overwrite-all |
No | Overwrite all existing graphs in the dataset |
--merge-graphs |
No | Merge data into existing graphs |
| Library | Version | Purpose |
|---|---|---|
| OkHttp | 4.12.0 | HTTP client |
| Jackson | 2.16.1 | JSON parsing |
| tus-java-client | 0.5.1 | TUS protocol |
java/
├── pom.xml
├── build.sh
├── upload.sh
├── README.md
└── src/main/java/com/triply/upload/
└── TriplyDBUploader.java