Apache Any23 supports all the main standard formats introduced by the Semantic Web community.
The following list shows the accepted input formats and for each one the support level.
The supported output formats are enlisted below.
Apache Any23 is able to produce JSON output following the format described below.
Given the following example statements (expressed in N-Quads format):
_:bn1 <http://pred/1> <http://value/1> <http://graph/1> . <http://sub/2> <http://pred/2> "language literal"@en <http://graph/2> . <http://sub/3> <http://pred/3> "123"^^<http://datatype> <http://graph/3> .
these will be represented as:
{ "quads" : [ [ { "type" : "bnode", "value" : "bn1" }, "http://pred/1", { "type" : "uri", "value" : "http://value/1" }, "http://graph/1" ], [ { "type" : "uri", "value" : "http://sub/2" }, "http://pred/2", { "type" : "literal", "value" : "language literal", "lang" : "en", "datatype" : null }, "http://graph/2" ], [ { "type" : "uri", "value" : "http://sub/3" }, "http://pred/3", { "type" : "literal", "value" : "123", "lang" : null, "datatype" : "http://datatype" }, "http://graph/3" ] ] }
The JSON object structure is described by the following BNF rules, where quotes are omitted to improve readability:
<json-response> ::= { "quads" : <statements> } <statements> ::= [ <statement>+ ] <statement> ::= [ <subject> , <predicate> , <object> , <graph> ] <subject> ::= { "type" : <subject-type> , "value" : <value> } <predicate> ::= <uri> <object> ::= { "type" : <object-type> , "value" : <value> , "lang" : <lang> , "datatype" : <datatype> } <graph> ::= <uri> | null <subject-type> ::= "uri" | "bnode" <object-type> ::= "uri" | "bnode"| "literal" <value> ::= String <lang> ::= String | null <datatype> ::= <uri> | null <uri> ::= String