Package org.apache.tajo.common

Examples of org.apache.tajo.common.TajoDataTypes$DataType$Builder


                    value = executeRemoteRequest(ref, (ComplexPPIO) ppio, inputId);
                }

            } else {
                // actual data, figure out which type
                DataType data = input.getData();

                if (data.getLiteralData() != null) {
                    LiteralDataType literal = data.getLiteralData();
                    value = ((LiteralPPIO) ppio).decode(literal.getValue());
                } else if (data.getComplexData() != null) {
                    ComplexDataType complex = data.getComplexData();
                    if (ppio instanceof RawDataPPIO) {
                        Object inputData = complex.getData().get(0);
                        String encoding = complex.getEncoding();
                        byte[] decoded = null;
                        if (encoding != null) {
                            if ("base64".equals(encoding)) {
                                String input = inputData.toString();
                                decoded = Base64.decode(input);
                            } else {
                                throw new WPSException("Unsupported encoding " + encoding);
                            }
                        }
                       
                        if(decoded != null) {
                            return new ByteArrayRawData(decoded, complex.getMimeType());
                        } else {
                            return new StringRawData(inputData.toString(), complex.getMimeType());
                        }
                       
                    } else {
                        Object inputData = complex.getData().get(0);
                        String encoding = complex.getEncoding();
                        byte[] decoded = null;
                        if (encoding != null) {
                            if ("base64".equals(encoding)) {
                                String input = inputData.toString();
                                decoded = Base64.decode(input);
                            } else {
                                throw new WPSException("Unsupported encoding " + encoding);
                            }
                        }

                        if (decoded != null) {
                            value = ((ComplexPPIO) ppio).decode(new ByteArrayInputStream(decoded));
                        } else {
                            value = ((ComplexPPIO) ppio).decode(inputData);
                        }
                    }
                } else if (data.getBoundingBoxData() != null) {
                    value = ((BoundingBoxPPIO) ppio).decode(data.getBoundingBoxData());
                }

            }
           
            if(value instanceof GridCoverage) {
View Full Code Here


   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setDataType(DATATYPE newDataType) {
    DATATYPE oldDataType = dataType;
    dataType = newDataType == null ? DATA_TYPE_EDEFAULT : newDataType;
    boolean oldDataTypeESet = dataTypeESet;
    dataTypeESet = true;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, _40Package.MAP_VALUES_TYPE__DATA_TYPE, oldDataType, dataType, !oldDataTypeESet));
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void unsetDataType() {
    DATATYPE oldDataType = dataType;
    boolean oldDataTypeESet = dataTypeESet;
    dataType = DATA_TYPE_EDEFAULT;
    dataTypeESet = false;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.UNSET, _40Package.MAP_VALUES_TYPE__DATA_TYPE, oldDataType, DATA_TYPE_EDEFAULT, oldDataTypeESet));
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setDataType(DATATYPE newDataType) {
    DATATYPE oldDataType = dataType;
    dataType = newDataType == null ? DATA_TYPE_EDEFAULT : newDataType;
    boolean oldDataTypeESet = dataTypeESet;
    dataTypeESet = true;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, _40Package.PARAMETER_FIELD_TYPE__DATA_TYPE, oldDataType, dataType, !oldDataTypeESet));
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void unsetDataType() {
    DATATYPE oldDataType = dataType;
    boolean oldDataTypeESet = dataTypeESet;
    dataType = DATA_TYPE_EDEFAULT;
    dataTypeESet = false;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.UNSET, _40Package.PARAMETER_FIELD_TYPE__DATA_TYPE, oldDataType, DATA_TYPE_EDEFAULT, oldDataTypeESet));
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setDataType(DATATYPE newDataType) {
    DATATYPE oldDataType = dataType;
    dataType = newDataType == null ? DATA_TYPE_EDEFAULT : newDataType;
    boolean oldDataTypeESet = dataTypeESet;
    dataTypeESet = true;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, _40Package.DERIVED_FIELD_TYPE__DATA_TYPE, oldDataType, dataType, !oldDataTypeESet));
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void unsetDataType() {
    DATATYPE oldDataType = dataType;
    boolean oldDataTypeESet = dataTypeESet;
    dataType = DATA_TYPE_EDEFAULT;
    dataTypeESet = false;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.UNSET, _40Package.DERIVED_FIELD_TYPE__DATA_TYPE, oldDataType, DATA_TYPE_EDEFAULT, oldDataTypeESet));
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setDataType(DATATYPE newDataType) {
    DATATYPE oldDataType = dataType;
    dataType = newDataType == null ? DATA_TYPE_EDEFAULT : newDataType;
    boolean oldDataTypeESet = dataTypeESet;
    dataTypeESet = true;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, _40Package.DISCRETIZE_TYPE__DATA_TYPE, oldDataType, dataType, !oldDataTypeESet));
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void unsetDataType() {
    DATATYPE oldDataType = dataType;
    boolean oldDataTypeESet = dataTypeESet;
    dataType = DATA_TYPE_EDEFAULT;
    dataTypeESet = false;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.UNSET, _40Package.DISCRETIZE_TYPE__DATA_TYPE, oldDataType, DATA_TYPE_EDEFAULT, oldDataTypeESet));
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setDataType(DATATYPE newDataType) {
    DATATYPE oldDataType = dataType;
    dataType = newDataType == null ? DATA_TYPE_EDEFAULT : newDataType;
    boolean oldDataTypeESet = dataTypeESet;
    dataTypeESet = true;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, _40Package.DATA_FIELD_TYPE__DATA_TYPE, oldDataType, dataType, !oldDataTypeESet));
View Full Code Here

TOP

Related Classes of org.apache.tajo.common.TajoDataTypes$DataType$Builder

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.