Package name.moore.kevin.ze.XMLdata
Class shipyard
java.lang.Object
name.moore.kevin.ze.XMLdata.XMLbase
name.moore.kevin.ze.XMLdata.shipyard
Shipyards are in orbit around planets and build ships and hulls.
Processes the <shipyard>...</shipyard> XML element.
- 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.The reference will have its default distance of 1.getSpec()Derived classes override if they really do want to return a spec reference.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, missingXMLmessage
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
spec
@ZodiacEntityReference @XStreamConverter(AttributedValueReferenceConverter.class) private reference specRequired element in XML<spec>SY01</spec>.String reference to the read-only properties of this shipyard.
- See Also:
shipyardSpec
-
orbiting
@ZodiacEntityReference @XStreamConverter(AttributedValueReferenceConverter.class) private reference orbitingRequired element in XML<orbiting key="Sol"></orbiting>.This is a String reference to another entity to be in orbit around, invariably a planet. It will need to be resolved to a real entity via the procesorFactory
- See Also:
name.moore.kevin.ze.entity.entityFactory#makeEntity(name.moore.kevin.ze.XMLdata.XMLbase)
-
-
Constructor Details
-
shipyard
public shipyard()
-
-
Method Details
-
getSpec
Description copied from class:XMLbaseDerived classes override if they really do want to return a spec reference. -
getOrbiting
The reference will have its default distance 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:
-