MapGuide API Reference
 All Classes Functions Variables Enumerations Enumerator Friends
virtual void MgResourceService::RenameResourceData ( MgResourceIdentifier resource,
CREFSTRING  oldDataName,
CREFSTRING  newDataName,
bool  overwrite 
) [pure virtual]

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
Note:
In a feature source, this method does not rename anything in the connection properties, since MapGuide Open Source cannot tell if the connection properties should be changed. You may need to recreate the feature source or edit the XML for the feature source.
See also:
SetResourceData
EnumerateResourceData
GetResourceData
DeleteResourceData