MarkLogic XCC/.Net Library |

# Marklogic.Xcc Namespace

The Marklogic.Xcc namespace defines the core interfaces for XCC/.NET.

Namespace hierarchy

### Classes

Class | Description
--- | ---
ContentCapability | An enumeration class defining permission capability values.
ContentCreateOptions | A set of creations options to be applied to a document when it is inserted into a contentbase. By default, the document format is set to DocumentFormat.NONE which indicates that server-configured defaults should be used to determine the document format from the URI extension.
ContentFactory | A helper class for creating instances of Content.
ContentPermission | An individual Content (document) permission, a capability/role pair. Instances of ContentPermission are immutable and may be shared.
ContentSourceFactory | Static helper class with factory methods to create instances of ContentSource using explicit connection parameters.
DocumentFormat | An enumeration of allowable formats for document insertion.
DocumentRepairLevel | An enumeration defining load-time document repair levels.
RequestOptions | This class represents options to apply to execution of a query. RequestOptions may be set on both Request and on Session objects. Options set on Request take priority. The effective options applied to a request are a blend of of the two objects with defaults applied to values not explicitly set. Use the method Request#getEffectiveOptions() to determine the actual values that will be applied to a given request.
ResultChannelName | An enumeration of channel names.
ValueFactory | This class contains various static factory methods that return instances of XdmValue and XdmVariable.
Version | Provides version information about this XCC/.NET assembly.

### Interfaces

Interface | Description
--- | ---
AdhocQuery | A specialization of Request which contains an ad-hoc query (XQuery code as a literal String) to be submitted and evaluated by the MarkLogic Server.
Content | A Content object encapsulates content (a document) that can be transferred to and inserted into a contentbase. Because Session.insertContent(Content) automatically handles recovery of interrupted document inserts, Content objects must be rewindable to enable auto-retry. It is possible to create non-rewindable Content instances, such as from an InputStream, which is too large to buffer and can only be consumed once. If a problem is encountered during or after a non-rewindable Content instance is processed then no automatic retries will be possible and an exception will be thrown. If rewindable and non-rewindable Content objects are mixed together in a multi-document insert (Session.insertContent(Content[]) and only rewindable instances have so far been processed, the insert will be retryable. If a non-rewindable instance is in process or if the current instance is rewindable but a non-rewindable instance has previously been processed when a problem occurs then no automatic retry is possible and processing will stop with an exception. Instances of this interface for common usage patterns may be created with the ContentFactory helper class. This interface may also be implemented by user code to handle specialized situations.
ContentbaseMetaData | Meta-data about a contentbase as represented by a Session instance. The methods of this class that throw RequestException may make one or more calls the the server to obtain needed information. Those which don't throw exceptions return local information. All server-query methods are lazy and do temporary caching. That is, no server calls are made until you invoke a method that needs information from the server. And once some information is fetched from the server, local copies will be returned on subsequent calls, until the data ages out. The time-to-live for cached information is about 60 seconds.
ContentSource | A ContentSource object describes a content source (MarkLogic Server instance) and serves as a factory that creates Session objects. Instances of ContentSource may be obtained from one of the static factory methods on the ContentSourceFactory class.
ModuleInvoke | An specialization of Request that contains the URI of an XQuery module (resident in the server) to be evaluated by the MarkLogic Server.
ModuleSpawn | An extension of Request that contains the URI of an XQuery module (resident server-side) to be spawned asynchronously by the MarkLogic Server.
Request | Base Request interface that contains methods common to all requests. Methods defined here manage request options and variable binding.
ResultItem | An XdmItem that is a member of a ResultSequence. The values associated with ResultItem instances may be transient. ResultItem wraps an XdmItem instance and also implements the XdmItem interface. Invoking the methods of the XdmItem interface are passed through to the contained instance. Because a ResultSequence may be streaming, the contained XdmItem may be have been partially consumed. Use the Fetchable property to determine if it is safe to access the value.
ResultSequence | A sequence of ResultItem values as returned from a query or module execution. A ResultSequence instance is stateful, it holds an internal positional index (cursor) which is updated on successive accesses. It is therefore not recommended that ResultSequence objects be accessed concurrently by multiple threads. ResultSequence instances can operate in two modes: cached and non-cached. If a ResultSequence is cached (default) then all XdmItems have been read and buffered. If non-cached, then items may only be accessed sequentially and some values may only be fetched once if accessed as a Stream. Cached ResultSequences need not be closed. Upon return, they no longer tie up any connection resources. However, closing a cached ResultSequence will invalidate it and prevent further access to its contents. Streaming (non-cached) ResultSequences should always be promptly closed. They hold a server connection until closed. If not closed, connections may be tied up indefinitely. Additionally, you should always consume the ResultSequence in a timely manner, because the server may close the connection if the (server-side configurable) request tiemout expires before the data is read out. In general, it is preferable to use cached ResultSequences (this is the default) unless you have reason to believe the amount of data returned may be too large to be fully buffered in memory.
Session | A Session object represents a conversation with a contentbase (database) on a MarkLogic Server instance (ContentSource) and holds state information related to that conversation. Connections to the server are created and released as needed and are automatically pooled. Sessions are created by invoking one of the ContentSource.newSession() factory methods.
UserCredentials | This interface encapsulates a user identity. It is intended primarily for internal use.

### Enumerations

Enumeration | Description
--- | ---
ContentCapability.Capability | An enumeration class defining permission capability values.
DocumentFormat.Format | An enumeration of allowable formats for document insertion.
DocumentRepairLevel.Level | An enumeration defining load-time document repair levels.
ResultChannelName.Name | An enumeration of channel names.