HEC-DSS version 7 provides is alias pathnames. A DSS alias is a pathname that points to a record with a different pathname. The pathname for that record is called the primary pathname. Any operation using an alias pathname is the same as doing the operation on the record with the primary pathname. If you read or write using an alias, you are reading or writing the primary record.


You can have as many aliases for a record as desired. Alias pathnames are not "deleted", but "removed", as a delete would delete the primary record and all aliases, whereas a remove just removes the alias pathname. You cannot rename an alias, but you can remove it and then add another alias with the new name.


Aliases operate on the record level. If you wanted an alias for a dataset with more than one record, such as a year of hourly flows, you can use the condensed reference class to obtain all the pathnames in a dataset, then create aliases for each of those pathnames. For example, the following snippet shows adding alias pathnames with a new F part for a time series dataset.


CondensedReference cr = new CondensedReference(TimeSeriesContainer or Pathname);
DSSPathname aliasPart = new DSSPathname();
aliasPart.setFPart("Run 5");
status = hecDataManager.addAlias(cr, aliasPart);

JAVA


Alias functions in HecDataManager

public int addAlias(String primaryPathname, String aliasPathname)


public int addAliasList(String primaryPathnameList\[\], String aliasPathnameList\[\])


public int addAlias(CondensedReference primary, DSSPathname aliasPart)
public String aliasGetPrimary(String aliasPathname)


public String\[\] aliasList(String primaryPathname) //  (or aliasPathname)


public int aliasRemove(String aliasPathname, boolean removeAll)


public int aliasRemoveList(String aliasPathnameList\[\])



JAVA


Note:

// Will delete data and all aliases
public int delete(String pathname) 
JAVA