out.println("  public "+context+" get"+context+"("+timeVar+")"); out.println("  {");
println(out,"  public "+context+" get"+context+"("+timeVar+")"); println(out,"  {");
    public void writeAsset () throws IOException {      String outname = "AssetSkeleton.java";      if (cleanp) {        (new File(outname)).delete();        return ;      }      debug("Writing AssetSkeleton to \""+outname+"\"");      noteFile(outname);      FileOutputStream fos = new FileOutputStream(new File(getTargetDir(),outname));      OutputStreamWriter osw = new OutputStreamWriter(fos);      PrintWriter out = new PrintWriter(osw);      writeCR(out);            out.println("/** Abstract Asset Skeleton implementation");      out.println(" * Implements default property getters, and additional property");      out.println(" * lists.");      out.println(" * Intended to be extended by org.cougaar.domain.planning.ldm.asset.Asset");      out.println(" **/");      out.println();      doPackaging(out,"global");      out.println("import java.io.Serializable;");      out.println("import java.beans.PropertyDescriptor;" );      out.println("import java.beans.IndexedPropertyDescriptor;" );      out.println();      String baseclass = p.get("global","skeletonBase");      if (baseclass == null) baseclass = "org.cougaar.domain.planning.ldm.asset.Asset";      out.println("public abstract class AssetSkeleton extends "+baseclass+" {");      out.println();      // default constructor      out.println("  protected AssetSkeleton() {}");      out.println();      // copy constructor      out.println("  protected AssetSkeleton(AssetSkeleton prototype) {\n"+                  "    super(prototype);\n"+                  "  }");      out.println();      out.println("  /**                 Default PG accessors               **/");      out.println();      Enumeration contexts = p.getContexts();      while ( contexts.hasMoreElements()) {        String context = (String) contexts.nextElement();        if (! context.equals("global") &&             (p.get(context, "abstract") == null)) {          out.println("  /** Search additional properties for a "+                      context+                      " instance.");          out.println("   * @return instance of "+context+" or null.");          out.println("   **/");                    boolean timephased = (p.get(context, PGParser.TIMEPHASED) != null);          String timeVar = "";          if (timephased) {            timeVar = "long time";          }          out.println("  public "+context+" get"+context+"("+timeVar+")");          out.println("  {");          if (timephased) {            timeVar = ", time";          }          out.println("    "+context+" _tmp = ("+context+") resolvePG("+                      context+".class"+timeVar+");");          out.println("    return (_tmp=="+context+".nullPG)?null:_tmp;");          out.println("  }");          out.println();          out.println("  /** Test for existence of a "+context+"\n"+                      "   **/");          if (timephased) {            timeVar = "long time";          }          out.println("  public boolean has"+context+"("+timeVar+") {\n");          if (timephased) {            timeVar = "time";          }          out.println("    return (get"+context+"("+timeVar+") != null);\n"+                      "  }");          out.println();          String vr = "a"+context;          out.println("  /** Set the "+context+" property.\n"+                      "   * The default implementation will create a new "+context+"\n"+                      "   * property and add it to the otherPropertyGroup list.\n"+                      "   * Many subclasses override with local slots.\n"+                      "   **/\n"+                      "  public void set"+context+"(PropertyGroup "+vr+") {\n"+                      "    if ("+vr+" == null) {\n"+                      "      removeOtherPropertyGroup("+context+".class);\n"+                      "    } else {\n"+                      "      addOtherPropertyGroup(a"+context+");\n"+                      "    }\n"+                      "  }");          out.println();          if (timephased) {            out.println("  public PropertyGroupSchedule get"+context+"Schedule()");            out.println("  {");            out.println("    return searchForPropertyGroupSchedule("+context+                      ".class);");            out.println("  }");            out.println();            out.println("  public void set"+context+"Schedule(PropertyGroupSchedule schedule) {\n"+                      "    removeOtherPropertyGroup("+context+".class);\n"+                      "    if (schedule != null) {\n"+                      "      addOtherPropertyGroupSchedule(schedule);\n"+                      "    }\n"+                      "  }");            out.println();          }        }      }      out.println("}");      out.close();    }