/**
  * Return all edges owned by the specified diagram.
  *
  * @return all edges owned by the specified diagram.
  */
 public Collection<DEdge> getEdges() {
   final Collection<DEdge> result = new ArrayList<DEdge>();
   final Iterator<DDiagramElement> it = dDiagram.getOwnedDiagramElements().iterator();
   while (it.hasNext()) {
     final DDiagramElement elem = it.next();
     if (elem instanceof DEdge) {
       result.add((DEdge) elem);
     }
   }
   return result;
 }
 /**
  * Return all node list elements owned by the specified diagram.
  *
  * @return Return all node list elements owned by the specified diagram.
  */
 public Collection<DNodeListElement> getNodeListElements() {
   final Collection<DNodeListElement> result = new ArrayList<DNodeListElement>();
   final Iterator<DDiagramElement> it = dDiagram.getOwnedDiagramElements().iterator();
   while (it.hasNext()) {
     final DDiagramElement elem = it.next();
     if (elem instanceof DNodeListElement) {
       final DNodeListElement nodeListElement = (DNodeListElement) elem;
       result.add(nodeListElement);
     }
     if (elem instanceof DDiagramElementContainer) {
       addDNodeListElements((DDiagramElementContainer) elem, result);
     }
   }
   return result;
 }
 /**
  * Implementation of {@link DDiagram#getContainers()}.
  *
  * @return all containers of the diagram.
  */
 public Collection<DDiagramElementContainer> getContainers() {
   final Collection<DDiagramElementContainer> result = new ArrayList<DDiagramElementContainer>();
   final Iterator<DDiagramElement> it = dDiagram.getOwnedDiagramElements().iterator();
   while (it.hasNext()) {
     final DDiagramElement elem = it.next();
     if (elem instanceof DDiagramElementContainer) {
       result.add((DDiagramElementContainer) elem);
     }
     if (elem instanceof DNodeContainer) {
       addDiagramElementContainers(dDiagram, (DNodeContainer) elem, result);
     }
   }
   return result;
   // return new EcoreEList.UnmodifiableEList(eInternalContainer(),
   // ViewpointPackage.eINSTANCE.getSirius_Containers(), result.size(),
   // result.toArray());
 }