forked from dbpedia/databus-python-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconvert.py
More file actions
48 lines (39 loc) · 1.03 KB
/
Copy pathconvert.py
File metadata and controls
48 lines (39 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
from databusclient.filehandling.format import convert_file, get_converted_filename
from databusclient.filehandling import mapping as _mapping
from databusclient.filehandling.format import (
QuadHandler,
TSDHandler,
TripleHandler,
_quad_handler,
_tsd_handler,
_triple_handler,
)
__all__ = [
"convert_file",
"get_converted_filename",
"QuadHandler",
"TSDHandler",
"TripleHandler",
]
convert_rdf_to_csv = _mapping.convert_rdf_to_csv
def convert_rdf_triple_format(
source: str,
target: str,
input_format: str,
output_format: str,
) -> None:
_triple_handler.convert(source, target, input_format, output_format)
def convert_rdf_quad_format(
source: str,
target: str,
input_format: str,
output_format: str,
) -> None:
_quad_handler.convert(source, target, input_format, output_format)
def convert_tabular_format(
source: str,
target: str,
input_format: str,
output_format: str,
) -> None:
_tsd_handler.convert(source, target, input_format, output_format)