Bonjour a tous,
S'il vous plait soit le fichier XML suivant(xml version envoyé ci-joint)
et j'ai le bout de code suivant
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| for (Element lifeline:lifelineElements) {
for (Element message:messagesElements) {
for (Element boundary:boundaryChildren) {
for (Element control:controlChildren) {
Boolean boundaryLifeline = lifeline.getAttributeValue("id", namespaces.get("xmi")).equals(boundary.getAttributeValue("base_Lifeline"));
Boolean messageEmi = lifeline.getAttributeValue("coveredBy").contains(message.getAttributeValue("sendEvent"));
Boolean messageRecu = lifeline.getAttributeValue("coveredBy").contains(message.getAttributeValue("receiveEvent"));
Boolean controleLifeline = lifeline.getAttributeValue("id", namespaces.get("xmi")).equals(control.getAttributeValue("base_Lifeline"));
if (messageEmi && boundaryLifeline && messageRecu && controleLifeline)
{
System.out.println(message.getAttributeValue("name") + "est de type entry");
}
}
}
}
} |
mais il ne m'affiche rien or c'est pas vrai ..je ne sais pas où est l'erreur sachant que si je me limite que la condition
if (messageEmi && boundaryLifeline
ca me donne quelque chose partiellement juste .s'il vous plait de l'aide et merci
Partager