Class FileHistoryXml
java.lang.Object
jmri.configurexml.AbstractXmlAdapter
jmri.jmrit.revhistory.configurexml.FileHistoryXml
- All Implemented Interfaces:
XmlAdapter
Load/Store FileHistory objects.
This interacts somewhat differently with the ConfigureXML system. FileHistory objects are _not_ registed with the manager, but rather handled explicitly by them. The "load()" method is therefore a null-op here.
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.configurexml.AbstractXmlAdapter
AbstractXmlAdapter.EnumIO<T extends Enum<T>>, AbstractXmlAdapter.EnumIoMapped<T extends Enum<T>>, AbstractXmlAdapter.EnumIoNames<T extends Enum<T>>, AbstractXmlAdapter.EnumIoNamesNumbers<T extends Enum<T>>, AbstractXmlAdapter.EnumIoOrdinals<T extends Enum<T>> -
Field Summary
FieldsFields inherited from class jmri.configurexml.AbstractXmlAdapter
STR_FALSE, STR_NO, STR_TRUE, STR_YES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static org.jdom2.ElementhistoryElement(FileHistory r, int depth) voidCreate a set of configured objects from their XML description, using an auxiliary object.booleanload(org.jdom2.Element shared, org.jdom2.Element perNode) Usual configurexml method, this one doesn't do anything because the content is explicitly loaded from the filebooleanloadDirectly(org.jdom2.Element e) Load RevHistory from an element.static FileHistoryloadFileHistory(org.jdom2.Element e) static voidloadOperation(FileHistory r, org.jdom2.Element e) (package private) static org.jdom2.ElementoperationElement(FileHistory.OperationMemo r, int depth) org.jdom2.ElementStore thestatic org.jdom2.ElementstoreDirectly(Object o, String fileName) Methods inherited from class jmri.configurexml.AbstractXmlAdapter
getAttributeBooleanValue, getAttributeDoubleValue, getAttributeFloatValue, getAttributeIntegerValue, getExceptionHandler, handleException, load, load, loadDeferred, loadOrder, setExceptionHandler, store
-
Field Details
-
defaultDepth
-
-
Constructor Details
-
FileHistoryXml
public FileHistoryXml()
-
-
Method Details
-
load
Usual configurexml method, this one doesn't do anything because the content is explicitly loaded from the file- Specified by:
loadin interfaceXmlAdapter- Overrides:
loadin classAbstractXmlAdapter- Parameters:
shared- Top-level XML element containing the common, multi-node elements of the descriptionperNode- Top-level XML element containing the private, single-node elements of the description- Returns:
- true if successful
-
loadDirectly
Load RevHistory from an element.If no RevHistory already present in InstanceManager, creates one and adds this.
Then adds, instead of replacing, the history information
- Parameters:
e- element to load.- Returns:
- true when complete, false if unexpected.
-
loadFileHistory
-
loadOperation
-
load
Create a set of configured objects from their XML description, using an auxiliary object.For example, the auxilary object o might be a manager or GUI of some type that needs to be informed as each object is created.
- Specified by:
loadin interfaceXmlAdapter- Overrides:
loadin classAbstractXmlAdapter- Parameters:
e- Top-level XML element containing the descriptiono- Implementation-specific Object needed for the conversion
-
store
Store the- Parameters:
o- The object to be recorded. Specific XmlAdapter implementations will require this to be of a specific type; that binding is done in ConfigXmlManager.- Returns:
- The XML representation Element
-
storeDirectly
-
historyElement
-
operationElement
-