Time Resolver Web AIP

 

1. Overview

The time resolver function that obtains position on the temporal axis from an RDF resource representing period is available via Web API. This Web API supports both GET and POST methods, and can resolve a single RDF resource for the GET method, or one or more RDF name resources for the POST method. The following is an example of use with the GET method.

(Request)
https://ap.hutime.org/tresolver/?name=https://resource.hutime.org/test/PacificWar
(Response)
{"beginning":"1941-12-07","end":"1945-09-02"}

When a request is made with the URI of the RDF resource to be resolved in the parameter of name in the URL query, the position on the temporal axis of the period represented by the RDF resource is returned in JSON format. The output format can be modified by setting values for each parameter.

2. Parameters

Each parameter should be set to a predetermined value (except the name and code parameters). If a parameter is omitted, the default value is set.

name

The URI of the RDF resource to be resolved is set at the name parameter. When using the POST method, two or more URIs can be set separated by newlines (either CR+LF, CR or LF).

code

If the code of the RDF resource is entered directly, set the code to the code parameter. No more than one RDF resource codes may be entered. Only the POST method allows direct entering code.

codeFormat

Data format of the RDF code entered into the code parameter is specified by the codeFormat parameter.

XML (default)
XML format. Content-Type is "application/rdf+xml".
json
JSON-LD format. Content-Type is "application/ld+json".
turtle
Turtle format. Content-Type is "text/turtle".
ntriple
N-Triples format. Content-Type is "application/n-triples".
n3
N3 format. Content-Type is "text/n3".

interval

Type of period expression in the output data can be specified by the interval parameter

owl (default)
The period is the output data is expressed as "time:ProperInterval" of OWL-Time. The beginning and end points are time instant, and two values (beginning and end) are returned, representing the time instant.
hutime
The period is the output data is expressed as "hutime:UncertainTimeInterval" of HuTime Ontology. The beginning and end of the period are time ranges, and four values (the beginning is from Pb to Rb, and the end is from Re to Pe) are returned, representing the ranges.

format

Data format of the output data can be specified by the format parameter.

raw (default)
Only values representing the beginning and end points or ranges of the period are returned.
rdf
RDF data (JSON-LD format) according to OWL-Time or its extension, HuTime Ontology is returned.

date

Date representation format of the beginning and end of the period can be specified by the date parameter.

date (default)
The beginning and end are represented as dates (xsd:date).
datetime
The beginning and end are represented as dates and times (xsd:dateTime).
jd
The beginning and end are represented as Julian dates. If the output data is in RDF format (when the format parameter is set to rdf), the Julian Date values are expressed differently depending on the setting of the interval parameter. When the beginning and end point of the "time:ProperInterval" period are specified in the Julian dates, it must be specified in time reference system (TRS) that these values are Julian date. Therefore, if the interval parameter is set to "owl", the TRS is specified as the Julian date by a calendar resource (http://datetime.hutime.org/calendar/1.1) representing the Julian dates of the HuTime calendar LOD. On the other hand, the "hutime:UncertainTimeInterval" period is designed assuming that its beginning and end are specified in the Julian dates. Therefore if the interval parameter is set to "hutime", the beginning and end of the period are directly specified in Julian dates by four predicates (hutime:hasPossibleJdBeginning, etc.).

calendar

Calendar for the date in the output data can be specified by the calendar parameter.

g (default)
Dates are according to proleptic Gregorian calendar. Because the ISO 8601 uses the proleptic Gregorian calendar as the default, this Web API also uses the calendar as the default.
jg1
Dates are according to Julian / Gregorian Calendar (modified in 1582).
jg2
Dates are according to Julian / Gregorian Calendar (modified in 1752).

info

Whether or not error information is added to the output data can be specified by the info parameter.

yes
Along with data of the period, error information (status, URI of the RDF resource where the error occurred, and HTTP status code of the server providing the RDF resource) is returned.
no (default)
Only data of the periods are returned.

3. Error information

The status value output when the info parameter is set to "yes" is set to one of the following values.

OK
The resolving process was successfully completed.
DataNotFound
Given or referred RDF data not found.
UnknownFormat
Given or referred RDF data is described in unknown data format. Content-Type of the response header may be inappropriate.
TripleNotFound
No required triples is in the RDF data.
PointInfoNotFound
No information about beginning or end of the period is in the RDF data.
CircularReference
Circular references between resources.
InvalidUri
Given or referred URI is invalid.
ServerNotFound
Invalid host name or no response from the server.
InvalidValue
Inappropriate value type is used in the data.
ContradictoryRelation
There is contradictory between relations.
InternalError
Other error occurred in the server.

4. Sample application

A Web form using this Web API are available. This web form uses all the features of this Web API, so you can see how the Web API works.