Remove IOMVisitor and its only (unused) implementation
Change-Id: I5230479d6446db0dbd167f30320fd31d772c9898
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1699
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABinary.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABinary.java
index db87ce0..d4b7ac7 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABinary.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABinary.java
@@ -19,10 +19,8 @@
package org.apache.asterix.om.base;
import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -59,11 +57,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitABinary(this);
- }
-
- @Override
public IAType getType() {
return BuiltinType.ABINARY;
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABitArray.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABitArray.java
index a15dbad..d3dbe42 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABitArray.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABitArray.java
@@ -22,10 +22,8 @@
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
public final class ABitArray implements IAObject {
@@ -98,10 +96,6 @@
return h;
}
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitABitArray(this);
- }
-
@Override
public boolean deepEqual(IAObject obj) {
if (!(obj instanceof ABitArray)) {
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABoolean.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABoolean.java
index a1011d8..8b24205 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABoolean.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ABoolean.java
@@ -19,10 +19,8 @@
package org.apache.asterix.om.base;
import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
import com.fasterxml.jackson.databind.node.ObjectNode;
public final class ABoolean implements IAObject {
@@ -65,11 +63,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitABoolean(this);
- }
-
- @Override
public boolean deepEqual(IAObject obj) {
return obj == this;
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ACircle.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ACircle.java
index 4878d7a..43f9109 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ACircle.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ACircle.java
@@ -21,10 +21,8 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
public class ACircle implements IAObject {
@@ -53,11 +51,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitACircle(this);
- }
-
- @Override
public IAType getType() {
return BuiltinType.ACIRCLE;
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADate.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADate.java
index 9373f90..4bd6711 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADate.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADate.java
@@ -23,11 +23,9 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
/**
* ADate type represents dates in a gregorian calendar system.
@@ -63,11 +61,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitADate(this);
- }
-
- @Override
public boolean deepEqual(IAObject obj) {
return equals(obj);
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADateTime.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADateTime.java
index 75f653e..ab228a2 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADateTime.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADateTime.java
@@ -21,11 +21,9 @@
import java.io.IOException;
import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
import com.fasterxml.jackson.databind.node.ObjectNode;
/**
@@ -96,11 +94,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitADateTime(this);
- }
-
- @Override
public boolean deepEqual(IAObject obj) {
return equals(obj);
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADayTimeDuration.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADayTimeDuration.java
index d31b8c8..95e677b 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADayTimeDuration.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADayTimeDuration.java
@@ -22,10 +22,8 @@
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
public class ADayTimeDuration implements IAObject {
@@ -63,14 +61,6 @@
}
/* (non-Javadoc)
- * @see org.apache.asterix.om.base.IAObject#accept(org.apache.asterix.om.visitors.IOMVisitor)
- */
- @Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitADayTimeDuration(this);
- }
-
- /* (non-Javadoc)
* @see org.apache.asterix.om.base.IAObject#deepEqual(org.apache.asterix.om.base.IAObject)
*/
@Override
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADouble.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADouble.java
index 7a2fe06..7cb4151 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADouble.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADouble.java
@@ -22,10 +22,8 @@
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
public class ADouble implements IAObject {
@@ -64,11 +62,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitADouble(this);
- }
-
- @Override
public boolean deepEqual(IAObject obj) {
return equals(obj);
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADuration.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADuration.java
index a3f23d3..3753930 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADuration.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ADuration.java
@@ -22,11 +22,9 @@
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
/**
* ADuration type represents time duration (unanchored time length) values.
@@ -93,11 +91,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitADuration(this);
- }
-
- @Override
public boolean deepEqual(IAObject obj) {
return equals(obj);
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AFloat.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AFloat.java
index f29e659..3794747 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AFloat.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AFloat.java
@@ -22,10 +22,8 @@
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
public class AFloat implements IAObject {
@@ -59,11 +57,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAFloat(this);
- }
-
- @Override
public boolean deepEqual(IAObject obj) {
return equals(obj);
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt16.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt16.java
index 934ef0a..392aae7 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt16.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt16.java
@@ -22,10 +22,8 @@
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
public class AInt16 implements IAObject {
@@ -36,11 +34,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAInt16(this);
- }
-
- @Override
public IAType getType() {
return BuiltinType.AINT16;
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt32.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt32.java
index 38a87d7..495a604 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt32.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt32.java
@@ -22,10 +22,8 @@
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
public class AInt32 implements IAObject {
@@ -79,11 +77,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAInt32(this);
- }
-
- @Override
public boolean deepEqual(IAObject obj) {
return equals(obj);
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt64.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt64.java
index 02bc8b0..3cf40d6 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt64.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt64.java
@@ -22,10 +22,8 @@
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
public class AInt64 implements IAObject {
@@ -45,11 +43,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAInt64(this);
- }
-
- @Override
public boolean deepEqual(IAObject obj) {
if (!(obj instanceof AInt64)) {
return false;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt8.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt8.java
index 5623d37..a435833 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt8.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInt8.java
@@ -22,10 +22,8 @@
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
public class AInt8 implements IAObject {
@@ -36,11 +34,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAInt8(this);
- }
-
- @Override
public IAType getType() {
return BuiltinType.AINT8;
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInterval.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInterval.java
index 9dfaf3b..b5d40c0 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInterval.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AInterval.java
@@ -22,12 +22,10 @@
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
import org.apache.asterix.om.types.ATypeTag;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
public class AInterval implements IAObject {
@@ -78,14 +76,6 @@
}
/* (non-Javadoc)
- * @see org.apache.asterix.om.base.IAObject#accept(org.apache.asterix.om.visitors.IOMVisitor)
- */
- @Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAInterval(this);
- }
-
- /* (non-Javadoc)
* @see org.apache.asterix.om.base.IAObject#deepEqual(org.apache.asterix.om.base.IAObject)
*/
@Override
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ALine.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ALine.java
index 9134a3c..e1cf6ff 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ALine.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ALine.java
@@ -21,10 +21,8 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
public class ALine implements IAObject {
@@ -50,11 +48,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitALine(this);
- }
-
- @Override
public boolean deepEqual(IAObject obj) {
if (!(obj instanceof ALine)) {
return false;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AMissing.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AMissing.java
index 2455311..a404032 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AMissing.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AMissing.java
@@ -19,10 +19,8 @@
package org.apache.asterix.om.base;
import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
import com.fasterxml.jackson.databind.node.ObjectNode;
// This class represents a MISSING object.
@@ -34,11 +32,6 @@
public final static AMissing MISSING = new AMissing();
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAMissing(this);
- }
-
- @Override
public IAType getType() {
return BuiltinType.AMISSING;
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ANull.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ANull.java
index ebf7975..6be4832 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ANull.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ANull.java
@@ -20,10 +20,8 @@
package org.apache.asterix.om.base;
import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
import com.fasterxml.jackson.databind.node.ObjectNode;
public class ANull implements IAObject {
@@ -34,11 +32,6 @@
public final static ANull NULL = new ANull();
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitANull(this);
- }
-
- @Override
public IAType getType() {
return BuiltinType.ANULL;
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AOrderedList.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AOrderedList.java
index 8138a51..9a5a147 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AOrderedList.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AOrderedList.java
@@ -22,11 +22,9 @@
import java.util.List;
import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.AOrderedListType;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -94,11 +92,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAOrderedList(this);
- }
-
- @Override
public boolean deepEqual(IAObject obj) {
return equals(obj);
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APoint.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APoint.java
index a847cff..543edfb 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APoint.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APoint.java
@@ -21,10 +21,8 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
public class APoint implements IAObject {
@@ -45,11 +43,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAPoint(this);
- }
-
- @Override
public IAType getType() {
return BuiltinType.APOINT;
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APoint3D.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APoint3D.java
index 7b8ad94..94876b5 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APoint3D.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APoint3D.java
@@ -21,10 +21,8 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
public class APoint3D implements IAObject {
@@ -51,11 +49,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAPoint3D(this);
- }
-
- @Override
public IAType getType() {
return BuiltinType.APOINT3D;
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APolygon.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APolygon.java
index 7a3a167..8c31c76 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APolygon.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/APolygon.java
@@ -22,10 +22,8 @@
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
public class APolygon implements IAObject {
@@ -49,11 +47,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAPolygon(this);
- }
-
- @Override
public boolean deepEqual(IAObject obj) {
if (!(obj instanceof APolygon)) {
return false;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ARecord.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ARecord.java
index 147ef6d..352f2eb 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ARecord.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ARecord.java
@@ -19,10 +19,8 @@
package org.apache.asterix.om.base;
import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.ARecordType;
import org.apache.asterix.om.utils.RecordUtil;
-import org.apache.asterix.om.visitors.IOMVisitor;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -39,11 +37,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitARecord(this);
- }
-
- @Override
public ARecordType getType() {
return type;
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ARectangle.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ARectangle.java
index 4bff3a8..c99bc9b 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ARectangle.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ARectangle.java
@@ -21,10 +21,8 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
public class ARectangle implements IAObject {
@@ -50,11 +48,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitARectangle(this);
- }
-
- @Override
public boolean deepEqual(IAObject obj) {
if (!(obj instanceof ARectangle)) {
return false;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AString.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AString.java
index b0cedbc..4efd63a 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AString.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AString.java
@@ -21,10 +21,8 @@
import java.io.Serializable;
import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -64,11 +62,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAString(this);
- }
-
- @Override
public boolean deepEqual(IAObject obj) {
return equals(obj);
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ATime.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ATime.java
index 2a9e6da..38d22bc 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ATime.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ATime.java
@@ -23,11 +23,9 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.base.temporal.GregorianCalendarSystem;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
public class ATime implements IAObject {
@@ -78,11 +76,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitATime(this);
- }
-
- @Override
public boolean deepEqual(IAObject obj) {
return equals(obj);
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AUUID.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AUUID.java
index 2c7f531..c0d27ce 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AUUID.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AUUID.java
@@ -25,10 +25,8 @@
import java.util.Arrays;
import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -70,11 +68,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAUUID(this);
- }
-
- @Override
public boolean deepEqual(IAObject obj) {
if (!(obj instanceof AUUID)) {
return false;
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AUnorderedList.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AUnorderedList.java
index 62043f2..cac0840 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AUnorderedList.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AUnorderedList.java
@@ -22,10 +22,8 @@
import java.util.List;
import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.AUnorderedListType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -85,11 +83,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAUnorderedList(this);
- }
-
- @Override
public boolean deepEqual(IAObject obj) {
return equals(obj);
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AYearMonthDuration.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AYearMonthDuration.java
index ce8e7c5..55982e1 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AYearMonthDuration.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/AYearMonthDuration.java
@@ -22,10 +22,8 @@
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
/**
* AYearMonthDuration represents the duration in the unit of months.
@@ -71,14 +69,6 @@
}
/* (non-Javadoc)
- * @see org.apache.asterix.om.base.IAObject#accept(org.apache.asterix.om.visitors.IOMVisitor)
- */
- @Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAYearMonthDuration(this);
- }
-
- /* (non-Javadoc)
* @see org.apache.asterix.om.base.IAObject#deepEqual(org.apache.asterix.om.base.IAObject)
*/
@Override
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/IAObject.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/IAObject.java
index afcb5e9..7cdbb96 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/IAObject.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/IAObject.java
@@ -18,9 +18,7 @@
*/
package org.apache.asterix.om.base;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
import org.apache.hyracks.api.dataflow.value.JSONSerializable;
/**
@@ -29,8 +27,6 @@
public interface IAObject extends JSONSerializable {
public IAType getType();
- public void accept(IOMVisitor visitor) throws AsterixException;
-
public boolean deepEqual(IAObject obj);
public int hash();
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ShortWithoutTypeInfo.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ShortWithoutTypeInfo.java
index b600995..4ed7966 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ShortWithoutTypeInfo.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/base/ShortWithoutTypeInfo.java
@@ -21,10 +21,8 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.types.BuiltinType;
import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.visitors.IOMVisitor;
public class ShortWithoutTypeInfo implements IAObject {
@@ -76,11 +74,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitShortWithoutTypeInfo(this);
- }
-
- @Override
public boolean deepEqual(IAObject obj) {
return equals(obj);
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/ARecordType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/ARecordType.java
index 0196e94..77c491f 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/ARecordType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/ARecordType.java
@@ -29,7 +29,6 @@
import org.apache.asterix.common.annotations.IRecordTypeAnnotation;
import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.base.IAObject;
-import org.apache.asterix.om.visitors.IOMVisitor;
import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -280,11 +279,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAType(this);
- }
-
- @Override
public IAType getType() {
return BuiltinType.ASTERIX_TYPE;
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnionType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnionType.java
index af06108..2a06976 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnionType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AUnionType.java
@@ -23,9 +23,7 @@
import java.util.List;
import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.base.IAObject;
-import org.apache.asterix.om.visitors.IOMVisitor;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -154,11 +152,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAType(this);
- }
-
- @Override
public IAType getType() {
return BuiltinType.ASTERIX_TYPE;
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AbstractCollectionType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AbstractCollectionType.java
index 88a4f93..2902e18 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AbstractCollectionType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/AbstractCollectionType.java
@@ -18,9 +18,6 @@
*/
package org.apache.asterix.om.types;
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.om.visitors.IOMVisitor;
-
public abstract class AbstractCollectionType extends AbstractComplexType {
private static final long serialVersionUID = 1L;
@@ -50,11 +47,6 @@
}
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAType(this);
- }
-
- @Override
public void generateNestedDerivedTypeNames() {
if (itemType.getTypeTag().isDerivedType() && itemType.getTypeName() == null) {
AbstractComplexType nestedType = ((AbstractComplexType) itemType);
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/BuiltinType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/BuiltinType.java
index 42745f4..661fd3c 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/BuiltinType.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/types/BuiltinType.java
@@ -19,9 +19,7 @@
package org.apache.asterix.om.types;
import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.asterix.common.exceptions.AsterixException;
import org.apache.asterix.om.base.IAObject;
-import org.apache.asterix.om.visitors.IOMVisitor;
import com.fasterxml.jackson.databind.node.ObjectNode;
public abstract class BuiltinType implements IAType {
@@ -864,11 +862,6 @@
public abstract String getConstructor();
@Override
- public void accept(IOMVisitor visitor) throws AsterixException {
- visitor.visitAType(this);
- }
-
- @Override
public IAType getType() {
return ASTERIX_TYPE;
}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/visitors/IOMVisitor.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/visitors/IOMVisitor.java
deleted file mode 100644
index 6ef6a9d..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/visitors/IOMVisitor.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.asterix.om.visitors;
-
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.om.base.ABinary;
-import org.apache.asterix.om.base.ABitArray;
-import org.apache.asterix.om.base.ABoolean;
-import org.apache.asterix.om.base.ACircle;
-import org.apache.asterix.om.base.ADate;
-import org.apache.asterix.om.base.ADateTime;
-import org.apache.asterix.om.base.ADayTimeDuration;
-import org.apache.asterix.om.base.ADouble;
-import org.apache.asterix.om.base.ADuration;
-import org.apache.asterix.om.base.AFloat;
-import org.apache.asterix.om.base.AInt16;
-import org.apache.asterix.om.base.AInt32;
-import org.apache.asterix.om.base.AInt64;
-import org.apache.asterix.om.base.AInt8;
-import org.apache.asterix.om.base.AInterval;
-import org.apache.asterix.om.base.ALine;
-import org.apache.asterix.om.base.AMissing;
-import org.apache.asterix.om.base.ANull;
-import org.apache.asterix.om.base.AOrderedList;
-import org.apache.asterix.om.base.APoint;
-import org.apache.asterix.om.base.APoint3D;
-import org.apache.asterix.om.base.APolygon;
-import org.apache.asterix.om.base.ARecord;
-import org.apache.asterix.om.base.ARectangle;
-import org.apache.asterix.om.base.AString;
-import org.apache.asterix.om.base.ATime;
-import org.apache.asterix.om.base.AUUID;
-import org.apache.asterix.om.base.AUnorderedList;
-import org.apache.asterix.om.base.AYearMonthDuration;
-import org.apache.asterix.om.base.ShortWithoutTypeInfo;
-import org.apache.asterix.om.types.IAType;
-
-public interface IOMVisitor {
- public void visitABoolean(ABoolean obj) throws AsterixException;
-
- public void visitADouble(ADouble obj) throws AsterixException;
-
- public void visitAFloat(AFloat obj) throws AsterixException;
-
- public void visitAInt8(AInt8 obj) throws AsterixException;
-
- public void visitAInt16(AInt16 obj) throws AsterixException;
-
- public void visitAInt32(AInt32 obj) throws AsterixException;
-
- public void visitAInt64(AInt64 obj) throws AsterixException;
-
- public void visitAString(AString obj) throws AsterixException;
-
- public void visitADuration(ADuration obj) throws AsterixException;
-
- public void visitAYearMonthDuration(AYearMonthDuration obj) throws AsterixException;
-
- public void visitADayTimeDuration(ADayTimeDuration obj) throws AsterixException;
-
- public void visitAInterval(AInterval obj) throws AsterixException;
-
- public void visitADate(ADate obj) throws AsterixException;
-
- public void visitATime(ATime obj) throws AsterixException;
-
- public void visitADateTime(ADateTime obj) throws AsterixException;
-
- public void visitABitArray(ABitArray obj) throws AsterixException;
-
- public void visitABinary(ABinary obj) throws AsterixException;
-
- public void visitAOrderedList(AOrderedList obj) throws AsterixException;
-
- public void visitAUnorderedList(AUnorderedList obj) throws AsterixException;
-
- public void visitARecord(ARecord obj) throws AsterixException;
-
- public void visitAMissing(AMissing obj) throws AsterixException;
-
- public void visitANull(ANull obj) throws AsterixException;
-
- public void visitAPoint(APoint obj) throws AsterixException;
-
- public void visitAPoint3D(APoint3D obj) throws AsterixException;
-
- public void visitAType(IAType obj) throws AsterixException;
-
- public void visitALine(ALine obj) throws AsterixException;
-
- public void visitAPolygon(APolygon obj) throws AsterixException;
-
- public void visitACircle(ACircle obj) throws AsterixException;
-
- public void visitARectangle(ARectangle obj) throws AsterixException;
-
- public void visitAUUID(AUUID obj) throws AsterixException;
-
- public void visitShortWithoutTypeInfo(ShortWithoutTypeInfo obj) throws AsterixException;
-
-}
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/visitors/OMPrintToStringVisitor.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/visitors/OMPrintToStringVisitor.java
deleted file mode 100644
index 0752a84..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/visitors/OMPrintToStringVisitor.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.asterix.om.visitors;
-
-import org.apache.asterix.common.exceptions.AsterixException;
-import org.apache.asterix.om.base.ABinary;
-import org.apache.asterix.om.base.ABitArray;
-import org.apache.asterix.om.base.ABoolean;
-import org.apache.asterix.om.base.ACircle;
-import org.apache.asterix.om.base.ACollectionCursor;
-import org.apache.asterix.om.base.ADate;
-import org.apache.asterix.om.base.ADateTime;
-import org.apache.asterix.om.base.ADayTimeDuration;
-import org.apache.asterix.om.base.ADouble;
-import org.apache.asterix.om.base.ADuration;
-import org.apache.asterix.om.base.AFloat;
-import org.apache.asterix.om.base.AInt16;
-import org.apache.asterix.om.base.AInt32;
-import org.apache.asterix.om.base.AInt64;
-import org.apache.asterix.om.base.AInt8;
-import org.apache.asterix.om.base.AInterval;
-import org.apache.asterix.om.base.ALine;
-import org.apache.asterix.om.base.AMissing;
-import org.apache.asterix.om.base.ANull;
-import org.apache.asterix.om.base.AOrderedList;
-import org.apache.asterix.om.base.APoint;
-import org.apache.asterix.om.base.APoint3D;
-import org.apache.asterix.om.base.APolygon;
-import org.apache.asterix.om.base.ARecord;
-import org.apache.asterix.om.base.ARectangle;
-import org.apache.asterix.om.base.AString;
-import org.apache.asterix.om.base.ATime;
-import org.apache.asterix.om.base.AUUID;
-import org.apache.asterix.om.base.AUnorderedList;
-import org.apache.asterix.om.base.AYearMonthDuration;
-import org.apache.asterix.om.base.IACursor;
-import org.apache.asterix.om.base.IAObject;
-import org.apache.asterix.om.base.ShortWithoutTypeInfo;
-import org.apache.asterix.om.types.ARecordType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
-
-public class OMPrintToStringVisitor implements IOMVisitor {
-
- private StringBuilder buffer;
- private ACollectionCursor collCur = new ACollectionCursor();
-
- public OMPrintToStringVisitor() {
- this.buffer = new StringBuilder();
- }
-
- public void reset() {
- buffer.setLength(0);
- }
-
- @Override
- public String toString() {
- return buffer.toString();
- }
-
- @Override
- public void visitABinary(ABinary obj) throws AsterixException {
- // TODO Auto-generated method stub
- throw new NotImplementedException();
- }
-
- @Override
- public void visitABitArray(ABitArray obj) throws AsterixException {
- // TODO Auto-generated method stub
- throw new NotImplementedException();
- }
-
- @Override
- public void visitABoolean(ABoolean obj) throws AsterixException {
- buffer.append(obj.getBoolean());
- }
-
- @Override
- public void visitADate(ADate obj) throws AsterixException {
- // TODO Auto-generated method stub
- throw new NotImplementedException();
- }
-
- @Override
- public void visitADateTime(ADateTime obj) throws AsterixException {
- // TODO Auto-generated method stub
- throw new NotImplementedException();
- }
-
- @Override
- public void visitADouble(ADouble obj) throws AsterixException {
- buffer.append(obj.getDoubleValue());
- }
-
- @Override
- public void visitADuration(ADuration obj) throws AsterixException {
- // TODO Auto-generated method stub
- throw new NotImplementedException();
- }
-
- @Override
- public void visitAInterval(AInterval obj) throws AsterixException {
- // TODO Auto-generated method stub
- throw new NotImplementedException();
- }
-
- @Override
- public void visitAFloat(AFloat obj) throws AsterixException {
- buffer.append(obj.getFloatValue() + "f");
- }
-
- @Override
- public void visitAInt16(AInt16 obj) throws AsterixException {
- buffer.append(obj.getShortValue());
- }
-
- @Override
- public void visitAInt32(AInt32 obj) throws AsterixException {
- buffer.append(obj.getIntegerValue());
- }
-
- @Override
- public void visitAInt64(AInt64 obj) throws AsterixException {
- buffer.append(obj.getLongValue());
- }
-
- @Override
- public void visitShortWithoutTypeInfo(ShortWithoutTypeInfo obj) throws AsterixException {
- buffer.append(obj.getShortValue());
- }
-
- @Override
- public void visitAInt8(AInt8 obj) throws AsterixException {
- buffer.append(obj.getByteValue());
- }
-
- @Override
- public void visitAMissing(AMissing obj) throws AsterixException {
- buffer.append("missing");
- }
-
- @Override
- public void visitANull(ANull obj) throws AsterixException {
- buffer.append("null");
- }
-
- @Override
- public void visitAOrderedList(AOrderedList obj) throws AsterixException {
- buffer.append("[ ");
- collCur.reset(obj);
- printListToBuffer(collCur);
- buffer.append("]");
- }
-
- @Override
- public void visitAPoint(APoint obj) throws AsterixException {
- // TODO Auto-generated method stub
- throw new NotImplementedException();
- }
-
- @Override
- public void visitAPoint3D(APoint3D obj) throws AsterixException {
- // TODO Auto-generated method stub
- throw new NotImplementedException();
- }
-
- @Override
- public void visitALine(ALine obj) throws AsterixException {
- // TODO Auto-generated method stub
- throw new NotImplementedException();
- }
-
- @Override
- public void visitAPolygon(APolygon obj) throws AsterixException {
- // TODO Auto-generated method stub
- throw new NotImplementedException();
- }
-
- @Override
- public void visitACircle(ACircle obj) throws AsterixException {
- // TODO Auto-generated method stub
- throw new NotImplementedException();
- }
-
- @Override
- public void visitARectangle(ARectangle obj) throws AsterixException {
- // TODO Auto-generated method stub
- throw new NotImplementedException();
- }
-
- @Override
- public void visitARecord(ARecord obj) throws AsterixException {
- buffer.append("{ ");
- int sz = obj.numberOfFields();
- ARecordType type = obj.getType();
- if (sz > 0) {
- for (int i = 0; i < sz - 1; i++) {
- buffer.append("\"");
- buffer.append(type.getFieldNames()[i]);
- buffer.append("\"");
- buffer.append(": ");
- obj.getValueByPos(i).accept(this);
- buffer.append(", ");
- }
- buffer.append("\"");
- buffer.append(type.getFieldNames()[sz - 1]);
- buffer.append("\"");
- buffer.append(": ");
- obj.getValueByPos(sz - 1).accept(this);
- buffer.append(" ");
- }
- buffer.append("}");
- }
-
- @Override
- public void visitAString(AString obj) throws AsterixException {
- buffer.append("\"");
- buffer.append(obj.getStringValue());
- buffer.append("\"");
- }
-
- @Override
- public void visitATime(ATime obj) throws AsterixException {
- // TODO Auto-generated method stub
- throw new NotImplementedException();
- }
-
- @Override
- public void visitAType(IAType obj) throws AsterixException {
- switch (obj.getTypeTag()) {
- case INT32: {
- buffer.append("int32");
- break;
- }
- case FLOAT: {
- buffer.append("float");
- break;
- }
- case STRING: {
- buffer.append("string");
- break;
- }
- default: {
- // TODO Auto-generated method stub
- throw new NotImplementedException(
- "Pretty-printing is not implemented for type " + obj.getTypeTag() + " .");
- }
- }
-
- }
-
- @Override
- public void visitAUnorderedList(AUnorderedList obj) throws AsterixException {
- buffer.append("{{");
- collCur.reset(obj);
- printListToBuffer(collCur);
- buffer.append("}}");
- }
-
- private void printListToBuffer(IACursor cursor) throws AsterixException {
- if (cursor.next()) {
- IAObject item0 = cursor.get();
- item0.accept(this);
- while (cursor.next()) {
- buffer.append(", ");
- IAObject item = cursor.get();
- item.accept(this);
- }
- buffer.append(" ");
- }
- }
-
- @Override
- public void visitAYearMonthDuration(AYearMonthDuration obj) throws AsterixException {
- // TODO Auto-generated method stub
- throw new NotImplementedException();
- }
-
- @Override
- public void visitADayTimeDuration(ADayTimeDuration obj) throws AsterixException {
- // TODO Auto-generated method stub
- throw new NotImplementedException();
- }
-
- @Override
- public void visitAUUID(AUUID obj) throws AsterixException {
- throw new NotImplementedException();
- }
-
-}