Class Container
The Container class encapsulates a document container and its related indices and statistics.
Inheritance
Implements
Inherited Members
Namespace: Figaro
Assembly: Figaro.dll
Syntax
public sealed class Container : IDisposable
Remarks
Container exposes methods for managing (putting and deleting) XmlDocument objects, managing indices, and retrieving container statistics.
If the Container has never before been opened, use CreateContainer(String) to instantiate a Container object. If the container already exists, use OpenContainer(String) instead. Containers are always opened until the last referencing handle is destroyed.
You can delete containers using RemoveContainer(String) and rename containers using RenameContainer(String, String).
The class is implemented using a handle-body idiom. When a handle is copied both handles maintain a reference to the same body.
Constructors
View SourceContainer(Container)
Initializes a new instance of the Container class.
Declaration
public Container(Container container)
Parameters
Type | Name | Description |
---|---|---|
Container | container | The container to copy. |
Remarks
When a handle is copied, both handles maintain a reference to the same body.
Properties
View SourceCompressionEnabled
Gets a value indicating whether the container was configured to use compression.
Declaration
public bool CompressionEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ContainerState
Gets the state of the container.
Declaration
public ContainerState ContainerState { get; }
Property Value
Type | Description |
---|---|
ContainerState |
ContainerType
Gets the container's storage type.
Declaration
public XmlContainerType ContainerType { get; }
Property Value
Type | Description |
---|---|
XmlContainerType | The container's storage type. |
See Also
View SourceIndexNodes
Gets a value indicating whether the container is configured to create node indices.
Declaration
public bool IndexNodes { get; }
Property Value
Type | Description |
---|---|
System.Boolean | The boolean operator used to determine if the Container is configured to create node indices. |
Name
Gets the container name.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String | The container name. |
PageSize
Gets the page size for the container.
Declaration
public int PageSize { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The page size for the container. |
Settings
Gets the flags used to open the Container.
Declaration
public ContainerConfig Settings { get; }
Property Value
Type | Description |
---|---|
ContainerConfig | The ContainerConfig used to open the container. |
See Also
View SourceTransactional
Gets a value indicating whether or not the object is configured for transactions.
Declaration
public bool Transactional { get; }
Property Value
Type | Description |
---|---|
System.Boolean | Returns |
Methods
View SourceAddAlias(String)
Adds a new alias to the list maintained by the XmlManager
Declaration
public bool AddAlias(string alias)
Parameters
Type | Name | Description |
---|---|---|
System.String | alias | The new alias to be added. |
Returns
Type | Description |
---|---|
System.Boolean | Returns |
Remarks
The new alias can then be used as a parameter to the collection()
function in an XQuery expression.
AddDefaultIndex(XmlTransaction, String, UpdateContext)
Add a default index to the container.
Declaration
public void AddDefaultIndex(XmlTransaction transaction, string index, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | The XmlTransaction to operate under. |
System.String | index | A comma-separated list of strings that represent the indexing strategy. |
UpdateContext | context | The UpdateContext to use for the index operation. |
Remarks
This method is for convenience -- see AddDefaultIndex(String) for more information.
See Also
View SourceAddDefaultIndex(String, UpdateContext)
Add a default index to the container.
Declaration
public void AddDefaultIndex(string index, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
System.String | index | A comma-separated list of strings that represent the indexing strategy. |
UpdateContext | context | The UpdateContext to use for the index operation. |
Remarks
This method is for convenience -- see AddDefaultIndex(String) for more information.
See Also
View SourceAddIndex(XmlTransaction, String, String, IndexingStrategy, UpdateContext)
Adds an index of the specified type for the named document node.
Declaration
public void AddIndex(XmlTransaction transaction, string nodeNamespace, string nodeName, IndexingStrategy indexingStrategy, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | The XmlTransaction to operate under. |
System.String | nodeNamespace | The namespace of the node to be indexed. The default is selected by passing an empty string. |
System.String | nodeName | Name of the node. |
IndexingStrategy | indexingStrategy | The indexing strategy. |
UpdateContext | context | The update context to use for index insertion. |
See Also
View SourceAddIndex(XmlTransaction, String, String, String, UpdateContext)
Adds an index of the specified type for the named document node.
Declaration
public void AddIndex(XmlTransaction transaction, string nodeNamespace, string nodeName, string index, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | The XmlTransaction to operate under. |
System.String | nodeNamespace | The namespace of the node to be indexed. The default is selected by passing an empty string. |
System.String | nodeName | Name of the node. |
System.String | index | A comma-separated list of strings representing the indexing strategy. See Using Indices for more details. |
UpdateContext | context | The update context to use for index insertion. |
AddIndex(String, String, IndexingStrategy, UpdateContext)
Adds an index of the specified type for the named document node.
Declaration
public void AddIndex(string nodeNamespace, string nodeName, IndexingStrategy indexStrategy, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
System.String | nodeNamespace | The namespace of the node to be indexed. The default is selected by passing an empty string. |
System.String | nodeName | The name of the attribute or node to be indexed. |
IndexingStrategy | indexStrategy | An IndexingStrategy object used for streamlining the index creation process. See Using Indices for more details. |
UpdateContext | context | The update context to use for index insertion. |
See Also
View SourceAddIndex(String, String, String, UpdateContext)
Adds an index of the specified type for the named document node.
Declaration
public void AddIndex(string nodeNamespace, string nodeName, string index, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
System.String | nodeNamespace | The namespace of the node to be indexed. The default is selected by passing an empty string. |
System.String | nodeName | The name of the attribute or node to be indexed. |
System.String | index | A comma-separated list of strings representing the indexing strategy. See Using Indices for more details. |
UpdateContext | context | The update context to use for index insertion. |
Close()
Closes the container.
Declaration
[Obsolete]
public void Close()
Remarks
This method is obsolete and will be removed in the next version of Figaro.
See Also
View SourceDeleteDefaultIndex(XmlTransaction, String, UpdateContext)
Deletes the default index for the container.
Declaration
public void DeleteDefaultIndex(XmlTransaction transaction, string index, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | The XmlTransaction to operate under. |
System.String | index | A comma-separated list of strings that represent the indexing strategy. |
UpdateContext | context | The UpdateContext to use for this operation. |
Remarks
This method is for convenience - see DeleteDefaultIndex(String) for more information.
DeleteDefaultIndex(String, UpdateContext)
Deletes the default index for the container.
Declaration
public void DeleteDefaultIndex(string index, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
System.String | index | A comma-separated list of strings that represent the indexing strategy. |
UpdateContext | context | The UpdateContext to use for this operation. |
Remarks
This method is for convenience - see DeleteDefaultIndex(String) for more information.
DeleteDocument(XmlDocument, UpdateContext)
Removes the specified XmlDocument from the Container.
Declaration
public void DeleteDocument(XmlDocument document, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
XmlDocument | document | The XmlDocument to be deleted from the container. The name to be deleted is extracted from this parameter. |
UpdateContext | context | The UpdateContext object to use for this deletion. |
DeleteDocument(XmlTransaction, XmlDocument, UpdateContext)
Removes the specified XmlDocument from the Container.
Declaration
public void DeleteDocument(XmlTransaction transaction, XmlDocument document, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | The XmlTransaction to operate under. |
XmlDocument | document | The XmlDocument to be deleted from the container. The name to be deleted is extracted from this parameter. |
UpdateContext | context | The UpdateContext object to use for this deletion. |
DeleteDocument(XmlTransaction, String, UpdateContext)
Delete the document with the given name.
Declaration
public void DeleteDocument(XmlTransaction transaction, string name, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | The XmlTransaction to operate under. |
System.String | name | The file name of the XmlDocument to be deleted from the container. The name to be deleted is extracted from this parameter. |
UpdateContext | context | The UpdateContext object to use for this deletion. |
See Also
View SourceDeleteDocument(String, UpdateContext)
Delete the document with the given name.
Declaration
public void DeleteDocument(string name, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The file name of the XmlDocument to be deleted from the container. The name to be deleted is extracted from this parameter. |
UpdateContext | context | The UpdateContext object to use for this deletion. |
See Also
View SourceDeleteIndex(XmlTransaction, String, String, String, UpdateContext)
Deletes an index of the specified type for the named document node.
Declaration
public void DeleteIndex(XmlTransaction transaction, string nodeNamespace, string nodeName, string index, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | The XmlTransaction to operate under. |
System.String | nodeNamespace | The namespace of the node to be indexed. The default namespace is selected by passing an empty string for the namespace. |
System.String | nodeName | Name of the node. |
System.String | index | A comma-separated list of strings that represent the indexing strategy. |
UpdateContext | context | The UpdateContext to use for this operation. |
Remarks
This method is for convenience -- see DeleteIndex(XmlIndex) for more information.
DeleteIndex(String, String, String, UpdateContext)
Deletes an index of the specified type for the named document node.
Declaration
public void DeleteIndex(string nodeNamespace, string nodeName, string index, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
System.String | nodeNamespace | The namespace of the node to be indexed. The default namespace is selected by passing an empty string for the namespace. |
System.String | nodeName | The name of the element or attribute node to be indexed. |
System.String | index | A comma-separated list of strings that represent the indexing strategy. |
UpdateContext | context | The UpdateContext to use for this operation. |
Remarks
This method is for convenience -- see DeleteIndex(XmlIndex) for more information.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(Boolean)
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
protected void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | If disposing equals |
DocumentExists(String)
Verifies the existence of a document in the container with the specified name.
Declaration
public bool DocumentExists(string docName)
Parameters
Type | Name | Description |
---|---|---|
System.String | docName | The name of the document to look for within the container. |
Returns
Type | Description |
---|---|
System.Boolean | Returns |
Finalize()
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
Declaration
protected void Finalize()
GetAllDocuments()
Return all of the documents in the container in a lazily evaluated XmlResults set.
Declaration
public XmlResults GetAllDocuments()
Returns
Type | Description |
---|---|
XmlResults | All documents from the Container in a lazily evaluated XmlResults set. |
See Also
View SourceGetAllDocuments(GetAllDocumentOptions)
Return all of the documents in the container in a lazily evaluated XmlResults set.
Declaration
public XmlResults GetAllDocuments(GetAllDocumentOptions getAllDocumentOptions)
Parameters
Type | Name | Description |
---|---|---|
GetAllDocumentOptions | getAllDocumentOptions | The GetAllDocumentOptions parameter. |
Returns
Type | Description |
---|---|
XmlResults | All documents from the Container in a lazily evaluated XmlResults set. |
See Also
View SourceGetAllDocuments(XmlTransaction, GetAllDocumentOptions)
Return all of the documents in the container in a lazily evaluated XmlResults set.
Declaration
public XmlResults GetAllDocuments(XmlTransaction transaction, GetAllDocumentOptions getAllDocumentOptions)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | The XmlTransaction to operate under. |
GetAllDocumentOptions | getAllDocumentOptions | Document options to use. |
Returns
Type | Description |
---|---|
XmlResults | All documents from the Container in a lazily evaluated XmlResults set. |
See Also
View SourceGetDocument(XmlTransaction, String, RetrievalModes)
Returns the XmlDocument with the specified name.
Declaration
public XmlDocument GetDocument(XmlTransaction transaction, string name, RetrievalModes retrievalModes)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | The XmlTransaction to operate under. |
System.String | name | The name of the XmlDocument to be retrieved from the container. |
RetrievalModes | retrievalModes | The RetrievalModes parameter. |
Returns
Type | Description |
---|---|
XmlDocument | The requested XmlDocument. |
See Also
View SourceGetDocument(String)
Returns the XmlDocument with the specified name.
Declaration
public XmlDocument GetDocument(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The file name of the document to get. |
Returns
Type | Description |
---|---|
XmlDocument | The requested XmlDocument. |
See Also
View SourceGetDocument(String, RetrievalModes)
Returns the XmlDocument with the specified name.
Declaration
public XmlDocument GetDocument(string name, RetrievalModes retrievalModes)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the XmlDocument to be retrieved from the container. |
RetrievalModes | retrievalModes | The RetrievalModes parameter. |
Returns
Type | Description |
---|---|
XmlDocument | The requested XmlDocument. |
See Also
View SourceGetIndexSpecification()
Gets the current indexing specification for the container.
Declaration
public XmlIndexSpecification GetIndexSpecification()
Returns
Type | Description |
---|---|
XmlIndexSpecification |
Remarks
The indexing specification can be modified using SetIndexSpecification(XmlIndexSpecification, UpdateContext).
GetManager()
Returns the XmlManager associated with the Container.
Declaration
public XmlManager GetManager()
Returns
Type | Description |
---|---|
XmlManager | The XmlManager associated with the Container. |
GetNode(XmlTransaction, String, RetrievalModes)
Returns a node representing the specified handle.
Declaration
public XmlValue GetNode(XmlTransaction transaction, string nodeHandle, RetrievalModes nodeOptions)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | The XmlTransaction to operate under. |
System.String | nodeHandle | The handle representing the node which must have been obtained using NodeHandle. |
RetrievalModes | nodeOptions | One or more RetrievalModes values. |
Returns
Type | Description |
---|---|
XmlValue | An XmlValue representing a node in a document in the calling Container. |
Remarks
The handle must represent a node in a document in the Container. If the document or node has been removed, the operation may fail.
Node handles are guaranteed to remain stable in the absence of modifications to a document. If a document is modified, a handle may cease to exist, or may belong to a different node.
See Also
View SourceGetNode(String, RetrievalModes)
Returns a node representing the specified handle.
Declaration
public XmlValue GetNode(string nodeHandle, RetrievalModes nodeOptions)
Parameters
Type | Name | Description |
---|---|---|
System.String | nodeHandle | The handle representing the node which must have been obtained using NodeHandle. |
RetrievalModes | nodeOptions | One or more RetrievalModes values. |
Returns
Type | Description |
---|---|
XmlValue | An XmlValue representing a node in a document in the calling Container. |
Remarks
The handle must represent a node in a document in the Container. If the document or node has been removed, the operation may fail.
Node handles are guaranteed to remain stable in the absence of modifications to a document. If a document is modified, a handle may cease to exist, or may belong to a different node.
See Also
View SourceGetNumDocuments()
Performs a lookup of the number of documents in the Container.
Declaration
public ulong GetNumDocuments()
Returns
Type | Description |
---|---|
System.UInt64 | The number of documents stored in the Container. |
Remarks
If you use this method and the container is configured with transactions, an XmlTransaction object will be created and used for the operation.
GetNumDocuments(XmlTransaction)
Performs a lookup of the number of documents in the Container.
Declaration
public ulong GetNumDocuments(XmlTransaction transaction)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | The XmlTransaction to operate under. |
Returns
Type | Description |
---|---|
System.UInt64 | The number of documents stored in the Container. |
LookupStatistics(XmlTransaction, String, String, String, XmlValue)
Returns an KeyStatistics object for the identified index. This object identifies the number of keys (both total and unique) maintained for the identified index.
Declaration
public KeyStatistics LookupStatistics(XmlTransaction transaction, string nodeNamespace, string nodeName, string index, XmlValue value)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | The XmlTransaction to operate under. |
System.String | nodeNamespace | The namespace of the node to which this index is applied. |
System.String | nodeName | Name of the node. |
System.String | index | Identifies the index for which you want the statistics returned. The value supplied here must be a valid index. See AddIndex(XmlIndex)for a description of valid index specifications. |
XmlValue | value | Provides the value to which equality indices must be equal. This parameter is required when returning statistics on equality indices, and it is ignored for all other types of indices. |
Returns
Type | Description |
---|---|
KeyStatistics | Statistical information for the indices. |
Remarks
This form of this method cannot be used to return statistics on edge indices.
See Also
View SourceLookupStatistics(XmlTransaction, String, String, String, String, String, XmlValue)
Returns an KeyStatistics object for the identified index. This object identifies the number of keys (both total and unique) maintained for the identified index.
Declaration
public KeyStatistics LookupStatistics(XmlTransaction transaction, string nodeNamespace, string nodeName, string parentUri, string parentName, string index, XmlValue value)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | The XmlTransaction to operate under. |
System.String | nodeNamespace | The namespace of the node to which this index is applied. |
System.String | nodeName | Name of the node. |
System.String | parentUri | The namespace of the parent node to which this edge index is applied. |
System.String | parentName | The name of the parent node to which this edge index is applied. |
System.String | index | Identifies the index for which you want the statistics returned. The value supplied here must be a valid index. See AddIndex(XmlIndex) for a description of valid index specifications. |
XmlValue | value | Provides the value to which equality indices must be equal. This parameter is required when returning statistics on equality indices, and it is ignored for all other types of indices. |
Returns
Type | Description |
---|---|
KeyStatistics | Statistical information for the indices. |
Remarks
Lookup statistics for the identified index. Use this form of this method to return statistics on edge indices.
Edge indices are indices maintained for those locations in a document where two nodes (a parent node and a child node) meet. See Developing .NET Applications with Figaro for details.
See Also
View SourceLookupStatistics(String, String, String, XmlValue)
Returns a KeyStatistics object for the identified index. This object identifies the number of keys (both total and unique) maintained for the identified index.
Declaration
public KeyStatistics LookupStatistics(string nodeNamespace, string nodeName, string index, XmlValue value)
Parameters
Type | Name | Description |
---|---|---|
System.String | nodeNamespace | The namespace of the node to which this index is applied. |
System.String | nodeName | Name of the node. |
System.String | index | Identifies the index for which you want the statistics returned. The value supplied here must be a valid index. See AddIndex(XmlIndex)for a description of valid index specifications. |
XmlValue | value | Provides the value to which equality indices must be equal. This parameter is required when returning statistics on equality indices, and it is ignored for all other types of indices. |
Returns
Type | Description |
---|---|
KeyStatistics | Statistical information for the indices. |
Remarks
This form of this method cannot be used to return statistics on edge indices.
See Also
View SourceLookupStatistics(String, String, String, String, String, XmlValue)
Returns an KeyStatistics object for the identified index. This object identifies the number of keys (both total and unique) maintained for the identified index.
Declaration
public KeyStatistics LookupStatistics(string nodeNamespace, string nodeName, string parentUri, string parentName, string index, XmlValue value)
Parameters
Type | Name | Description |
---|---|---|
System.String | nodeNamespace | The namespace of the node to which this index is applied. |
System.String | nodeName | The name of the node to which this index is applied. |
System.String | parentUri | The namespace of the parent node to which this edge index is applied. |
System.String | parentName | The name of the parent node to which this edge index is applied. |
System.String | index | Identifies the index for which you want the statistics returned. The value supplied here must be a valid index. See AddIndex(XmlIndex) for a description of valid index specifications. |
XmlValue | value | Provides the value to which equality indices must be equal. This parameter is required when returning statistics on equality indices, and it is ignored for all other types of indices. |
Returns
Type | Description |
---|---|
KeyStatistics | Statistical information for the indices. |
Remarks
Lookup statistics for the identified index. Use this form of this method to return statistics on edge indices.
Edge indices are indices maintained for those locations in a document where two nodes (a parent node and a child node) meet. See Developing .NET Applications with Figaro for details.
See Also
View SourcePutDocument(XmlDocument, UpdateContext)
Inserts an XmlDocument into the container. The value returned by this method is dependent upon the form of the method that you used to perform the insertion.
Declaration
public void PutDocument(XmlDocument doc, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
XmlDocument | doc | The XmlDocument to insert into the Container. |
UpdateContext | context | The update context to use for the document insertion. |
Remarks
Note that the name used for the document must be unique in the container or an exception is thrown. The flag, GenerateFileName, can be used to generate a name. To change a document that already exists in the container, use UpdateDocument(XmlDocument, UpdateContext).
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
See Also
View SourcePutDocument(XmlDocument, UpdateContext, PutDocumentOptions)
Inserts an XmlDocument into the container. The value returned by this method is dependent upon the form of the method that you used to perform the insertion.
Declaration
public void PutDocument(XmlDocument doc, UpdateContext context, PutDocumentOptions putDocumentOptions)
Parameters
Type | Name | Description |
---|---|---|
XmlDocument | doc | The XmlDocument to insert into the Container. |
UpdateContext | context | The update context to use for the document insertion. |
PutDocumentOptions | putDocumentOptions | One or more of the values specified in PutDocumentOptions. |
Remarks
Note that the name used for the document must be unique in the container or an exception is thrown. The flag, GenerateFileName, can be used to generate a name. To change a document that already exists in the container, use UpdateDocument(XmlDocument, UpdateContext).
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
See Also
View SourcePutDocument(XmlTransaction, XmlDocument, UpdateContext)
Inserts an XmlDocument into the container. The value returned by this method is dependent upon the form of the method that you used to perform the insertion.
Declaration
public void PutDocument(XmlTransaction transaction, XmlDocument doc, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | If the operation is to be transaction-protected, the parameter is an XmlTransaction handle returned from CreateTransaction(). |
XmlDocument | doc | The XmlDocument to insert into the Container. |
UpdateContext | context | The update context to use for the document insertion. |
Remarks
Note that the name used for the document must be unique in the container or an exception is thrown. The flag, GenerateFileName, can be used to generate a name. To change a document that already exists in the container, use UpdateDocument(XmlTransaction, XmlDocument, UpdateContext).
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
See Also
View SourcePutDocument(XmlTransaction, XmlDocument, UpdateContext, PutDocumentOptions)
Inserts an XmlDocument into the container. The value returned by this method is dependent upon the form of the method that you used to perform the insertion.
Declaration
public void PutDocument(XmlTransaction transaction, XmlDocument doc, UpdateContext context, PutDocumentOptions putDocumentOptions)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | If the operation is to be transaction-protected, the parameter is an XmlTransaction handle returned from CreateTransaction(). |
XmlDocument | doc | The XmlDocument to insert into the Container. |
UpdateContext | context | The update context to use for the document insertion. |
PutDocumentOptions | putDocumentOptions | One or more of the values specified in PutDocumentOptions. |
Remarks
Note that the name used for the document must be unique in the container or an exception is thrown. The flag, GenerateFileName, can be used to generate a name. To change a document that already exists in the container, use UpdateDocument(XmlDocument, UpdateContext).
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
PutDocument(XmlTransaction, String, UpdateContext)
Inserts an XmlDocument into the container. The value returned by this method is dependent upon the form of the method that you used to perform the insertion.
Declaration
public string PutDocument(XmlTransaction transaction, string pathAndName, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | If the operation is to be transaction-protected, the parameter is an XmlTransaction handle returned from CreateTransaction(). |
System.String | pathAndName | The full file path and name of the document you want to insert. |
UpdateContext | context | The update context to use for the document insertion. |
Returns
Type | Description |
---|---|
System.String | The name used for the new document. |
Remarks
Note that the name used for the document must be unique in the container or an exception is thrown. The flag, GenerateFileName, can be used to generate a name. To change a document that already exists in the container, use UpdateDocument(XmlDocument, UpdateContext).
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
See Also
View SourcePutDocument(XmlTransaction, String, UpdateContext, PutDocumentOptions)
Inserts an XmlDocument into the container. The value returned by this method is dependent upon the form of the method that you used to perform the insertion.
Declaration
public string PutDocument(XmlTransaction transaction, string pathAndName, UpdateContext context, PutDocumentOptions putDocumentOptions)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | If the operation is to be transaction-protected, the parameter is an XmlTransaction handle returned from CreateTransaction(). |
System.String | pathAndName | The full path of the document for Container to read as a stream. |
UpdateContext | context | The update context to use for the document insertion. |
PutDocumentOptions | putDocumentOptions | One or more of the values specified in PutDocumentOptions. |
Returns
Type | Description |
---|---|
System.String | The name used for the new document. |
Remarks
Note that the name used for the document must be unique in the container or an exception is thrown. The flag, GenerateFileName, can be used to generate a name. To change a document that already exists in the container, use UpdateDocument(XmlDocument, UpdateContext).
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
See Also
View SourcePutDocument(XmlTransaction, String, XmlInputStream, UpdateContext, PutDocumentOptions)
Inserts an XmlInputStream into the container.
Declaration
public string PutDocument(XmlTransaction transaction, string name, XmlInputStream adoptedInput, UpdateContext context, PutDocumentOptions putDocumentOptions)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | The XmlTransaction to operate under. |
System.String | name | Provides the name of the document to insert into the container. This name must be unique in the container. If GenerateFileName is set, a system-defined string is appended to create a unique name. This applies if the name parameter is provided or empty. If the name is not unique within the container, an exception is thrown. |
XmlInputStream | adoptedInput | The stream object to insert into the container. The content read by the input stream must be well-formed XML, or an exception is thrown. The stream object provided is consumed (deleted) by this method. |
UpdateContext | context | The update context for document insertion. |
PutDocumentOptions | putDocumentOptions | One or more options to use when inserting the document. |
Returns
Type | Description |
---|---|
System.String | The name used for the new document. |
PutDocument(XmlTransaction, String, String, UpdateContext, PutDocumentOptions)
Inserts an XmlDocument into the container. The value returned by this method is dependent upon the form of the method that you used to perform the insertion.
Declaration
public string PutDocument(XmlTransaction transaction, string name, string contents, UpdateContext context, PutDocumentOptions putDocumentOptions)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | If the operation is to be transaction-protected, the parameter is an XmlTransaction handle returned from CreateTransaction(). |
System.String | name | The name of the document you want to insert. |
System.String | contents | The contents of the document as a System.String variable. |
UpdateContext | context | The update context to use for the document insertion. |
PutDocumentOptions | putDocumentOptions | One or more of the values specified in PutDocumentOptions. |
Returns
Type | Description |
---|---|
System.String | The name used for the new document. |
Remarks
Note that the name used for the document must be unique in the container or an exception is thrown. The flag, GenerateFileName, can be used to generate a name. To change a document that already exists in the container, use UpdateDocument(XmlDocument, UpdateContext).
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
See Also
View SourcePutDocument(String, UpdateContext)
Inserts an XmlDocument into the container. The value returned by this method is dependent upon the form of the method that you used to perform the insertion.
Declaration
public string PutDocument(string pathAndName, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
System.String | pathAndName | The full path of the document for Container to read as a stream. |
UpdateContext | context | The update context to use for the document insertion. |
Returns
Type | Description |
---|---|
System.String | The name used for the new document. |
Remarks
Note that the name used for the document must be unique in the container or an exception is thrown. The flag, GenerateFileName, can be used to generate a name. To change a document that already exists in the container, use UpdateDocument(XmlDocument, UpdateContext).
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
See Also
View SourcePutDocument(String, UpdateContext, PutDocumentOptions)
Inserts an XmlDocument into the container. The value returned by this method is dependent upon the form of the method that you used to perform the insertion.
Declaration
public string PutDocument(string pathAndName, UpdateContext context, PutDocumentOptions putDocumentOptions)
Parameters
Type | Name | Description |
---|---|---|
System.String | pathAndName | The full path of the document for Container to read as a stream. |
UpdateContext | context | The update context to use for the document insertion. |
PutDocumentOptions | putDocumentOptions | One or more of the values specified in PutDocumentOptions. |
Returns
Type | Description |
---|---|
System.String | The name used for the new document. |
Remarks
Note that the name used for the document must be unique in the container or an exception is thrown. The flag, GenerateFileName, can be used to generate a name. To change a document that already exists in the container, use UpdateDocument(XmlDocument, UpdateContext).
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
See Also
View SourcePutDocument(String, XmlInputStream, UpdateContext, PutDocumentOptions)
Inserts an XmlInputStream into the container.
Declaration
public string PutDocument(string name, XmlInputStream adoptedInput, UpdateContext context, PutDocumentOptions putDocumentOptions)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Provides the name of the document to insert into the container. This name must be unique in the container. If GenerateFileName is set, a system-defined string is appended to create a unique name. This applies if the name parameter is provided or empty. If the name is not unique within the container, an exception is thrown. |
XmlInputStream | adoptedInput | The stream object to insert into the container. The content read by the input stream must be well-formed XML, or an exception is thrown. The stream object provided is consumed (deleted) by this method. |
UpdateContext | context | The update context for document insertion. |
PutDocumentOptions | putDocumentOptions | One or more options to use when inserting the document. |
Returns
Type | Description |
---|---|
System.String | The name used for the new document. |
PutDocument(String, String, UpdateContext, PutDocumentOptions)
Inserts an XmlDocument into the container. The value returned by this method is dependent upon the form of the method that you used to perform the insertion.
Declaration
public string PutDocument(string name, string contents, UpdateContext context, PutDocumentOptions putDocumentOptions)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the document you want to insert. |
System.String | contents | The contents of the document as a System.String variable. |
UpdateContext | context | The update context to use for the document insertion. |
PutDocumentOptions | putDocumentOptions | One or more of the values specified in PutDocumentOptions. |
Returns
Type | Description |
---|---|
System.String | The name used for the new document. |
Remarks
Note that the name used for the document must be unique in the container or an exception is thrown. The flag, GenerateFileName, can be used to generate a name. To change a document that already exists in the container, use UpdateDocument(XmlDocument, UpdateContext).
The document content is indexed according to the container indexing specification. The indexer supports the Xerces content encodings and expects the content to be well-formed, but it need not be valid.
See Also
View SourceRemoveAlias(String)
Removes the named alias from the list maintained by the containing XmlManager. If the alias does not exist, or matches a different Container, the call fails.
Declaration
public bool RemoveAlias(string alias)
Parameters
Type | Name | Description |
---|---|---|
System.String | alias | The alias to remove. |
Returns
Type | Description |
---|---|
System.Boolean | Returns |
See Also
View SourceReplaceDefaultIndex(XmlTransaction, String, UpdateContext)
Replaces the container's default index.
Declaration
public void ReplaceDefaultIndex(XmlTransaction transaction, string index, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | The XmlTransaction to operate under. |
System.String | index | A comma-separated list of strings that represent the indexing strategy. |
UpdateContext | context | The update context to use for the index replacement. |
Remarks
This method is for convenience -- see ReplaceDefaultIndex(String) for more information.
See Also
View SourceReplaceDefaultIndex(String, UpdateContext)
Replaces the container's default index.
Declaration
public void ReplaceDefaultIndex(string index, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
System.String | index | A comma-separated list of strings that represent the indexing strategy. |
UpdateContext | context | The update context to use for the index replacement. |
Remarks
This method is for convenience -- see ReplaceIndex(XmlIndex) for more information.
See Also
View SourceReplaceIndex(XmlTransaction, String, String, String, UpdateContext)
Replaces an index of the specified type for the named document node.
Declaration
public void ReplaceIndex(XmlTransaction transaction, string nodeNamespace, string nodeName, string index, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | The XmlTransaction to operate under. |
System.String | nodeNamespace | The namespace of the node to be indexed. The default namespace is selected by passing an empty string for the namespace. |
System.String | nodeName | The name of the element or attribute node to be indexed. |
System.String | index | A comma-separated list of strings that represent the indexing strategy. |
UpdateContext | context | The UpdateContext to use for this operation. |
Remarks
This method is for convenience -- see ReplaceIndex(XmlIndex)for more information.
See Also
View SourceReplaceIndex(String, String, String, UpdateContext)
Replaces an index of the specified type for the named document node.
Declaration
public void ReplaceIndex(string nodeNamespace, string nodeName, string index, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
System.String | nodeNamespace | The namespace of the node to be indexed. The default namespace is selected by passing an empty string for the namespace. |
System.String | nodeName | Name of the node. |
System.String | index | A comma-separated list of strings that represent the indexing strategy. |
UpdateContext | context | The UpdateContext to use for this operation. |
Remarks
This method is for convenience -- see ReplaceIndex(XmlIndex) for more information.
See Also
View SourceSetIndexSpecification(XmlIndexSpecification, UpdateContext)
Defines the type of indexing to be maintained for a container of documents. The currently defined indexing specification can be retrieved with the GetIndexSpecification() method.
Declaration
public void SetIndexSpecification(XmlIndexSpecification index, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
XmlIndexSpecification | index | The indexing specification for the Container. |
UpdateContext | context | The update context to use for the index modification. |
Remarks
If the container is not empty then the contained documents are incrementally indexed. Index keys for disabled index strategies are removed and index keys for enabled index strategies are added. Note that the length of time taken to perform this re-indexing operation is proportional to the size of the container.
See Also
View SourceSetIndexSpecification(XmlTransaction, XmlIndexSpecification, UpdateContext)
Defines the type of indexing to be maintained for a container of documents. The currently defined indexing specification can be retrieved with the GetIndexSpecification() method.
Declaration
public void SetIndexSpecification(XmlTransaction transaction, XmlIndexSpecification index, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | The XmlTransaction to operate under. |
XmlIndexSpecification | index | The indexing specification for the Container. |
UpdateContext | context | The update context to use for the index modification. |
Remarks
If the container is not empty then the contained documents are incrementally indexed. Index keys for disabled index strategies are removed and index keys for enabled index strategies are added. Note that the length of time taken to perform this re-indexing operation is proportional to the size of the container.
See Also
View SourceSync()
Flushes database pages for the container to disk.
Declaration
public void Sync()
UpdateDocument(XmlDocument, UpdateContext)
Updates an XmlDocumentin the container. The document must have been retrieved from the container using GetDocument(String), Query(String, QueryContext, QueryOptions), or Execute(QueryContext).
Declaration
public void UpdateDocument(XmlDocument document, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
XmlDocument | document | The XmlDocument to be updated in the Container. |
UpdateContext | context | The update context to use for the document insertion. |
Remarks
It is possible to use a constructed XmlDocument object, if its name is set to a valid name in the container. The document must still exist within the container. The document content is indexed according to the container indexing specification, with index keys being removed for the previous document content, and added for the updated document content.
See Also
View SourceUpdateDocument(XmlTransaction, XmlDocument, UpdateContext)
Transactionally updates an XmlDocumentin the container. The document must have been retrieved from the container using GetDocument(String), Query(String, QueryContext, QueryOptions), or Execute(QueryContext).
Declaration
public void UpdateDocument(XmlTransaction transaction, XmlDocument document, UpdateContext context)
Parameters
Type | Name | Description |
---|---|---|
XmlTransaction | transaction | The XmlTransaction object to use in the transactional update. |
XmlDocument | document | The XmlDocument to be updated in the Container. |
UpdateContext | context | The update context to use for the document insertion. |
Remarks
It is possible to use a constructed XmlDocument object, if its name is set to a valid name in the container. The document must still exist within the container. The document content is indexed according to the container indexing specification, with index keys being removed for the previous document content, and added for the updated document content.