public class XMCDAv2 extends Object
| Constructor and Description |
|---|
XMCDAv2() |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,Integer> |
difference(Map<String,Integer> initialStatus,
Map<String,Integer> finalStatus)
Return a map of root XMCDA tags whose number of element in the initial and final status are different.
|
static Map<String,Integer> |
difference(Map<String,Integer> initialStatus,
Map<String,Integer> finalStatus,
boolean includeAll)
Compares two different status as returned by
rootElementsSize(XMCDA) and returns the difference of
elements declared in each tag between the two status. |
static void |
main(String[] args) |
static Map<String,Integer> |
rootElementsSize(XMCDA xmcdav2) |
public static Map<String,Integer> difference(Map<String,Integer> initialStatus, Map<String,Integer> finalStatus)
difference(initialStatus, finalStatus, false)initialStatus - finalStatus - difference(Map, Map, boolean)public static Map<String,Integer> difference(Map<String,Integer> initialStatus, Map<String,Integer> finalStatus, boolean includeAll)
rootElementsSize(XMCDA) and returns the difference of
elements declared in each tag between the two status. The difference is calculated on the basis of the content
of finalStatus. When both maps comes from rootElementsSize(XMCDA) they obviously have the same
size and the set of keys. If it not the case, it may happen that a tag/key in the finalStatus is not
present in initialStatus, it defaults to zero.
initialStatus - the initial statusfinalStatus - the final statusincludeAll - if False, every tag in final Status is returned with its difference, even when it
is zero. When true, only tags with a non-zero difference are included in the
returned map.public static void main(String[] args) throws IOException, JAXBException, SAXException
IOExceptionJAXBExceptionSAXExceptionCopyright © 2013–2021 Sébastien Bigaret, Patrick Meyer. All rights reserved.