Skip to content

Commit

Permalink
Revert "Updated documentation"
Browse files Browse the repository at this point in the history
This reverts commit 5c3040d.
  • Loading branch information
nielsdejong committed Jan 23, 2024
1 parent 5c3040d commit dcc8c87
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 284 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
= Neo4j Store
== Neo4j Store
[.procedures, opts=header]

This class is an implementation of the rdflib link:https://rdflib.readthedocs.io/en/stable/_modules/rdflib/store.html[Store class] that uses Neo4j as a backend. In this way it is possible to persist you RDF data directly in Neo4j, with the power of rdflib to process your data.

== Constructor
=== Object Initialization
|===
| Name | Type | Required | Default | Description
|config|Neo4jStoreConfig|True||Neo4jStoreConfig object that contains all the useful informations to initialize the store.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
= Neo4j Store Config
== Neo4j Store Config
[.procedures, opts=header]

This object is used to configure the Neo4j Store to connect to your Neo4j Instance and to manage the parsing of a Triple Store.

== Constructor
=== Object Initialization
|===
| Name | Type | Required | Values(Default) | Description
| auth_data | Dictionary | True | ("uri", "database", "user", "pwd") | A dictionary containing authentication data. The required keys are: ["uri", "database", "user", "pwd"].
| batching | Boolean | False | boolean (True) | A boolean indicating whether batching is enabled.
| batch_size | Integer | False | (5000) | An integer representing the batch size (The batch size is intended as number of entities to store inside the database (nodes/relationships) and not triples.
| custom_mappings | List[Tuple[Str,Str,Str]] | False | Empty list | A list of tuples containing custom mappings for prefixes in the form (prefix, object_to_replace, new_object).
| custom_prefixes | Dictionary | True | ({}) | A dictionary containing custom prefixes.
| handle_vocab_uri_strategy | HANDLE_VOCAB_URI_STRATEGY | False |IGNORE, KEEP, MAP, (SHORTEN) |
| custom_prefixes | Dictionary | True if handle_vocab_uri_strategy == HANDLE_VOCAB_URI_STRATEGY.SHORTEN | ({}) | A dictionary containing custom prefixes.
| handle_vocab_uri_strategy | HANDLE_VOCAB_URI_STRATEGY | False |HANDLE_VOCAB_URI_STRATEGY.IGNORE, HANDLE_VOCAB_URI_STRATEGY.KEEP, HANDLE_VOCAB_URI_STRATEGY.MAP(HANDLE_VOCAB_URI_STRATEGY.SHORTEN) |

* 'SHORTEN', full uris are shortened using prefixes for property names, relationship names and labels. Fails if a prefix is not predefined for a namespace in the imported RDF.

Expand All @@ -21,15 +21,13 @@ This object is used to configure the Neo4j Store to connect to your Neo4j Instan

* 'KEEP' uris are kept unchanged

| handle_multival_strategy | HANDLE_MULTIVAL_STRATEGY | False | ARRAY (OVERWRITE)|
| handle_multival_strategy | HANDLE_MULTIVAL_STRATEGY | False | HANDLE_MULTIVAL_STRATEGY.ARRAY (HANDLE_MULTIVAL_STRATEGY.OVERWRITE)|
* 'OVERWRITE' property values are kept single valued. Multiple values in the imported RDF are overwriten (only the last one is kept)

* 'ARRAY' properties are stored in an array enabling storage of multiple values. All of them unless multivalPropList is set.
| multival_props_names | List[Tuple[Str,Str]] | False | ([]) | A list of tuples containing the prefix and property names to be treated as multivalued in the form (prefix, property_name).
|===

① if handle_vocab_uri_strategy == HANDLE_VOCAB_URI_STRATEGY.SHORTEN

== Functions

=== set_handle_vocab_uri_strategy
Expand Down Expand Up @@ -190,7 +188,7 @@ No arguments
| Dictionary | A dictionary containing all prefixes.
|===

== Enumerated Values
== Enumerators

=== HANDLE_VOCAB_URI_STRATEGY

Expand All @@ -206,6 +204,12 @@ Enum class defining different strategies for handling vocabulary URIs.
| IGNORE | Strategy to ignore the Namespace and get only the local part
|===

=== Examples

Here a series of examples of the application of a strategy on a certain triplet.

#TODO: Fill the examples#

=== Shorten

This strategy will shorten the URIs, replacing the prefix with its shorted version. If the Store find a prefix not defined inside its Neo4jStoreConfig object, the parsing will stop, raising a ShortenStrictException error.
Expand All @@ -225,7 +229,7 @@ This strategy will remove the entire prefix from the predicate.

Enum class defining different strategies for handling multiple values.

> If the strategy is ARRAY and the Neo4jStoreConfig doesn't contain any predicate marked as multivalued, EVERY field will be treated as multivalued.
TO NOTICE: If the strategy is ARRAY and the Neo4jStoreConfig doesn't contain any predicate marked as multivalued, EVERY field will be treated as multivalued.

==== Possible Values

Expand All @@ -235,6 +239,9 @@ Enum class defining different strategies for handling multiple values.
| ARRAY | Strategy to treat multiple values as an array
|===

=== Examples

Here a series of examples of the application of a strategy on a certain triplet.

=== Overwrite

Expand Down
3 changes: 3 additions & 0 deletions docs/getting_started.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
== Using the Neo4j store and examples

== Migrating an existing implementation to the Neo4j Store
16 changes: 16 additions & 0 deletions docs/introduction.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
= RDFLIB + Neo4j User Guide
:doctype: book
:icons: font
:source-highlighter: coderay
:toc: left
:toclevels: 2

toc::[]

= Chapter 1: Introduction

== Section 1.1: Purpose
This section provides an overview of the purpose of this documentation.



7 changes: 1 addition & 6 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
* xref:index.adoc[Introduction]
* xref:gettingstarted.adoc[Getting Started]
* xref:neo4jstore.adoc[Neo4j Store]
* xref:neo4jstoreconfig.adoc[Store Configuration]
* xref:examples.adoc[Examples]
* xref:contributing.adoc[Contributing]
* xref:index.adoc[Introduction]
17 changes: 0 additions & 17 deletions docs/modules/ROOT/pages/contributing.adoc

This file was deleted.

149 changes: 0 additions & 149 deletions docs/modules/ROOT/pages/examples.adoc

This file was deleted.

88 changes: 0 additions & 88 deletions docs/modules/ROOT/pages/gettingstarted.adoc

This file was deleted.

14 changes: 1 addition & 13 deletions docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -1,13 +1 @@
# RDFLib-Neo4j

The **rdflib-neo4j** project is a Python-based https://rdflib.readthedocs.io/en/stable/[RDFLib Store] backed by Neo4j.
You can use this library for high-performance RDF data ingestion into the Neo4j database.

This library works with all types of Neo4j deployments, whether on-premise or cloud-hosted (Neo4j Aura).

## Documentation

- To get started, see the link:quickstart[Quickstart] page.
- For details on the available Python classes, see the link:neo4jstore[Neo4j Store] page.
- Example code fragments are available under link:examples[Examples].
- If you want to contribute to this project, see link:contributing[Contributing].
jsdhdfvjfdvfv

0 comments on commit dcc8c87

Please sign in to comment.