/*
* Copyright (C) 2010-2012 Stichting Akvo (Akvo Foundation)
*
* This file is part of Akvo FLOW.
*
* Akvo FLOW is free software: you can redistribute it and modify it under the terms of
* the GNU Affero General Public License (AGPL) as published by the Free Software Foundation,
* either version 3 of the License or any later version.
*
* Akvo FLOW is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Affero General Public License included below for more details.
*
* The full license text can also be seen at <http://www.gnu.org/licenses/agpl.html>.
*/
package com.gallatinsystems.gis.geography.domain;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import com.gallatinsystems.framework.domain.BaseDomain;
/**
* structure to hold sub-country geographical regions. These should be auto-created on ingest of
* shape files.
*
* @author Christopher Fagiani
*/
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class SubCountry extends BaseDomain {
private static final long serialVersionUID = 5331278163302041952L;
private String name;
private Integer level;
private Long parentKey;
private String parentName;
private String countryCode;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
public Long getParentKey() {
return parentKey;
}
public void setParentKey(Long parentKey) {
this.parentKey = parentKey;
}
public String getParentName() {
return parentName;
}
public void setParentName(String parentName) {
this.parentName = parentName;
}
public String getCountryCode() {
return countryCode;
}
public void setCountryCode(String countryCode) {
this.countryCode = countryCode;
}
public String toString() {
StringBuilder b = new StringBuilder();
b.append(key.getId()).append(": ").append(countryCode).append(",")
.append(level).append(",").append(name);
return b.toString();
}
}