Package jmri.jmrit
Class XmlFileValidateAction
java.lang.Object
javax.swing.AbstractAction
jmri.util.swing.JmriAbstractAction
jmri.jmrit.XmlFileValidateAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action
- Direct Known Subclasses:
XmlFileValidateRunner
Make sure an XML file is readable, and validates OK against its schema and DTD.
Can also be run from the command line as apps.jmrit.XmlFileValidationAction (e.g. ./runtest.csh apps/jmrit/XmlFileValidateAction foo.xml) in which case if there's a filename argument, it checks that directly, otherwise it pops a file selection dialog. (The dialog form has to be manually canceled when done)
- See Also:
-
Field Summary
Fields inherited from class jmri.util.swing.JmriAbstractAction
context, hint, wiFields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidprocessFile(File file) (package private) voidRead and verify a file is schema valid XML.protected voidshowFailResults(Component who, String fileName, String text) protected voidshowOkResults(Component who, String text) Methods inherited from class jmri.util.swing.JmriAbstractAction
dispose, setContext, setHint, setName, setParameter, setParameter, setWindowInterface, toStringMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Constructor Details
-
XmlFileValidateAction
-
XmlFileValidateAction
-
XmlFileValidateAction
public XmlFileValidateAction()
-
-
Method Details
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classJmriAbstractAction
-
processFile
-
showOkResults
-
showFailResults
-
readFile
Read and verify a file is schema valid XML.- Parameters:
file- the file to read- Throws:
org.jdom2.JDOMException- if file is not schema valid XMLIOException- if unable to read file
-
makePanel
- Specified by:
makePanelin classJmriAbstractAction
-