Web API Reference MapGuide Open Source

virtual void MgResourceService::RenameResourceData MgResourceIdentifier resource,
CREFSTRING  oldDataName,
CREFSTRING  newDataName,
bool  overwrite
[pure virtual, inherited]
 

Renames resource data for the specified resource.

.Net Syntax
virtual void RenameResourceData(MgResourceIdentifier resource, string oldDataName, string newDataName, bool overwrite);
Java Syntax
virtual void RenameResourceData(MgResourceIdentifier resource, String oldDataName, String newDataName, boolean overwrite);
PHP Syntax
virtual void RenameResourceData(MgResourceIdentifier resource, string oldDataName, string newDataName, bool overwrite);

Parameters:
resource (MgResourceIdentifier) The resource for which the resource data will be renamed.
oldDataName (String/string) Old data name.
newDataName (String/string) New data name.
overwrite (boolean/bool) Flag to determine whether or not the destination resource data should be overwritten if it exists.
Returns:
Returns nothing.
Example (PHP)
    /// // Assuming that $resourceService has already been initialized
    /// $resourceID = new MgResourceIdentifier("Library://Geography/Calgary points of interest.FeatureSource");
    /// $resourceService->RenameResourceData($resourceID, "locations of points of interest", "locations of historical sites", true);
    /// 

Exceptions:
MgInvalidRepositoryTypeException 
MgInvalidResourceTypeException 
MgInvalidResourceDataTypeException 
MgResourceDataNotFoundException 
MgDuplicateResourceDataException 
See also:
SetResourceData

EnumerateResourceData

GetResourceData

DeleteResourceData