Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added resources needed for the tests I checked in #657

Merged
merged 1 commit into from
Jan 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,7 @@ public static void setup() throws IOException {
FileUtil.copy(getResourceStream("flow-manager/xqy-flow/triples.xqy"), inputDir.resolve("xqy-xml-input-flow/triples.xqy").toFile());

Path harmonizeDir = projectDir.resolve("plugins/entities/" + ENTITY + "/harmonize");
FileUtil.copy(getResourceStream("flow-manager/sjs-harmonize-flow/collector.sjs"), harmonizeDir.resolve("sjs-json-harmonization-flow/collector.sjs").toFile());
FileUtil.copy(getResourceStream("flow-manager/sjs-harmonize-flow/content.sjs"), harmonizeDir.resolve("sjs-json-harmonization-flow/content.sjs").toFile());
FileUtil.copy(getResourceStream("flow-manager/sjs-harmonize-flow/headers.sjs"), harmonizeDir.resolve("sjs-json-harmonization-flow/headers.sjs").toFile());
FileUtil.copy(getResourceStream("flow-manager/sjs-harmonize-flow/main.sjs"), harmonizeDir.resolve("sjs-json-harmonization-flow/main.sjs").toFile());
FileUtil.copy(getResourceStream("flow-manager/sjs-harmonize-flow/triples.sjs"), harmonizeDir.resolve("sjs-json-harmonization-flow/triples.sjs").toFile());
FileUtil.copy(getResourceStream("flow-manager/sjs-harmonize-flow/writer.sjs"), harmonizeDir.resolve("sjs-json-harmonization-flow/writer.sjs").toFile());


getDataHub().installUserModules(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,7 @@ public void runHarmonizeFlowWithOptions() throws IOException, InterruptedExcepti
CodeFormat.JAVASCRIPT, DataFormat.JSON);

Path harmonizeDir = projectDir.resolve("plugins/entities/" + ENTITY + "/harmonize");
FileUtil.copy(getResourceStream("flow-manager/sjs-harmonize-flow/collector.sjs"), harmonizeDir.resolve("sjs-json-harmonization-flow/collector.sjs").toFile());
FileUtil.copy(getResourceStream("flow-manager/sjs-harmonize-flow/content.sjs"), harmonizeDir.resolve("sjs-json-harmonization-flow/content.sjs").toFile());
FileUtil.copy(getResourceStream("flow-manager/sjs-harmonize-flow/headers.sjs"), harmonizeDir.resolve("sjs-json-harmonization-flow/headers.sjs").toFile());
FileUtil.copy(getResourceStream("flow-manager/sjs-harmonize-flow/main.sjs"), harmonizeDir.resolve("sjs-json-harmonization-flow/main.sjs").toFile());
FileUtil.copy(getResourceStream("flow-manager/sjs-harmonize-flow/triples.sjs"), harmonizeDir.resolve("sjs-json-harmonization-flow/triples.sjs").toFile());
FileUtil.copy(getResourceStream("flow-manager/sjs-harmonize-flow/writer.sjs"), harmonizeDir.resolve("sjs-json-harmonization-flow/writer.sjs").toFile());

getDataHub().installUserModules(true);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Create Headers Plugin
*
* @param id - the identifier returned by the collector
* @param content - the output of your content plugin
* @param options - an object containing options. Options are sent from Java
*
* @return - an object of headers
*/
function createHeaders(id, content, options) {
let headers = {};
for (let key in options) {
headers[key] = options[key];
}
return headers;
}

module.exports = {
createHeaders: createHeaders
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
#Thu Jan 04 10:41:46 EST 2018
mainModule=main.sjs
collectorCodeFormat=sjs
mainCodeFormat=sjs
codeFormat=sjs
collectorModule=collector.sjs
dataFormat=json