serverparser.java

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

JAVA
64
字号
/*Copyright (C) 2001, 2008 United States Government as represented bythe Administrator of the National Aeronautics and Space Administration.All Rights Reserved.*/package gov.nasa.worldwind.applications.gio.gidb;import gov.nasa.worldwind.applications.gio.xml.ElementParser;/** * @author dcollins * @version $Id: ServerParser.java 5517 2008-07-15 23:36:34Z dcollins $ */public class ServerParser extends ElementParser implements Server{    private Text title;    private Text url;    public static final String ELEMENT_NAME = "server";    private static final String TITLE_ELEMENT_NAME = "title";    private static final String URL_ELEMENT_NAME = "url";    public ServerParser(String elementName, org.xml.sax.Attributes attributes)    {        super(elementName, attributes);    }    protected void doStartElement(String name, org.xml.sax.Attributes attributes) throws Exception    {        if (TITLE_ELEMENT_NAME.equalsIgnoreCase(name))        {            TextParser parser = new TextParser(name, attributes);            this.title = parser;            setCurrentElement(parser);        }        if (URL_ELEMENT_NAME.equalsIgnoreCase(name))        {            TextParser parser = new TextParser(name, attributes);            this.url = parser;            setCurrentElement(parser);        }    }    public Text getTitle()    {        return this.title;    }    public void setTitle(Text title)    {        this.title = title;    }    public Text getURL()    {        return this.url;    }    public void setURL(Text url)    {        this.url = url;    }}

⌨️ 快捷键说明

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