-
Notifications
You must be signed in to change notification settings - Fork 124
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
fixed #187 #190
fixed #187 #190
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
xquery version "1.0-ml"; | ||
|
||
module namespace plugin = "http://marklogic.com/data-hub/plugins"; | ||
|
||
declare option xdmp:mapping "false"; | ||
|
||
(:~ | ||
: Writer Plugin | ||
: | ||
: @param $id - the identifier returned by the collector | ||
: @param $envelope - the final envelope | ||
: @param $options - a map containing options. Options are sent from Java | ||
: | ||
: @return - nothing | ||
:) | ||
declare function plugin:write( | ||
$id as xs:string, | ||
$envelope as node(), | ||
$options as map:map) as empty-sequence() | ||
{ | ||
xdmp:document-insert($id, $envelope) | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -254,8 +254,8 @@ public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) | |
boolean isRest = dir.endsWith("REST"); | ||
|
||
String dirStr = dir.toString(); | ||
boolean isInputDir = dirStr.matches(".*/input/.*"); | ||
boolean isConformanceDir = dirStr.matches(".*/conformance/.*"); | ||
boolean isInputDir = dirStr.matches(".*[/\\\\]input[/\\\\].*"); | ||
boolean isConformanceDir = dirStr.matches(".*[/\\\\]conformance[/\\\\].*"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these lines looking at file paths? Should you be using File.separator here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can do either. It's way uglier to do separator, IMO. boolean isInputDir = dirStr.matches(".*\\" + File.separator + "input\\" + File.separator + ".*"); |
||
if (isRest) { | ||
if (isInputDir) { | ||
loadedFiles.addAll(hubModulesLoader.loadModules(dir.normalize().toAbsolutePath().toFile(), new AllButAssetsModulesFinder(), stagingClient)); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ public class HubFileFilter implements FileFilter { | |
|
||
@Override | ||
public boolean accept(File f) { | ||
boolean result = f != null && !f.getName().startsWith(".") && !f.toString().matches(".*/REST/.*"); | ||
boolean result = f != null && !f.getName().startsWith(".") && !f.toString().matches(".*[/\\\\]REST[/\\\\].*"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. File.separator? |
||
return result; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the upstream processes always be envelopes? I get that they might be now, but is that the only kind of transform you intend to support? If you have broader capabilities in mind, then maybe
param $input - the conformed input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have no broader capabilities in mind.