All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gov.nasa.worldwind.ogc.kml.KMLSchemaData Maven / Gradle / Ivy

The newest version!
/*
 * 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.ogc.kml;

import gov.nasa.worldwind.util.xml.XMLEventParserContext;

import javax.xml.stream.events.XMLEvent;
import javax.xml.stream.XMLStreamException;
import java.util.*;

/**
 * Represents the KML SchemaData element and provides access to its contents.
 *
 * @author tag
 * @version $Id: KMLSchemaData.java 1171 2013-02-11 21:45:02Z dcollins $
 */
public class KMLSchemaData extends KMLAbstractObject
{
    protected List simpleData = new ArrayList();

    /**
     * Construct an instance.
     *
     * @param namespaceURI the qualifying namespace URI. May be null to indicate no namespace qualification.
     */
    public KMLSchemaData(String namespaceURI)
    {
        super(namespaceURI);
    }

    @Override
    protected void doAddEventContent(Object o, XMLEventParserContext ctx, XMLEvent event, Object... args)
        throws XMLStreamException
    {
        if (o instanceof KMLSimpleData)
            this.addSimpleData((KMLSimpleData) o);
    }

    public String getSchemaUrl()
    {
        return (String) this.getField("schemaUrl");
    }

    protected void addSimpleData(KMLSimpleData o)
    {
        this.simpleData.add(o);
    }

    public List getSimpleData()
    {
        return this.simpleData;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy