Example usage for org.jdom2 Element getValue

List of usage examples for org.jdom2 Element getValue

Introduction

In this page you can find the example usage for org.jdom2 Element getValue.

Prototype

@Override
public String getValue() 

Source Link

Document

Returns the XPath 1.0 string value of this element, which is the complete, ordered content of all text node descendants of this element (i.e. the text that's left after all references are resolved and all other markup is stripped out.)

Usage

From source file:model.data.contrat.Contrat.java

License:Open Source License

private void loadClauses(Element e) {
    Element root = StringToElement.getElementFromString(e.getValue(), e.getName());
    for (Element i : root.getChildren()) {
        addClaus(new Clause(i));
    }//from   ww  w.ja  v a 2  s  .  c  o m
}

From source file:model.data.favorites.Favorites.java

License:Open Source License

private void loadItemsKey(Element e) {
    Element root = StringToElement.getElementFromString(e.getValue(), e.getName());
    if (itemsKey == null)
        itemsKey = new ArrayList<String>();
    for (Element i : root.getChildren()) {
        String itemKey = new String(i.getValue());
        itemsKey.add(itemKey);//  w w w. j  av a 2  s  .  co  m
    }
}

From source file:model.data.manager.ContratManager.java

License:Open Source License

/**
 * Load all the deals in this element//from w w w. j  a v  a 2 s.  c  om
 * @param e an element that contains messages in XML format.
 */
protected void loadDeals(Element e) {
    Element root = StringToElement.getElementFromString(e.getValue(), e.getName());
    for (Element d : root.getChildren()) {
        String owner = d.getChildText("owner");
        Element deal = d.getChild("Deal");
        addDeal(owner, new Contrat(deal));
    }
}

From source file:model.data.manager.FavoriteManager.java

License:Open Source License

/**
 * Load all the favorites in this element
 * @param e an element that contains messages in XML format.
 *///from  w w  w  . j  a  v a  2s.c o m
protected void loadFavorites(Element e) {
    Element root = StringToElement.getElementFromString(e.getValue(), e.getName());
    for (Element f : root.getChildren()) {
        addFavorites(new Favorites(f));
    }
}

From source file:model.data.manager.ItemManager.java

License:Open Source License

/**
 * Load all the items in this element//  w  ww.j a v a 2  s  . c om
 * @param e an element that contains items in XML format.
 * TODO a voir
 */
protected void loadItems(Element e) {
    Element root = StringToElement.getElementFromString(e.getValue(), e.getName());
    for (Element i : root.getChildren()) {
        addItem(new Item(i));
    }
}

From source file:model.data.manager.MessageManager.java

License:Open Source License

/**
 * Load all the messages in this element
 * @param e an element that contains messages in XML format.
 *//*from ww w . j a va  2  s .  co  m*/
protected void loadReceivedMessages(Element e) {
    Element root = StringToElement.getElementFromString(e.getValue(), e.getName());
    for (Element m : root.getChildren()) {
        addConversations(new Conversations(m));
    }
}

From source file:model.data.manager.UserManager.java

License:Open Source License

/**
 * Load all the users in this element//from  w  w  w. j ava 2 s  .c  om
 * @param e an element that contains users in XML format.
 * TODO a voir
 */
protected void loadUsers(Element e) {
    Element root = StringToElement.getElementFromString(e.getValue(), e.getName());
    for (Element u : root.getChildren()) {
        addUser(new User(u));
    }
}

From source file:model.data.RendezVousIp.java

License:Open Source License

public ArrayList<String> getIps() {
    ArrayList<String> iparray = new ArrayList<String>();
    for (Element e : ips.getChildren()) {
        iparray.add(e.getValue());
    }//from  w w w  . ja va  2 s  .c  o m
    return iparray;
}

From source file:model.data.RendezVousIp.java

License:Open Source License

public void removeIp(String ip) {
    for (Element e : ips.getChildren()) {
        if (e.getValue().equals(ip)) {
            e.detach();//  w ww.j a v a2 s.  c  o m
        }
    }
}

From source file:model.data.RendezVousIp.java

License:Open Source License

@Override
protected boolean handleElement(Element e) {
    switch (e.getName()) {
    case "ips":
        ips = StringToElement.getElementFromString(e.getValue());
        return true;
    }/*  w  w  w  .ja v a  2  s  . c om*/
    return false;
}