T - the entity typepublic class XmlIoEntityMap<T extends Entity> extends XmlIoSingleton<HashMap<Integer,T>>
Entity subclass as an XML section.handledTags| Constructor and Description |
|---|
XmlIoEntityMap(String tag,
Class<T> klass,
XmlIoEntity<T> entityIo) |
| Modifier and Type | Method and Description |
|---|---|
HashMap<Integer,T> |
fromXml(org.jdom2.Element elem)
Create an object from the given element.
|
org.jdom2.Element |
toXml(Collection<T> values)
Add the values to a new
XmlIoSingleton.getTag() element (in the iteration order of the collection). |
org.jdom2.Element |
toXml(Map<Integer,? extends T> map)
Sort the
values in the entity map by id and add them
to a new XmlIoSingleton.getTag() element. |
getTag, toXmlpublic XmlIoEntityMap(String tag, Class<T> klass, XmlIoEntity<T> entityIo)
public org.jdom2.Element toXml(Map<Integer,? extends T> map) throws SpimDataException
values in the entity map by id and add them
to a new XmlIoSingleton.getTag() element.map - maps id to entity.SpimDataExceptionpublic org.jdom2.Element toXml(Collection<T> values) throws SpimDataException
XmlIoSingleton.getTag() element (in the iteration order of the collection).SpimDataExceptionpublic HashMap<Integer,T> fromXml(org.jdom2.Element elem) throws SpimDataException
XmlIoSingletoncreated.
Calling this method clears all unhandled content from previous
invocations.fromXml in class XmlIoSingleton<HashMap<Integer,T extends Entity>>SpimDataExceptionCopyright © 2015–2021 Fiji. All rights reserved.