Package name.moore.kevin.ze.XMLdata
Class reference
java.lang.Object
name.moore.kevin.ze.XMLdata.XMLbase
name.moore.kevin.ze.XMLdata.reference
Process the XML of form <reference key="Sol">3</reference> into an object.
A reference is a String 'pointer' to the Name component of another entity. So the example points to an entity with Name = "Sol". The @XStreamAlias used will decide the XML element name (ie the 'orbiting' bit) The XML value is optional defaults to 1.
Extending XMLbase provides the String attribute key, an unused description field and the ...XMLmessage() methods.
- Author:
- Kevin Moore
<dev@kevin.moore.name>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDerived classes have to override this and say what class eg engine.class they are.If this wasn't provided in XML, then it will return the default of 1.protected ObjectCalled automatically when loading from XML as part of JDK serialisation.Methods inherited from class name.moore.kevin.ze.XMLdata.XMLbase
defaultXMLmessage, duplicatedXMLmessage, getDescription, getKey, getSpec, missingXMLmessage
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
value
-
-
Constructor Details
-
reference
- Parameters:
key-
-
-
Method Details
-
getIntegerValue
If this wasn't provided in XML, then it will return the default of 1.- Returns:
-
readResolve
Description copied from class:XMLbaseCalled automatically when loading from XML as part of JDK serialisation.Used to do some validation of that incoming XML by asserting that properties are set and have defaults as required. Output warning messages if a default is applied. Output error messages if a required XML element is missing and return null to indicate an invalid object.
- Overrides:
readResolvein classXMLbase- Returns:
- null if we can't create a valid object
-
getEntityClass
Description copied from class:XMLbaseDerived classes have to override this and say what class eg engine.class they are. This allows us to use this base class but discover the derived class.- Specified by:
getEntityClassin classXMLbase- Returns:
-