Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[MOD] Minor refactorings.

  • Loading branch information...
commit 446f6b0c2ae4711f8dc53afdfcaf07dcd07fe301 1 parent 49ac257
Johannes Lichtenberger JohannesLichtenberger authored
71 bundles/sirix-example/pom.xml
View
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Copyright (c) 2011, University of Konstanz, Distributed Systems Group
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of the University of Konstanz nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>com.github.johanneslichtenberger.sirix</groupId>
- <artifactId>sirix-parent</artifactId>
- <version>0.1.3-SNAPSHOT</version>
- <relativePath>../../pom.xml</relativePath>
- </parent>
-
- <artifactId>sirix-example</artifactId>
- <packaging>jar</packaging>
- <name>sirix-example</name>
- <version>0.1.2-SNAPSHOT</version>
- <description>Sirix example usages.</description>
- <repositories>
- <repository>
- <id>javamaven2</id>
- <name>Repository for Maven2</name>
- <url>http://download.java.net/maven/2</url>
- </repository>
- </repositories>
-
- <dependencies>
- <dependency>
- <groupId>com.github.johanneslichtenberger.sirix</groupId>
- <artifactId>sirix-core</artifactId>
- <version>0.1.2-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>com.github.johanneslichtenberger.sirix</groupId>
- <artifactId>sirix-core</artifactId>
- <version>0.1.2-SNAPSHOT</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.github.johanneslichtenberger.sirix</groupId>
- <artifactId>sirix-xquery</artifactId>
- <version>0.1.0</version>
- </dependency>
- </dependencies>
-</project>
295 bundles/sirix-example/src/main/java/org/sirix/examples/XQueryUsage.java
View
@@ -1,295 +0,0 @@
-package org.sirix.examples;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.Date;
-import java.util.Random;
-
-import org.brackit.xquery.QueryContext;
-import org.brackit.xquery.QueryException;
-import org.brackit.xquery.XQuery;
-import org.sirix.access.Databases;
-import org.sirix.api.Database;
-import org.sirix.exception.SirixException;
-import org.sirix.xquery.node.DBStore;
-
-/**
- * A few examples (some taken from the official brackit examples). Usually you
- * would use a logger for all output!
- *
- * @author Johannes Lichtenberger
- * @author Sebastian Bächle
- *
- */
-public final class XQueryUsage {
-
- /** User home directory. */
- private static final String USER_HOME = System.getProperty("user.home");
-
- /** Storage for databases: Sirix data in home directory. */
- private static final File LOCATION = new File(USER_HOME, "sirix-data");
-
- /** Severity used to build a random sample document. */
- enum Severity {
- low, high, critical
- };
-
- /**
- * Main method.
- *
- * @param args
- * not used
- */
- public static void main(final String[] args) throws SirixException {
- try {
- loadDocumentAndQuery();
- System.out.println();
- loadDocumentAndUpdate();
- System.out.println();
- loadCollectionAndQuery();
- System.out.println();
- loadDocumentAndQueryTemporal();
- } catch (IOException e) {
- System.err.print("I/O error: ");
- System.err.println(e.getMessage());
- } catch (QueryException e) {
- System.err.print("XQuery error ");
- System.err.println(e.getMessage());
- }
- }
-
- /**
- * Load a document and query it.
- */
- private static void loadDocumentAndQuery() throws QueryException,
- IOException, SirixException {
- final File doc = new File(new StringBuilder("src").append(File.separator)
- .append("main").append(File.separator).append("resources")
- .append(File.separator).append("test.xml").toString());
-
- // Initialize query context and store.
- final DBStore store = DBStore.newBuilder().build();
- QueryContext ctx = new QueryContext(store);
-
- // Use XQuery to load sample document into store.
- System.out.println("Loading document:");
- String xq1 = String.format("bit:load('mydoc.xml', '%s')", doc);
- System.out.println(xq1);
- new XQuery(xq1).evaluate(ctx);
-
- try (final Database database = Databases.openDatabase(new File(
- new StringBuilder(3).append(LOCATION).append(File.separator)
- .append("mydoc.xml").toString()))) {
- // Reuse store and query loaded document.
- final QueryContext ctx2 = new QueryContext(store);
- System.out.println();
- System.out.println("Query loaded document:");
- final String xq2 = "doc('mydoc.xml')/nachrichten/nachricht[betreff/text()='sommer' or betreff/text()='strand' or text/text()='sommer' or text/text()='strand']";
- System.out.println(xq2);
- XQuery query = new XQuery(xq2);
- query.prettyPrint().serialize(ctx2, System.out);
- }
-
- System.out.println();
- store.close();
- }
-
- /**
- * Load a document and update it.
- */
- private static void loadDocumentAndUpdate() throws QueryException,
- IOException {
- // Prepare sample document.
- final File tmpDir = new File(System.getProperty("java.io.tmpdir"));
- final File doc = generateSampleDoc(tmpDir, "sample");
- doc.deleteOnExit();
-
- // Initialize query context and store.
- try (final DBStore store = DBStore.newBuilder().isUpdatable().build()) {
- final QueryContext ctx = new QueryContext(store);
-
- // Use XQuery to load sample document into store.
- System.out.println("Loading document:");
- final String xq1 = String.format("bit:load('mydoc.xml', '%s')", doc);
- System.out.println(xq1);
- new XQuery(xq1).evaluate(ctx);
-
- // Reuse store and query loaded document.
- final QueryContext ctx2 = new QueryContext(store);
- System.out.println();
- System.out.println("Query loaded document:");
- final String xq2 = "insert nodes <a><b/></a> into doc('mydoc.xml')/log";
- System.out.println(xq2);
- new XQuery(xq2).execute(ctx2);
- store.commitAll();
- System.out.println();
- }
- }
-
- /**
- * Load a collection and query it.
- */
- private static void loadCollectionAndQuery() throws QueryException,
- IOException {
- // Prepare directory with sample documents.
- final File tmpDir = new File(System.getProperty("java.io.tmpdir"));
- final File dir = new File(tmpDir + File.separator + "docs"
- + System.currentTimeMillis());
- if (!dir.mkdir()) {
- throw new IOException("Directory " + dir + " already exists");
- }
- dir.deleteOnExit();
- for (int i = 0; i < 10; i++) {
- generateSampleDoc(dir, "sample");
- }
-
- // Initialize query context and store.
- try (final DBStore store = DBStore.newBuilder().build()) {
- final QueryContext ctx = new QueryContext(store);
-
- // Use XQuery to load all sample documents into store.
- System.out.println("Load collection from files:");
- final String xq1 = String.format(
- "bit:load('mydocs.col', io:ls('%s', '\\.xml$'))", dir);
- System.out.println(xq1);
- new XQuery(xq1).evaluate(ctx);
-
- // Reuse store and query loaded collection.
- final QueryContext ctx2 = new QueryContext(store);
- System.out.println();
- System.out.println("Query loaded collection:");
- final String xq2 = "for $log in collection('mydocs.col')/log\n"
- + "where $log/@severity='critical'\n" + "return\n" + "<message>\n"
- + " <from>{$log/src/text()}</from>\n"
- + " <body>{$log/msg/text()}</body>\n" + "</message>\n";
- System.out.println(xq2);
- final XQuery q = new XQuery(xq2);
- q.prettyPrint();
- q.serialize(ctx2, System.out);
- System.out.println();
-
- // Use XQuery to load all sample documents once more into store.
- System.out.println("Load collection from files:");
- final String xq3 = String.format(
- "bit:load('mydocs.col', io:ls('%s', '\\.xml$'), fn:false())", dir);
- System.out.println(xq3);
- new XQuery(xq3).evaluate(ctx);
- }
- }
-
- /**
- * Load a document and query it (temporal enhancements).
- */
- private static void loadDocumentAndQueryTemporal() throws QueryException,
- IOException {
- // Prepare sample document.
- File tmpDir = new File(System.getProperty("java.io.tmpdir"));
- File doc = generateSampleDoc(tmpDir, "sample");
- doc.deleteOnExit();
-
- // Initialize query context and store.
- try (final DBStore store = DBStore.newBuilder().isUpdatable().build()) {
- final QueryContext ctx = new QueryContext(store);
-
- // Use XQuery to load sample document into store.
- System.out.println("Loading document:");
- final String xq1 = String.format("bit:load('mydoc.xml', '%s')", doc);
- System.out.println(xq1);
- new XQuery(xq1).evaluate(ctx);
-
- // Reuse store and query loaded document.
- final QueryContext ctx2 = new QueryContext(store);
- System.out.println();
- System.out.println("Query loaded document:");
- final String xq2 = "insert nodes <a><b/></a> into doc('mydoc.xml')/log";
- System.out.println(xq2);
- final XQuery q = new XQuery(xq2);
- q.serialize(ctx2, System.out);
- store.commitAll();
- System.out.println();
- }
- try (final DBStore store = DBStore.newBuilder().build()) {
- final QueryContext ctx3 = new QueryContext(store);
- System.out.println();
- System.out.println("Query loaded document:");
- final String xq3 = "doc('mydoc.xml', 1)/log/all-time::*/*";
- System.out.println(xq3);
- XQuery q = new XQuery(xq3);
- q.prettyPrint();
- q.serialize(ctx3, System.out);
-
- // Serialize first version to XML.
- final QueryContext ctx4 = new QueryContext(store);
- final String xq4 = "bit:serialize(doc('mydoc.xml', 1))";
- q = new XQuery(xq4);
- try (final PrintStream out = new PrintStream(new FileOutputStream(
- new File(new StringBuilder(LOCATION.getAbsolutePath())
- .append(File.separator).append("output-revision-1.xml")
- .toString())))) {
- q.prettyPrint().serialize(ctx4, out);
- }
- System.out.println();
- // Serialize second version to XML.
- final QueryContext ctx5 = new QueryContext(store);
- final String xq5 = "bit:serialize(doc('mydoc.xml', 2))";
- q = new XQuery(xq5);
- try (final PrintStream out = new PrintStream(new FileOutputStream(
- new File(new StringBuilder(LOCATION.getAbsolutePath())
- .append(File.separator).append(File.separator)
- .append("output-revision-2.xml").toString())))) {
- q.prettyPrint().serialize(ctx5, out);
- }
- System.out.println();
- }
- }
-
- /**
- * Generate a small sample document.
- *
- * @param dir
- * the directory
- * @param prefix
- * prefix of name to use
- * @return the generated file
- * @throws IOException
- * if any I/O exception occured
- */
- private static File generateSampleDoc(final File dir, final String prefix)
- throws IOException {
- final File file = File.createTempFile(prefix, ".xml", dir);
- file.deleteOnExit();
- final PrintStream out = new PrintStream(new FileOutputStream(file));
- final Random rnd = new Random();
- final long now = System.currentTimeMillis();
- final int diff = rnd.nextInt(6000 * 60 * 24 * 7);
- final Date tst = new Date(now - diff);
- final Severity sev = Severity.values()[rnd.nextInt(3)];
- final String src = "192.168." + (1 + rnd.nextInt(254)) + "."
- + (1 + rnd.nextInt(254));
- final int mlen = 10 + rnd.nextInt(70);
- final byte[] bytes = new byte[mlen];
- int i = 0;
- while (i < mlen) {
- int wlen = 1 + rnd.nextInt(8);
- int j = i;
- while (j < Math.min(i + wlen, mlen)) {
- bytes[j++] = (byte) ('a' + rnd.nextInt('z' - 'a' + 1));
- }
- i = j;
- if (i < mlen - 1) {
- bytes[i++] = ' ';
- }
- }
- final String msg = new String(bytes);
- out.print("<?xml version='1.0'?>");
- out.print(String.format("<log tstamp='%s' severity='%s'>", tst, sev));
- out.print(String.format("<src>%s</src>", src));
- out.print(String.format("<msg>%s</msg>", msg));
- out.print("</log>");
- out.close();
- return file;
- }
-
-}
41 bundles/sirix-example/src/main/resources/test.xml
View
@@ -1,41 +0,0 @@
-<nachrichten>
- <nachricht>
- <sender>...</sender>
- <empfaenger>...</empfaenger>
- <betreff>...</betreff>
- <text>baz</text>
- </nachricht>
- <nachricht>
- <sender>...</sender>
- <empfaenger>...</empfaenger>
- <betreff>sommer</betreff>
- <text>strand</text>
- </nachricht>
- <nachricht>
- <sender>...</sender>
- <empfaenger>...</empfaenger>
- <betreff>...</betreff>
- <text>strand</text>
- </nachricht>
- <nachricht>
- <sender>...</sender>
- <empfaenger>...</empfaenger>
- <betreff>foo</betreff>
- <text>bar</text>
-</nachricht>
- <nachricht>
- <sender>...</sender>
- <empfaenger>...</empfaenger>
- <betreff>sommer</betreff>
- <text>...</text>
- </nachricht>
- <nachricht>...</nachricht>
- <nachricht>
- <sender>...</sender>
- <empfaenger>...</empfaenger>
- <betreff>foo</betreff>
- <text>...</text>
-</nachricht>
-</nachrichten>
-
-
2  bundles/sirix-examples/pom.xml
View
@@ -65,7 +65,7 @@
<dependency>
<groupId>com.github.johanneslichtenberger.sirix</groupId>
<artifactId>sirix-xquery</artifactId>
- <version>0.1.0</version>
+ <version>0.1.2-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
9 bundles/sirix-examples/src/main/java/org/sirix/examples/XQueryUsage.java
View
@@ -13,6 +13,7 @@
import org.sirix.access.Databases;
import org.sirix.api.Database;
import org.sirix.exception.SirixException;
+import org.sirix.xquery.SirixCompileChain;
import org.sirix.xquery.node.DBStore;
/**
@@ -88,7 +89,7 @@ private static void loadDocumentAndQuery() throws QueryException,
System.out.println("Query loaded document:");
final String xq2 = "doc('mydoc.xml')/nachrichten/nachricht[betreff/text()='sommer' or betreff/text()='strand' or text/text()='sommer' or text/text()='strand']";
System.out.println(xq2);
- XQuery query = new XQuery(xq2);
+ XQuery query = new XQuery(new SirixCompileChain(store), xq2);
query.prettyPrint().serialize(ctx2, System.out);
}
@@ -216,11 +217,11 @@ private static void loadDocumentAndQueryTemporal() throws QueryException,
System.out.println("Query loaded document:");
final String xq3 = "doc('mydoc.xml', 1)/log/all-time::*/*";
System.out.println(xq3);
- XQuery q = new XQuery(xq3);
+ XQuery q = new XQuery(new SirixCompileChain(store), xq3);
q.prettyPrint();
q.serialize(ctx3, System.out);
- // Serialize first version to XML.
+ // Serialize first version to XML ($user.home$/sirix-data/output-revision-1.xml).
final QueryContext ctx4 = new QueryContext(store);
final String xq4 = "bit:serialize(doc('mydoc.xml', 1))";
q = new XQuery(xq4);
@@ -231,7 +232,7 @@ private static void loadDocumentAndQueryTemporal() throws QueryException,
q.prettyPrint().serialize(ctx4, out);
}
System.out.println();
- // Serialize second version to XML.
+ // Serialize second version to XML ($user.home$/sirix-data/output-revision-1.xml).
final QueryContext ctx5 = new QueryContext(store);
final String xq5 = "bit:serialize(doc('mydoc.xml', 2))";
q = new XQuery(xq5);
2  bundles/sirix-xquery/pom.xml
View
@@ -32,7 +32,7 @@
<artifactId>sirix-xquery</artifactId>
<packaging>jar</packaging>
<name>sirix-xquery</name>
- <version>0.1.0</version>
+ <version>0.1.2-SNAPSHOT</version>
<description>Sirix/Brackit binding.</description>
<repositories>
<repository>
19 bundles/sirix-xquery/src/main/java/org/sirix/xquery/SirixCompileChain.java
View
@@ -15,17 +15,30 @@
import org.sirix.xquery.function.sdb.SDBFun;
import org.sirix.xquery.node.DBStore;
-public class SirixCompileChain extends CompileChain {
+/**
+ * Compile chain.
+ *
+ * @author Johannes Lichtenberger
+ *
+ */
+public final class SirixCompileChain extends CompileChain {
public static final boolean OPTIMIZE = Cfg.asBool(
"org.sirix.xquery.optimize.multichild", false);
-
+
static {
- // define function namespaces and functions in these namespaces
+ // define function namespaces and functions in these namespaces
SDBFun.register();
}
+ /** The Sirix {@link DBStore}. */
private final DBStore mStore;
+ /**
+ * Constructor.
+ *
+ * @param store
+ * the Sirix {@link DBStore}
+ */
public SirixCompileChain(final @Nonnull DBStore store) {
mStore = store;
}
4 bundles/sirix-xquery/src/main/java/org/sirix/xquery/compiler/translator/SirixTranslator.java
View
@@ -47,8 +47,8 @@
* @author Johannes Lichtenberger
*
*/
-public class SirixTranslator extends TopDownTranslator {
-
+public final class SirixTranslator extends TopDownTranslator {
+
/** Optimize accessors or not. */
public static final boolean OPTIMIZE = Cfg.asBool(
"org.sirix.xquery.optimize.accessor", true);
115 bundles/sirix-xquery/src/main/java/org/sirix/xquery/node/DBNode.java
View
@@ -406,19 +406,19 @@ public boolean isDocumentOf(final @Nonnull Node<?> other) {
}
return retVal;
}
-
+
@Override
public boolean isDocumentRoot() {
moveRtx();
- return mRtx.getParentKey() == Fixed.NULL_NODE_KEY
- .getStandardProperty() ? true : false;
+ return mRtx.getParentKey() == Fixed.NULL_NODE_KEY.getStandardProperty() ? true
+ : false;
}
@Override
public boolean isRoot() {
moveRtx();
- return mRtx.getParentKey() == Fixed.DOCUMENT_NODE_KEY
- .getStandardProperty() ? true : false;
+ return mRtx.getParentKey() == Fixed.DOCUMENT_NODE_KEY.getStandardProperty() ? true
+ : false;
}
@Override
@@ -1465,7 +1465,7 @@ public String toString() {
public Stream<? extends Node<?>> performStep(
final org.brackit.xquery.xdm.Axis axis, final NodeType test)
throws DocumentException {
- // TODO
+
return null;
}
@@ -1548,56 +1548,143 @@ public DBNode getLast() {
@Override
public boolean isNextOf(TemporalNode<?> other) {
- // TODO Auto-generated method stub
+ moveRtx();
+ if (other instanceof DBNode) {
+ final DBNode otherNode = (DBNode) other;
+ try {
+ return otherNode.getTrx().getRevisionNumber() - 1 == this.getTrx()
+ .getRevisionNumber();
+ } catch (final SirixIOException e) {
+ LOGWRAPPER.error(e.getMessage(), e);
+ }
+ }
return false;
}
@Override
public boolean isPreviousOf(TemporalNode<?> other) {
- // TODO Auto-generated method stub
+ moveRtx();
+ if (other instanceof DBNode) {
+ final DBNode otherNode = (DBNode) other;
+ try {
+ return otherNode.getTrx().getRevisionNumber() + 1 == this.getTrx()
+ .getRevisionNumber();
+ } catch (final SirixIOException e) {
+ LOGWRAPPER.error(e.getMessage(), e);
+ }
+ }
return false;
}
@Override
public boolean isFutureOf(TemporalNode<?> other) {
- // TODO Auto-generated method stub
+ moveRtx();
+ if (other instanceof DBNode) {
+ final DBNode otherNode = (DBNode) other;
+ try {
+ return otherNode.getTrx().getRevisionNumber() > this.getTrx()
+ .getRevisionNumber();
+ } catch (final SirixIOException e) {
+ LOGWRAPPER.error(e.getMessage(), e);
+ }
+ }
return false;
}
@Override
public boolean isFutureOrSelfOf(TemporalNode<?> other) {
- // TODO Auto-generated method stub
+ moveRtx();
+ if (other instanceof DBNode) {
+ final DBNode otherNode = (DBNode) other;
+ try {
+ return otherNode.getTrx().getRevisionNumber() - 1 >= this.getTrx()
+ .getRevisionNumber();
+ } catch (final SirixIOException e) {
+ LOGWRAPPER.error(e.getMessage(), e);
+ }
+ }
return false;
}
@Override
public boolean isEarlierOf(TemporalNode<?> other) {
- // TODO Auto-generated method stub
+ moveRtx();
+ if (other instanceof DBNode) {
+ final DBNode otherNode = (DBNode) other;
+ try {
+ return otherNode.getTrx().getRevisionNumber() < this.getTrx()
+ .getRevisionNumber();
+ } catch (final SirixIOException e) {
+ LOGWRAPPER.error(e.getMessage(), e);
+ }
+ }
return false;
}
@Override
public boolean isEarlierOrSelfOf(TemporalNode<?> other) {
- // TODO Auto-generated method stub
+ moveRtx();
+ if (other instanceof DBNode) {
+ final DBNode otherNode = (DBNode) other;
+ try {
+ return otherNode.getTrx().getRevisionNumber() <= this.getTrx()
+ .getRevisionNumber();
+ } catch (final SirixIOException e) {
+ LOGWRAPPER.error(e.getMessage(), e);
+ }
+ }
return false;
}
@Override
public boolean isLastOf(TemporalNode<?> other) {
- // TODO Auto-generated method stub
+ moveRtx();
+ if (other instanceof DBNode) {
+ final DBNode otherNode = (DBNode) other;
+ try {
+ final NodeReadTrx otherTrx = otherNode.getTrx();
+ return otherTrx.getSession().getLastRevisionNumber() == otherTrx
+ .getRevisionNumber();
+ } catch (final SirixIOException e) {
+ LOGWRAPPER.error(e.getMessage(), e);
+ }
+ }
return false;
}
@Override
public boolean isFirstOf(TemporalNode<?> other) {
- // TODO Auto-generated method stub
+ moveRtx();
+ if (other instanceof DBNode) {
+ final DBNode otherNode = (DBNode) other;
+ try {
+ final NodeReadTrx otherTrx = otherNode.getTrx();
+ // Revision 0 is just the bootstrap revision and not accessed over here.
+ return otherTrx.getRevisionNumber() == 1;
+ } catch (final SirixIOException e) {
+ LOGWRAPPER.error(e.getMessage(), e);
+ }
+ }
return false;
}
+ /**
+ * Get the path class record (PCR).
+ *
+ * @return the path class record
+ *
+ * @throws SirixException
+ */
public long getPCR() throws SirixException {
return mRtx.getPathNodeKey();
}
+ /**
+ * Get the DeweyID associated with this node (if any).
+ *
+ * @return an optional DeweyID (might be absent, depending on the
+ * {@link DBStore} configuration)
+ */
public Optional<SirixDeweyID> getDeweyID() {
return mRtx.getDeweyID();
}
3  bundles/sirix-xquery/src/main/java/org/sirix/xquery/stream/TemporalSirixStream.java
View
@@ -22,7 +22,10 @@
*/
public class TemporalSirixStream implements Stream<AbstractTemporalNode<DBNode>> {
+ /** Temporal axis. */
private final AbstractTemporalAxis mAxis;
+
+ /** The {@link DBCollection} reference. */
private DBCollection mCollection;
/**
Please sign in to comment.
Something went wrong with that request. Please try again.