Skip to content

Commit 05699e4

Browse files
committed
Merge branch 'gh-179' of github.com:gchq/stroom into 5.0
2 parents bd3c0c9 + 13d1c17 commit 05699e4

File tree

35 files changed

+259
-245
lines changed

35 files changed

+259
-245
lines changed

NOTICE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ The table below includes licences for all Maven dependencies. Not included in th
232232
| org.slf4j | slf4j-api | 1.7.5 | MIT | | |
233233
| org.slf4j | slf4j-log4j12 | 1.6.1 | MIT | | |
234234
| xmlenc | xmlenc | 0.52 | MIT | | |
235-
| net.sf.saxon | Saxon-HE | 9.6.0-6 | MPL 1.0 | | |
235+
| net.sf.saxon | Saxon-HE | 9.7.0-18 | MPL 1.0 | | |
236236
| aopalliance | aopalliance | 1 | Public domain | | |
237237
| Font Awesome Fonts | n/a | 4.4.0 | SIL Open Font | | |
238238
| Font Awesome code | n/a | 4.4.0 | MIT | | |

pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<artifactId>stroom</artifactId>
4040
<name>stroom</name>
4141
<description>STROOM</description>
42-
<version>5.0-beta.28</version>
42+
<version>5.0-beta.29-SNAPSHOT</version>
4343
<packaging>pom</packaging>
4444

4545
<properties>
@@ -64,7 +64,7 @@
6464
<gwtp-all.version>0.7</gwtp-all.version>
6565
<gin.version>2.1.2</gin.version>
6666
<gwt-d3-js.version>3.4.8</gwt-d3-js.version>
67-
<Saxon-HE.version>9.6.0-6</Saxon-HE.version>
67+
<Saxon-HE.version>9.7.0-18</Saxon-HE.version>
6868
<jackson.version>2.5.3</jackson.version>
6969
<hessian.version>4.0.38</hessian.version>
7070
<lucene.version>4.6.1</lucene.version>

stroom-app-client/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<parent>
3939
<groupId>stroom</groupId>
4040
<artifactId>stroom</artifactId>
41-
<version>5.0-beta.28</version>
41+
<version>5.0-beta.29-SNAPSHOT</version>
4242
</parent>
4343

4444
<artifactId>stroom-app-client</artifactId>

stroom-app-distribution/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<groupId>stroom</groupId>
2222
<artifactId>stroom</artifactId>
23-
<version>5.0-beta.28</version>
23+
<version>5.0-beta.29-SNAPSHOT</version>
2424
</parent>
2525

2626
<artifactId>stroom-app-distribution</artifactId>

stroom-app/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<parent>
3939
<groupId>stroom</groupId>
4040
<artifactId>stroom</artifactId>
41-
<version>5.0-beta.28</version>
41+
<version>5.0-beta.29-SNAPSHOT</version>
4242
</parent>
4343

4444
<artifactId>stroom-app</artifactId>

stroom-config/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<parent>
3939
<groupId>stroom</groupId>
4040
<artifactId>stroom</artifactId>
41-
<version>5.0-beta.28</version>
41+
<version>5.0-beta.29-SNAPSHOT</version>
4242
</parent>
4343

4444
<artifactId>stroom-config</artifactId>

stroom-core-client-widget/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<parent>
3838
<groupId>stroom</groupId>
3939
<artifactId>stroom</artifactId>
40-
<version>5.0-beta.28</version>
40+
<version>5.0-beta.29-SNAPSHOT</version>
4141
</parent>
4242

4343
<artifactId>stroom-core-client-widget</artifactId>

stroom-core-client/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<parent>
3838
<groupId>stroom</groupId>
3939
<artifactId>stroom</artifactId>
40-
<version>5.0-beta.28</version>
40+
<version>5.0-beta.29-SNAPSHOT</version>
4141
</parent>
4242

4343
<artifactId>stroom-core-client</artifactId>

stroom-core-server/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<parent>
3939
<groupId>stroom</groupId>
4040
<artifactId>stroom</artifactId>
41-
<version>5.0-beta.28</version>
41+
<version>5.0-beta.29-SNAPSHOT</version>
4242
</parent>
4343

4444
<artifactId>stroom-core-server</artifactId>

stroom-core-shared/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<parent>
3939
<groupId>stroom</groupId>
4040
<artifactId>stroom</artifactId>
41-
<version>5.0-beta.28</version>
41+
<version>5.0-beta.29-SNAPSHOT</version>
4242
</parent>
4343

4444
<artifactId>stroom-core-shared</artifactId>

stroom-dashboard/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<parent>
3939
<groupId>stroom</groupId>
4040
<artifactId>stroom</artifactId>
41-
<version>5.0-beta.28</version>
41+
<version>5.0-beta.29-SNAPSHOT</version>
4242
</parent>
4343

4444
<artifactId>stroom-dashboard</artifactId>

stroom-entities/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<parent>
3939
<groupId>stroom</groupId>
4040
<artifactId>stroom</artifactId>
41-
<version>5.0-beta.28</version>
41+
<version>5.0-beta.29-SNAPSHOT</version>
4242
</parent>
4343

4444
<artifactId>stroom-entities</artifactId>

stroom-expression/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<parent>
3939
<groupId>stroom</groupId>
4040
<artifactId>stroom</artifactId>
41-
<version>5.0-beta.28</version>
41+
<version>5.0-beta.29-SNAPSHOT</version>
4242
</parent>
4343

4444
<artifactId>stroom-expression</artifactId>

stroom-index/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<parent>
3939
<groupId>stroom</groupId>
4040
<artifactId>stroom</artifactId>
41-
<version>5.0-beta.28</version>
41+
<version>5.0-beta.29-SNAPSHOT</version>
4242
</parent>
4343

4444
<artifactId>stroom-index</artifactId>

stroom-integrationtest/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<parent>
3939
<groupId>stroom</groupId>
4040
<artifactId>stroom</artifactId>
41-
<version>5.0-beta.28</version>
41+
<version>5.0-beta.29-SNAPSHOT</version>
4242
</parent>
4343

4444
<artifactId>stroom-integrationtest</artifactId>

stroom-pipeline/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<parent>
3939
<groupId>stroom</groupId>
4040
<artifactId>stroom</artifactId>
41-
<version>5.0-beta.28</version>
41+
<version>5.0-beta.29-SNAPSHOT</version>
4242
</parent>
4343

4444
<artifactId>stroom-pipeline</artifactId>

stroom-pipeline/src/main/java/stroom/pipeline/server/filter/SAXEventRecorder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public boolean filterMatches(final long recordNo) {
196196
if (xPathFilters != null) {
197197
try {
198198
final NodeInfo nodeInfo = getEvents();
199-
final DocumentInfo documentInfo = nodeInfo.getDocumentRoot();
199+
final NodeInfo documentInfo = nodeInfo.getRoot();
200200
for (final CompiledXPathFilter compiledXPathFilter : xPathFilters) {
201201
final Object result = compiledXPathFilter.getXPathExpression().evaluate(documentInfo,
202202
XPathConstants.NODESET);

stroom-pipeline/src/main/java/stroom/pipeline/server/filter/XSLTFilter.java

+5
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,11 @@ public void setPipelineReference(final PipelineReference pipelineReference) {
663663
pipelineReferences.add(pipelineReference);
664664
}
665665

666+
@PipelineProperty(description = "Advanced: Choose whether or not you want to use cached XSLT templates to improve performance.", defaultValue = "true")
667+
public void setUsePool(final boolean usePool) {
668+
this.usePool = usePool;
669+
}
670+
666671
@Override
667672
public void setInjectedCode(final String injectedCode) {
668673
this.injectedCode = injectedCode;

stroom-pipeline/src/main/java/stroom/pipeline/server/writer/XMLWriter.java

-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ public void startProcessing() {
9494
getErrorReceiver());
9595
final TransformerHandler th = XMLUtil.createTransformerHandler(errorListener, indentOutput);
9696
th.setResult(new StreamResult(bufferedWriter));
97-
th.setDocumentLocator(locator);
9897
handler = th;
9998
startedDocument = false;
10099

stroom-pipeline/src/main/java/stroom/xml/event/np/EventListConsumer.java

+56-26
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,23 @@
1616

1717
package stroom.xml.event.np;
1818

19-
import java.util.HashMap;
20-
import java.util.Map;
21-
2219
import net.sf.saxon.event.PipelineConfiguration;
2320
import net.sf.saxon.event.Receiver;
2421
import net.sf.saxon.event.ReceiverOptions;
22+
import net.sf.saxon.expr.parser.Location;
2523
import net.sf.saxon.om.CodedName;
2624
import net.sf.saxon.om.NamePool;
2725
import net.sf.saxon.trans.XPathException;
2826
import net.sf.saxon.tree.tiny.CharSlice;
2927
import net.sf.saxon.type.BuiltInAtomicType;
3028
import net.sf.saxon.type.Untyped;
3129

30+
import java.util.HashMap;
31+
import java.util.Map;
32+
3233
public class EventListConsumer {
34+
private static final Location NULL_LOCATION = new NullLocation();
35+
3336
private static final String EMPTY = "";
3437
private final Receiver receiver;
3538
private final PipelineConfiguration pipe;
@@ -72,43 +75,43 @@ public void consume(final NPEventList eventList) throws XPathException {
7275
for (eventTypeIndex = 0; eventTypeIndex < eventList.eventTypeArr.length; eventTypeIndex++) {
7376
{
7477
switch (eventList.eventTypeArr[eventTypeIndex]) {
75-
case NPEventList.START_ELEMENT:
76-
nameCode = eventList.nameCodeArr[nameCodeIndex++];
77-
startElement(namePool, nameCode);
78-
receiver.startContent();
79-
break;
80-
case NPEventList.START_ELEMENT_WITH_ATTS:
81-
nameCode = eventList.nameCodeArr[nameCodeIndex++];
82-
startElement(namePool, nameCode);
83-
atts = eventList.attsArr[attsIndex++];
84-
attributes(namePool, atts);
85-
receiver.startContent();
86-
break;
87-
case NPEventList.END_ELEMENT:
88-
receiver.endElement();
89-
break;
90-
case NPEventList.CHARACTERS:
91-
final int pos = eventList.charPosArr[charPosIndex++];
92-
final CharSlice slice = new CharSlice(eventList.charArr, lastPos, pos - lastPos);
93-
receiver.characters(slice, 0, ReceiverOptions.WHOLE_TEXT_NODE);
94-
lastPos = pos;
95-
break;
78+
case NPEventList.START_ELEMENT:
79+
nameCode = eventList.nameCodeArr[nameCodeIndex++];
80+
startElement(namePool, nameCode);
81+
receiver.startContent();
82+
break;
83+
case NPEventList.START_ELEMENT_WITH_ATTS:
84+
nameCode = eventList.nameCodeArr[nameCodeIndex++];
85+
startElement(namePool, nameCode);
86+
atts = eventList.attsArr[attsIndex++];
87+
attributes(namePool, atts);
88+
receiver.startContent();
89+
break;
90+
case NPEventList.END_ELEMENT:
91+
receiver.endElement();
92+
break;
93+
case NPEventList.CHARACTERS:
94+
final int pos = eventList.charPosArr[charPosIndex++];
95+
final CharSlice slice = new CharSlice(eventList.charArr, lastPos, pos - lastPos);
96+
receiver.characters(slice, NULL_LOCATION, ReceiverOptions.WHOLE_TEXT_NODE);
97+
lastPos = pos;
98+
break;
9699
}
97100
}
98101
}
99102
}
100103

101104
private void startElement(final NPEventListNamePool namePool, final int nameCode) throws XPathException {
102105
final int code = mapCode(namePool, nameCode);
103-
receiver.startElement(new CodedName(code, pool), Untyped.getInstance(), 0, ReceiverOptions.NAMESPACE_OK);
106+
receiver.startElement(new CodedName(code, pool), Untyped.getInstance(), NULL_LOCATION, ReceiverOptions.NAMESPACE_OK);
104107
}
105108

106109
private void attributes(final NPEventListNamePool namePool, final NPAttributes atts) throws XPathException {
107110
int code = 0;
108111
for (int a = 0; a < atts.length; a++) {
109112
code = atts.nameCode[a];
110113
code = mapCode(namePool, code);
111-
receiver.attribute(new CodedName(code, pool), BuiltInAtomicType.UNTYPED_ATOMIC, atts.value[a], 0,
114+
receiver.attribute(new CodedName(code, pool), BuiltInAtomicType.UNTYPED_ATOMIC, atts.value[a], NULL_LOCATION,
112115
ReceiverOptions.NAMESPACE_OK);
113116
}
114117
}
@@ -129,4 +132,31 @@ private int mapCode(final NPEventListNamePool namePool, final int nameCode) {
129132

130133
return code;
131134
}
135+
136+
private static class NullLocation implements Location {
137+
@Override
138+
public String getSystemId() {
139+
return null;
140+
}
141+
142+
@Override
143+
public String getPublicId() {
144+
return null;
145+
}
146+
147+
@Override
148+
public int getLineNumber() {
149+
return 0;
150+
}
151+
152+
@Override
153+
public int getColumnNumber() {
154+
return 0;
155+
}
156+
157+
@Override
158+
public Location saveLocation() {
159+
return this;
160+
}
161+
}
132162
}

0 commit comments

Comments
 (0)