MapGuide API Reference
|
virtual void MgResourceService::UpdateRepository | ( | MgResourceIdentifier * | resource, |
MgByteReader * | content, | ||
MgByteReader * | header | ||
) | [pure virtual] |
Updates the header and content of the specified repository.
virtual void UpdateRepository(MgResourceIdentifier resource, MgByteReader content, MgByteReader header); |
virtual void UpdateRepository(MgResourceIdentifier resource, MgByteReader content, MgByteReader header); |
virtual void UpdateRepository(MgResourceIdentifier resource, MgByteReader content, MgByteReader header); |
resource | (MgResourceIdentifier) Repository to update. |
content | (MgByteReader) Repository content in XML format using the RepositoryContent schema. Or, if the repository is the library, this can be set to null in which case the content is not changed. |
header | (MgByteReader)
|
// Assuming $resourceService has already been initialized // Get a resource identifier for the library $resourceID = new MgResourceIdentifier('Library://'); // Read the new content from a file $byteSource = new MgByteSource('C:\Data\Repository\Content.xml'); // Put that MgByteSource into an MgByteReader $byteReader = $byteSource->GetReader(); // Update the repository content $resourceService->UpdateRepository($resourceID, $byteReader, null);
MgOutOfMemoryException | |
MgRepositoryNotFoundException | if repository does not exist |
MgInvalidRepositoryTypeException |
If you are updating | Content | Header |
---|---|---|
the library | Can be null as long as the header is not null. | Can be null as long as the content is not null. |
a session repository | Must not be null. | Must be null. |