You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by sf...@apache.org on 2010/12/12 17:10:52 UTC

svn commit: r1044841 [4/11] - in /incubator/stanbol/trunk/fise: SemiAutomaticContentEnhancer/src/main/java/eu/iksproject/fise/sace/ SemiAutomaticContentEnhancer/src/main/java/eu/iksproject/fise/sace/ui/ SemiAutomaticContentEnhancer/src/main/java/eu/iks...

Modified: incubator/stanbol/trunk/fise/ext/org.geonames/src/main/java/org/geonames/Toponym.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/fise/ext/org.geonames/src/main/java/org/geonames/Toponym.java?rev=1044841&r1=1044840&r2=1044841&view=diff
==============================================================================
--- incubator/stanbol/trunk/fise/ext/org.geonames/src/main/java/org/geonames/Toponym.java (original)
+++ incubator/stanbol/trunk/fise/ext/org.geonames/src/main/java/org/geonames/Toponym.java Sun Dec 12 16:10:48 2010
@@ -20,482 +20,482 @@ package org.geonames;
  * a GeoNames toponym
  * <p>
  * NOTE (Rupert Westenthaler) added get/set for score and DEFAULT_SCORE
- * 
+ *
  * @author marc@geonames
- * 
+ *
  */
 public class Toponym {
 
-	private int geoNameId;
+    private int geoNameId;
 
-	private String name;
+    private String name;
 
-	private String alternateNames;
+    private String alternateNames;
 
-	private String countryCode;
+    private String countryCode;
 
-	private String countryName;
-
-	private Long population;
-
-	private Integer elevation;
-
-	private FeatureClass featureClass;
-
-	private String featureClassName;
-
-	private String featureCode;
-
-	private String featureCodeName;
-
-	private double latitude;
-
-	private double longitude;
-
-	private String adminCode1;
-
-	private String adminName1;
-
-	private String adminCode2;
-
-	private String adminName2;
-
-	private String adminCode3;
-
-	private String adminCode4;
-
-	private Timezone timezone;
-
-	private Style style;
-	
-	private Double score;
-	/**
-	 * Not all services returning toponyms provide a score. For such services
-	 * (e.g. hierarchy) it is assumed, that the score is 1.0.<br>
-	 * This default score is only returned if no score information is available
-	 * AND ({@link Style} <code> == null</code> OR (
-	 * {@link Style} NOT <code>null</code> AND {@link Style} EQUALS 
-	 * {@link Style#FULL}))<br>
-	 * Otherwise a {@link InsufficientStyleException} is thrown if no score
-	 * information is available.
-	 */
-	private static final Double DEFAULT_SCORE = 1.0;
-
-	/**
-	 * @return Returns the score of this result
-	 * @throws InsufficientStyleException The style is only available with
-	 *     {@link Style#FULL}. 
-	 */
-	public Double getScore() throws InsufficientStyleException {
-		if (score == null && style != null
-				&& Style.FULL.compareTo(style) > 0) {
-			throw new InsufficientStyleException(
-					"score not supported by style " + style.name());
-		}
-		return score!=null?score:DEFAULT_SCORE;
-	}
-	
-	/**
-	 * @param score
-	 *            The score of the result
-	 */
-	public void setScore(Double score) {
-		this.score = score;
-	}
-
-	/**
-	 * @return Returns the ISO 3166-1-alpha-2 countryCode.
-	 */
-	public String getCountryCode() {
-		return countryCode;
-	}
-
-	/**
-	 * @param countryCode
-	 *            The ISO 3166-1-alpha-2 countryCode to set.
-	 */
-	public void setCountryCode(String countryCode) {
-		this.countryCode = countryCode;
-	}
-
-	/**
-	 * @return Returns the elevation in meter.
-	 */
-	public Integer getElevation() throws InsufficientStyleException {
-		if (elevation == null && style != null
-				&& Style.LONG.compareTo(style) > 0) {
-			throw new InsufficientStyleException(
-					"elevation not supported by style " + style.name());
-		}
-		return elevation;
-	}
-
-	/**
-	 * @param elevation
-	 *            The elevation im meter to set.
-	 */
-	public void setElevation(Integer elevation) {
-		this.elevation = elevation;
-	}
-
-	/**
-	 * the feature class {@link FeatureClass}
-	 * 
-	 * @see <a href="http://www.geonames.org/export/codes.html">GeoNames Feature
-	 *      Codes</a>
-	 * @return Returns the featureClass.
-	 */
-	public FeatureClass getFeatureClass() {
-		return featureClass;
-	}
-
-	/**
-	 * @param featureClass
-	 *            The featureClass to set.
-	 */
-	public void setFeatureClass(FeatureClass featureClass) {
-		this.featureClass = featureClass;
-	}
-
-	/**
-	 * @see <a href="http://www.geonames.org/export/codes.html">GeoNames Feature
-	 *      Codes</a>
-	 * @return Returns the featureCode.
-	 */
-	public String getFeatureCode() {
-		return featureCode;
-	}
-
-	/**
-	 * @param featureCode
-	 *            The featureCode to set.
-	 */
-	public void setFeatureCode(String featureCode) {
-		this.featureCode = featureCode;
-	}
-
-	/**
-	 * latitude in decimal degrees (wgs84)
-	 * 
-	 * @return Returns the latitude.
-	 */
-	public double getLatitude() {
-		return latitude;
-	}
-
-	/**
-	 * @param latitude
-	 *            The latitude to set.
-	 */
-	public void setLatitude(double latitude) {
-		this.latitude = latitude;
-	}
-
-	/**
-	 * longitude in decimal degrees (wgs84)
-	 * 
-	 * @return Returns the longitude.
-	 */
-	public double getLongitude() {
-		return longitude;
-	}
-
-	/**
-	 * @param longitude
-	 *            The longitude to set.
-	 */
-	public void setLongitude(double longitude) {
-		this.longitude = longitude;
-	}
-
-	/**
-	 * @return Returns the name.
-	 */
-	public String getName() {
-		return name;
-	}
-
-	/**
-	 * @param name
-	 *            The name to set.
-	 */
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	/**
-	 * @return Returns the population.
-	 */
-	public Long getPopulation() throws InsufficientStyleException {
-		if (population == null && style != null
-				&& Style.LONG.compareTo(style) > 0) {
-			throw new InsufficientStyleException(
-					"population not supported by style " + style.name());
-		}
-		return population;
-	}
-
-	/**
-	 * @param population
-	 *            The population to set.
-	 */
-	public void setPopulation(Long population) {
-		this.population = population;
-	}
-
-	/**
-	 * @return Returns the geoNameId.
-	 */
-	public int getGeoNameId() {
-		return geoNameId;
-	}
-
-	/**
-	 * @param geoNameId
-	 *            The geoNameId to set.
-	 */
-	public void setGeoNameId(int geonameId) {
-		this.geoNameId = geonameId;
-	}
-
-	/**
-	 * @return Returns the featureClassName.
-	 */
-	public String getFeatureClassName() {
-		return featureClassName;
-	}
-
-	/**
-	 * @param featureClassName
-	 *            The featureClassName to set.
-	 */
-	public void setFeatureClassName(String featureClassName) {
-		this.featureClassName = featureClassName;
-	}
-
-	/**
-	 * @return Returns the featureCodeName.
-	 */
-	public String getFeatureCodeName() {
-		return featureCodeName;
-	}
-
-	/**
-	 * @param featureCodeName
-	 *            The featureCodeName to set.
-	 */
-	public void setFeatureCodeName(String featureCodeName) {
-		this.featureCodeName = featureCodeName;
-	}
-
-	/**
-	 * @return Returns the countryName.
-	 */
-	public String getCountryName() {
-		return countryName;
-	}
-
-	/**
-	 * @param countryName
-	 *            The countryName to set.
-	 */
-	public void setCountryName(String countryName) {
-		this.countryName = countryName;
-	}
-
-	/**
-	 * alternate names of this place as comma separated list
-	 * 
-	 * @return the alternateNames as comma separated list
-	 */
-	public String getAlternateNames() throws InsufficientStyleException {
-		if (alternateNames == null && style != null
-				&& Style.LONG.compareTo(style) > 0) {
-			throw new InsufficientStyleException(
-					"alternateNames not supported by style " + style.name());
-		}
-		return alternateNames;
-	}
-
-	/**
-	 * @param alternateNames
-	 *            the alternateNames to set
-	 */
-	public void setAlternateNames(String alternateNames) {
-		this.alternateNames = alternateNames;
-	}
-
-	public String toString() {
-		StringBuilder str = new StringBuilder();
-		str.append("geoNameId=" + geoNameId + ",");
-		str.append("name=" + name + ",");
-		if (alternateNames != null) {
-			str.append("alternateNames=" + alternateNames + ",");
-		}
-		str.append("latitude=" + latitude + ",");
-		str.append("longitude=" + longitude + ",");
-		str.append("countryCode=" + countryCode + ",");
-		str.append("population=" + population + ",");
-		str.append("elevation=" + elevation + ",");
-		str.append("featureClass=" + featureClass + ",");
-		str.append("featureCode=" + featureCode);
-		return str.toString();
-	}
-
-	/**
-	 * @return the adminCode1
-	 */
-	public String getAdminCode1() throws InsufficientStyleException {
-		if (adminCode1 == null && style != null
-				&& Style.LONG.compareTo(style) > 0) {
-			throw new InsufficientStyleException(
-					"adminCode1 not supported by style " + style.name());
-		}
-		return adminCode1;
-	}
-
-	/**
-	 * @param adminCode1
-	 *            the adminCode1 to set
-	 */
-	public void setAdminCode1(String adminCode1) {
-		this.adminCode1 = adminCode1;
-	}
-
-	/**
-	 * @return the adminCode2
-	 */
-	public String getAdminCode2() throws InsufficientStyleException {
-		if (adminCode2 == null && style != null
-				&& Style.LONG.compareTo(style) > 0) {
-			throw new InsufficientStyleException(
-					"adminCode2 not supported by style " + style.name());
-		}
-		return adminCode2;
-	}
-
-	/**
-	 * @param adminCode2
-	 *            the adminCode2 to set
-	 */
-	public void setAdminCode2(String adminCode2) {
-		this.adminCode2 = adminCode2;
-	}
-
-	/**
-	 * @return the adminCode3
-	 */
-	public String getAdminCode3() throws InsufficientStyleException {
-		if (adminCode3 == null && style != null
-				&& Style.LONG.compareTo(style) > 0) {
-			throw new InsufficientStyleException(
-					"adminCode3 not supported by style " + style.name());
-		}
-		return adminCode3;
-	}
-
-	/**
-	 * @param adminCode3
-	 *            the adminCode3 to set
-	 */
-	public void setAdminCode3(String adminCode3) {
-		this.adminCode3 = adminCode3;
-	}
-
-	/**
-	 * @return the adminCode4
-	 */
-	public String getAdminCode4() throws InsufficientStyleException {
-		if (adminCode4 == null && style != null
-				&& Style.LONG.compareTo(style) > 0) {
-			throw new InsufficientStyleException(
-					"adminCode4 not supported by style " + style.name());
-		}
-		return adminCode4;
-	}
-
-	/**
-	 * @param adminCode4
-	 *            the adminCode4 to set
-	 */
-	public void setAdminCode4(String adminCode4) {
-		this.adminCode4 = adminCode4;
-	}
-
-	/**
-	 * @return the timezone
-	 */
-	public Timezone getTimezone() throws InsufficientStyleException {
-		if (timezone == null && style != null
-				&& Style.LONG.compareTo(style) > 0) {
-			throw new InsufficientStyleException(
-					"alternateNames not supported by style " + style.name());
-		}
-		return timezone;
-	}
-
-	/**
-	 * @param timezone
-	 *            the timezone to set
-	 */
-	public void setTimezone(Timezone timezone) {
-		this.timezone = timezone;
-	}
-
-	/**
-	 * @return the adminName1
-	 */
-	public String getAdminName1() throws InsufficientStyleException {
-		if (adminName1 == null && style != null
-				&& Style.LONG.compareTo(style) > 0) {
-			throw new InsufficientStyleException(
-					"adminName1 not supported by style " + style.name());
-		}
-		return adminName1;
-	}
-
-	/**
-	 * @param adminName1
-	 *            the adminName1 to set
-	 */
-	public void setAdminName1(String adminName1) {
-		this.adminName1 = adminName1;
-	}
-
-	/**
-	 * @return the adminName2
-	 */
-	public String getAdminName2() throws InsufficientStyleException {
-		if (adminName2 == null && style != null
-				&& Style.LONG.compareTo(style) > 0) {
-			throw new InsufficientStyleException(
-					"adminName2 not supported by style " + style.name());
-		}
-		return adminName2;
-	}
-
-	/**
-	 * @param adminName2
-	 *            the adminName2 to set
-	 */
-	public void setAdminName2(String adminName2) {
-		this.adminName2 = adminName2;
-	}
-
-	/**
-	 * @return the style used when calling the web service that returned this
-	 *         toponym.
-	 */
-	public Style getStyle() {
-		return style;
-	}
-
-	/**
-	 * @param style
-	 *            the style to set
-	 */
-	public void setStyle(Style style) {
-		this.style = style;
-	}
+    private String countryName;
+
+    private Long population;
+
+    private Integer elevation;
+
+    private FeatureClass featureClass;
+
+    private String featureClassName;
+
+    private String featureCode;
+
+    private String featureCodeName;
+
+    private double latitude;
+
+    private double longitude;
+
+    private String adminCode1;
+
+    private String adminName1;
+
+    private String adminCode2;
+
+    private String adminName2;
+
+    private String adminCode3;
+
+    private String adminCode4;
+
+    private Timezone timezone;
+
+    private Style style;
+
+    private Double score;
+    /**
+     * Not all services returning toponyms provide a score. For such services
+     * (e.g. hierarchy) it is assumed, that the score is 1.0.<br>
+     * This default score is only returned if no score information is available
+     * AND ({@link Style} <code> == null</code> OR (
+     * {@link Style} NOT <code>null</code> AND {@link Style} EQUALS
+     * {@link Style#FULL}))<br>
+     * Otherwise a {@link InsufficientStyleException} is thrown if no score
+     * information is available.
+     */
+    private static final Double DEFAULT_SCORE = 1.0;
+
+    /**
+     * @return Returns the score of this result
+     * @throws InsufficientStyleException The style is only available with
+     *     {@link Style#FULL}.
+     */
+    public Double getScore() throws InsufficientStyleException {
+        if (score == null && style != null
+                && Style.FULL.compareTo(style) > 0) {
+            throw new InsufficientStyleException(
+                    "score not supported by style " + style.name());
+        }
+        return score!=null?score:DEFAULT_SCORE;
+    }
+
+    /**
+     * @param score
+     *            The score of the result
+     */
+    public void setScore(Double score) {
+        this.score = score;
+    }
+
+    /**
+     * @return Returns the ISO 3166-1-alpha-2 countryCode.
+     */
+    public String getCountryCode() {
+        return countryCode;
+    }
+
+    /**
+     * @param countryCode
+     *            The ISO 3166-1-alpha-2 countryCode to set.
+     */
+    public void setCountryCode(String countryCode) {
+        this.countryCode = countryCode;
+    }
+
+    /**
+     * @return Returns the elevation in meter.
+     */
+    public Integer getElevation() throws InsufficientStyleException {
+        if (elevation == null && style != null
+                && Style.LONG.compareTo(style) > 0) {
+            throw new InsufficientStyleException(
+                    "elevation not supported by style " + style.name());
+        }
+        return elevation;
+    }
+
+    /**
+     * @param elevation
+     *            The elevation im meter to set.
+     */
+    public void setElevation(Integer elevation) {
+        this.elevation = elevation;
+    }
+
+    /**
+     * the feature class {@link FeatureClass}
+     *
+     * @see <a href="http://www.geonames.org/export/codes.html">GeoNames Feature
+     *      Codes</a>
+     * @return Returns the featureClass.
+     */
+    public FeatureClass getFeatureClass() {
+        return featureClass;
+    }
+
+    /**
+     * @param featureClass
+     *            The featureClass to set.
+     */
+    public void setFeatureClass(FeatureClass featureClass) {
+        this.featureClass = featureClass;
+    }
+
+    /**
+     * @see <a href="http://www.geonames.org/export/codes.html">GeoNames Feature
+     *      Codes</a>
+     * @return Returns the featureCode.
+     */
+    public String getFeatureCode() {
+        return featureCode;
+    }
+
+    /**
+     * @param featureCode
+     *            The featureCode to set.
+     */
+    public void setFeatureCode(String featureCode) {
+        this.featureCode = featureCode;
+    }
+
+    /**
+     * latitude in decimal degrees (wgs84)
+     *
+     * @return Returns the latitude.
+     */
+    public double getLatitude() {
+        return latitude;
+    }
+
+    /**
+     * @param latitude
+     *            The latitude to set.
+     */
+    public void setLatitude(double latitude) {
+        this.latitude = latitude;
+    }
+
+    /**
+     * longitude in decimal degrees (wgs84)
+     *
+     * @return Returns the longitude.
+     */
+    public double getLongitude() {
+        return longitude;
+    }
+
+    /**
+     * @param longitude
+     *            The longitude to set.
+     */
+    public void setLongitude(double longitude) {
+        this.longitude = longitude;
+    }
+
+    /**
+     * @return Returns the name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     *            The name to set.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return Returns the population.
+     */
+    public Long getPopulation() throws InsufficientStyleException {
+        if (population == null && style != null
+                && Style.LONG.compareTo(style) > 0) {
+            throw new InsufficientStyleException(
+                    "population not supported by style " + style.name());
+        }
+        return population;
+    }
+
+    /**
+     * @param population
+     *            The population to set.
+     */
+    public void setPopulation(Long population) {
+        this.population = population;
+    }
+
+    /**
+     * @return Returns the geoNameId.
+     */
+    public int getGeoNameId() {
+        return geoNameId;
+    }
+
+    /**
+     * @param geoNameId
+     *            The geoNameId to set.
+     */
+    public void setGeoNameId(int geonameId) {
+        this.geoNameId = geonameId;
+    }
+
+    /**
+     * @return Returns the featureClassName.
+     */
+    public String getFeatureClassName() {
+        return featureClassName;
+    }
+
+    /**
+     * @param featureClassName
+     *            The featureClassName to set.
+     */
+    public void setFeatureClassName(String featureClassName) {
+        this.featureClassName = featureClassName;
+    }
+
+    /**
+     * @return Returns the featureCodeName.
+     */
+    public String getFeatureCodeName() {
+        return featureCodeName;
+    }
+
+    /**
+     * @param featureCodeName
+     *            The featureCodeName to set.
+     */
+    public void setFeatureCodeName(String featureCodeName) {
+        this.featureCodeName = featureCodeName;
+    }
+
+    /**
+     * @return Returns the countryName.
+     */
+    public String getCountryName() {
+        return countryName;
+    }
+
+    /**
+     * @param countryName
+     *            The countryName to set.
+     */
+    public void setCountryName(String countryName) {
+        this.countryName = countryName;
+    }
+
+    /**
+     * alternate names of this place as comma separated list
+     *
+     * @return the alternateNames as comma separated list
+     */
+    public String getAlternateNames() throws InsufficientStyleException {
+        if (alternateNames == null && style != null
+                && Style.LONG.compareTo(style) > 0) {
+            throw new InsufficientStyleException(
+                    "alternateNames not supported by style " + style.name());
+        }
+        return alternateNames;
+    }
+
+    /**
+     * @param alternateNames
+     *            the alternateNames to set
+     */
+    public void setAlternateNames(String alternateNames) {
+        this.alternateNames = alternateNames;
+    }
+
+    public String toString() {
+        StringBuilder str = new StringBuilder();
+        str.append("geoNameId=" + geoNameId + ",");
+        str.append("name=" + name + ",");
+        if (alternateNames != null) {
+            str.append("alternateNames=" + alternateNames + ",");
+        }
+        str.append("latitude=" + latitude + ",");
+        str.append("longitude=" + longitude + ",");
+        str.append("countryCode=" + countryCode + ",");
+        str.append("population=" + population + ",");
+        str.append("elevation=" + elevation + ",");
+        str.append("featureClass=" + featureClass + ",");
+        str.append("featureCode=" + featureCode);
+        return str.toString();
+    }
+
+    /**
+     * @return the adminCode1
+     */
+    public String getAdminCode1() throws InsufficientStyleException {
+        if (adminCode1 == null && style != null
+                && Style.LONG.compareTo(style) > 0) {
+            throw new InsufficientStyleException(
+                    "adminCode1 not supported by style " + style.name());
+        }
+        return adminCode1;
+    }
+
+    /**
+     * @param adminCode1
+     *            the adminCode1 to set
+     */
+    public void setAdminCode1(String adminCode1) {
+        this.adminCode1 = adminCode1;
+    }
+
+    /**
+     * @return the adminCode2
+     */
+    public String getAdminCode2() throws InsufficientStyleException {
+        if (adminCode2 == null && style != null
+                && Style.LONG.compareTo(style) > 0) {
+            throw new InsufficientStyleException(
+                    "adminCode2 not supported by style " + style.name());
+        }
+        return adminCode2;
+    }
+
+    /**
+     * @param adminCode2
+     *            the adminCode2 to set
+     */
+    public void setAdminCode2(String adminCode2) {
+        this.adminCode2 = adminCode2;
+    }
+
+    /**
+     * @return the adminCode3
+     */
+    public String getAdminCode3() throws InsufficientStyleException {
+        if (adminCode3 == null && style != null
+                && Style.LONG.compareTo(style) > 0) {
+            throw new InsufficientStyleException(
+                    "adminCode3 not supported by style " + style.name());
+        }
+        return adminCode3;
+    }
+
+    /**
+     * @param adminCode3
+     *            the adminCode3 to set
+     */
+    public void setAdminCode3(String adminCode3) {
+        this.adminCode3 = adminCode3;
+    }
+
+    /**
+     * @return the adminCode4
+     */
+    public String getAdminCode4() throws InsufficientStyleException {
+        if (adminCode4 == null && style != null
+                && Style.LONG.compareTo(style) > 0) {
+            throw new InsufficientStyleException(
+                    "adminCode4 not supported by style " + style.name());
+        }
+        return adminCode4;
+    }
+
+    /**
+     * @param adminCode4
+     *            the adminCode4 to set
+     */
+    public void setAdminCode4(String adminCode4) {
+        this.adminCode4 = adminCode4;
+    }
+
+    /**
+     * @return the timezone
+     */
+    public Timezone getTimezone() throws InsufficientStyleException {
+        if (timezone == null && style != null
+                && Style.LONG.compareTo(style) > 0) {
+            throw new InsufficientStyleException(
+                    "alternateNames not supported by style " + style.name());
+        }
+        return timezone;
+    }
+
+    /**
+     * @param timezone
+     *            the timezone to set
+     */
+    public void setTimezone(Timezone timezone) {
+        this.timezone = timezone;
+    }
+
+    /**
+     * @return the adminName1
+     */
+    public String getAdminName1() throws InsufficientStyleException {
+        if (adminName1 == null && style != null
+                && Style.LONG.compareTo(style) > 0) {
+            throw new InsufficientStyleException(
+                    "adminName1 not supported by style " + style.name());
+        }
+        return adminName1;
+    }
+
+    /**
+     * @param adminName1
+     *            the adminName1 to set
+     */
+    public void setAdminName1(String adminName1) {
+        this.adminName1 = adminName1;
+    }
+
+    /**
+     * @return the adminName2
+     */
+    public String getAdminName2() throws InsufficientStyleException {
+        if (adminName2 == null && style != null
+                && Style.LONG.compareTo(style) > 0) {
+            throw new InsufficientStyleException(
+                    "adminName2 not supported by style " + style.name());
+        }
+        return adminName2;
+    }
+
+    /**
+     * @param adminName2
+     *            the adminName2 to set
+     */
+    public void setAdminName2(String adminName2) {
+        this.adminName2 = adminName2;
+    }
+
+    /**
+     * @return the style used when calling the web service that returned this
+     *         toponym.
+     */
+    public Style getStyle() {
+        return style;
+    }
+
+    /**
+     * @param style
+     *            the style to set
+     */
+    public void setStyle(Style style) {
+        this.style = style;
+    }
 
 }

Modified: incubator/stanbol/trunk/fise/ext/org.geonames/src/main/java/org/geonames/ToponymSearchCriteria.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/fise/ext/org.geonames/src/main/java/org/geonames/ToponymSearchCriteria.java?rev=1044841&r1=1044840&r2=1044841&view=diff
==============================================================================
--- incubator/stanbol/trunk/fise/ext/org.geonames/src/main/java/org/geonames/ToponymSearchCriteria.java (original)
+++ incubator/stanbol/trunk/fise/ext/org.geonames/src/main/java/org/geonames/ToponymSearchCriteria.java Sun Dec 12 16:10:48 2010
@@ -18,314 +18,314 @@ package org.geonames;
 
 /**
  * search criteria for web services returning toponyms.
- * 
+ *
  * The string parameters do not have to be utf8 encoded. The encoding is done
  * transparently in the call to the web service.
- * 
+ *
  * The main parameter for the search over all fields is the 'q' parameter.
- * 
+ *
  * @see WebService#search
- * 
+ *
  * @see <a href="http://www.geonames.org/export/geonames-search.html">search webservice documentation< /a>
- * 
+ *
  * @author marc@geonames
- * 
+ *
  */
 public class ToponymSearchCriteria {
 
-	private String q;
+    private String q;
 
-	private String countryCode;
-	
-	private String continentCode;
-
-	private String name;
-
-	private String nameEquals;
-
-	private String nameStartsWith;
-
-	private String tag;
-
-	private String language;
-
-	private Style style;
-
-	private FeatureClass featureClass;
-
-	private String[] featureCodes;
-
-	private String adminCode1;
-
-	private String adminCode2;
-
-	private String adminCode3;
-
-	private String adminCode4;
-
-	private int maxRows;
-
-	private int startRow;
-
-	/**
-	 * @return Returns the ISO 3166-1-alpha-2 countryCode.
-	 */
-	public String getCountryCode() {
-		return countryCode;
-	}
-
-	/**
-	 * @param countryCode
-	 *            The ISO 3166-1-alpha-2 countryCode to set.
-	 */
-	public void setCountryCode(String countryCode)
-			throws InvalidParameterException {
-		if (countryCode != null && countryCode.length() != 2) {
-			throw new InvalidParameterException("invalid country code "
-					+ countryCode);
-		}
-		this.countryCode = countryCode;
-	}
-
-	/**
-	 * @return the continentCode
-	 */
-	public String getContinentCode() {
-		return continentCode;
-	}
-
-	/**
-	 * @param continentCode the continentCode to set
-	 */
-	public void setContinentCode(String continentCode) {
-		this.continentCode = continentCode;
-	}
-
-	/**
-	 * @return Returns the nameEquals.
-	 */
-	public String getNameEquals() {
-		return nameEquals;
-	}
-
-	/**
-	 * @param nameEquals
-	 *            The nameEquals to set.
-	 */
-	public void setNameEquals(String exactName) {
-		this.nameEquals = exactName;
-	}
-
-	/**
-	 * @return Returns the featureCodes.
-	 */
-	public String[] getFeatureCodes() {
-		return featureCodes;
-	}
-
-	/**
-	 * @param featureCodes
-	 *            The featureCodes to set.
-	 */
-	public void setFeatureCodes(String[] featureCodes) {
-		this.featureCodes = featureCodes;
-	}
-
-	public void setFeatureCode(String featureCode) {
-		this.featureCodes = new String[] { featureCode };
-	}
-
-	/**
-	 * @return Returns the language.
-	 */
-	public String getLanguage() {
-		return language;
-	}
-
-	/**
-	 * @param language
-	 *            The language to set.
-	 */
-	public void setLanguage(String language) {
-		this.language = language;
-	}
-
-	/**
-	 * @return Returns the maxRows.
-	 */
-	public int getMaxRows() {
-		return maxRows;
-	}
-
-	/**
-	 * @param maxRows
-	 *            The maxRows to set.
-	 */
-	public void setMaxRows(int maxRows) {
-		this.maxRows = maxRows;
-	}
-
-	/**
-	 * @return Returns the name.
-	 */
-	public String getName() {
-		return name;
-	}
-
-	/**
-	 * search over the name field only.
-	 * 
-	 * @param name
-	 *            The name to set.
-	 */
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	/**
-	 * @return Returns the q.
-	 */
-	public String getQ() {
-		return q;
-	}
-
-	/**
-	 * The main search term. The search is executed over all fields (place name,
-	 * country name, admin names, etc)
-	 * 
-	 * @param q
-	 *            The q to set.
-	 */
-	public void setQ(String q) {
-		this.q = q;
-	}
-
-	/**
-	 * @return Returns the startRow.
-	 */
-	public int getStartRow() {
-		return startRow;
-	}
-
-	/**
-	 * @param startRow
-	 *            The startRow to set.
-	 */
-	public void setStartRow(int startRow) {
-		this.startRow = startRow;
-	}
-
-	/**
-	 * @return Returns the style.
-	 */
-	public Style getStyle() {
-		return style;
-	}
-
-	/**
-	 * @param style
-	 *            The style to set.
-	 */
-	public void setStyle(Style style) {
-		this.style = style;
-	}
-
-	/**
-	 * @return Returns the tag.
-	 */
-	public String getTag() {
-		return tag;
-	}
-
-	/**
-	 * @param tag
-	 *            The tag to set.
-	 */
-	public void setTag(String tag) {
-		this.tag = tag;
-	}
-
-	/**
-	 * @return Returns the nameStartsWith.
-	 */
-	public String getNameStartsWith() {
-		return nameStartsWith;
-	}
-
-	/**
-	 * @param nameStartsWith
-	 *            The nameStartsWith to set.
-	 */
-	public void setNameStartsWith(String nameStartsWith) {
-		this.nameStartsWith = nameStartsWith;
-	}
-
-	/**
-	 * @return the featureClass
-	 */
-	public FeatureClass getFeatureClass() {
-		return featureClass;
-	}
-
-	/**
-	 * @param featureClass
-	 *            the featureClass to set
-	 */
-	public void setFeatureClass(FeatureClass featureClass) {
-		this.featureClass = featureClass;
-	}
-
-	/**
-	 * @return the adminCode1
-	 */
-	public String getAdminCode1() {
-		return adminCode1;
-	}
-
-	/**
-	 * @param adminCode1
-	 *            the adminCode1 to set
-	 */
-	public void setAdminCode1(String adminCode1) {
-		this.adminCode1 = adminCode1;
-	}
-
-	/**
-	 * @return the adminCode2
-	 */
-	public String getAdminCode2() {
-		return adminCode2;
-	}
-
-	/**
-	 * @param adminCode2
-	 *            the adminCode2 to set
-	 */
-	public void setAdminCode2(String adminCode2) {
-		this.adminCode2 = adminCode2;
-	}
-
-	/**
-	 * @return the adminCode3
-	 */
-	public String getAdminCode3() {
-		return adminCode3;
-	}
-
-	/**
-	 * @param adminCode3
-	 *            the adminCode3 to set
-	 */
-	public void setAdminCode3(String adminCode3) {
-		this.adminCode3 = adminCode3;
-	}
-
-	public String getAdminCode4() {
-		return adminCode4;
-	}
-
-	public void setAdminCode4(String adminCode4) {
-		this.adminCode4 = adminCode4;
-	}
+    private String countryCode;
+
+    private String continentCode;
+
+    private String name;
+
+    private String nameEquals;
+
+    private String nameStartsWith;
+
+    private String tag;
+
+    private String language;
+
+    private Style style;
+
+    private FeatureClass featureClass;
+
+    private String[] featureCodes;
+
+    private String adminCode1;
+
+    private String adminCode2;
+
+    private String adminCode3;
+
+    private String adminCode4;
+
+    private int maxRows;
+
+    private int startRow;
+
+    /**
+     * @return Returns the ISO 3166-1-alpha-2 countryCode.
+     */
+    public String getCountryCode() {
+        return countryCode;
+    }
+
+    /**
+     * @param countryCode
+     *            The ISO 3166-1-alpha-2 countryCode to set.
+     */
+    public void setCountryCode(String countryCode)
+            throws InvalidParameterException {
+        if (countryCode != null && countryCode.length() != 2) {
+            throw new InvalidParameterException("invalid country code "
+                    + countryCode);
+        }
+        this.countryCode = countryCode;
+    }
+
+    /**
+     * @return the continentCode
+     */
+    public String getContinentCode() {
+        return continentCode;
+    }
+
+    /**
+     * @param continentCode the continentCode to set
+     */
+    public void setContinentCode(String continentCode) {
+        this.continentCode = continentCode;
+    }
+
+    /**
+     * @return Returns the nameEquals.
+     */
+    public String getNameEquals() {
+        return nameEquals;
+    }
+
+    /**
+     * @param nameEquals
+     *            The nameEquals to set.
+     */
+    public void setNameEquals(String exactName) {
+        this.nameEquals = exactName;
+    }
+
+    /**
+     * @return Returns the featureCodes.
+     */
+    public String[] getFeatureCodes() {
+        return featureCodes;
+    }
+
+    /**
+     * @param featureCodes
+     *            The featureCodes to set.
+     */
+    public void setFeatureCodes(String[] featureCodes) {
+        this.featureCodes = featureCodes;
+    }
+
+    public void setFeatureCode(String featureCode) {
+        this.featureCodes = new String[] { featureCode };
+    }
+
+    /**
+     * @return Returns the language.
+     */
+    public String getLanguage() {
+        return language;
+    }
+
+    /**
+     * @param language
+     *            The language to set.
+     */
+    public void setLanguage(String language) {
+        this.language = language;
+    }
+
+    /**
+     * @return Returns the maxRows.
+     */
+    public int getMaxRows() {
+        return maxRows;
+    }
+
+    /**
+     * @param maxRows
+     *            The maxRows to set.
+     */
+    public void setMaxRows(int maxRows) {
+        this.maxRows = maxRows;
+    }
+
+    /**
+     * @return Returns the name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * search over the name field only.
+     *
+     * @param name
+     *            The name to set.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return Returns the q.
+     */
+    public String getQ() {
+        return q;
+    }
+
+    /**
+     * The main search term. The search is executed over all fields (place name,
+     * country name, admin names, etc)
+     *
+     * @param q
+     *            The q to set.
+     */
+    public void setQ(String q) {
+        this.q = q;
+    }
+
+    /**
+     * @return Returns the startRow.
+     */
+    public int getStartRow() {
+        return startRow;
+    }
+
+    /**
+     * @param startRow
+     *            The startRow to set.
+     */
+    public void setStartRow(int startRow) {
+        this.startRow = startRow;
+    }
+
+    /**
+     * @return Returns the style.
+     */
+    public Style getStyle() {
+        return style;
+    }
+
+    /**
+     * @param style
+     *            The style to set.
+     */
+    public void setStyle(Style style) {
+        this.style = style;
+    }
+
+    /**
+     * @return Returns the tag.
+     */
+    public String getTag() {
+        return tag;
+    }
+
+    /**
+     * @param tag
+     *            The tag to set.
+     */
+    public void setTag(String tag) {
+        this.tag = tag;
+    }
+
+    /**
+     * @return Returns the nameStartsWith.
+     */
+    public String getNameStartsWith() {
+        return nameStartsWith;
+    }
+
+    /**
+     * @param nameStartsWith
+     *            The nameStartsWith to set.
+     */
+    public void setNameStartsWith(String nameStartsWith) {
+        this.nameStartsWith = nameStartsWith;
+    }
+
+    /**
+     * @return the featureClass
+     */
+    public FeatureClass getFeatureClass() {
+        return featureClass;
+    }
+
+    /**
+     * @param featureClass
+     *            the featureClass to set
+     */
+    public void setFeatureClass(FeatureClass featureClass) {
+        this.featureClass = featureClass;
+    }
+
+    /**
+     * @return the adminCode1
+     */
+    public String getAdminCode1() {
+        return adminCode1;
+    }
+
+    /**
+     * @param adminCode1
+     *            the adminCode1 to set
+     */
+    public void setAdminCode1(String adminCode1) {
+        this.adminCode1 = adminCode1;
+    }
+
+    /**
+     * @return the adminCode2
+     */
+    public String getAdminCode2() {
+        return adminCode2;
+    }
+
+    /**
+     * @param adminCode2
+     *            the adminCode2 to set
+     */
+    public void setAdminCode2(String adminCode2) {
+        this.adminCode2 = adminCode2;
+    }
+
+    /**
+     * @return the adminCode3
+     */
+    public String getAdminCode3() {
+        return adminCode3;
+    }
+
+    /**
+     * @param adminCode3
+     *            the adminCode3 to set
+     */
+    public void setAdminCode3(String adminCode3) {
+        this.adminCode3 = adminCode3;
+    }
+
+    public String getAdminCode4() {
+        return adminCode4;
+    }
+
+    public void setAdminCode4(String adminCode4) {
+        this.adminCode4 = adminCode4;
+    }
 
 }

Modified: incubator/stanbol/trunk/fise/ext/org.geonames/src/main/java/org/geonames/ToponymSearchResult.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/fise/ext/org.geonames/src/main/java/org/geonames/ToponymSearchResult.java?rev=1044841&r1=1044840&r2=1044841&view=diff
==============================================================================
--- incubator/stanbol/trunk/fise/ext/org.geonames/src/main/java/org/geonames/ToponymSearchResult.java (original)
+++ incubator/stanbol/trunk/fise/ext/org.geonames/src/main/java/org/geonames/ToponymSearchResult.java Sun Dec 12 16:10:48 2010
@@ -21,60 +21,60 @@ import java.util.List;
 
 /**
  * a toponym search result as returned by the geonames webservice.
- * 
+ *
  * @author marc@geonames
- * 
+ *
  */
 public class ToponymSearchResult {
 
-	List<Toponym> toponyms = new ArrayList<Toponym>();
+    List<Toponym> toponyms = new ArrayList<Toponym>();
 
-	int totalResultsCount;
-	
-	Style style;
-
-	/**
-	 * @return Returns the toponyms.
-	 */
-	public List<Toponym> getToponyms() {
-		return toponyms;
-	}
-
-	/**
-	 * @param toponyms
-	 *            The toponyms to set.
-	 */
-	public void setToponyms(List<Toponym> toponyms) {
-		this.toponyms = toponyms;
-	}
-
-	/**
-	 * @return Returns the totalResultsCount.
-	 */
-	public int getTotalResultsCount() {
-		return totalResultsCount;
-	}
-
-	/**
-	 * @param totalResultsCount
-	 *            The totalResultsCount to set.
-	 */
-	public void setTotalResultsCount(int totalResultsCount) {
-		this.totalResultsCount = totalResultsCount;
-	}
-
-	/**
-	 * @return the style
-	 */
-	public Style getStyle() {
-		return style;
-	}
-
-	/**
-	 * @param style the style to set
-	 */
-	public void setStyle(Style style) {
-		this.style = style;
-	}
+    int totalResultsCount;
+
+    Style style;
+
+    /**
+     * @return Returns the toponyms.
+     */
+    public List<Toponym> getToponyms() {
+        return toponyms;
+    }
+
+    /**
+     * @param toponyms
+     *            The toponyms to set.
+     */
+    public void setToponyms(List<Toponym> toponyms) {
+        this.toponyms = toponyms;
+    }
+
+    /**
+     * @return Returns the totalResultsCount.
+     */
+    public int getTotalResultsCount() {
+        return totalResultsCount;
+    }
+
+    /**
+     * @param totalResultsCount
+     *            The totalResultsCount to set.
+     */
+    public void setTotalResultsCount(int totalResultsCount) {
+        this.totalResultsCount = totalResultsCount;
+    }
+
+    /**
+     * @return the style
+     */
+    public Style getStyle() {
+        return style;
+    }
+
+    /**
+     * @param style the style to set
+     */
+    public void setStyle(Style style) {
+        this.style = style;
+    }
 
 }