Package org.graphstream.util.cumulative.CumulativeSpells

Examples of org.graphstream.util.cumulative.CumulativeSpells.Spell


        CumulativeSpells spells = graphSpells.getNodeSpells(nodeId);

        if (!spells.isEternal()) {
          startElement(stream, "spells");
          for (int i = 0; i < spells.getSpellCount(); i++) {
            Spell s = spells.getSpell(i);

            startElement(stream, "spell");
            putSpellAttributes(s);
            endElement(stream, true);
          }
          endElement(stream, false);
        }

        if (attr.getAttributesCount() > 0) {
          startElement(stream, "attvalues");
          nodeAttributes.push(stream, nodeId, graphSpells);
          endElement(stream, false);
        }

        endElement(stream,
            spells.isEternal() && attr.getAttributesCount() == 0);
      }
      endElement(stream, false);

      startElement(stream, "edges");
      for (String edgeId : graphSpells.getEdges()) {
        startElement(stream, "edge");

        GraphSpells.EdgeData data = graphSpells.getEdgeData(edgeId);

        stream.writeAttribute("id", edgeId);
        stream.writeAttribute("source", data.getSource());
        stream.writeAttribute("target", data.getTarget());

        CumulativeAttributes attr = graphSpells
            .getEdgeAttributes(edgeId);

        CumulativeSpells spells = graphSpells.getEdgeSpells(edgeId);

        if (!spells.isEternal()) {
          startElement(stream, "spells");
          for (int i = 0; i < spells.getSpellCount(); i++) {
            Spell s = spells.getSpell(i);

            startElement(stream, "spell");
            putSpellAttributes(s);
            endElement(stream, true);
          }
View Full Code Here


  public Object get(String key) {
    CumulativeSpells o = data.get(key);

    if (o != null) {
      Spell s = o.getCurrentSpell();
      return s == null ? null : s.getAttachedData();
    }

    return null;
  }
View Full Code Here

  public Object getAny(String key) {
    CumulativeSpells o = data.get(key);

    if (o != null) {
      Spell s = o.getSpell(0);
      return s == null ? null : s.getAttachedData();
    }

    return null;
  }
View Full Code Here

    if (spells == null) {
      spells = new CumulativeSpells();
      data.put(key, spells);
    }

    Spell s = spells.closeSpell();

    if (s != null)
      s.setEndOpen(true);

    s = spells.startSpell(date);
    s.setAttachedData(value);
  }
View Full Code Here

TOP

Related Classes of org.graphstream.util.cumulative.CumulativeSpells.Spell

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.