Examples of PrimitiveType


Examples of org.eclipse.uml2.uml.PrimitiveType

    {
      EList<Element> _allOwnedElements = model.allOwnedElements();
      for(final Element e : _allOwnedElements) {
        {
          if ((e instanceof PrimitiveType)) {
            final PrimitiveType ne = ((PrimitiveType) e);
            _builder.newLineIfNotEmpty();
            _builder.append("<tr>");
            _builder.newLine();
            _builder.append("\t");
            _builder.append("<td>");
            String _name_1 = ne.getName();
            _builder.append(_name_1, "  ");
            _builder.append("</td>");
            _builder.newLineIfNotEmpty();
            _builder.append("\t");
            _builder.append("<td>");
View Full Code Here

Examples of org.geomajas.configuration.PrimitiveType

              default:
                throw new LayerException(ExceptionCode.UNEXPECTED_PROBLEM,
                    "Coding error, not all AssociationType options are covered");
            }
          } else {
            PrimitiveType type = ((PrimitiveAttributeInfo) attribute).getType();
            value = new LazyPrimitiveAttribute(type, featureModel, featureBean, name);
          }
        } else {
          value = featureModel.getAttribute(featureBean, name);
        }
View Full Code Here

Examples of org.geomajas.configuration.PrimitiveType

  private String toComparison(ComparisonOpsTypeInfo coOps, FeatureInfo featureInfo) {
    if (coOps instanceof BinaryComparisonOpTypeInfo) {
      BinaryComparisonOpTypeInfo binary = (BinaryComparisonOpTypeInfo) coOps;
      String propertyName = binary.getExpressionList().get(0).getValue();
      String propertyValue = binary.getExpressionList().get(1).getValue();
      PrimitiveType type = PrimitiveType.STRING;
      for (AttributeInfo attributeInfo : featureInfo.getAttributes()) {
        if (attributeInfo.getName().equals(propertyName)) {
          if (attributeInfo instanceof PrimitiveAttributeInfo) {
            type = ((PrimitiveAttributeInfo) attributeInfo).getType();
          }
View Full Code Here

Examples of parquet.schema.PrimitiveType

        List<Mapping> mappings = computeMapping(descriptor, schema, configuration);
        List<Type> fields = new ArrayList<Type>();
        List<PropertyDescriptor> properties = new ArrayList<PropertyDescriptor>();
        for (Mapping mapping : mappings) {
            if (mapping != null) {
                fields.add(new PrimitiveType(
                        Repetition.OPTIONAL,
                        mapping.source.getType(),
                        mapping.source.getPath()[0]));
                properties.add(mapping.target);
            }
View Full Code Here

Examples of parquet.schema.PrimitiveType

  }

  private static Type convertType(final String name, final TypeInfo typeInfo, final Repetition repetition) {
    if (typeInfo.getCategory().equals(Category.PRIMITIVE)) {
      if (typeInfo.equals(TypeInfoFactory.stringTypeInfo)) {
        return new PrimitiveType(repetition, PrimitiveTypeName.BINARY, name);
      } else if (typeInfo.equals(TypeInfoFactory.intTypeInfo) ||
          typeInfo.equals(TypeInfoFactory.shortTypeInfo) ||
          typeInfo.equals(TypeInfoFactory.byteTypeInfo)) {
        return new PrimitiveType(repetition, PrimitiveTypeName.INT32, name);
      } else if (typeInfo.equals(TypeInfoFactory.longTypeInfo)) {
        return new PrimitiveType(repetition, PrimitiveTypeName.INT64, name);
      } else if (typeInfo.equals(TypeInfoFactory.doubleTypeInfo)) {
        return new PrimitiveType(repetition, PrimitiveTypeName.DOUBLE, name);
      } else if (typeInfo.equals(TypeInfoFactory.floatTypeInfo)) {
        return new PrimitiveType(repetition, PrimitiveTypeName.FLOAT, name);
      } else if (typeInfo.equals(TypeInfoFactory.booleanTypeInfo)) {
        return new PrimitiveType(repetition, PrimitiveTypeName.BOOLEAN, name);
      } else if (typeInfo.equals(TypeInfoFactory.binaryTypeInfo)) {
        // TODO : binaryTypeInfo is a byte array. Need to map it
        throw new UnsupportedOperationException("Binary type not implemented");
      } else if (typeInfo.equals(TypeInfoFactory.timestampTypeInfo)) {
        throw new UnsupportedOperationException("Timestamp type not implemented");
View Full Code Here

Examples of parquet.schema.PrimitiveType

    }
  }

  private PrimitiveType primitive(String name,
                                  PrimitiveType.PrimitiveTypeName primitive) {
    return new PrimitiveType(Type.Repetition.OPTIONAL, primitive, name, null);
  }
View Full Code Here

Examples of parquet.schema.PrimitiveType

  }

  private PrimitiveType primitive(String name,
                                  PrimitiveType.PrimitiveTypeName primitive,
                                  OriginalType originalType) {
    return new PrimitiveType(Type.Repetition.OPTIONAL, primitive, name,
                             originalType);
  }
View Full Code Here

Examples of parquet.schema.PrimitiveType

public class ParquetSchemaMerge {
  public static void main(String[] args) {
    MessageType message1;
    MessageType message2;

    PrimitiveType c = new PrimitiveType(Repetition.OPTIONAL, PrimitiveTypeName.INT32, "c");
    GroupType b = new GroupType(Repetition.REQUIRED, "b");
    GroupType a = new GroupType(Repetition.OPTIONAL, "a", b);
    message1 = new MessageType("root", a);

    PrimitiveType c2 = new PrimitiveType(Repetition.OPTIONAL, PrimitiveTypeName.INT32, "d");
    GroupType b2 = new GroupType(Repetition.OPTIONAL, "b", c2);
    GroupType a2 = new GroupType(Repetition.OPTIONAL, "a", b2);
    message2 = new MessageType("root", a2);

    MessageType message3 = message1.union(message2);
View Full Code Here

Examples of parquet.schema.PrimitiveType

        // listColumns contains partition columns which are metadata only
        if (fileSchema.containsField(col)) {
          typeListTable.add(fileSchema.getType(col));
        } else {
          // below allows schema evolution
          typeListTable.add(new PrimitiveType(Repetition.OPTIONAL, PrimitiveTypeName.BINARY, col));
        }
      }
      MessageType tableSchema = new MessageType(TABLE_SCHEMA, typeListTable);
      contextMetadata.put(HIVE_SCHEMA_KEY, tableSchema.toString());
View Full Code Here

Examples of parquet.schema.PrimitiveType

  }

  private static Type convertType(final String name, final TypeInfo typeInfo, final Repetition repetition) {
    if (typeInfo.getCategory().equals(Category.PRIMITIVE)) {
      if (typeInfo.equals(TypeInfoFactory.stringTypeInfo)) {
        return new PrimitiveType(repetition, PrimitiveTypeName.BINARY, name);
      } else if (typeInfo.equals(TypeInfoFactory.intTypeInfo) ||
          typeInfo.equals(TypeInfoFactory.shortTypeInfo) ||
          typeInfo.equals(TypeInfoFactory.byteTypeInfo)) {
        return new PrimitiveType(repetition, PrimitiveTypeName.INT32, name);
      } else if (typeInfo.equals(TypeInfoFactory.longTypeInfo)) {
        return new PrimitiveType(repetition, PrimitiveTypeName.INT64, name);
      } else if (typeInfo.equals(TypeInfoFactory.doubleTypeInfo)) {
        return new PrimitiveType(repetition, PrimitiveTypeName.DOUBLE, name);
      } else if (typeInfo.equals(TypeInfoFactory.floatTypeInfo)) {
        return new PrimitiveType(repetition, PrimitiveTypeName.FLOAT, name);
      } else if (typeInfo.equals(TypeInfoFactory.booleanTypeInfo)) {
        return new PrimitiveType(repetition, PrimitiveTypeName.BOOLEAN, name);
      } else if (typeInfo.equals(TypeInfoFactory.binaryTypeInfo)) {
        // TODO : binaryTypeInfo is a byte array. Need to map it
        throw new UnsupportedOperationException("Binary type not implemented");
      } else if (typeInfo.equals(TypeInfoFactory.timestampTypeInfo)) {
        throw new UnsupportedOperationException("Timestamp type not implemented");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.