Example #1
0
  /**
   * Return the container entity for the specified ASTPtRootNode.
   *
   * @param node The specified ASTPtRootNode.
   * @return The container entity for the specified ASTPtRootNode.
   */
  public Entity getContainerEntity(ASTPtRootNode node) {
    Attribute attribute = _solver.getAttribute(node);
    NamedObj container = attribute.getContainer();

    while (!(container instanceof Entity)) {
      container = container.getContainer();
    }
    return (Entity) container;
  }
Example #2
0
 /**
  * Request a MoMLChangeRequest to delete this attribute from its container.
  *
  * @param attribute The attribute to be deleted.
  */
 private static void _delete(Attribute attribute) {
   String moml = "<deleteProperty name=\"" + attribute.getName() + "\"/>";
   attribute.requestChange(new MoMLChangeRequest(attribute, attribute.getContainer(), moml));
 }