Package org.apache.avro

Examples of org.apache.avro.Schema$DoubleSchema


    importFile = JsonString();
    jj_consume_token(SEMICOLON);
      try {
        Parser parser = new Schema.Parser();
        parser.addTypes(names);                   // inherit names
        Schema value = parser.parse(new File(inputDir, importFile));
        names = parser.getTypes();                // update names
        {if (true) return value;}
      } catch (IOException e) {
        {if (true) throw error("Error importing "+importFile+": "+e, token);}
      }
View Full Code Here


    name = Identifier();
    jj_consume_token(LPAREN);
    sizeTok = jj_consume_token(INTEGER_LITERAL);
    jj_consume_token(RPAREN);
    jj_consume_token(SEMICOLON);
    Schema s = Schema.createFixed(name, getDoc(), this.namespace,
                                  Integer.parseInt(sizeTok.image));
    names.put(s.getFullName(), s);
    {if (true) return s;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

      jj_la1[11] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
    name = Identifier();
    Schema result = Schema.createRecord(
      name, getDoc(), this.namespace, isError);
    names.put(result.getFullName(), result);
    jj_consume_token(LBRACE);
    label_6:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case ARRAY:
      case BOOLEAN:
      case DOUBLE:
      case FLOAT:
      case INT:
      case LONG:
      case MAP:
      case BYTES:
      case STRING:
      case NULL:
      case UNION:
      case IDENTIFIER:
      case AT:
      case TICK:
        ;
        break;
      default:
        jj_la1[12] = jj_gen;
        break label_6;
      }
      FieldDeclaration(fields);
    }
    jj_consume_token(RBRACE);
    result.setFields(fields);
    {if (true) return result;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

      {if (true) throw error("Property '" + key + "' already specified", token);}
    properties.put(key, val);
  }

  final public void FieldDeclaration(List<Field> fields) throws ParseException {
  Schema type;
  Map<String, JsonNode> props = new LinkedHashMap<String, JsonNode>();
    label_7:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case AT:
        ;
        break;
      default:
        jj_la1[13] = jj_gen;
        break label_7;
      }
      SchemaProperty(props);
    }
    type = Type();
    VariableDeclarator(type, fields);
    label_8:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case COMMA:
        ;
        break;
      default:
        jj_la1[14] = jj_gen;
        break label_8;
      }
      jj_consume_token(COMMA);
      VariableDeclarator(type, fields);
    }
    jj_consume_token(SEMICOLON);
    for (String key : props.keySet())
      type.addProp(key, getTextProp(key, props, token));
  }
View Full Code Here

    fields.add(field);
  }

  final public Message MessageDeclaration(Protocol p) throws ParseException {
  String name;
  Schema request;
  Schema response;
  boolean oneWay = false;
  List<Schema> errorSchemata = new ArrayList<Schema>();
  errorSchemata.add(Protocol.SYSTEM_ERROR);
    response = ResultType();
    name = Identifier();
    request = FormalParameters();
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case ONEWAY:
    case THROWS:
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case ONEWAY:
        jj_consume_token(ONEWAY);
              oneWay = true;
        break;
      case THROWS:
        jj_consume_token(THROWS);
        ErrorList(errorSchemata);
        break;
      default:
        jj_la1[17] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
      break;
    default:
      jj_la1[18] = jj_gen;
      ;
    }
    jj_consume_token(SEMICOLON);
    Schema errors = Schema.createUnion(errorSchemata);
    if (oneWay && response.getType() != Type.NULL)
      {if (true) throw error("One-way message'"+name+"' must return void", token);}
    {if (true) return oneWay
    ? p.createMessage(name, null, request)
    : p.createMessage(name, null, request, response, errors);}
View Full Code Here

    : p.createMessage(name, null, request, response, errors);}
    throw new Error("Missing return statement in function");
  }

  final public void ErrorList(List<Schema> errors) throws ParseException {
  Schema s;
    s = ReferenceType();
                        errors.add(s);
    label_10:
    while (true) {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
View Full Code Here

    {if (true) return Schema.createRecord(fields);}
    throw new Error("Missing return statement in function");
  }

  final public void FormalParameter(List<Field> fields) throws ParseException {
  Schema type;
    type = Type();
    VariableDeclarator(type, fields);
  }
View Full Code Here

    type = Type();
    VariableDeclarator(type, fields);
  }

  final public Schema Type() throws ParseException {
  Schema s;
    if (jj_2_2(2)) {
      s = ReferenceType();
    } else {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case BOOLEAN:
View Full Code Here

    {if (true) return s;}
    throw new Error("Missing return statement in function");
  }

  final public Schema ArrayType() throws ParseException {
  Schema elemSchema;
    jj_consume_token(ARRAY);
    jj_consume_token(LT);
    elemSchema = Type();
    jj_consume_token(GT);
    {if (true) return Schema.createArray(elemSchema);}
View Full Code Here

    {if (true) return Schema.createArray(elemSchema);}
    throw new Error("Missing return statement in function");
  }

  final public Schema MapType() throws ParseException {
  Schema elemSchema;
    jj_consume_token(MAP);
    jj_consume_token(LT);
    elemSchema = Type();
    jj_consume_token(GT);
    {if (true) return Schema.createMap(elemSchema);}
View Full Code Here

TOP

Related Classes of org.apache.avro.Schema$DoubleSchema

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.