Package com.google.i18n.phonenumbers.Phonemetadata

Examples of com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadataCollection.addMetadata()


        // country calling codes instead of the region code to form the file name.
        if (regionCode.equals("001") || regionCode.isEmpty()) {
          regionCode = Integer.toString(metadata.getCountryCode());
        }
        PhoneMetadataCollection outMetadataCollection = new PhoneMetadataCollection();
        outMetadataCollection.addMetadata(metadata);
        FileOutputStream outputForRegion = new FileOutputStream(filePrefix + "_" + regionCode);
        ObjectOutputStream out = new ObjectOutputStream(outputForRegion);
        outMetadataCollection.writeExternal(out);
        out.close();
      }
View Full Code Here


        // country calling codes instead of the region code to form the file name.
        if (regionCode.equals("001") || regionCode.isEmpty()) {
          regionCode = Integer.toString(metadata.getCountryCode());
        }
        PhoneMetadataCollection outMetadataCollection = new PhoneMetadataCollection();
        outMetadataCollection.addMetadata(metadata);
        FileOutputStream outputForRegion = new FileOutputStream(filePrefix + "_" + regionCode);
        ObjectOutputStream out = new ObjectOutputStream(outputForRegion);
        outMetadataCollection.writeExternal(out);
        out.close();
      }
View Full Code Here

        BuildMetadataFromXml.buildPhoneMetadataCollection(inputFile, liteBuild);

    for (PhoneMetadata metadata : metadataCollection.getMetadataList()) {
      String regionCode = metadata.getId();
      PhoneMetadataCollection outMetadataCollection = new PhoneMetadataCollection();
      outMetadataCollection.addMetadata(metadata);
      FileOutputStream outputForRegion = new FileOutputStream(filePrefix + "_" + regionCode);
      ObjectOutputStream out = new ObjectOutputStream(outputForRegion);
      outMetadataCollection.writeExternal(out);
      out.close();
    }
View Full Code Here

    int numOfTerritories = territory.getLength();
    for (int i = 0; i < numOfTerritories; i++) {
      Element territoryElement = (Element) territory.item(i);
      String regionCode = territoryElement.getAttribute("id");
      PhoneMetadata metadata = loadCountryMetadata(regionCode, territoryElement);
      metadataCollection.addMetadata(metadata);
    }
    return metadataCollection;
  }

  // Build a mapping from a country calling code to the region codes which denote the country/region
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.