MapGuide API Reference
 All Classes Functions Variables Enumerations Enumerator Friends
virtual void MgResourceIdentifier::SetRepositoryName ( CREFSTRING  name) [virtual]

Sets the repository name.

Remarks:
This method is designed to be used to construct identifiers for new resources. Do not use this to try to rename an existing resource. Use MoveResource instead.
After you have finished calling SetName, SetPath, SetRepositoryName, and SetRepositoryType, call Validate to make sure the identifier is syntactically correct.
.NET Syntax
virtual void SetRepositoryName(string name);
Java Syntax
virtual void SetRepositoryName(String name);
PHP Syntax
virtual void SetRepositoryName(string name);
Parameters:
name(String/string) Repository name.
  • If the repository is the library, the name must be an empty string.
  • If the repository is a session repository, the name cannot be empty.
Returns:
Returns nothing.
Examples (PHP)
 // Assuming $newResourceID has already been created
 $newResourceID->SetRepositoryName("");
 $newResourceID->SetRepositoryType("Library");
 $newResourceID->Validate();

or

 $newResourceID->SetRepositoryName($sessionID);
 $newResourceID->SetRepositoryType("Session");
 $newResourceID->Validate();