Data formats
Gazette notices can be submitted as either documents containing the full text of the notice, or as data where the only the variable elements of the notice are provided and this is then merged with a template to produce a full notice.
During the submission of the notice, in both instances, the data elements within the notice are marked up using the RDFa syntax and enriched with information from other data sources. As the notice is published, the RDFa is extracted from the notice and stored as RDF in a triple store. This provides us with both document views of the notice, ie the whole textual content of the notice and data views of the notice, ie the entities which have been identified within the notice.
The Gazette API allows the different representations of a notice to be retrieved via format specific URIs as described in the table below:
Response type | Notes | |||
---|---|---|---|---|
/notice/{notice-id} /notice/{notice-id}/data.htm |
(X)HTML5+RDFa | Website view of the notice with all of the page chrome included. | ||
/notice/{notice-id}/data.xml | (X)HTML5+RDFa | Contains only the notice content | ||
/notice/{notice-id}/data.pdf | ||||
/notice/{notice-id}/data.ttl | TTL | |||
/notice/{notice-id}/data.rdf | RDF | |||
/notice/{notice-id}/data.jsonld | JSON LD | |||
/notice/{notice-id}?view=linked-data | HTML | HTML representation of the data view of the notice | ||
/notice/{notice-id}/data.ttl?view=linked-data | TTL | |||
/notice/{notice-id}/data.rdf?view=linked-data | RDF/XML | |||
/notice/{notice-id}/data.rdfjson?view=linked-data | RDF/JSON | |||
/notice/{notice-id}/data.json?view=linked-data | JSON LD | |||
/notice/{notice-id}/data.xml?view=linked-data | XML | Linked data XML view containing the only data elements of the notice |
The Gazette API also supports content negotiation so using the document URIs in the table below and the Accept header set to the media type specified content can be retrieved in all the available formats.
Generic Document URI | Accept header | Response type | Matching representation* | |||
---|---|---|---|---|---|---|
/notice/{notice-id} | application/ld+json | JSON LD | ||||
application/rdf+xml | RDF | |||||
text/turtle | TTL | |||||
application/xml | (X)HTML5+RDFa | /notice/{notice-id}/data.xml | ||||
text/html | (X)HTML5+RDFa | /notice/{notice-id} /notice/{notice-id}/data.htm |
||||
*/* | ||||||
/notice/{notice-id}?view=linked-data | application/rdf+xml | RDF/XML | ||||
application/rdf+json | RDF/JSON | |||||
text/turtle | TTL | |||||
application/json | JSON | |||||
application/xml | XML | |||||
text/html | HTML |
Various other key elements of content available in The Gazette platform such as search results and historic pages are also available in various representations. For more information regarding the available content, formats available and ways of accessing please refer to The Gazette Developer Documentation which contains far more information.