Create a HumanNameDataType from Rolodex object

@param rolodex
Rolodex object
@return HumanNameDataType corresponding to the rolodex object.
553413
public HumanNameDataType getHumanNameDataType(RolodexContract rolodex) {

		HumanNameDataType humanName = HumanNameDataType.Factory.newInstance();
		if (rolodex != null) {
			humanName.setFirstName(rolodex.getFirstName());
			humanName.setLastName(rolodex.getLastName());
			String middleName = rolodex.getMiddleName();
			if (middleName != null && !middleName.equals("")) {
				humanName.setMiddleName(middleName);
			}
		}
		return humanName;
	}
362710
public static String getHumanName(String methodName) {
        char[] name = methodName.toCharArray();
        StringBuilder humanName = new StringBuilder();

        boolean digit = false;
        boolean upper = true;

        int upCount = 0;

        for (int i = 0; i < name.length; i++) {
            if (i == 0) {
                humanName.append(Character.toUpperCase(name[i]));
            } else {
                humanName.append(Character.toLowerCase(name[i]));
            }

            if (i < name.length - 1) {
                if (!digit && Character.isDigit(name[i + 1])) {
                    digit = true;
                    humanName.append(" ");
                } else if (digit && !Character.isDigit(name[i + 1])) {
                    digit = false;
                    humanName.append(" ");
                } else if (upper && !Character.isUpperCase(name[i + 1])) {
                    if (upCount == 2) {
                        humanName.insert(humanName.length() - 2, " ");
                    }

                    upper = false;
                    upCount = 0;

                    humanName.insert(humanName.length() - 1, " ");
                } else if (Character.isUpperCase(name[i + 1])) {
                    upCount++;
                    upper = true;
                }
            }
        }

        return humanName.toString().replaceAll("^ ", "");
    }
597671
private NameGenerator getNameGenerator(String namePrefix)
    {
        synchronized(this)
        {
            if (_nameGenerators == null)
                _nameGenerators = new HashMap<String,NameGenerator>();

            NameGenerator nameGenerator = _nameGenerators.get(namePrefix);
            if (nameGenerator == null)
            {
                nameGenerator = new NameGenerator(namePrefix);
                _nameGenerators.put(namePrefix, nameGenerator);
            }
            return nameGenerator;
        }
    }
559267
public DataType nd4jTypeFromOnnxType(OnnxProto3.TensorProto.DataType dataType) {
        switch (dataType) {
            case DOUBLE: return DataType.DOUBLE;
            case FLOAT: return DataType.FLOAT;
            case FLOAT16: return DataType.HALF;
            case INT32:
            case INT64: return DataType.INT;
            default: return DataType.UNKNOWN;
        }
    }
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;
	}
562603
public static String getJsonDatatypeFromDatatypeIri(String datatypeIri) {
		switch (datatypeIri) {
			case DatatypeIdValue.DT_ITEM:
				return DatatypeIdImpl.JSON_DT_ITEM;
			case DatatypeIdValue.DT_GLOBE_COORDINATES:
				return DatatypeIdImpl.JSON_DT_GLOBE_COORDINATES;
			case DatatypeIdValue.DT_URL:
				return DatatypeIdImpl.JSON_DT_URL;
			case DatatypeIdValue.DT_COMMONS_MEDIA:
				return DatatypeIdImpl.JSON_DT_COMMONS_MEDIA;
			case DatatypeIdValue.DT_TIME:
				return DatatypeIdImpl.JSON_DT_TIME;
			case DatatypeIdValue.DT_QUANTITY:
				return DatatypeIdImpl.JSON_DT_QUANTITY;
			case DatatypeIdValue.DT_STRING:
				return DatatypeIdImpl.JSON_DT_STRING;
			case DatatypeIdValue.DT_MONOLINGUAL_TEXT:
				return DatatypeIdImpl.JSON_DT_MONOLINGUAL_TEXT;
			case DatatypeIdValue.DT_PROPERTY:
				return DatatypeIdImpl.JSON_DT_PROPERTY;
			default:
				//We apply the reverse algorithm of JacksonDatatypeId::getDatatypeIriFromJsonDatatype
				Matcher matcher = DATATYPE_ID_PATTERN.matcher(datatypeIri);
				if(!matcher.matches()) {
					throw new IllegalArgumentException("Unknown datatype: " + datatypeIri);
				}
		
				StringBuilder jsonDatatypeBuilder = new StringBuilder();
				for(char ch : StringUtils.uncapitalize(matcher.group(1)).toCharArray()) {
					if(Character.isUpperCase(ch)) {
						jsonDatatypeBuilder
								.append('-')
								.append(Character.toLowerCase(ch));
					} else {
						jsonDatatypeBuilder.append(ch);
					}
				}
				return jsonDatatypeBuilder.toString();
		}
	}
317355
public static UserCustomColumn createRelatedIdColumn(int index) {
		return UserCustomColumn.createColumn(index, COLUMN_RELATED_ID,
				GeoPackageDataType.INTEGER, true, null);
	}
137882
private DataType readDataType() {
    String name = readWord();
    switch (name) {
      case "map":
        if (readChar() != '<') throw unexpected("expected '<'");
        DataType keyType = readDataType();
        if (readChar() != ',') throw unexpected("expected ','");
        DataType valueType = readDataType();
        if (readChar() != '>') throw unexpected("expected '>'");
        return MapType.create(keyType, valueType);
      case "any":
        return ScalarType.ANY;
      case "bool":
        return ScalarType.BOOL;
      case "bytes":
        return ScalarType.BYTES;
      case "double":
        return ScalarType.DOUBLE;
      case "float":
        return ScalarType.FLOAT;
      case "fixed32":
        return ScalarType.FIXED32;
      case "fixed64":
        return ScalarType.FIXED64;
      case "int32":
        return ScalarType.INT32;
      case "int64":
        return ScalarType.INT64;
      case "sfixed32":
        return ScalarType.SFIXED32;
      case "sfixed64":
        return ScalarType.SFIXED64;
      case "sint32":
        return ScalarType.SINT32;
      case "sint64":
        return ScalarType.SINT64;
      case "string":
        return ScalarType.STRING;
      case "uint32":
        return ScalarType.UINT32;
      case "uint64":
        return ScalarType.UINT64;
      default:
        return NamedType.create(name);
    }
  }
1361136
public String convertToConLLTypes(String neType) {
    String conllType = null;
    if (neType.equalsIgnoreCase("PERSON")
        || neType.equalsIgnoreCase("ORGANIZATION")
        || neType.equalsIgnoreCase("LOCATION") || neType.length() == 3) {
      conllType = neType.substring(0, 3);
    } else {
      conllType = neType;
    }
    return conllType;
  }
1071949
def registerToDataTypes( cls ):
        
        from projexui.xdatatype import registerDataType
        registerDataType(cls.__name__,
            lambda pyvalue:  pyvalue.toString(),
            lambda qvariant: cls.fromString(unwrapVariant(qvariant)))
231030
private static UserIdentifier createUserIdentifier(
      OfflineDataUploadUserIdentifierType identifierType, String value)
      throws UnsupportedEncodingException {
    // If the user identifier type is a hashed type, also call hash function
    // on the value.
    if (HASHED_IDENTIFIER_TYPES.contains(identifierType)) {
      value = toSHA256String(value);
    }
    UserIdentifier userIdentifier = new UserIdentifier();
    userIdentifier.setUserIdentifierType(identifierType);
    userIdentifier.setValue(value);
    return userIdentifier;
  }
964151
public static String nameOfPersist(int x) {
    switch( x ) {
    case ICE : return "ICE";
    case HDFS: return "HDFS";
    case S3  : return "S3";
    case NFS : return "NFS";
    case TCP : return "TCP";
    case GCS : return "GCS";
    default  : return null;
    }
  }
742477
public ContactPersonDataType getContactPersonDataType(ProposalPersonContract person) {
		ContactPersonDataType contactPerson = ContactPersonDataType.Factory
				.newInstance();
		if (person != null) {
			contactPerson.setName((getHumanNameDataType(person)));
			String phone = person.getOfficePhone();
			if (phone != null && !phone.equals("")) {
				contactPerson.setPhone(phone);
			}
			String email = person.getEmailAddress();
			if (email != null && !email.equals("")) {
				contactPerson.setEmail(email);
			}
			String title = person.getPrimaryTitle();
			if (title != null && !title.equals("")) {
				contactPerson.setTitle(title);
			}
			String fax = person.getFaxNumber();
			if (StringUtils.isNotEmpty(fax)) {
				contactPerson.setFax(fax);
			}
			contactPerson.setAddress(getAddressDataType(person));
		}
		return contactPerson;
	}
669332
public String toCreateIndexDDL(final String indexName, final String indexType) {
    final StringBuilder ddl = new StringBuilder("create index ");
    ddl.append(indexName).append(' ').append(indexType).append(' ');
    ddl.append("runtime ").append(serializer.getId());
    return ddl.toString();
  }
88821
public static AttributesColumn createColumn(int index, String name,
			GeoPackageDataType type, boolean notNull, Object defaultValue) {
		return createColumn(index, name, type, null, notNull, defaultValue);
	}
186689
public InternalCallContext createInternalCallContext(final UUID objectId, final ObjectType objectType, final String userName,
                                                         final CallOrigin callOrigin, final UserType userType, @Nullable final UUID userToken, final Long tenantRecordId) {
        final Long accountRecordId = getAccountRecordIdSafe(objectId, objectType, tenantRecordId);
        return createInternalCallContext(tenantRecordId, accountRecordId, userName, callOrigin, userType, userToken, null, null, null, null);
    }
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);
		}
	}