test_match v0.1.0 TestMatch
Top-level module used in "" post.
This module is now standalone and finds the NeoSemantics
modules from the github neo_semantics project.
See the examples directory for some example scripts.
Link to this section Summary
Functions
Delegates to TestMatch.LPG.Cypher.Client.rquery/0
Delegates to TestMatch.LPG.Cypher.Client.rquery/1
Delegates to TestMatch.LPG.Cypher.Client.rquery/0
Delegates to TestMatch.LPG.Cypher.Client.rquery/1
Delegates to TestMatch.LPG.Cypher.Client.clear/0
Delegates to TestMatch.LPG.Cypher.Client.dump/1
Delegates to TestMatch.LPG.Cypher.Client.dump/2
Delegates to TestMatch.LPG.Cypher.Client.init/0
Delegates to TestMatch.LPG.Cypher.Client.reset/0
Delegates to TestMatch.LPG.Cypher.Client.test/0
Delegates to TestMatch.RDF.SPARQL.Client.dbpedia_sparql_endpoint/0
Exports from Neo4j an LPG graph transformed into an RDF graph. The graph
is centered on a node identified by node_id
.
Exports from Neo4j an LPG graph transformed into an RDF graph. The graph
is defined by the cypher
query.
Exports from Neo4j an LPG graph transformed into an RDF graph. The graph
is defined by the cypher
query.
Exports from Neo4j an LPG graph transformed into an RDF graph. The graph
is centered on a node identified by node_uri
.
Imports into Neo4j an LPG graph transformed from an RDF graph.
Imports into Neo4j an LPG graph transformed from an RDF graph which was queried from a remote datastore using a SPARQL endpoint.
Delegates to TestMatch.Lib.from_cypher/0
Delegates to TestMatch.Lib.from_cypher/1
Delegates to TestMatch.Lib.from_cypher_with_properties/0
Delegates to TestMatch.Lib.from_cypher_with_properties/1
Delegates to TestMatch.Lib.from_sparql/0
Delegates to TestMatch.Lib.from_sparql/1
Delegates to TestMatch.Lib.list_graph_images/0
Delegates to TestMatch.Lib.list_graphs/0
Delegates to TestMatch.Lib.list_graph_images/0
Delegates to TestMatch.Lib.list_graphs/0
Delegates to TestMatch.LPG.list_graphs/0
Delegates to TestMatch.LPG.list_queries/0
Delegates to TestMatch.RDF.list_graphs/0
Delegates to TestMatch.RDF.list_queries/0
Delegates to TestMatch.RDF.SPARQL.Client.sparql_services/0
Delegates to TestMatch.RDF.SPARQL.Client.local_sparql_endpoint/0
Delegates to TestMatch.LPG.books/0
Delegates to TestMatch.LPG.movies/0
Delegates to TestMatch.RDF.books/0
Delegates to TestMatch.Lib.read_graph/0
Delegates to TestMatch.Lib.read_graph/1
Delegates to TestMatch.LPG.read_graph/0
Delegates to TestMatch.LPG.read_graph/1
Delegates to TestMatch.LPG.read_query/0
Delegates to TestMatch.LPG.read_query/1
Delegates to TestMatch.RDF.read_graph/0
Delegates to TestMatch.RDF.read_graph/1
Delegates to TestMatch.RDF.read_query/0
Delegates to TestMatch.RDF.read_query/1
Delegates to TestMatch.RDF.SPARQL.Client.rquery/0
Delegates to TestMatch.RDF.SPARQL.Client.rquery/1
Delegates to TestMatch.RDF.SPARQL.Client.rquery/2
Delegates to TestMatch.RDF.SPARQL.Client.rquery/0
Delegates to TestMatch.RDF.SPARQL.Client.rquery/1
Delegates to TestMatch.RDF.SPARQL.Client.rquery/2
Delegates to TestMatch.RDF.SPARQL.Client.sparql_endpoint/0
Delegates to TestMatch.RDF.SPARQL.Client.sparql_endpoint/1
Delegates to TestMatch.RDF.SPARQL.Client.sparql_query/0
Delegates to TestMatch.RDF.SPARQL.Client.sparql_query/1
Delegates to TestMatch.RDF.SPARQL.Client.wikidata_sparql_endpoint/0
Delegates to TestMatch.Lib.write_graph/1
Delegates to TestMatch.Lib.write_graph/2
Delegates to TestMatch.Lib.write_lib_graph/1
Delegates to TestMatch.Lib.write_lib_graph/2
Delegates to TestMatch.LPG.write_graph/1
Delegates to TestMatch.LPG.write_graph/2
Delegates to TestMatch.LPG.write_query/1
Delegates to TestMatch.LPG.write_query/2
Delegates to TestMatch.RDF.write_graph/1
Delegates to TestMatch.RDF.write_graph/2
Delegates to TestMatch.RDF.write_query/1
Delegates to TestMatch.RDF.write_query/2
Delegates to TestMatch.Lib.to_png/1
Delegates to TestMatch.Lib.to_png/2
Link to this section Functions
cypher()
Delegates to TestMatch.LPG.Cypher.Client.rquery/0
cypher(arg)
Delegates to TestMatch.LPG.Cypher.Client.rquery/1
cypher!()
Delegates to TestMatch.LPG.Cypher.Client.rquery/0
cypher!(arg)
Delegates to TestMatch.LPG.Cypher.Client.rquery/1
cypher_clear()
Delegates to TestMatch.LPG.Cypher.Client.clear/0
cypher_dump(arg)
Delegates to TestMatch.LPG.Cypher.Client.dump/1
cypher_dump(arg1, arg2)
Delegates to TestMatch.LPG.Cypher.Client.dump/2
cypher_init()
Delegates to TestMatch.LPG.Cypher.Client.init/0
cypher_reset()
Delegates to TestMatch.LPG.Cypher.Client.reset/0
cypher_test()
Delegates to TestMatch.LPG.Cypher.Client.test/0
dbpedia_sparql_endpoint()
Delegates to TestMatch.RDF.SPARQL.Client.dbpedia_sparql_endpoint/0
export_rdf_by_id(node_id, exclude_context \\ false)
Exports from Neo4j an LPG graph transformed into an RDF graph. The graph
is centered on a node identified by node_id
.
This returns the full context unless an optional boolean arg exclude_context
is passed as true
which will exclude context if present.
Examples
iex> TestMatch.export_rdf_by_id(1783)
%TestMatch.Graph{
data: "@prefix neovoc: <neo4j://defaultvocabulary#> .\n@prefix neoind: <neo4j://indiv#> .\n\n\nneoind:1783 a neovoc:Resource;\n neovoc:ns0__creator neoind:1785;\n neovoc:ns0__homepage neoind:1784;\n neovoc:ns0__license neoind:1786;\n neovoc:ns0__name "Elixir";\n neovoc:uri "http://example.org/Elixir" .\n",
file: "1783.ttl",
path: "/Users/tony/Projects/github/tonyhammond/ex_mples/test_match/_build/dev/lib/test_graph/priv/rdf/graphs/1783.ttl",
type: :rdf,
uri: "file:///Users/tony/Projects/github/tonyhammond/ex_mples/test_match/_build/dev/lib/test_graph/priv/rdf/graphs/1783.ttl"
}
iex> TestMatch.export_rdf_by_id(1783).data
"@prefix neovoc: <neo4j://defaultvocabulary#> .\n@prefix neoind: <neo4j://indiv#> .\n\n\nneoind:1783 a neovoc:Resource;\n neovoc:ns0__creator neoind:1785;\n neovoc:ns0__homepage neoind:1784;\n neovoc:ns0__license neoind:1786;\n neovoc:ns0__name "Elixir";\n neovoc:uri "http://example.org/Elixir" .\n"
export_rdf_by_query(cypher, graph_file)
Exports from Neo4j an LPG graph transformed into an RDF graph. The graph
is defined by the cypher
query.
Examples
iex> cypher = TestMatch.LPG.read_query("node1.cypher").data
"match (n) return n limit 1\n"
iex> cypher |> TestMatch.export_rdf_by_query
"..."
export_rdf_by_query_on_rdf(cypher, graph_file)
Exports from Neo4j an LPG graph transformed into an RDF graph. The graph
is defined by the cypher
query.
Examples
iex> cypher = TestMatch.LPG.read_query("temp.cypher").data
"match (n:Resource {uri:'http://dataset/indiv#153'}) return n\n"
iex> cypher |> TestMatch.export_rdf_by_query_on_rdf
"..."
export_rdf_by_uri(node_uri, exclude_context \\ false)
Exports from Neo4j an LPG graph transformed into an RDF graph. The graph
is centered on a node identified by node_uri
.
This returns the full context unless an optional boolean arg exclude_context
is passed as true
which will exclude context if present.
Examples
iex> TestMatch.export_rdf_by_uri("http://example.org/Elixir")
%TestMatch.Graph{
data: "@prefix neovoc: <neo4j://vocabulary#> .\n\n\n<http://example.org/Elixir> <http://example.org/creator> <http://dbpedia.org/resource/José_Valim>;\n <http://example.org/homepage> <http://elixir-lang.org>;\n <http://example.org/license> <http://dbpedia.org/resource/Apache_License>;\n <http://example.org/name> "Elixir" .\n",
file: "http___example.org_Elixir.ttl",
path: ... <> "/test_match/priv/rdf/graphs/http___example.org_Elixir.ttl",
type: :rdf,
uri: "file:///" <> ... <> "/test_match/priv/rdf/graphs/http___example.org_Elixir.ttl"
}
iex> TestMatch.export_rdf_by_uri("http://example.org/Elixir").data
"@prefix neovoc: <neo4j://vocabulary#> .\n\n\n<http://example.org/Elixir> <http://example.org/creator> <http://dbpedia.org/resource/José_Valim>;\n <http://example.org/homepage> <http://elixir-lang.org>;\n <http://example.org/license> <http://dbpedia.org/resource/Apache_License>;\n <http://example.org/name> "Elixir" .\n"
import_rdf_from_graph(graph_file \\ "default.ttl")
Imports into Neo4j an LPG graph transformed from an RDF graph.
Examples
iex> TestMatch.import_rdf_from_graph("elixir.ttl")
[
%{
"extraInfo" => "",
"namespaces" => %{
"http://example.org/" => "ns0",
"http://purl.org/dc/elements/1.1/" => "dc",
"http://purl.org/dc/terms/" => "dct",
"http://schema.org/" => "sch",
"http://www.w3.org/1999/02/22-rdf-syntax-ns#" => "rdf",
"http://www.w3.org/2000/01/rdf-schema#" => "rdfs",
"http://www.w3.org/2002/07/owl#" => "owl",
"http://www.w3.org/2004/02/skos/core#" => "skos"
},
"terminationStatus" => "OK",
"triplesLoaded" => 4
}
]
import_rdf_from_query(query_file \\ "default.rq")
Imports into Neo4j an LPG graph transformed from an RDF graph which was queried from a remote datastore using a SPARQL endpoint.
Examples
iex> TestMatch.import_rdf_from_query("elixir.rq")
[
%{
"extraInfo" => "",
"namespaces" => %{
"http://example.org/" => "ns0",
"http://purl.org/dc/elements/1.1/" => "dc",
"http://purl.org/dc/terms/" => "dct",
"http://schema.org/" => "sch",
"http://www.w3.org/1999/02/22-rdf-syntax-ns#" => "rdf",
"http://www.w3.org/2000/01/rdf-schema#" => "rdfs",
"http://www.w3.org/2002/07/owl#" => "owl",
"http://www.w3.org/2004/02/skos/core#" => "skos"
},
"terminationStatus" => "OK",
"triplesLoaded" => 4
}
]
lib_graph_from_cypher()
Delegates to TestMatch.Lib.from_cypher/0
lib_graph_from_cypher(arg)
Delegates to TestMatch.Lib.from_cypher/1
lib_graph_from_cypher_with_properties()
Delegates to TestMatch.Lib.from_cypher_with_properties/0
lib_graph_from_cypher_with_properties(arg)
Delegates to TestMatch.Lib.from_cypher_with_properties/1
lib_graph_from_sparql()
Delegates to TestMatch.Lib.from_sparql/0
lib_graph_from_sparql(arg)
Delegates to TestMatch.Lib.from_sparql/1
list_dot_graph_images()
Delegates to TestMatch.Lib.list_graph_images/0
list_dot_graphs()
Delegates to TestMatch.Lib.list_graphs/0
list_lib_graph_images()
Delegates to TestMatch.Lib.list_graph_images/0
list_lib_graphs()
Delegates to TestMatch.Lib.list_graphs/0
list_lpg_graphs()
Delegates to TestMatch.LPG.list_graphs/0
list_lpg_queries()
Delegates to TestMatch.LPG.list_queries/0
list_rdf_graphs()
Delegates to TestMatch.RDF.list_graphs/0
list_rdf_queries()
Delegates to TestMatch.RDF.list_queries/0
list_sparql_services()
Delegates to TestMatch.RDF.SPARQL.Client.sparql_services/0
local_sparql_endpoint()
Delegates to TestMatch.RDF.SPARQL.Client.local_sparql_endpoint/0
lpg_books()
Delegates to TestMatch.LPG.books/0
lpg_movies()
Delegates to TestMatch.LPG.movies/0
rdf_books()
Delegates to TestMatch.RDF.books/0
read_dot_graph()
Delegates to TestMatch.Lib.read_graph/0
read_dot_graph(arg)
Delegates to TestMatch.Lib.read_graph/1
read_lpg_graph()
Delegates to TestMatch.LPG.read_graph/0
read_lpg_graph(arg)
Delegates to TestMatch.LPG.read_graph/1
read_lpg_query()
Delegates to TestMatch.LPG.read_query/0
read_lpg_query(arg)
Delegates to TestMatch.LPG.read_query/1
read_rdf_graph()
Delegates to TestMatch.RDF.read_graph/0
read_rdf_graph(arg)
Delegates to TestMatch.RDF.read_graph/1
read_rdf_query()
Delegates to TestMatch.RDF.read_query/0
read_rdf_query(arg)
Delegates to TestMatch.RDF.read_query/1
sparql()
Delegates to TestMatch.RDF.SPARQL.Client.rquery/0
sparql(arg)
Delegates to TestMatch.RDF.SPARQL.Client.rquery/1
sparql(arg1, arg2)
Delegates to TestMatch.RDF.SPARQL.Client.rquery/2
sparql!()
Delegates to TestMatch.RDF.SPARQL.Client.rquery/0
sparql!(arg)
Delegates to TestMatch.RDF.SPARQL.Client.rquery/1
sparql!(arg1, arg2)
Delegates to TestMatch.RDF.SPARQL.Client.rquery/2
sparql_endpoint()
Delegates to TestMatch.RDF.SPARQL.Client.sparql_endpoint/0
sparql_endpoint(arg)
Delegates to TestMatch.RDF.SPARQL.Client.sparql_endpoint/1
sparql_query()
Delegates to TestMatch.RDF.SPARQL.Client.sparql_query/0
sparql_query(arg)
Delegates to TestMatch.RDF.SPARQL.Client.sparql_query/1
wikidata_sparql_endpoint()
Delegates to TestMatch.RDF.SPARQL.Client.wikidata_sparql_endpoint/0
write_dot_graph(arg)
Delegates to TestMatch.Lib.write_graph/1
write_dot_graph(arg1, arg2)
Delegates to TestMatch.Lib.write_graph/2
write_lib_graph(arg)
Delegates to TestMatch.Lib.write_lib_graph/1
write_lib_graph(arg1, arg2)
Delegates to TestMatch.Lib.write_lib_graph/2
write_lpg_graph(arg)
Delegates to TestMatch.LPG.write_graph/1
write_lpg_graph(arg1, arg2)
Delegates to TestMatch.LPG.write_graph/2
write_lpg_query(arg)
Delegates to TestMatch.LPG.write_query/1
write_lpg_query(arg1, arg2)
Delegates to TestMatch.LPG.write_query/2
write_rdf_graph(arg)
Delegates to TestMatch.RDF.write_graph/1
write_rdf_graph(arg1, arg2)
Delegates to TestMatch.RDF.write_graph/2
write_rdf_query(arg)
Delegates to TestMatch.RDF.write_query/1
write_rdf_query(arg1, arg2)
Delegates to TestMatch.RDF.write_query/2
write_to_png(arg)
Delegates to TestMatch.Lib.to_png/1
write_to_png(arg1, arg2)
Delegates to TestMatch.Lib.to_png/2