Get the type by its compatibility name.

@param compatibilityDataTypeName the compat name, as for example {@link #COMPAT_TEXT};
@return the data type;
974753
public String ofCompat( String compatibilityDataTypeName ) {
        switch( compatibilityDataTypeName ) {
        case COMPAT_TEXT:
            return TEXT();
        case COMPAT_INT:
            return INTEGER();
        case COMPAT_LONG:
            return LONG();
        case COMPAT_REAL:
            return REAL();
        case COMPAT_BLOB:
            return BLOB();
        case COMPAT_CLOB:
            return CLOB();
        }
        throw new RuntimeException("No type for name: " + compatibilityDataTypeName);
    }
414123
public static String getDatatypeIriFromJsonDatatype(String jsonDatatype) {
		switch (jsonDatatype) {
		case JSON_DT_ITEM:
			return DT_ITEM;
		case JSON_DT_PROPERTY:
			return DT_PROPERTY;
		case JSON_DT_GLOBE_COORDINATES:
			return DT_GLOBE_COORDINATES;
		case JSON_DT_URL:
			return DT_URL;
		case JSON_DT_COMMONS_MEDIA:
			return DT_COMMONS_MEDIA;
		case JSON_DT_TIME:
			return DT_TIME;
		case JSON_DT_QUANTITY:
			return DT_QUANTITY;
		case JSON_DT_STRING:
			return DT_STRING;
		case JSON_DT_MONOLINGUAL_TEXT:
			return DT_MONOLINGUAL_TEXT;
		default:
			if(!JSON_DATATYPE_PATTERN.matcher(jsonDatatype).matches()) {
				throw new IllegalArgumentException("Invalid JSON datatype \"" + jsonDatatype + "\"");
			}

			String[] parts = jsonDatatype.split("-");
			for(int i = 0; i < parts.length; i++) {
				parts[i] = StringUtils.capitalize(parts[i]);
			}
			return "http://wikiba.se/ontology#" + StringUtils.join(parts);
		}
	}
891542
private EditType getEditType(String typeName) {
    for (EditType type : EditType.values()) {
      if (type.toString().equals(typeName)) {
        return type;
      }
    }
    return null;
  }
1198939
private static ParamType typeConverter(String typeName) {
        if (typeName == null || typeName.isEmpty()) {
            return null;
        }

        if ("Number".equals(typeName) || "Long".equalsIgnoreCase(typeName)
                || "Integer".equals(typeName) || "int".equals(typeName)) {
            return ParamType.NUMBER;
        }

        if ("Boolean".equalsIgnoreCase(typeName)) {
            return ParamType.BOOLEAN;
        }

        if ("String".equals(typeName)) {
            return ParamType.STRING;
        }

        if ("Date".equals(typeName)) {
            return ParamType.DATE;
        }

        if ("File".equals(typeName)) {
            return ParamType.FILE;
        }

        return null;
    }
823323
def _ConvertDataType(self, dataType):
      
      if dataType:
         vmodlName = dataType.name
         wsdlName = dataType.wsdlName
         version = dataType.version
         parent = dataType.base[0]
         props = self._Filter(self._ConvertDataPropertyType, dataType.property)
         doType = (vmodlName, wsdlName, parent, version, props)
      else:
         doType = None
      return doType
22243
private int getFileType(String filename) throws Exception {

        String extension = "";
        if (filename.indexOf(".") > -1) {
            extension = filename.substring((filename.lastIndexOf(".")));
        }

        String typename = (String)m_extensions.get(extension.toLowerCase());
        if (typename == null) {
            typename = "binary";
        }
        CmsResourceManager resourceManager = OpenCms.getResourceManager();

        return resourceManager.getResourceType(typename).getTypeId();
    }
1359222
public ColumnType getType(String columnName) {
        if (!hasColumn(columnName)) {
            throw new IllegalArgumentException("Column \"" + columnName + "\" does not exist in schema");
        }
        return getMetaData(columnName).getColumnType();
    }
906074
public static DataType getDtypeFromContext() {
        try {
            lock.readLock().lock();

            if (dtype == null) {
                lock.readLock().unlock();
                lock.writeLock().lock();

                if (dtype == null)
                    dtype = getDtypeFromContext(Nd4jContext.getInstance().getConf().getProperty("dtype"));

                lock.writeLock().unlock();
                lock.readLock().lock();
            }

            return dtype;
        } finally {
            lock.readLock().unlock();
        }
    }
188323
public static <E> GenericData getDataModelForType(Class<E> type) {
    // Need to check if SpecificRecord first because specific records also
    // implement GenericRecord
    if (SpecificRecord.class.isAssignableFrom(type)) {
      return new SpecificData(type.getClassLoader());
    } else if (IndexedRecord.class.isAssignableFrom(type)) {
      return GenericData.get();
    } else {
      return AllowNulls.get();
    }
  }
1363862
public static String getDataTypeDef(String datatypeKey)
    {
    	Datatype datatype = getDatatype(datatypeKey);
    	return datatype.getDefinition();
    }
652594
public <R> R getData(TypeToken<R> dataType) {
        return GSON.fromJson(data, dataType.getType());
    }
81293
@Nullable
  public SoyType getType(String typeName) {
    SoyType result = BUILTIN_TYPES.get(typeName);
    if (result != null) {
      return result;
    }
    synchronized (lock) {
      result = protoTypeCache.get(typeName);
      if (result == null) {
        GenericDescriptor descriptor = descriptors.get(typeName);
        if (descriptor == null) {
          return null;
        }
        if (descriptor instanceof EnumDescriptor) {
          result = new SoyProtoEnumType((EnumDescriptor) descriptor);
        } else {
          result = new SoyProtoType(this, (Descriptor) descriptor, extensions.get(typeName));
        }
        protoTypeCache.put(typeName, result);
      }
    }
    return result;
  }
959999
public GeoPackageDataType getDataType(String type) {

		GeoPackageDataType dataType = null;

		try {
			dataType = GeoPackageDataType.fromName(type);
		} catch (IllegalArgumentException dataTypeException) {
			try {
				// Check if a geometry and convert to a blob
				GeometryType.fromName(type);
				dataType = GeoPackageDataType.BLOB;
			} catch (IllegalArgumentException geometryException) {
				throw new GeoPackageException("Unsupported column data type "
						+ type, dataTypeException);
			}
		}

		return dataType;
	}
248381
public static TypeName typeName(String typeName) {
		TypeName[] values = { TypeName.BOOLEAN, TypeName.BYTE, TypeName.CHAR, TypeName.DOUBLE, TypeName.FLOAT,
				TypeName.INT, TypeName.LONG, TypeName.SHORT, TypeName.VOID };

		for (TypeName item : values) {
			if (item.toString().equals(typeName)) {
				return item;
			}
		}

		LiteralType literalName = LiteralType.of(typeName);
		if (literalName.isParametrizedType()) {
			return ParameterizedTypeName.get(className(literalName.getRawType()),
					typeName(literalName.getTypeParameter()));
		}
		if (literalName.isArray()) {
			return ArrayTypeName.of(typeName(literalName.getRawType()));
		}

		return ClassName.bestGuess(typeName);
	}
1296092
public String readDataType(String name) {
    if (name.equals("map")) {
      if (readChar() != '<') throw unexpected("expected '<'");
      String keyType = readDataType();
      if (readChar() != ',') throw unexpected("expected ','");
      String valueType = readDataType();
      if (readChar() != '>') throw unexpected("expected '>'");
      return String.format("map<%s, %s>", keyType, valueType);
    } else {
      return name;
    }
  }
1219016
public java.lang.String getMaybeTypeName() {
    java.lang.Object ref = maybeTypeName_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      maybeTypeName_ = s;
      return s;
    }
  }
938766
public static byte getDataTypeAsByte(@NonNull org.nd4j.linalg.api.buffer.DataType type) {
        switch (type) {
            case FLOAT:
                return DataType.FLOAT;
            case DOUBLE:
                return DataType.DOUBLE;
            case HALF:
                return DataType.HALF;
            case INT:
                return DataType.INT32;
            case LONG:
                return DataType.INT64;
            case BOOL:
                return DataType.BOOL;
            case SHORT:
                return DataType.INT16;
            case BYTE:
                return DataType.INT8;
            case UBYTE:
                return DataType.UINT8;
            case UTF8:
                return DataType.UTF8;
            default:
                throw new ND4JIllegalStateException("Unknown or unsupported DataType used: [" + type + "]");
        }
    }