public class DataConfigurationFilter extends java.lang.Object implements java.io.FileFilter, FileStoreFilter
FileStoreFilter
which accepts XML configuration documents. Accepted document types are:
Constructor and Description |
---|
DataConfigurationFilter()
Creates a DataConfigurationFilter, but otherwise does nothing.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(org.w3c.dom.Document doc)
Returns true if the specified DOM Document should be accepted as a configuration document.
|
boolean |
accept(org.w3c.dom.Element domElement)
Returns true if the specified DOM
Element should be accepted as a configuration document. |
boolean |
accept(java.io.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,
java.lang.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(java.io.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(java.net.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(java.lang.String filePath) |
public DataConfigurationFilter()
public boolean accept(org.w3c.dom.Document doc)
doc
- the Document in question.java.lang.IllegalArgumentException
- if the document is null.public boolean accept(org.w3c.dom.Element domElement)
Element
should be accepted as a configuration document.domElement
- the Document in question.java.lang.IllegalArgumentException
- if the document is null.public boolean accept(java.io.File file)
accept(org.w3c.dom.Document)
returns true.accept
in interface java.io.FileFilter
file
- the file in question.java.lang.IllegalArgumentException
- if the file is null.public boolean accept(FileStore fileStore, java.lang.String fileName)
accept(org.w3c.dom.Document)
returns true.accept
in interface FileStoreFilter
fileStore
- the file store containing the named file path.fileName
- the named file path in question.java.lang.IllegalArgumentException
- if either the file store or the file name are null.public boolean accept(java.io.InputStream inputStream)
InputStream
can be opened as an XML document, and calling accept(org.w3c.dom.Document)
returns true.inputStream
- the input stream in question.java.lang.IllegalArgumentException
- if the input stream is null.public boolean accept(java.net.URL url)
URL
can be opened as an XML document, and calling accept(org.w3c.dom.Document)
returns true.url
- the URL in question.java.lang.IllegalArgumentException
- if the url is null.protected boolean acceptFilePath(java.lang.String filePath)