Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Tridoc Serverside Infrastructure

License

NotificationsYou must be signed in to change notification settings

tridoc/tridoc-backend

Repository files navigation

Server-side infrastructure for tridoc: easy document management for individuals and small teams.

Table Of Contents

Setup

This will setup tridoc on port 8000 and fuseki avaliable on port 8001.Make sure you havedocker-compose installed.

ReplaceYOUR PASSWORD HERE in the first command with your choice of password.

Unix/Linux/wsl:

export TRIDOC_PWD="YOUR PASSWORD HERE"docker-compose builddocker-compose up

On windows, relpace the first line with:

$env:TRIDOC_PWD="YOUR PASSWORD HERE"

For more Setup options see theDEV-README.md

Tag System

There are two types of tags: simple tags and parameterizable tags. Parameterizable tags need a parameter to become a parameterized tag wich can be added to a document.

Simple Tags

Simple tags can be created byPOST to/tag. You need to send an JSON object like this:

{"label":"Inbox"}

Note:label must be unique.

The label must not contain any of the following: whitespace,/,\,#,",',,,;,:,?;
The label must not equal. (single dot) or.. (double dot).

Tags can be added to a document byPOST to/doc/{id}/tag. You need to send an JSON object like the one above.

Tags must be created before adding them to a document.

Parameterizable & Parameterized Tags

Parameterizable tags can be created byPOST to/tag too. You need to send an JSON object like this:

{"label":"Amount","parameter": {"type":"http://www.w3.org/2001/XMLSchema#decimal"    }}

Again,label must be unique.
parameter.type can either behttp://www.w3.org/2001/XMLSchema#decimal orhttp://www.w3.org/2001/XMLSchema#date .

Parameterizable tags can only be added to a document with a value assigned. ByPOSTing a JSON object like the following to/doc/{id}/tag, a parameterized tag is created and added to the document.

{"label":"Amount","parameter": {"type":"http://www.w3.org/2001/XMLSchema#decimal","value":"12.50"    }}

A parameterizable tag with thislabel andparameter.type has to be created before.

Comments

Tags can be added to a document byPOST to/doc/{id}/comment

You can either send an JSON document like the following

{"text":"This is a comment"}

When getting a comment, a JSON array with objects of the following structure is provided:

{"text":"This is a comment","created":"2020-03-12T10:07:20.493Z"}

API

AddressMethodDescriptionRequest / PayloadResponseImplemented in Version
/countGETCount (matching) documents13Number1.1.0
/docPOSTAdd / Store DocumentPDF5-1.1.0
/docGETGet List of all (matching) documents123Array of objects with document identifiers and titles (where available)1.1.0
/doc/{id}GETGet this document-PDF1.1.0
/doc/{id}DELETEDeletes all metadata associated with the document. Document will not be deleted and is stays accessible over /doc/{id}.--1.1.0
/doc/{id}/commentPOSTAdd comment to documentComment object / See above-1.2.0
/doc/{id}/commentGETGet comments-Array of comment objects1.2.0
/doc/{id}/tagPOSTAdd a tag to documentTag object / See above-1.1.0
/doc/{id}/tagGETGet tags of document-Array of tag objects1.1.0
/doc/{id}/tag/{tagLabel}DELETERemove tag from document--1.1.0
/doc/{id}/thumbGETGet document thumbnail-PNG (300px wide)1.5.0
/doc/{id}/titlePUTSet document title{"title": "the_Title"}-1.1.0
/doc/{id}/titleGETGet document title-{"title": "the_Title"}1.1.0
/doc/{id}/titleDELETEReset document title--1.1.0
/doc/{id}/metaGETGet various metadata-{"title": "the_Title", "tags":[...], "comments": [...] ... }1.1.0 | .comments & .created in 1.2.1
/raw/rdfGETGet all metadata as RDF. Useful for Backups4RDF, Content-Type defined over request Headers or ?accept. Fallback to text/turtle.1.1.0
/raw/zip or/raw/tgzGETGet all data. Useful for backups-ZIP / TGZ containing blobs/ directory with all pdfs as stored within tridoc and a rdf.ttl file with all metadata.1.3.0
/raw/zipPUTReplace all data with backup zipZIPReplaces the metadata and adds the blobs from the zip1.3.0
/tagPOSTCreate new tagSee above-1.1.0
/tagGETGet (list of) all tags--1.1.0
/tag/{tagLabel}GETGet Documents with this tag. Same as/doc?tag={tagLabel}12Array of objects with document identifiers and titles (where available)1.1.0
/tag/{tagLabel}DELETEDelete this tag--1.1.0
/versionGETGet tridoc version-semver version number1.1.0

URL-Parameters supported:

1 : ?text
2 : ?limit and ?offset

3 : ?tag and ?nottag
Since 1.4.4, filtering for Tag Ranges is possible with the following syntax:…={label};{min};{max}.min ormax may be ommitted for unbounded search. Trailing semocolons may be omitted.Example:

…?tag=foo;;30&tag=bar;2020-01-01;2020-12-31

gives all that have tag foo with a value <= 30, and bar values within 2020.

Be aware that this may need replacing of the caracter; by%3B.

4 : ?accept
5 : ?date followed by an ISO 8601 date string including time and timezone, seconds optional, sets creation date

Deleting / editing comments might be supported in the future


[8]ページ先頭

©2009-2025 Movatter.jp