/*
 * This file is released under terms of BSD license
 * See LICENSE file for more information
 */

package cx2x.xcodeml.xnode;

import org.w3c.dom.Document;

/**
 * The Xmod represents the module information produced by the Fortran front-end
 * of OMNI Compiler.
 *
 * @author clementval
 */
public class Xmod extends XcodeML {

  // Xmod inner elements
  private final String _path;
  private final String _name;

  private XsymbolTable _identifiers = null;

  /**
   * Constructs a basic Xmod object representing the XcodeML module file given
   * in input.
   * @param baseElement XcodeML document.
   * @param name        Name of the module.
   * @param path        Path of the XcodeML module file without the filename.
   */
  public Xmod(Document baseElement, String name, String path){
    super(baseElement);
    _name = name;
    _path = path.endsWith("/") ? path : path + "/";
    _identifiers = new XsymbolTable(find(Xcode.IDENTIFIERS).getElement());
  }

  /**
   * Get the path associated with this XcodeML module.
   * @return Path of the module file.
   */
  public String getPath(){
    return _path;
  }

  /**
   * Get the name of the module.
   * @return Name of the module.
   */
  public String getName() {
    return _name;
  }

  /**
   * Get the identifiers table.
   * @return Identifiers as a symbol table.
   */
  public XsymbolTable getIdentifiers(){
    return _identifiers;
  }
}

@@ -123,16 +123,98 @@
 xnode;%0A%0A
+import cx2x.translator.common.ClawConstant;%0Aimport cx2x.xcodeml.helper.XnodeUtil;%0A
 import o
@@ -1324,24 +1324,248 @@
 _name;%0A  %7D%0A%0A
+  /**%0A   * Get the full path of the module file.%0A   * @return Module file full path.%0A   */%0A  public String getFullPath()%7B%0A    return _path + _name + ClawConstant.CLAW_MOD_SUFFIX%0A        + XnodeUtil.XMOD_FILE_EXTENSION;%0A  %7D%0A%0A
   /**%0A   * G

Add getFullPath()