externallinkparser.java

来自「world wind java sdk 源码」· Java 代码 · 共 49 行

JAVA
49
字号
/*
Copyright (C) 2001, 2008 United States Government as represented by
the Administrator of the National Aeronautics and Space Administration.
All Rights Reserved.
*/
package gov.nasa.worldwind.applications.gio.ebrim;

import gov.nasa.worldwind.util.Logging;

/**
 * @author dcollins
 * @version $Id$
 */
public class ExternalLinkParser extends RegistryObjectParser implements ExternalLink
{
    private String externalURI;
    public static final String ELEMENT_NAME = "ExternalLink";
    private static final String EXTERNAL_URI_ATTRIBUTE_NAME = "externalURI";

    public ExternalLinkParser(String elementName, org.xml.sax.Attributes attributes)
    {
        super(elementName, attributes);

        if (attributes == null)
        {
            String message = Logging.getMessage("nullValue.AttributesIsNull");
            Logging.logger().severe(message);
            throw new IllegalArgumentException(message);
        }

        for (int i = 0; i < attributes.getLength(); i++)
        {
            String attribName = attributes.getLocalName(i);
            if (EXTERNAL_URI_ATTRIBUTE_NAME.equalsIgnoreCase(attribName))
                this.externalURI = attributes.getValue(i);
        }
    }

    public String getExternalURI()
    {
        return this.externalURI;
    }

    public void setExternalURI(String externalURI)
    {
        this.externalURI = externalURI;
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?