afs_rdfx_serialize - AFS - Reference Guides

AFS Filters Description

Product
AFS
Platform
7.12
Category
Reference Guides
Language
English
The rdfx serialize filter makes it possible to convert a set of RDF data into a specific normalized serialization. The following elements are required:
  • One starting point per document:
    • It is the resource URI.
    • The resource is selected by a sparql query which must be set using the sparql_directories generic parameter.
  • A strategy to walk over the RDF structure:
    • The root is always serialized and accepted.
    • A literal connected to an accepted resource is serialized.
    • A resource connected with a distance less or equal to max_depth is serialized.
    • A resource connected to an accepted resource with a predicate of predicates_to_follow type becomes accepted.
    • A resource, whose rdf:type is connected to an accepted resource in types_to_follow, becomes accepted.

The filter is declared with the afs_rdfx_serialize type. It is in the antidot-paf-rdf package. It is a processor filter.

This filter can be instantiated only once at any given moment. It will not read the "instances" parameter in the configuration.

The RDFX Serialize filter specifications are described in the following table:

Parameter name

Mandatory

Type

Default

Description

base_triplestores_path

No

directory

N/A

It is the path to a folder which contains several pre-duplicated triplestores.

triplestore_path

No

directory

N/A

It is the path to a unique triplestore (disk or SPARQL end-point url).

rdf_layer

No

layer

No RDF loaded from layer

It is where to read an RDF layer to load in the triplestore at runtime (i.e. in process).

rdf_layers

No

list

Empty List

It is where to read a set of RDF layers to load in the triplestore at runtime (i.e. in process).

nb_clear

No

integer

1

When the triplestore is contextual, it is how many process methods are made before reinitializing the triplestore.

triplestores_tempdir

No

directory

$AFS7/afs_triplestores

It is the temp path where a filter works on some triplestore in disk mode.

construct_directories

No

directory_list

N/A

It is where to find the SPARQL construct queries to execute (.rq).

input_layer

No

layer

CONTENTS

It is where to read the input XML document where XPaths are applied.

output_layer

No

layer

RDFX

It is where to write the result

rdf_directories

No

directory_list

Empty List

A list of directories containing rdf files (.owl, .rdf, .xml) to load in a triplestore

rdf_files

No

file_list

Empty List

A list of rdf files to load in a triplestore

sparql_directories

No

directory_list

N/A

Where to find the SPARQL queries to execute (.rq).

use_rdfs_inference

No

boolean

false

When set to 'true', apply automatically RDFs inferences.

use_mondeca_engine

No

boolean

false

Activate if the project contains Mondeca thesaurus with SPARQL inference encapsulated

force_rdf_format

No

string

auto-detected

Force input RDF format to avoid spending time in auto detection. Available values are: - RDF_XML, - TURTLE, - N_TRIPLES, - N3

separator

No

string

/

The separator used to separate hierarchical facets in the result.

uri_separator

No

string

-

The separator used to separate hierarchical uris in the result.

max_depth

No

integer

0

It is the maximal depth of serialization.

output_format

No

string

XML

The serialized format in the OUTPUT layer. Values can be "XML", "JSON" or "SERIALIZED_PROTOBUF".

predicates_to_follow

No

list

Empty List

description1

skos_urls

No

list

Empty List

It is the predicate URLs used to generate a facet. Warning: It is applied only on main URI selected by the sparql query. Note: The default value of this parameter is empty list, but if the use_mondeca_engine parameter is activated, the following two URLs are automatically added to the list: - http://www.w3.org/2004/02/skos/core#subject - http://purl.org/dc/terms/subject

split_mode

No

boolean

false

Determine if filter works as "generator filter" (split_mode set to true) or as "processor filter" (split_mode set to false). See note for more informations. Note: If the parameter is enabled, the filter will use the SELECT queries to build new documents (each result will be a new document). If the parameter if disabled, the SELECT queries will be used with binding parameter to fill a specific layer, according to the specific content in the incoming XML data.

urn_namespace_identifier

No

string

afs

Define specific URN namespace identifier by replacing 'afs' by specified value in following patterns: "urn:afs:<URI>".

types_to_follow

No

list

Empty List

It it the RDF types to follow.