Skip to content

Commit a2fdaf7

Browse files
committed
fixing code editor bugs
1 parent 9657371 commit a2fdaf7

33 files changed

+358
-331
lines changed

marklogic-data-hub/src/main/resources/ml-modules/root/com.marklogic.hub/lib/trace-lib.xqy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ declare function trace:error-trace(
281281
$duration as xs:dayTimeDuration)
282282
{
283283
let $_ := trace:increment-error-count()
284-
let $_ := trace:add-failed-item($identifier)
284+
let $_ := $identifier ! trace:add-failed-item(.)
285285
let $format :=
286286
let $o :=
287287
if ($input instance of document-node()) then

marklogic-data-hub/src/main/resources/scaffolding/harmonize/sjs/collector.sjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* @return - an array of ids or uris
77
*/
88
function collect(options) {
9-
// by default we return the URIs in the same collection as the Flow name
10-
return cts.uris(null, null, cts.collectionQuery(options.flow));
9+
// by default we return the URIs in the same collection as the Entity name
10+
return cts.uris(null, null, cts.collectionQuery(options.entity));
1111
}
1212

1313
module.exports = {

marklogic-data-hub/src/main/resources/scaffolding/harmonize/sjs/writer.sjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @return - nothing
99
*/
1010
function write(id, envelope, options) {
11-
xdmp.documentInsert(id, envelope);
11+
xdmp.documentInsert(id, envelope, xdmp.defaultPermissions(), options.entity);
1212
}
1313

1414
module.exports = {

marklogic-data-hub/src/main/resources/scaffolding/harmonize/xqy/collector.xqy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ declare option xdmp:mapping "false";
1414
declare function plugin:collect(
1515
$options as map:map) as xs:string*
1616
{
17-
(: by default we return the URIs in the same collection as the Flow name :)
18-
cts:uris((), (), cts:collection-query(map:get($options, "flow")))
17+
(: by default we return the URIs in the same collection as the Entity name :)
18+
cts:uris((), (), cts:collection-query(map:get($options, "entity")))
1919
};
2020

marklogic-data-hub/src/main/resources/scaffolding/harmonize/xqy/writer.xqy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ declare function plugin:write(
1818
$envelope as node(),
1919
$options as map:map) as empty-sequence()
2020
{
21-
xdmp:document-insert($id, $envelope)
21+
xdmp:document-insert($id, $envelope, xdmp:default-permissions(), map:get($options, "entity"))
2222
};

quick-start/src/main/java/com/marklogic/quickstart/ApplicationRunListener.java

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,16 @@ public class ApplicationRunListener implements SpringApplicationRunListener {
1515
public ApplicationRunListener(SpringApplication application, String[] args) { }
1616

1717
@Override
18-
public void starting() {
19-
System.out.println("Starting up the QuickStart UI...");
20-
}
18+
public void starting() {}
2119

2220
@Override
23-
public void environmentPrepared(ConfigurableEnvironment environment) {
24-
25-
}
21+
public void environmentPrepared(ConfigurableEnvironment environment) {}
2622

2723
@Override
28-
public void contextPrepared(ConfigurableApplicationContext context) {
29-
30-
}
24+
public void contextPrepared(ConfigurableApplicationContext context) {}
3125

3226
@Override
33-
public void contextLoaded(ConfigurableApplicationContext context) {
34-
35-
}
27+
public void contextLoaded(ConfigurableApplicationContext context) {}
3628

3729
@Override
3830
public void finished(ConfigurableApplicationContext context, Throwable exception) {

quick-start/src/main/java/com/marklogic/quickstart/service/FileSystemWatcherService.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -194,24 +194,25 @@ public void run() {
194194

195195
for (WatchEvent<?> event: key.pollEvents()) {
196196
Kind<?> kind = event.kind();
197-
if (kind == StandardWatchEventKinds.OVERFLOW) {
198-
continue;
199-
}
200-
201-
// Context for directory entry event is the file name of entry
202-
@SuppressWarnings("unchecked")
203-
WatchEvent<Path> ev = (WatchEvent<Path>)event;
204-
Path context = ev.context();
205-
Path child = dir.resolve(context);
197+
// if (kind == StandardWatchEventKinds.OVERFLOW) {
198+
// continue;
199+
// }
206200

207-
// print out event
208-
logger.debug("Event received: {} for: {}", event.kind().name(), child);
209201
queueReload();
210202

211203
// if directory is created, then register it and its sub-directories
212204
// we are always listening recursively
213205
if (kind == StandardWatchEventKinds.ENTRY_CREATE) {
206+
// Context for directory entry event is the file name of entry
207+
@SuppressWarnings("unchecked")
208+
WatchEvent<Path> ev = (WatchEvent<Path>)event;
209+
Path context = ev.context();
210+
Path child = dir.resolve(context);
211+
214212
try {
213+
// print out event
214+
logger.debug("Event received: {} for: {}", event.kind().name(), child);
215+
215216
if (Files.isDirectory(child, LinkOption.NOFOLLOW_LINKS)) {
216217
registerAll(child);
217218
}

quick-start/src/main/java/com/marklogic/quickstart/service/SearchService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ public StringHandle search(SearchQuery searchQuery) {
6767
sb = queryMgr.newStructuredQueryBuilder("entity-options");
6868
queries.add(
6969
sb.or(
70-
sb.containerQuery(sb.element(new QName("http://marklogic.com/entity-services", "instance")), sb.and(null)),
71-
sb.containerQuery(sb.jsonProperty("instance"), sb.and(null))
70+
sb.containerQuery(sb.element(new QName("http://marklogic.com/entity-services", "instance")), sb.and()),
71+
sb.containerQuery(sb.jsonProperty("instance"), sb.and())
7272
)
7373
);
7474
}

quick-start/src/main/resources/application.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
server.port=${port:8080}
33
server.contextPath=/
44
# server.error.whitelabel.enabled=false
5-
logging.level.com.marklogic.hub: INFO
6-
logging.level.org.apache.catalina.webresources.Cache: ERROR
5+
logging.level.com.marklogic.hub=INFO
6+
logging.level.org.apache.catalina.webresources.Cache=ERROR
7+
logging.level.java.util.prefs=OFF
78
spring.mvc.favicon.enabled=false
89

910
# By default, enable the dev profile

quick-start/src/main/resources/banner.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@
1919
| | | | | (_| | | | | | | __/\ V V / (_) | | | <
2020
|_| |_| \__,_|_| |_| |_|\___| \_/\_/ \___/|_| |_|\_\
2121

22+
23+
Starting. Please wait...

0 commit comments

Comments
 (0)