public static Museum parse(String text) {

    Map<String, String> map = WikipediaInfoboxParserUtils.asMap(text);

    Museum museum = new Museum();

    museum.setCoordinates(WikipediaCoordinatesInfoboxParserUtils.buildCoordinates(map));

    for (String key : map.keySet()) {

      try {

        switch (key) {
          case NAME:
            museum.setName(map.get(key));
            break;
          case IMAGE:
            museum.setImage(WikipediaInfoboxParserUtils.parseAsURL(map.get(key)));
            break;
          case LOCATION:
            museum.setLocation(map.get(key));
            break;
          case WEBSITE:
            museum.setWebsite(WikipediaInfoboxParserUtils.parseAsURL(map.get(key)));
            break;
        }
      } catch (Exception e) {

        logger.trace(
            "   #    Error parsing infobox pair ("
                + key
                + " , "
                + map.get(key)
                + ") : "
                + e.getMessage());
      }
    }

    return museum;
  }
  public static Settlement parse(String text) {

    Map<String, String> map = WikipediaInfoboxParserUtils.asMap(text);

    Settlement settlement = new Settlement();
    Coordinates coordinates = new Coordinates();

    for (String key : map.keySet()) {

      try {
        switch (key) {
          case NAME:
            settlement.setName(InfoboxParserUtil.removeAllParenthesis(map.get(key)));
            break;
          case STYLE:
            settlement.setType(InfoboxTypeParserUtil.getType(map.get(key)));
            break;
          case OFFICIAL_NAME:
            settlement.setOfficialName(InfoboxParserUtil.removeAllParenthesis(map.get(key)));
            break;
          case NATIVE_NAME:
            settlement.setNativeName(InfoboxParserUtil.removeAllParenthesis(map.get(key)));
            break;
          case OTHER_NAME:
            settlement.setOtherName(InfoboxParserUtil.removeAllParenthesis(map.get(key)));
            break;
          case LATITUDE:
            coordinates.setLatD(Double.parseDouble(map.get(key)));
            settlement.setCoordinates(coordinates);

            break;
          case LONGITUDE:
            coordinates.setLongD(Double.parseDouble(map.get(key)));
            settlement.setCoordinates(coordinates);
            break;
          case LATD:
            coordinates.setLatD(Double.parseDouble(map.get(key)));
            settlement.setCoordinates(coordinates);

            break;
          case LATM:
            coordinates.setLatM(Double.parseDouble(map.get(key)));
            settlement.setCoordinates(coordinates);
            break;
          case LATS:
            coordinates.setLatS(Double.parseDouble(map.get(key)));
            settlement.setCoordinates(coordinates);
            break;
          case LATDEG:
            coordinates.setLatD(Double.parseDouble(map.get(key)));
            settlement.setCoordinates(coordinates);

            break;
          case LATMIN:
            coordinates.setLatM(Double.parseDouble(map.get(key)));
            settlement.setCoordinates(coordinates);
            break;
          case LATSEC:
            coordinates.setLatS(Double.parseDouble(map.get(key)));
            settlement.setCoordinates(coordinates);
            break;
          case LATNS:
            coordinates.setLatNS(map.get(key));
            settlement.setCoordinates(coordinates);
            break;
          case LONGD:
            coordinates.setLongD(Double.parseDouble(map.get(key)));
            settlement.setCoordinates(coordinates);
            break;
          case LONGM:
            coordinates.setLongM(Double.parseDouble(map.get(key)));
            settlement.setCoordinates(coordinates);
            break;
          case LONGS:
            coordinates.setLongS(Double.parseDouble(map.get(key)));
            settlement.setCoordinates(coordinates);
            break;
          case LONGDEG:
            coordinates.setLongD(Double.parseDouble(map.get(key)));
            settlement.setCoordinates(coordinates);
            break;
          case LONGMIN:
            coordinates.setLongM(Double.parseDouble(map.get(key)));
            settlement.setCoordinates(coordinates);
            break;
          case LONGSEC:
            coordinates.setLongS(Double.parseDouble(map.get(key)));
            settlement.setCoordinates(coordinates);
            break;
          case LONGEW:
            coordinates.setLongEW(map.get(key));
            settlement.setCoordinates(coordinates);
            break;
          case WEB:
            settlement.setWebsite(WikipediaInfoboxParserUtils.parseAsURL(map.get(key)));
            break;
          case WEBU:
            settlement.setWebsite(WikipediaInfoboxParserUtils.parseAsURL(map.get(key)));
            break;
          case WEBSITE:
            settlement.setWebsite(WikipediaInfoboxParserUtils.parseAsURL(map.get(key)));
            break;
        }
      } catch (Exception e) {
      }
    }

    return settlement;
  }