SPARQL builder and CQL-to-SPARQL converter SUP-652
[cql-java-moved-to-github.git] / src / main / java / org / z3950 / zing / cql / sparql / Optional.java
diff --git a/src/main/java/org/z3950/zing/cql/sparql/Optional.java b/src/main/java/org/z3950/zing/cql/sparql/Optional.java
new file mode 100644 (file)
index 0000000..88d51cc
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 1995-2014, Index Data
+ * All rights reserved.
+ * See the file LICENSE for details.
+ */
+
+package org.z3950.zing.cql.sparql;
+
+import org.z3950.zing.cql.utils.PrettyPrinter;
+
+/**
+ *
+ * @author jakub
+ */
+public class Optional extends GraphPatternSet {
+
+  public Optional(GraphPattern pattern) {
+    super(pattern);
+  }
+  
+  @Override
+  public void print(PrettyPrinter sw) {
+    sw.startl("OPTIONAL ");
+    super.print(sw);
+  }
+}