Next: Parameters
Up: Catalog Commands
Previous: Catalog Commands
  Contents
public java.net.URI registerFile(java.net.URI file,
java.net.URI logicalName)
Register a file in the Replica Catalog that is already stored on a
Storage Element. It takes two arguments: source file and logical
name. The source file needs to be a qualified storage file name URI,
following the rule srm://storage.element.host/path/file.name The
logical name is optional, it may declare a logical identifier that can
be used later to look up any instance of the file. The method returns
the GUID, the Grid Unique IDentifier of the file. The detailed
semantics are:
- If the source file is not registered yet:
- no logical name is given: a new GUID is generated, the file is registered and the GUID is returned to the caller.
- a logical name is given: a new GUID will be allocated and returned, and the logical name will also be registered and can be used to retrieve the file later.
- If the file is already registered:
- no logical name is given: the already existing GUID is returned.
- a logical name is given that does not exist yet: it is added as an alias in the Replica Catalog so that the file can be looked up later using that name as well.
- a logical name is given which already exists: it is checked whether the logical name really corresponds to the file. If not, an exception is thrown, otherwise the existing GUID is returned.
This method does not include any data movement (i.e. the storage file is not copied) and assumes that the storage file is already located at a known Storage Element.
Next: Parameters
Up: Catalog Commands
Previous: Catalog Commands
  Contents
2005-02-04