@@ -7,7 +7,7 @@ use crate::executors::classes_map::generic_algo::generic_class_map;
7
7
use crate :: executors:: preprocessing:: exec_preprocessing;
8
8
use crate :: lang:: { Description , Resource } ;
9
9
use crate :: writers:: stream_writer:: { OutputFormat } ;
10
- use crate :: writers:: stream_writer:: { GraphJSONWriter , TTLStreamWriter } ;
10
+ use crate :: writers:: stream_writer:: { GraphJSONWriter , TTLStreamWriter , GraphPyWriter } ;
11
11
use crate :: writers:: stream_writer:: stream_writer:: { StreamWriterResult , WriteResult } ;
12
12
use crate :: execution_plans:: classes_map_plan:: class_map_plan:: ClassMapExecStrategy ;
13
13
#[ cfg( feature = "enable-exec-macro-cls-map" ) ]
@@ -55,6 +55,17 @@ pub fn classes_map(resource_files: &[PhysicalResource], desc: &Description, plan
55
55
}
56
56
} ;
57
57
readers. push ( reader) ;
58
+ } ,
59
+ Resource :: NPDict ( _) => {
60
+ let reader = match & resource_files[ i] {
61
+ PhysicalResource :: File ( fpath) => {
62
+ Box :: new ( JSONRAReader :: from_file ( fpath) )
63
+ }
64
+ PhysicalResource :: String ( content) => {
65
+ Box :: new ( JSONRAReader :: from_str ( content) )
66
+ }
67
+ } ;
68
+ readers. push ( reader) ;
58
69
}
59
70
_ => unimplemented ! ( )
60
71
}
@@ -74,12 +85,18 @@ pub fn classes_map(resource_files: &[PhysicalResource], desc: &Description, plan
74
85
& format ! ( "{}.edge" , fpath) ,
75
86
& desc. semantic_model ) )
76
87
}
77
- PhysicalOutput :: String { format : OutputFormat :: TTL } => {
88
+ PhysicalOutput :: File { fpath : _, format : OutputFormat :: GraphPy } => {
89
+ unimplemented ! ( )
90
+ }
91
+ PhysicalOutput :: Memory { format : OutputFormat :: TTL } => {
78
92
Box :: new ( TTLStreamWriter :: write2str ( & desc. semantic_model ) )
79
93
}
80
- PhysicalOutput :: String { format : OutputFormat :: GraphJSON } => {
94
+ PhysicalOutput :: Memory { format : OutputFormat :: GraphJSON } => {
81
95
Box :: new ( GraphJSONWriter :: write2str ( & desc. semantic_model ) )
82
96
}
97
+ PhysicalOutput :: Memory { format : OutputFormat :: GraphPy } => {
98
+ Box :: new ( GraphPyWriter :: write2mem ( & desc. semantic_model ) )
99
+ }
83
100
} ;
84
101
85
102
writer. begin ( ) ;
0 commit comments