Web API Reference | MapGuide Open Source

- Overview
- Modules
- Classes

# MgResourceIdentifier Class Reference
[Resource Service Classes]

Creates and manipulates resource identifiers. More...

Inherits MgSerializable.

List of all members.

## Public Member Functions
virtual STRING | GetName ()
| Extracts the resource's name from the resource identifier.
virtual STRING | GetPath ()
| Extracts the resource's path from the resource identifier.
virtual STRING | GetRepositoryName ()
| Extracts the repository name from a resource's identifier.
virtual STRING | GetRepositoryType ()
| Extracts the repository type from a resource's identifier.
virtual STRING | GetResourceType ()
| Extracts the resource's type from the resource identifier.
| MgResourceIdentifier (CREFSTRING resource)
| Initialize and validate a resource identifier from a string.
virtual void | SetName (CREFSTRING name)
virtual void | SetPath (CREFSTRING path)
virtual void | SetRepositoryName (CREFSTRING name)
virtual void | SetRepositoryType (CREFSTRING type)
virtual void | SetResourceType (CREFSTRING type)
virtual STRING | ToString ()
| Converts the resource identifier into a string.
virtual void | Validate ()
| Validates the resource identifier. This method should be called after the identifier has been fully specified by constructor and/or Set methods.

## Detailed Description

Creates and manipulates resource identifiers.

Remarks:
  A resource identifier fully defines the location of a resource or folder.
  The first part of the identifier specifies which repository the resource is located in (for example, `Library://`, or `Session:a421c694-ffff-ffff-8000-005056c00008_eng//`). The path, name and type (for example, `Maps/North America/World.MapDefinition`) define the resource within the repository.
  If the resource is a folder (for example, `Library://Maps/North America/`), you must include the trailing slash.

Comments or suggestions? Send us feedback.