Create AddressDataType from rolodex entry

@param rolodex
Rolodex entry
@return The AddressDataType corresponding to the rolodex entry.
329098
public AddressDataType getAddressDataType(RolodexContract rolodex) {

		AddressDataType addressDataType = AddressDataType.Factory.newInstance();
		if (rolodex != null) {

			String street1 = rolodex.getAddressLine1();
			addressDataType.setStreet1(street1);
			String street2 = rolodex.getAddressLine2();
			if (street2 != null && !street2.equals("")) {
				addressDataType.setStreet2(street2);
			}
			String city = rolodex.getCity();
			addressDataType.setCity(city);
			String county = rolodex.getCounty();
			if (county != null && !county.equals("")) {
				addressDataType.setCounty(county);
			}
						
			String postalCode = rolodex.getPostalCode();
			if (postalCode != null && !postalCode.equals("")) {
				addressDataType.setZipPostalCode(postalCode);
			}
			String country = rolodex.getCountryCode();
			CountryCodeDataType.Enum countryCodeDataType = getCountryCodeDataType(country);
			addressDataType.setCountry(countryCodeDataType);
			
			String state = rolodex.getState();
			if (state != null && !state.equals("")) {
				if (countryCodeDataType != null) {
					if (countryCodeDataType
							.equals(CountryCodeDataType.USA_UNITED_STATES)) {
						addressDataType.setState(getStateCodeDataType(country, state));
					} else {
						addressDataType.setProvince(state);
					}
				}
			}
		}
		return addressDataType;
	}
1168553
public ResourceAddress newResourceAddress(String location, String nextProtocol) {
        if (nextProtocol != null) {
            ResourceOptions options = ResourceOptions.FACTORY.newResourceOptions();
            options.setOption(NEXT_PROTOCOL, nextProtocol);
            return newResourceAddress(location, options);
        }
        else {
            return newResourceAddress(location);
        }
    }
849782
protected Datatype updateDtrDatatype(Datatype datatype) {
		// 
		assert (dtrMapInUse);

		// // QNameContext qncSchemaType = datatype.getSchemaType();
		// QNameContext qncBase = qncSchemaType.getSimpleBaseType();
		// assert(qncSchemaType != null);
		//
		//
		// // // special integer handling
		// // if (dtrDatatype.getBuiltInType() == BuiltInType.INTEGER
		// // && (datatype.getBuiltInType() == BuiltInType.NBIT_UNSIGNED_INTEGER
		// || datatype
		// // .getBuiltInType() == BuiltInType.UNSIGNED_INTEGER)) {
		// // dtrDatatype = datatype;
		// // }
		//
		// Datatype dt = dtrMap.get(qncBase.getQName());
		//
		// if (dt == null) {
		// // dt = updateDtrDatatype(simpleBaseType);
		// // dt = updateDtrDatatype(qncSchemaType.getSimpleBaseDatatype());
		// dt = updateDtrDatatype(qncBase); //baseDatatype);
		// // dtrMap.put(qncBase.getQName(), dt);
		// } else {
		// // save new mapping in map
		// // dtrMap.put(qncSchemaType.getQName(), dt);
		// }
		//
		// return dt;

		Datatype baseDatatype = datatype.getBaseDatatype();
		// QNameContext qncSchemaType = datatype.getSchemaType();
		// QNameContext simpleBaseType =
		// qncSchemaType.getSimpleBaseDatatype().getSchemaType();
		QNameContext simpleBaseType = baseDatatype.getSchemaType();

		Datatype dtrDatatype = dtrMap.get(simpleBaseType.getQName());

		if (dtrDatatype == null) {
			// dt = updateDtrDatatype(simpleBaseType);
			// dt = updateDtrDatatype(qncSchemaType.getSimpleBaseDatatype());
			dtrDatatype = updateDtrDatatype(baseDatatype);
		}

		// special integer handling
		if ((dtrDatatype.getBuiltInType() == BuiltInType.INTEGER || dtrDatatype
				.getBuiltInType() == BuiltInType.UNSIGNED_INTEGER)
				&& (datatype.getBuiltInType() == BuiltInType.NBIT_UNSIGNED_INTEGER || datatype
						.getBuiltInType() == BuiltInType.UNSIGNED_INTEGER)) {
			dtrDatatype = datatype;
		}

		// save new mapping in map
		dtrMap.put(datatype.getSchemaType().getQName(), dtrDatatype);

		return dtrDatatype;
	}
445842
public static ModelNode createOperation(final String operation, final ModelNode address) {
        if (address.getType() != ModelType.LIST) {
            throw ControllerClientLogger.ROOT_LOGGER.invalidAddressType();
        }
        final ModelNode op = createOperation(operation);
        op.get(OP_ADDR).set(address);
        return op;
    }
986263
public Type type() {
    if (type == null) {
      synchronized (this) {
        if (type == null) {
          type = address() instanceof Inet6Address ? Type.IPV6 : Type.IPV4;
        }
      }
    }
    return type;
  }
96109
@Override
	public com.liferay.commerce.model.CommerceAddress createCommerceAddress(
		long commerceAddressId) {
		return _commerceAddressLocalService.createCommerceAddress(commerceAddressId);
	}
25777
public static ModelNode createReadAttributeRequest(String attributeName, Address address) {
        return createReadAttributeRequest(false, attributeName, address);
    }
85801
public static IPAddressType getAddressType(String ipAddress)
    {
    	if(IPAddressUtil.isIPv4LiteralAddress(ipAddress))
    		return IPAddressType.IPV4;
    	
    	if(IPAddressUtil.isIPv6LiteralAddress(ipAddress))
    		return IPAddressType.IPV6;
    	
    	return IPAddressType.INVALID;
    }
1237060
public static V1BinaryAnnotation createAddress(String address, Endpoint endpoint) {
    if (endpoint == null) throw new NullPointerException("endpoint == null");
    return new V1BinaryAnnotation(address, null, endpoint);
  }
1182564
public static WebsocketClientTransport create(InetSocketAddress address) {
    Objects.requireNonNull(address, "address must not be null");

    TcpClient client = TcpClient.create().addressSupplier(() -> address);
    return create(client);
  }
382509
public InetAddress
getAddress() {
	try {
		if (name == null)
			return InetAddress.getByAddress(toArray(addr));
		else
			return InetAddress.getByAddress(name.toString(),
							toArray(addr));
	} catch (UnknownHostException e) {
		return null;
	}
}
625277
public com.google.api.ads.admanager.axis.v201902.CustomFieldDataType getDataType() {
        return dataType;
    }
645845
public static <X> String createTypeId(AnnotatedType<X> annotatedType) {
        String id = createTypeId(annotatedType.getJavaClass(), annotatedType.getAnnotations(), annotatedType.getMethods(), annotatedType.getFields(), annotatedType.getConstructors());
        String hash = hash(id);
        MetadataLogger.LOG.tracef("Generated AnnotatedType id hash for %s: %s", id, hash);
        return hash;
    }
960292
public Datatype createDatatype(String typeLocalName)
            throws DatatypeException {
        if ("ID".equals(typeLocalName)) {
            return new Id();
        } else if ("IDREF".equals(typeLocalName)) {
            return Idref.THE_INSTANCE;
        } else if ("IDREFS".equals(typeLocalName)) {
            return Idrefs.THE_INSTANCE;
        } else if ("pattern".equals(typeLocalName)) {
            return Pattern.THE_INSTANCE;
        } else if ("datetime".equals(typeLocalName)) {
            return Datetime.THE_INSTANCE;
        } else if ("datetime-local".equals(typeLocalName)) {
            return DatetimeLocal.THE_INSTANCE;
        } else if ("datetime-tz".equals(typeLocalName)) {
            return DatetimeTz.THE_INSTANCE;
        } else if ("date-or-time".equals(typeLocalName)) {
            return DateOrTime.THE_INSTANCE;
        } else if ("date".equals(typeLocalName)) {
            return Date.THE_INSTANCE;
        } else if ("month".equals(typeLocalName)) {
            return Month.THE_INSTANCE;
        } else if ("week".equals(typeLocalName)) {
            return Week.THE_INSTANCE;
        } else if ("time".equals(typeLocalName)) {
            return Time.THE_INSTANCE;
        } else if ("iri".equals(typeLocalName)) {
            return Iri.THE_INSTANCE;
        } else if ("iri-ref".equals(typeLocalName)) {
            return IriRef.THE_INSTANCE;
        } else if ("string".equals(typeLocalName)) {
            return AsciiCaseInsensitiveString.THE_INSTANCE;
        } else if ("language".equals(typeLocalName)) {
            return Language.THE_INSTANCE;
        } else if ("media-query".equals(typeLocalName)) {
            return MediaQuery.THE_INSTANCE;
        } else if ("mime-type".equals(typeLocalName)) {
            return MimeType.THE_INSTANCE;
        } else if ("browsing-context".equals(typeLocalName)) {
            return BrowsingContext.THE_INSTANCE;
        } else if ("browsing-context-or-keyword".equals(typeLocalName)) {
            return BrowsingContextOrKeyword.THE_INSTANCE;
        } else if ("hash-name".equals(typeLocalName)) {
            return HashName.THE_INSTANCE;
        } else if ("integer".equals(typeLocalName)) {
            return Int.THE_INSTANCE;
        } else if ("integer-non-negative".equals(typeLocalName)) {
            return IntNonNegative.THE_INSTANCE;
        } else if ("integer-positive".equals(typeLocalName)) {
            return IntPositive.THE_INSTANCE;
        } else if ("float".equals(typeLocalName)) {
            return FloatingPointExponent.THE_INSTANCE;
        } else if ("float-non-negative".equals(typeLocalName)) {
            return FloatingPointExponentNonNegative.THE_INSTANCE;
        } else if ("float-positive".equals(typeLocalName)) {
            return FloatingPointExponentPositive.THE_INSTANCE;
        } else if ("mime-type-list".equals(typeLocalName)) {
            return MimeTypeList.THE_INSTANCE;
        } else if ("circle".equals(typeLocalName)) {
            return Circle.THE_INSTANCE;
        } else if ("rectangle".equals(typeLocalName)) {
            return Rectangle.THE_INSTANCE;
        } else if ("polyline".equals(typeLocalName)) {
            return Polyline.THE_INSTANCE;
        } else if ("xml-name".equals(typeLocalName)) {
            return XmlName.THE_INSTANCE;
        } else if ("meta-charset".equals(typeLocalName)) {
            return MetaCharset.THE_INSTANCE;
        } else if ("microdata-property".equals(typeLocalName)) {
            return MicrodataProperty.THE_INSTANCE;
        } else if ("charset".equals(typeLocalName)) {
            return Charset.THE_INSTANCE;
        } else if ("refresh".equals(typeLocalName)) {
            return Refresh.THE_INSTANCE;
        } else if ("paren-start".equals(typeLocalName)) {
            return ParenthesisStart.THE_INSTANCE;
        } else if ("paren-end".equals(typeLocalName)) {
            return ParenthesisEnd.THE_INSTANCE;
        } else if ("email-address".equals(typeLocalName)) {
            return EmailAddress.THE_INSTANCE;
        } else if ("email-address-list".equals(typeLocalName)) {
            return EmailAddressList.THE_INSTANCE;
        } else if ("keylabellist".equals(typeLocalName)) {
            return KeyLabelList.THE_INSTANCE;
        } else if ("zero".equals(typeLocalName)) {
            return Zero.THE_INSTANCE;
        } else if ("cdo-cdc-pair".equals(typeLocalName)) {
            return CdoCdcPair.THE_INSTANCE;
        } else if ("script".equals(typeLocalName)) {
            return Script.THE_INSTANCE;
        } else if ("script-documentation".equals(typeLocalName)) {
            return ScriptDocumentation.THE_INSTANCE;
        } else if ("functionbody".equals(typeLocalName)) {
            return FunctionBody.THE_INSTANCE;
        } else if ("a-rel".equals(typeLocalName)) {
            return ARel.THE_INSTANCE;
        } else if ("link-rel".equals(typeLocalName)) {
            return LinkRel.THE_INSTANCE;
        } else if ("meta-name".equals(typeLocalName)) {
            return MetaName.THE_INSTANCE;
        } else if ("non-empty-string".equals(typeLocalName)) {
            return NonEmptyString.THE_INSTANCE;
        } else if ("string-without-line-breaks".equals(typeLocalName)) {
            return StringWithoutLineBreaks.THE_INSTANCE;
        } else if ("simple-color".equals(typeLocalName)) {
            return SimpleColor.THE_INSTANCE;
        } else if ("time-datetime".equals(typeLocalName)) {
            return TimeDatetime.THE_INSTANCE;
        } else if ("svg-pathdata".equals(typeLocalName)) {
            return new SvgPathData();
        }
        throw new DatatypeException("Unknown local name for datatype: " + typeLocalName);
    }
119195
@Override
    public EndpointReferenceType getAddressWithId(String id) {
        EndpointReferenceType ref = null;

        if (isMultiplexWithAddress()) {
            String address = EndpointReferenceUtils.getAddress(reference);
            ref = EndpointReferenceUtils.duplicate(reference);
            if (address.endsWith("/")) {
                EndpointReferenceUtils.setAddress(ref, address + id);
            } else {
                EndpointReferenceUtils.setAddress(ref, address + "/" + id);
            }
        } else {
            ref = super.getAddressWithId(id);
        }
        return ref;
    }
146303
public static SourceAddressAttribute createSourceAddressAttribute(
			TransportAddress address) {
		SourceAddressAttribute attribute = new SourceAddressAttribute();

		attribute.setAddress(address);

		return attribute;
	}
118285
public static String getOfficialDataTypeURI(Datatype datatype) {
    	for(Uris uris : datatype.getUris()) {
    		for(Uri uri : uris.getUri()) {
    			if(!isDeprecated(uri) && uri.getType() == UriType.URN) {
    				return uri.getValue();
    			}
    		}
    	}
    	
    	return null;
    }