You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2014/08/31 11:34:41 UTC
svn commit: r1621573 [4/5] - in /jena/trunk/jena-arq: ./
src/main/java/org/apache/jena/riot/
src/main/java/org/apache/jena/riot/resultset/
src/main/java/org/apache/jena/riot/system/
src/main/java/org/apache/jena/riot/thrift/ src/main/java/org/apache/je...
Added: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_StreamRow.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_StreamRow.java?rev=1621573&view=auto
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_StreamRow.java (added)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_StreamRow.java Sun Aug 31 09:34:40 2014
@@ -0,0 +1,419 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.jena.riot.thrift.wire;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all")
+public class RDF_StreamRow extends org.apache.thrift.TUnion<RDF_StreamRow, RDF_StreamRow._Fields> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RDF_StreamRow");
+ private static final org.apache.thrift.protocol.TField PREFIX_DECL_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixDecl", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField TRIPLE_FIELD_DESC = new org.apache.thrift.protocol.TField("triple", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField QUAD_FIELD_DESC = new org.apache.thrift.protocol.TField("quad", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ PREFIX_DECL((short)1, "prefixDecl"),
+ TRIPLE((short)2, "triple"),
+ QUAD((short)3, "quad");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // PREFIX_DECL
+ return PREFIX_DECL;
+ case 2: // TRIPLE
+ return TRIPLE;
+ case 3: // QUAD
+ return QUAD;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.PREFIX_DECL, new org.apache.thrift.meta_data.FieldMetaData("prefixDecl", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RDF_PrefixDecl.class)));
+ tmpMap.put(_Fields.TRIPLE, new org.apache.thrift.meta_data.FieldMetaData("triple", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RDF_Triple.class)));
+ tmpMap.put(_Fields.QUAD, new org.apache.thrift.meta_data.FieldMetaData("quad", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RDF_Quad.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RDF_StreamRow.class, metaDataMap);
+ }
+
+ public RDF_StreamRow() {
+ super();
+ }
+
+ public RDF_StreamRow(_Fields setField, Object value) {
+ super(setField, value);
+ }
+
+ public RDF_StreamRow(RDF_StreamRow other) {
+ super(other);
+ }
+ public RDF_StreamRow deepCopy() {
+ return new RDF_StreamRow(this);
+ }
+
+ public static RDF_StreamRow prefixDecl(RDF_PrefixDecl value) {
+ RDF_StreamRow x = new RDF_StreamRow();
+ x.setPrefixDecl(value);
+ return x;
+ }
+
+ public static RDF_StreamRow triple(RDF_Triple value) {
+ RDF_StreamRow x = new RDF_StreamRow();
+ x.setTriple(value);
+ return x;
+ }
+
+ public static RDF_StreamRow quad(RDF_Quad value) {
+ RDF_StreamRow x = new RDF_StreamRow();
+ x.setQuad(value);
+ return x;
+ }
+
+
+ @Override
+ protected void checkType(_Fields setField, Object value) throws ClassCastException {
+ switch (setField) {
+ case PREFIX_DECL:
+ if (value instanceof RDF_PrefixDecl) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type RDF_PrefixDecl for field 'prefixDecl', but got " + value.getClass().getSimpleName());
+ case TRIPLE:
+ if (value instanceof RDF_Triple) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type RDF_Triple for field 'triple', but got " + value.getClass().getSimpleName());
+ case QUAD:
+ if (value instanceof RDF_Quad) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type RDF_Quad for field 'quad', but got " + value.getClass().getSimpleName());
+ default:
+ throw new IllegalArgumentException("Unknown field id " + setField);
+ }
+ }
+
+ @Override
+ protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
+ _Fields setField = _Fields.findByThriftId(field.id);
+ if (setField != null) {
+ switch (setField) {
+ case PREFIX_DECL:
+ if (field.type == PREFIX_DECL_FIELD_DESC.type) {
+ RDF_PrefixDecl prefixDecl;
+ prefixDecl = new RDF_PrefixDecl();
+ prefixDecl.read(iprot);
+ return prefixDecl;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case TRIPLE:
+ if (field.type == TRIPLE_FIELD_DESC.type) {
+ RDF_Triple triple;
+ triple = new RDF_Triple();
+ triple.read(iprot);
+ return triple;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case QUAD:
+ if (field.type == QUAD_FIELD_DESC.type) {
+ RDF_Quad quad;
+ quad = new RDF_Quad();
+ quad.read(iprot);
+ return quad;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ default:
+ throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ }
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ switch (setField_) {
+ case PREFIX_DECL:
+ RDF_PrefixDecl prefixDecl = (RDF_PrefixDecl)value_;
+ prefixDecl.write(oprot);
+ return;
+ case TRIPLE:
+ RDF_Triple triple = (RDF_Triple)value_;
+ triple.write(oprot);
+ return;
+ case QUAD:
+ RDF_Quad quad = (RDF_Quad)value_;
+ quad.write(oprot);
+ return;
+ default:
+ throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ }
+ }
+
+ @Override
+ protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
+ _Fields setField = _Fields.findByThriftId(fieldID);
+ if (setField != null) {
+ switch (setField) {
+ case PREFIX_DECL:
+ RDF_PrefixDecl prefixDecl;
+ prefixDecl = new RDF_PrefixDecl();
+ prefixDecl.read(iprot);
+ return prefixDecl;
+ case TRIPLE:
+ RDF_Triple triple;
+ triple = new RDF_Triple();
+ triple.read(iprot);
+ return triple;
+ case QUAD:
+ RDF_Quad quad;
+ quad = new RDF_Quad();
+ quad.read(iprot);
+ return quad;
+ default:
+ throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ }
+ } else {
+ throw new TProtocolException("Couldn't find a field with field id " + fieldID);
+ }
+ }
+
+ @Override
+ protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ switch (setField_) {
+ case PREFIX_DECL:
+ RDF_PrefixDecl prefixDecl = (RDF_PrefixDecl)value_;
+ prefixDecl.write(oprot);
+ return;
+ case TRIPLE:
+ RDF_Triple triple = (RDF_Triple)value_;
+ triple.write(oprot);
+ return;
+ case QUAD:
+ RDF_Quad quad = (RDF_Quad)value_;
+ quad.write(oprot);
+ return;
+ default:
+ throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ }
+ }
+
+ @Override
+ protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) {
+ switch (setField) {
+ case PREFIX_DECL:
+ return PREFIX_DECL_FIELD_DESC;
+ case TRIPLE:
+ return TRIPLE_FIELD_DESC;
+ case QUAD:
+ return QUAD_FIELD_DESC;
+ default:
+ throw new IllegalArgumentException("Unknown field id " + setField);
+ }
+ }
+
+ @Override
+ protected org.apache.thrift.protocol.TStruct getStructDesc() {
+ return STRUCT_DESC;
+ }
+
+ @Override
+ protected _Fields enumForId(short id) {
+ return _Fields.findByThriftIdOrThrow(id);
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+
+ public RDF_PrefixDecl getPrefixDecl() {
+ if (getSetField() == _Fields.PREFIX_DECL) {
+ return (RDF_PrefixDecl)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'prefixDecl' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setPrefixDecl(RDF_PrefixDecl value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.PREFIX_DECL;
+ value_ = value;
+ }
+
+ public RDF_Triple getTriple() {
+ if (getSetField() == _Fields.TRIPLE) {
+ return (RDF_Triple)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'triple' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setTriple(RDF_Triple value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.TRIPLE;
+ value_ = value;
+ }
+
+ public RDF_Quad getQuad() {
+ if (getSetField() == _Fields.QUAD) {
+ return (RDF_Quad)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'quad' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setQuad(RDF_Quad value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.QUAD;
+ value_ = value;
+ }
+
+ public boolean isSetPrefixDecl() {
+ return setField_ == _Fields.PREFIX_DECL;
+ }
+
+
+ public boolean isSetTriple() {
+ return setField_ == _Fields.TRIPLE;
+ }
+
+
+ public boolean isSetQuad() {
+ return setField_ == _Fields.QUAD;
+ }
+
+
+ public boolean equals(Object other) {
+ if (other instanceof RDF_StreamRow) {
+ return equals((RDF_StreamRow)other);
+ } else {
+ return false;
+ }
+ }
+
+ public boolean equals(RDF_StreamRow other) {
+ return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue());
+ }
+
+ @Override
+ public int compareTo(RDF_StreamRow other) {
+ int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField());
+ if (lastComparison == 0) {
+ return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue());
+ }
+ return lastComparison;
+ }
+
+
+ /**
+ * If you'd like this to perform more respectably, use the hashcode generator option.
+ */
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+
+}
Propchange: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_StreamRow.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_Term.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_Term.java?rev=1621573&view=auto
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_Term.java (added)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_Term.java Sun Aug 31 09:34:40 2014
@@ -0,0 +1,901 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.jena.riot.thrift.wire;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all")
+public class RDF_Term extends org.apache.thrift.TUnion<RDF_Term, RDF_Term._Fields> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RDF_Term");
+ private static final org.apache.thrift.protocol.TField IRI_FIELD_DESC = new org.apache.thrift.protocol.TField("iri", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField BNODE_FIELD_DESC = new org.apache.thrift.protocol.TField("bnode", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField LITERAL_FIELD_DESC = new org.apache.thrift.protocol.TField("literal", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+ private static final org.apache.thrift.protocol.TField PREFIX_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("prefixName", org.apache.thrift.protocol.TType.STRUCT, (short)4);
+ private static final org.apache.thrift.protocol.TField VARIABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("variable", org.apache.thrift.protocol.TType.STRUCT, (short)5);
+ private static final org.apache.thrift.protocol.TField ANY_FIELD_DESC = new org.apache.thrift.protocol.TField("any", org.apache.thrift.protocol.TType.STRUCT, (short)6);
+ private static final org.apache.thrift.protocol.TField UNDEFINED_FIELD_DESC = new org.apache.thrift.protocol.TField("undefined", org.apache.thrift.protocol.TType.STRUCT, (short)7);
+ private static final org.apache.thrift.protocol.TField REPEAT_FIELD_DESC = new org.apache.thrift.protocol.TField("repeat", org.apache.thrift.protocol.TType.STRUCT, (short)8);
+ private static final org.apache.thrift.protocol.TField VAL_INTEGER_FIELD_DESC = new org.apache.thrift.protocol.TField("valInteger", org.apache.thrift.protocol.TType.I64, (short)10);
+ private static final org.apache.thrift.protocol.TField VAL_DOUBLE_FIELD_DESC = new org.apache.thrift.protocol.TField("valDouble", org.apache.thrift.protocol.TType.DOUBLE, (short)11);
+ private static final org.apache.thrift.protocol.TField VAL_DECIMAL_FIELD_DESC = new org.apache.thrift.protocol.TField("valDecimal", org.apache.thrift.protocol.TType.STRUCT, (short)12);
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ IRI((short)1, "iri"),
+ BNODE((short)2, "bnode"),
+ LITERAL((short)3, "literal"),
+ PREFIX_NAME((short)4, "prefixName"),
+ VARIABLE((short)5, "variable"),
+ ANY((short)6, "any"),
+ UNDEFINED((short)7, "undefined"),
+ REPEAT((short)8, "repeat"),
+ VAL_INTEGER((short)10, "valInteger"),
+ VAL_DOUBLE((short)11, "valDouble"),
+ VAL_DECIMAL((short)12, "valDecimal");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // IRI
+ return IRI;
+ case 2: // BNODE
+ return BNODE;
+ case 3: // LITERAL
+ return LITERAL;
+ case 4: // PREFIX_NAME
+ return PREFIX_NAME;
+ case 5: // VARIABLE
+ return VARIABLE;
+ case 6: // ANY
+ return ANY;
+ case 7: // UNDEFINED
+ return UNDEFINED;
+ case 8: // REPEAT
+ return REPEAT;
+ case 10: // VAL_INTEGER
+ return VAL_INTEGER;
+ case 11: // VAL_DOUBLE
+ return VAL_DOUBLE;
+ case 12: // VAL_DECIMAL
+ return VAL_DECIMAL;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.IRI, new org.apache.thrift.meta_data.FieldMetaData("iri", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RDF_IRI.class)));
+ tmpMap.put(_Fields.BNODE, new org.apache.thrift.meta_data.FieldMetaData("bnode", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RDF_BNode.class)));
+ tmpMap.put(_Fields.LITERAL, new org.apache.thrift.meta_data.FieldMetaData("literal", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RDF_Literal.class)));
+ tmpMap.put(_Fields.PREFIX_NAME, new org.apache.thrift.meta_data.FieldMetaData("prefixName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RDF_PrefixName.class)));
+ tmpMap.put(_Fields.VARIABLE, new org.apache.thrift.meta_data.FieldMetaData("variable", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RDF_VAR.class)));
+ tmpMap.put(_Fields.ANY, new org.apache.thrift.meta_data.FieldMetaData("any", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RDF_ANY.class)));
+ tmpMap.put(_Fields.UNDEFINED, new org.apache.thrift.meta_data.FieldMetaData("undefined", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RDF_UNDEF.class)));
+ tmpMap.put(_Fields.REPEAT, new org.apache.thrift.meta_data.FieldMetaData("repeat", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RDF_REPEAT.class)));
+ tmpMap.put(_Fields.VAL_INTEGER, new org.apache.thrift.meta_data.FieldMetaData("valInteger", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.VAL_DOUBLE, new org.apache.thrift.meta_data.FieldMetaData("valDouble", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
+ tmpMap.put(_Fields.VAL_DECIMAL, new org.apache.thrift.meta_data.FieldMetaData("valDecimal", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RDF_Decimal.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RDF_Term.class, metaDataMap);
+ }
+
+ public RDF_Term() {
+ super();
+ }
+
+ public RDF_Term(_Fields setField, Object value) {
+ super(setField, value);
+ }
+
+ public RDF_Term(RDF_Term other) {
+ super(other);
+ }
+ public RDF_Term deepCopy() {
+ return new RDF_Term(this);
+ }
+
+ public static RDF_Term iri(RDF_IRI value) {
+ RDF_Term x = new RDF_Term();
+ x.setIri(value);
+ return x;
+ }
+
+ public static RDF_Term bnode(RDF_BNode value) {
+ RDF_Term x = new RDF_Term();
+ x.setBnode(value);
+ return x;
+ }
+
+ public static RDF_Term literal(RDF_Literal value) {
+ RDF_Term x = new RDF_Term();
+ x.setLiteral(value);
+ return x;
+ }
+
+ public static RDF_Term prefixName(RDF_PrefixName value) {
+ RDF_Term x = new RDF_Term();
+ x.setPrefixName(value);
+ return x;
+ }
+
+ public static RDF_Term variable(RDF_VAR value) {
+ RDF_Term x = new RDF_Term();
+ x.setVariable(value);
+ return x;
+ }
+
+ public static RDF_Term any(RDF_ANY value) {
+ RDF_Term x = new RDF_Term();
+ x.setAny(value);
+ return x;
+ }
+
+ public static RDF_Term undefined(RDF_UNDEF value) {
+ RDF_Term x = new RDF_Term();
+ x.setUndefined(value);
+ return x;
+ }
+
+ public static RDF_Term repeat(RDF_REPEAT value) {
+ RDF_Term x = new RDF_Term();
+ x.setRepeat(value);
+ return x;
+ }
+
+ public static RDF_Term valInteger(long value) {
+ RDF_Term x = new RDF_Term();
+ x.setValInteger(value);
+ return x;
+ }
+
+ public static RDF_Term valDouble(double value) {
+ RDF_Term x = new RDF_Term();
+ x.setValDouble(value);
+ return x;
+ }
+
+ public static RDF_Term valDecimal(RDF_Decimal value) {
+ RDF_Term x = new RDF_Term();
+ x.setValDecimal(value);
+ return x;
+ }
+
+
+ @Override
+ protected void checkType(_Fields setField, Object value) throws ClassCastException {
+ switch (setField) {
+ case IRI:
+ if (value instanceof RDF_IRI) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type RDF_IRI for field 'iri', but got " + value.getClass().getSimpleName());
+ case BNODE:
+ if (value instanceof RDF_BNode) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type RDF_BNode for field 'bnode', but got " + value.getClass().getSimpleName());
+ case LITERAL:
+ if (value instanceof RDF_Literal) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type RDF_Literal for field 'literal', but got " + value.getClass().getSimpleName());
+ case PREFIX_NAME:
+ if (value instanceof RDF_PrefixName) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type RDF_PrefixName for field 'prefixName', but got " + value.getClass().getSimpleName());
+ case VARIABLE:
+ if (value instanceof RDF_VAR) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type RDF_VAR for field 'variable', but got " + value.getClass().getSimpleName());
+ case ANY:
+ if (value instanceof RDF_ANY) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type RDF_ANY for field 'any', but got " + value.getClass().getSimpleName());
+ case UNDEFINED:
+ if (value instanceof RDF_UNDEF) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type RDF_UNDEF for field 'undefined', but got " + value.getClass().getSimpleName());
+ case REPEAT:
+ if (value instanceof RDF_REPEAT) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type RDF_REPEAT for field 'repeat', but got " + value.getClass().getSimpleName());
+ case VAL_INTEGER:
+ if (value instanceof Long) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type Long for field 'valInteger', but got " + value.getClass().getSimpleName());
+ case VAL_DOUBLE:
+ if (value instanceof Double) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type Double for field 'valDouble', but got " + value.getClass().getSimpleName());
+ case VAL_DECIMAL:
+ if (value instanceof RDF_Decimal) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type RDF_Decimal for field 'valDecimal', but got " + value.getClass().getSimpleName());
+ default:
+ throw new IllegalArgumentException("Unknown field id " + setField);
+ }
+ }
+
+ @Override
+ protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
+ _Fields setField = _Fields.findByThriftId(field.id);
+ if (setField != null) {
+ switch (setField) {
+ case IRI:
+ if (field.type == IRI_FIELD_DESC.type) {
+ RDF_IRI iri;
+ iri = new RDF_IRI();
+ iri.read(iprot);
+ return iri;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case BNODE:
+ if (field.type == BNODE_FIELD_DESC.type) {
+ RDF_BNode bnode;
+ bnode = new RDF_BNode();
+ bnode.read(iprot);
+ return bnode;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case LITERAL:
+ if (field.type == LITERAL_FIELD_DESC.type) {
+ RDF_Literal literal;
+ literal = new RDF_Literal();
+ literal.read(iprot);
+ return literal;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case PREFIX_NAME:
+ if (field.type == PREFIX_NAME_FIELD_DESC.type) {
+ RDF_PrefixName prefixName;
+ prefixName = new RDF_PrefixName();
+ prefixName.read(iprot);
+ return prefixName;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case VARIABLE:
+ if (field.type == VARIABLE_FIELD_DESC.type) {
+ RDF_VAR variable;
+ variable = new RDF_VAR();
+ variable.read(iprot);
+ return variable;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case ANY:
+ if (field.type == ANY_FIELD_DESC.type) {
+ RDF_ANY any;
+ any = new RDF_ANY();
+ any.read(iprot);
+ return any;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case UNDEFINED:
+ if (field.type == UNDEFINED_FIELD_DESC.type) {
+ RDF_UNDEF undefined;
+ undefined = new RDF_UNDEF();
+ undefined.read(iprot);
+ return undefined;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case REPEAT:
+ if (field.type == REPEAT_FIELD_DESC.type) {
+ RDF_REPEAT repeat;
+ repeat = new RDF_REPEAT();
+ repeat.read(iprot);
+ return repeat;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case VAL_INTEGER:
+ if (field.type == VAL_INTEGER_FIELD_DESC.type) {
+ Long valInteger;
+ valInteger = iprot.readI64();
+ return valInteger;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case VAL_DOUBLE:
+ if (field.type == VAL_DOUBLE_FIELD_DESC.type) {
+ Double valDouble;
+ valDouble = iprot.readDouble();
+ return valDouble;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case VAL_DECIMAL:
+ if (field.type == VAL_DECIMAL_FIELD_DESC.type) {
+ RDF_Decimal valDecimal;
+ valDecimal = new RDF_Decimal();
+ valDecimal.read(iprot);
+ return valDecimal;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ default:
+ throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ }
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ switch (setField_) {
+ case IRI:
+ RDF_IRI iri = (RDF_IRI)value_;
+ iri.write(oprot);
+ return;
+ case BNODE:
+ RDF_BNode bnode = (RDF_BNode)value_;
+ bnode.write(oprot);
+ return;
+ case LITERAL:
+ RDF_Literal literal = (RDF_Literal)value_;
+ literal.write(oprot);
+ return;
+ case PREFIX_NAME:
+ RDF_PrefixName prefixName = (RDF_PrefixName)value_;
+ prefixName.write(oprot);
+ return;
+ case VARIABLE:
+ RDF_VAR variable = (RDF_VAR)value_;
+ variable.write(oprot);
+ return;
+ case ANY:
+ RDF_ANY any = (RDF_ANY)value_;
+ any.write(oprot);
+ return;
+ case UNDEFINED:
+ RDF_UNDEF undefined = (RDF_UNDEF)value_;
+ undefined.write(oprot);
+ return;
+ case REPEAT:
+ RDF_REPEAT repeat = (RDF_REPEAT)value_;
+ repeat.write(oprot);
+ return;
+ case VAL_INTEGER:
+ Long valInteger = (Long)value_;
+ oprot.writeI64(valInteger);
+ return;
+ case VAL_DOUBLE:
+ Double valDouble = (Double)value_;
+ oprot.writeDouble(valDouble);
+ return;
+ case VAL_DECIMAL:
+ RDF_Decimal valDecimal = (RDF_Decimal)value_;
+ valDecimal.write(oprot);
+ return;
+ default:
+ throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ }
+ }
+
+ @Override
+ protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
+ _Fields setField = _Fields.findByThriftId(fieldID);
+ if (setField != null) {
+ switch (setField) {
+ case IRI:
+ RDF_IRI iri;
+ iri = new RDF_IRI();
+ iri.read(iprot);
+ return iri;
+ case BNODE:
+ RDF_BNode bnode;
+ bnode = new RDF_BNode();
+ bnode.read(iprot);
+ return bnode;
+ case LITERAL:
+ RDF_Literal literal;
+ literal = new RDF_Literal();
+ literal.read(iprot);
+ return literal;
+ case PREFIX_NAME:
+ RDF_PrefixName prefixName;
+ prefixName = new RDF_PrefixName();
+ prefixName.read(iprot);
+ return prefixName;
+ case VARIABLE:
+ RDF_VAR variable;
+ variable = new RDF_VAR();
+ variable.read(iprot);
+ return variable;
+ case ANY:
+ RDF_ANY any;
+ any = new RDF_ANY();
+ any.read(iprot);
+ return any;
+ case UNDEFINED:
+ RDF_UNDEF undefined;
+ undefined = new RDF_UNDEF();
+ undefined.read(iprot);
+ return undefined;
+ case REPEAT:
+ RDF_REPEAT repeat;
+ repeat = new RDF_REPEAT();
+ repeat.read(iprot);
+ return repeat;
+ case VAL_INTEGER:
+ Long valInteger;
+ valInteger = iprot.readI64();
+ return valInteger;
+ case VAL_DOUBLE:
+ Double valDouble;
+ valDouble = iprot.readDouble();
+ return valDouble;
+ case VAL_DECIMAL:
+ RDF_Decimal valDecimal;
+ valDecimal = new RDF_Decimal();
+ valDecimal.read(iprot);
+ return valDecimal;
+ default:
+ throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ }
+ } else {
+ throw new TProtocolException("Couldn't find a field with field id " + fieldID);
+ }
+ }
+
+ @Override
+ protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ switch (setField_) {
+ case IRI:
+ RDF_IRI iri = (RDF_IRI)value_;
+ iri.write(oprot);
+ return;
+ case BNODE:
+ RDF_BNode bnode = (RDF_BNode)value_;
+ bnode.write(oprot);
+ return;
+ case LITERAL:
+ RDF_Literal literal = (RDF_Literal)value_;
+ literal.write(oprot);
+ return;
+ case PREFIX_NAME:
+ RDF_PrefixName prefixName = (RDF_PrefixName)value_;
+ prefixName.write(oprot);
+ return;
+ case VARIABLE:
+ RDF_VAR variable = (RDF_VAR)value_;
+ variable.write(oprot);
+ return;
+ case ANY:
+ RDF_ANY any = (RDF_ANY)value_;
+ any.write(oprot);
+ return;
+ case UNDEFINED:
+ RDF_UNDEF undefined = (RDF_UNDEF)value_;
+ undefined.write(oprot);
+ return;
+ case REPEAT:
+ RDF_REPEAT repeat = (RDF_REPEAT)value_;
+ repeat.write(oprot);
+ return;
+ case VAL_INTEGER:
+ Long valInteger = (Long)value_;
+ oprot.writeI64(valInteger);
+ return;
+ case VAL_DOUBLE:
+ Double valDouble = (Double)value_;
+ oprot.writeDouble(valDouble);
+ return;
+ case VAL_DECIMAL:
+ RDF_Decimal valDecimal = (RDF_Decimal)value_;
+ valDecimal.write(oprot);
+ return;
+ default:
+ throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ }
+ }
+
+ @Override
+ protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) {
+ switch (setField) {
+ case IRI:
+ return IRI_FIELD_DESC;
+ case BNODE:
+ return BNODE_FIELD_DESC;
+ case LITERAL:
+ return LITERAL_FIELD_DESC;
+ case PREFIX_NAME:
+ return PREFIX_NAME_FIELD_DESC;
+ case VARIABLE:
+ return VARIABLE_FIELD_DESC;
+ case ANY:
+ return ANY_FIELD_DESC;
+ case UNDEFINED:
+ return UNDEFINED_FIELD_DESC;
+ case REPEAT:
+ return REPEAT_FIELD_DESC;
+ case VAL_INTEGER:
+ return VAL_INTEGER_FIELD_DESC;
+ case VAL_DOUBLE:
+ return VAL_DOUBLE_FIELD_DESC;
+ case VAL_DECIMAL:
+ return VAL_DECIMAL_FIELD_DESC;
+ default:
+ throw new IllegalArgumentException("Unknown field id " + setField);
+ }
+ }
+
+ @Override
+ protected org.apache.thrift.protocol.TStruct getStructDesc() {
+ return STRUCT_DESC;
+ }
+
+ @Override
+ protected _Fields enumForId(short id) {
+ return _Fields.findByThriftIdOrThrow(id);
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+
+ public RDF_IRI getIri() {
+ if (getSetField() == _Fields.IRI) {
+ return (RDF_IRI)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'iri' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setIri(RDF_IRI value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.IRI;
+ value_ = value;
+ }
+
+ public RDF_BNode getBnode() {
+ if (getSetField() == _Fields.BNODE) {
+ return (RDF_BNode)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'bnode' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setBnode(RDF_BNode value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.BNODE;
+ value_ = value;
+ }
+
+ public RDF_Literal getLiteral() {
+ if (getSetField() == _Fields.LITERAL) {
+ return (RDF_Literal)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'literal' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setLiteral(RDF_Literal value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.LITERAL;
+ value_ = value;
+ }
+
+ public RDF_PrefixName getPrefixName() {
+ if (getSetField() == _Fields.PREFIX_NAME) {
+ return (RDF_PrefixName)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'prefixName' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setPrefixName(RDF_PrefixName value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.PREFIX_NAME;
+ value_ = value;
+ }
+
+ public RDF_VAR getVariable() {
+ if (getSetField() == _Fields.VARIABLE) {
+ return (RDF_VAR)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'variable' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setVariable(RDF_VAR value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.VARIABLE;
+ value_ = value;
+ }
+
+ public RDF_ANY getAny() {
+ if (getSetField() == _Fields.ANY) {
+ return (RDF_ANY)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'any' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setAny(RDF_ANY value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.ANY;
+ value_ = value;
+ }
+
+ public RDF_UNDEF getUndefined() {
+ if (getSetField() == _Fields.UNDEFINED) {
+ return (RDF_UNDEF)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'undefined' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setUndefined(RDF_UNDEF value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.UNDEFINED;
+ value_ = value;
+ }
+
+ public RDF_REPEAT getRepeat() {
+ if (getSetField() == _Fields.REPEAT) {
+ return (RDF_REPEAT)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'repeat' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setRepeat(RDF_REPEAT value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.REPEAT;
+ value_ = value;
+ }
+
+ public long getValInteger() {
+ if (getSetField() == _Fields.VAL_INTEGER) {
+ return (Long)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'valInteger' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setValInteger(long value) {
+ setField_ = _Fields.VAL_INTEGER;
+ value_ = value;
+ }
+
+ public double getValDouble() {
+ if (getSetField() == _Fields.VAL_DOUBLE) {
+ return (Double)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'valDouble' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setValDouble(double value) {
+ setField_ = _Fields.VAL_DOUBLE;
+ value_ = value;
+ }
+
+ public RDF_Decimal getValDecimal() {
+ if (getSetField() == _Fields.VAL_DECIMAL) {
+ return (RDF_Decimal)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'valDecimal' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setValDecimal(RDF_Decimal value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.VAL_DECIMAL;
+ value_ = value;
+ }
+
+ public boolean isSetIri() {
+ return setField_ == _Fields.IRI;
+ }
+
+
+ public boolean isSetBnode() {
+ return setField_ == _Fields.BNODE;
+ }
+
+
+ public boolean isSetLiteral() {
+ return setField_ == _Fields.LITERAL;
+ }
+
+
+ public boolean isSetPrefixName() {
+ return setField_ == _Fields.PREFIX_NAME;
+ }
+
+
+ public boolean isSetVariable() {
+ return setField_ == _Fields.VARIABLE;
+ }
+
+
+ public boolean isSetAny() {
+ return setField_ == _Fields.ANY;
+ }
+
+
+ public boolean isSetUndefined() {
+ return setField_ == _Fields.UNDEFINED;
+ }
+
+
+ public boolean isSetRepeat() {
+ return setField_ == _Fields.REPEAT;
+ }
+
+
+ public boolean isSetValInteger() {
+ return setField_ == _Fields.VAL_INTEGER;
+ }
+
+
+ public boolean isSetValDouble() {
+ return setField_ == _Fields.VAL_DOUBLE;
+ }
+
+
+ public boolean isSetValDecimal() {
+ return setField_ == _Fields.VAL_DECIMAL;
+ }
+
+
+ public boolean equals(Object other) {
+ if (other instanceof RDF_Term) {
+ return equals((RDF_Term)other);
+ } else {
+ return false;
+ }
+ }
+
+ public boolean equals(RDF_Term other) {
+ return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue());
+ }
+
+ @Override
+ public int compareTo(RDF_Term other) {
+ int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField());
+ if (lastComparison == 0) {
+ return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue());
+ }
+ return lastComparison;
+ }
+
+
+ /**
+ * If you'd like this to perform more respectably, use the hashcode generator option.
+ */
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+
+}
Propchange: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_Term.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_Triple.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_Triple.java?rev=1621573&view=auto
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_Triple.java (added)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_Triple.java Sun Aug 31 09:34:40 2014
@@ -0,0 +1,578 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.jena.riot.thrift.wire;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all")
+public class RDF_Triple implements org.apache.thrift.TBase<RDF_Triple, RDF_Triple._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RDF_Triple");
+
+ private static final org.apache.thrift.protocol.TField S_FIELD_DESC = new org.apache.thrift.protocol.TField("S", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField P_FIELD_DESC = new org.apache.thrift.protocol.TField("P", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField O_FIELD_DESC = new org.apache.thrift.protocol.TField("O", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new RDF_TripleStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new RDF_TripleTupleSchemeFactory());
+ }
+
+ public RDF_Term S; // required
+ public RDF_Term P; // required
+ public RDF_Term O; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ S((short)1, "S"),
+ P((short)2, "P"),
+ O((short)3, "O");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // S
+ return S;
+ case 2: // P
+ return P;
+ case 3: // O
+ return O;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.S, new org.apache.thrift.meta_data.FieldMetaData("S", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RDF_Term.class)));
+ tmpMap.put(_Fields.P, new org.apache.thrift.meta_data.FieldMetaData("P", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RDF_Term.class)));
+ tmpMap.put(_Fields.O, new org.apache.thrift.meta_data.FieldMetaData("O", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, RDF_Term.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RDF_Triple.class, metaDataMap);
+ }
+
+ public RDF_Triple() {
+ }
+
+ public RDF_Triple(
+ RDF_Term S,
+ RDF_Term P,
+ RDF_Term O)
+ {
+ this();
+ this.S = S;
+ this.P = P;
+ this.O = O;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public RDF_Triple(RDF_Triple other) {
+ if (other.isSetS()) {
+ this.S = new RDF_Term(other.S);
+ }
+ if (other.isSetP()) {
+ this.P = new RDF_Term(other.P);
+ }
+ if (other.isSetO()) {
+ this.O = new RDF_Term(other.O);
+ }
+ }
+
+ public RDF_Triple deepCopy() {
+ return new RDF_Triple(this);
+ }
+
+ @Override
+ public void clear() {
+ this.S = null;
+ this.P = null;
+ this.O = null;
+ }
+
+ public RDF_Term getS() {
+ return this.S;
+ }
+
+ public RDF_Triple setS(RDF_Term S) {
+ this.S = S;
+ return this;
+ }
+
+ public void unsetS() {
+ this.S = null;
+ }
+
+ /** Returns true if field S is set (has been assigned a value) and false otherwise */
+ public boolean isSetS() {
+ return this.S != null;
+ }
+
+ public void setSIsSet(boolean value) {
+ if (!value) {
+ this.S = null;
+ }
+ }
+
+ public RDF_Term getP() {
+ return this.P;
+ }
+
+ public RDF_Triple setP(RDF_Term P) {
+ this.P = P;
+ return this;
+ }
+
+ public void unsetP() {
+ this.P = null;
+ }
+
+ /** Returns true if field P is set (has been assigned a value) and false otherwise */
+ public boolean isSetP() {
+ return this.P != null;
+ }
+
+ public void setPIsSet(boolean value) {
+ if (!value) {
+ this.P = null;
+ }
+ }
+
+ public RDF_Term getO() {
+ return this.O;
+ }
+
+ public RDF_Triple setO(RDF_Term O) {
+ this.O = O;
+ return this;
+ }
+
+ public void unsetO() {
+ this.O = null;
+ }
+
+ /** Returns true if field O is set (has been assigned a value) and false otherwise */
+ public boolean isSetO() {
+ return this.O != null;
+ }
+
+ public void setOIsSet(boolean value) {
+ if (!value) {
+ this.O = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case S:
+ if (value == null) {
+ unsetS();
+ } else {
+ setS((RDF_Term)value);
+ }
+ break;
+
+ case P:
+ if (value == null) {
+ unsetP();
+ } else {
+ setP((RDF_Term)value);
+ }
+ break;
+
+ case O:
+ if (value == null) {
+ unsetO();
+ } else {
+ setO((RDF_Term)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case S:
+ return getS();
+
+ case P:
+ return getP();
+
+ case O:
+ return getO();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case S:
+ return isSetS();
+ case P:
+ return isSetP();
+ case O:
+ return isSetO();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof RDF_Triple)
+ return this.equals((RDF_Triple)that);
+ return false;
+ }
+
+ public boolean equals(RDF_Triple that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_S = true && this.isSetS();
+ boolean that_present_S = true && that.isSetS();
+ if (this_present_S || that_present_S) {
+ if (!(this_present_S && that_present_S))
+ return false;
+ if (!this.S.equals(that.S))
+ return false;
+ }
+
+ boolean this_present_P = true && this.isSetP();
+ boolean that_present_P = true && that.isSetP();
+ if (this_present_P || that_present_P) {
+ if (!(this_present_P && that_present_P))
+ return false;
+ if (!this.P.equals(that.P))
+ return false;
+ }
+
+ boolean this_present_O = true && this.isSetO();
+ boolean that_present_O = true && that.isSetO();
+ if (this_present_O || that_present_O) {
+ if (!(this_present_O && that_present_O))
+ return false;
+ if (!this.O.equals(that.O))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(RDF_Triple other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ RDF_Triple typedOther = (RDF_Triple)other;
+
+ lastComparison = Boolean.valueOf(isSetS()).compareTo(typedOther.isSetS());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetS()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.S, typedOther.S);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetP()).compareTo(typedOther.isSetP());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetP()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.P, typedOther.P);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetO()).compareTo(typedOther.isSetO());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetO()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.O, typedOther.O);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("RDF_Triple(");
+ boolean first = true;
+
+ sb.append("S:");
+ if (this.S == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.S);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("P:");
+ if (this.P == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.P);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("O:");
+ if (this.O == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.O);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (S == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'S' was not present! Struct: " + toString());
+ }
+ if (P == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'P' was not present! Struct: " + toString());
+ }
+ if (O == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'O' was not present! Struct: " + toString());
+ }
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class RDF_TripleStandardSchemeFactory implements SchemeFactory {
+ public RDF_TripleStandardScheme getScheme() {
+ return new RDF_TripleStandardScheme();
+ }
+ }
+
+ private static class RDF_TripleStandardScheme extends StandardScheme<RDF_Triple> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, RDF_Triple struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // S
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.S = new RDF_Term();
+ struct.S.read(iprot);
+ struct.setSIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // P
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.P = new RDF_Term();
+ struct.P.read(iprot);
+ struct.setPIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // O
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.O = new RDF_Term();
+ struct.O.read(iprot);
+ struct.setOIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, RDF_Triple struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.S != null) {
+ oprot.writeFieldBegin(S_FIELD_DESC);
+ struct.S.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.P != null) {
+ oprot.writeFieldBegin(P_FIELD_DESC);
+ struct.P.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.O != null) {
+ oprot.writeFieldBegin(O_FIELD_DESC);
+ struct.O.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class RDF_TripleTupleSchemeFactory implements SchemeFactory {
+ public RDF_TripleTupleScheme getScheme() {
+ return new RDF_TripleTupleScheme();
+ }
+ }
+
+ private static class RDF_TripleTupleScheme extends TupleScheme<RDF_Triple> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, RDF_Triple struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ struct.S.write(oprot);
+ struct.P.write(oprot);
+ struct.O.write(oprot);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, RDF_Triple struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.S = new RDF_Term();
+ struct.S.read(iprot);
+ struct.setSIsSet(true);
+ struct.P = new RDF_Term();
+ struct.P.read(iprot);
+ struct.setPIsSet(true);
+ struct.O = new RDF_Term();
+ struct.O.read(iprot);
+ struct.setOIsSet(true);
+ }
+ }
+
+}
+
Propchange: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_Triple.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_UNDEF.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_UNDEF.java?rev=1621573&view=auto
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_UNDEF.java (added)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_UNDEF.java Sun Aug 31 09:34:40 2014
@@ -0,0 +1,279 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.jena.riot.thrift.wire;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all")
+public class RDF_UNDEF implements org.apache.thrift.TBase<RDF_UNDEF, RDF_UNDEF._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RDF_UNDEF");
+
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new RDF_UNDEFStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new RDF_UNDEFTupleSchemeFactory());
+ }
+
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+;
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RDF_UNDEF.class, metaDataMap);
+ }
+
+ public RDF_UNDEF() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public RDF_UNDEF(RDF_UNDEF other) {
+ }
+
+ public RDF_UNDEF deepCopy() {
+ return new RDF_UNDEF(this);
+ }
+
+ @Override
+ public void clear() {
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof RDF_UNDEF)
+ return this.equals((RDF_UNDEF)that);
+ return false;
+ }
+
+ public boolean equals(RDF_UNDEF that) {
+ if (that == null)
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(RDF_UNDEF other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ RDF_UNDEF typedOther = (RDF_UNDEF)other;
+
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("RDF_UNDEF(");
+ boolean first = true;
+
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class RDF_UNDEFStandardSchemeFactory implements SchemeFactory {
+ public RDF_UNDEFStandardScheme getScheme() {
+ return new RDF_UNDEFStandardScheme();
+ }
+ }
+
+ private static class RDF_UNDEFStandardScheme extends StandardScheme<RDF_UNDEF> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, RDF_UNDEF struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, RDF_UNDEF struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class RDF_UNDEFTupleSchemeFactory implements SchemeFactory {
+ public RDF_UNDEFTupleScheme getScheme() {
+ return new RDF_UNDEFTupleScheme();
+ }
+ }
+
+ private static class RDF_UNDEFTupleScheme extends TupleScheme<RDF_UNDEF> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, RDF_UNDEF struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, RDF_UNDEF struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ }
+ }
+
+}
+
Propchange: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_UNDEF.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_VAR.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_VAR.java?rev=1621573&view=auto
==============================================================================
--- jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_VAR.java (added)
+++ jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_VAR.java Sun Aug 31 09:34:40 2014
@@ -0,0 +1,380 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.jena.riot.thrift.wire;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all")
+public class RDF_VAR implements org.apache.thrift.TBase<RDF_VAR, RDF_VAR._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RDF_VAR");
+
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new RDF_VARStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new RDF_VARTupleSchemeFactory());
+ }
+
+ public String name; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ NAME((short)1, "name");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // NAME
+ return NAME;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(RDF_VAR.class, metaDataMap);
+ }
+
+ public RDF_VAR() {
+ }
+
+ public RDF_VAR(
+ String name)
+ {
+ this();
+ this.name = name;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public RDF_VAR(RDF_VAR other) {
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ }
+
+ public RDF_VAR deepCopy() {
+ return new RDF_VAR(this);
+ }
+
+ @Override
+ public void clear() {
+ this.name = null;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public RDF_VAR setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ /** Returns true if field name is set (has been assigned a value) and false otherwise */
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public void setNameIsSet(boolean value) {
+ if (!value) {
+ this.name = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case NAME:
+ return getName();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case NAME:
+ return isSetName();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof RDF_VAR)
+ return this.equals((RDF_VAR)that);
+ return false;
+ }
+
+ public boolean equals(RDF_VAR that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(RDF_VAR other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ RDF_VAR typedOther = (RDF_VAR)other;
+
+ lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("RDF_VAR(");
+ boolean first = true;
+
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (name == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
+ }
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class RDF_VARStandardSchemeFactory implements SchemeFactory {
+ public RDF_VARStandardScheme getScheme() {
+ return new RDF_VARStandardScheme();
+ }
+ }
+
+ private static class RDF_VARStandardScheme extends StandardScheme<RDF_VAR> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, RDF_VAR struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, RDF_VAR struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(struct.name);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class RDF_VARTupleSchemeFactory implements SchemeFactory {
+ public RDF_VARTupleScheme getScheme() {
+ return new RDF_VARTupleScheme();
+ }
+ }
+
+ private static class RDF_VARTupleScheme extends TupleScheme<RDF_VAR> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, RDF_VAR struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeString(struct.name);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, RDF_VAR struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.name = iprot.readString();
+ struct.setNameIsSet(true);
+ }
+ }
+
+}
+
Propchange: jena/trunk/jena-arq/src/main/java/org/apache/jena/riot/thrift/wire/RDF_VAR.java
------------------------------------------------------------------------------
svn:mime-type = text/plain