src.gov.nasa.worldwind.util.xml.xal.XALCountry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of worldwindx Show documentation
Show all versions of worldwindx Show documentation
World Wind is a collection of components that interactively display 3D geographic information within Java applications or applets.
/*
* Copyright (C) 2012 United States Government as represented by the Administrator of the
* National Aeronautics and Space Administration.
* All Rights Reserved.
*/
package gov.nasa.worldwind.util.xml.xal;
import gov.nasa.worldwind.util.xml.XMLEventParserContext;
import javax.xml.stream.events.XMLEvent;
import javax.xml.stream.XMLStreamException;
import java.util.*;
/**
* @author tag
* @version $Id: XALCountry.java 1171 2013-02-11 21:45:02Z dcollins $
*/
public class XALCountry extends XALAbstractObject
{
protected List addressLines;
protected List countryNameCodes;
protected List countryNames;
public XALCountry(String namespaceURI)
{
super(namespaceURI);
}
@Override
protected void doAddEventContent(Object o, XMLEventParserContext ctx, XMLEvent event, Object... args)
throws XMLStreamException
{
if (o instanceof XALAddressLine)
this.addAddressLine((XALAddressLine) o);
else if (o instanceof XALCountryNameCode)
this.addCountryNameCode((XALCountryNameCode) o);
else if (o instanceof XALCountryName)
this.addCountryName((XALCountryName) o);
else
super.doAddEventContent(o, ctx, event, args);
}
public List getAddressLines()
{
return this.addressLines;
}
protected void addAddressLine(XALAddressLine o)
{
if (this.addressLines == null)
this.addressLines = new ArrayList();
this.addressLines.add(o);
}
public List getCountryNameCodes()
{
return this.countryNameCodes;
}
protected void addCountryNameCode(XALCountryNameCode o)
{
if (this.countryNameCodes == null)
this.countryNameCodes = new ArrayList();
this.countryNameCodes.add(o);
}
public List getCountryNames()
{
return this.countryNames;
}
protected void addCountryName(XALCountryName o)
{
if (this.countryNames == null)
this.countryNames = new ArrayList();
this.countryNames.add(o);
}
public XALAdministrativeArea getAdministrativeArea()
{
return (XALAdministrativeArea) this.getField("AdministrativeArea");
}
public XALLocality getLocality()
{
return (XALLocality) this.getField("Locality");
}
public XALThoroughfare getThoroughfare()
{
return (XALThoroughfare) this.getField("Thoroughfare");
}
}