NASA World Wind

gov.nasa.worldwind.util
Class DataConfigurationFilter

java.lang.Object
  extended by gov.nasa.worldwind.util.DataConfigurationFilter
All Implemented Interfaces:
FileStoreFilter, FileFilter

public class DataConfigurationFilter
extends Object
implements FileFilter, FileStoreFilter

An implementation of FileStoreFilter which accepts XML configuration documents. Accepted document types are:

  • Layer configuration documents
  • ElevationModel configuration documents
  • Installed data configuration documents
  • World Wind .NET LevelSet documents


Constructor Summary
DataConfigurationFilter()
          Creates a DataConfigurationFilter, but otherwise does nothing.
 
Method Summary
 boolean accept(Document doc)
          Returns true if the specified DOM Document should be accepted as a configuration document.
 boolean accept(Element domElement)
          Returns true if the specified DOM Element should be accepted as a configuration document.
 boolean accept(File file)
          Returns true if the specified file can be opened as an XML document, and calling accept(org.w3c.dom.Document) returns true.
 boolean accept(FileStore fileStore, String fileName)
          Returns true if the specified file store path can be opened as an XML document, and calling accept(org.w3c.dom.Document) returns true.
 boolean accept(InputStream inputStream)
          Returns true if the specified InputStream can be opened as an XML document, and calling accept(org.w3c.dom.Document) returns true.
 boolean accept(URL url)
          Returns true if the specified URL can be opened as an XML document, and calling accept(org.w3c.dom.Document) returns true.
protected  boolean acceptFilePath(String filePath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataConfigurationFilter

public DataConfigurationFilter()
Creates a DataConfigurationFilter, but otherwise does nothing.

Method Detail

accept

public boolean accept(Document doc)
Returns true if the specified DOM Document should be accepted as a configuration document.

Parameters:
doc - the Document in question.
Returns:
true if the Document should be accepted; false otherwise.
Throws:
IllegalArgumentException - if the document is null.

accept

public boolean accept(Element domElement)
Returns true if the specified DOM Element should be accepted as a configuration document.

Parameters:
domElement - the Document in question.
Returns:
true if the Document should be accepted; false otherwise.
Throws:
IllegalArgumentException - if the document is null.

accept

public boolean accept(File file)
Returns true if the specified file can be opened as an XML document, and calling accept(org.w3c.dom.Document) returns true.

Specified by:
accept in interface FileFilter
Parameters:
file - the file in question.
Returns:
true if the file should be accepted; false otherwise.
Throws:
IllegalArgumentException - if the file is null.

accept

public boolean accept(FileStore fileStore,
                      String fileName)
Returns true if the specified file store path can be opened as an XML document, and calling accept(org.w3c.dom.Document) returns true.

Specified by:
accept in interface FileStoreFilter
Parameters:
fileStore - the file store containing the named file path.
fileName - the named file path in question.
Returns:
true if the file name should be accepted; false otherwise.
Throws:
IllegalArgumentException - if either the file store or the file name are null.

accept

public boolean accept(InputStream inputStream)
Returns true if the specified InputStream can be opened as an XML document, and calling accept(org.w3c.dom.Document) returns true.

Parameters:
inputStream - the input stream in question.
Returns:
true if the input stream should be accepted; false otherwise.
Throws:
IllegalArgumentException - if the input stream is null.

accept

public boolean accept(URL url)
Returns true if the specified URL can be opened as an XML document, and calling accept(org.w3c.dom.Document) returns true.

Parameters:
url - the URL in question.
Returns:
true if the URL should be accepted; false otherwise.
Throws:
IllegalArgumentException - if the url is null.

acceptFilePath

protected boolean acceptFilePath(String filePath)

NASA World Wind

Hosted by docs.bugaco.com