XCC/J 3.2-9

com.marklogic.xcc
Interface ContentbaseMetaData


public interface 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.


Method Summary
 BigInteger getContentBaseId()
          Return the numeric database ID of the contentbase.
 String getContentBaseName()
          Return the name of the contentbase associated with the Session.
 int getDriverMajorVersion()
          The driver (XCC) major release version.
 int getDriverMinorVersion()
          The driver (XCC) minor release version.
 int getDriverPatchVersion()
          The driver (XCC) patch release version.
 String getDriverVersionString()
          The driver (XCC) release version, as a String.
 BigInteger[] getForestIds()
          Return the IDs of forests attached to the contentbase associated with the Session.
 Map getForestMap()
          Returns a Map of forest names to forest IDs.
 String[] getForestNames()
          Return the names of the forests attached to the contnetbase associated with the Session.
 int getServerMajorVersion()
          Return the server major release version number.
 int getServerMinorVersion()
          Return ther server minor release version number.
 int getServerPatchVersion()
          Return ther server patch release version number.
 String getServerVersionString()
          Return a String version of the MarkLogic Server.
 Session getSession()
          The Session object that created this object.
 String getUser()
           Returns the user identity associated with the Session from which this object was obtained.
 

Method Detail

getDriverVersionString

public String getDriverVersionString()
The driver (XCC) release version, as a String.

Returns:
The String form (M.m-p) of the release version.

getDriverMajorVersion

public int getDriverMajorVersion()
The driver (XCC) major release version.

Returns:
The major release number, as an integer.

getDriverMinorVersion

public int getDriverMinorVersion()
The driver (XCC) minor release version.

Returns:
The minor release number, as an integer.

getDriverPatchVersion

public int getDriverPatchVersion()
The driver (XCC) patch release version.

Returns:
The minor release number, as an integer.

getUser

public String getUser()

Returns the user identity associated with the Session from which this object was obtained.

This property may also be obtained directly from the Session object via the UserCredentials object returned by the Session.getUserCredentials() method. It is included here for completeness.

Returns:
The user identity as a String.

getContentBaseName

public String getContentBaseName()
                          throws RequestException
Return the name of the contentbase associated with the Session. Unlike the similar method Session.getContentBaseName(), this method makes a call to the server to obtain the name. Session instances may be created without an explicit contentbase name (use a default) or with a numeric ID. This method determines the actual alphanumeric name of the contentbase.

Returns:
The contentbase name as a String.
Throws:
RequestException - If there is a problem communicating with the server.

getContentBaseId

public BigInteger getContentBaseId()
                            throws RequestException
Return the numeric database ID of the contentbase. Similar to getContentBaseName(), this method makes a call to the server to obtain the ID, regardless of how the Session was created.

Returns:
The server's numeric (unsigned long) database ID.
Throws:
RequestException - If there is a problem communicating with the server.

getForestIds

public BigInteger[] getForestIds()
                          throws RequestException
Return the IDs of forests attached to the contentbase associated with the Session.

Returns:
An array of BigInteger values.
Throws:
RequestException - If there is a problem communicating with the server.

getForestNames

public String[] getForestNames()
                        throws RequestException
Return the names of the forests attached to the contnetbase associated with the Session.

Returns:
An array of forest names as Strings.
Throws:
RequestException - If there is a problem communicating with the server.

getForestMap

public Map getForestMap()
                 throws RequestException
Returns a Map of forest names to forest IDs. The keys of the Map are the forest names and the values are BigInteger values that represent the forest IDs.

Returns:
A Map, keyed by forest name, of the forest IDs.
Throws:
RequestException - If there is a problem communicating with the server.

getServerVersionString

public String getServerVersionString()
                              throws RequestException
Return a String version of the MarkLogic Server.

Returns:
The full server version as a String.
Throws:
RequestException - If there is a problem communicating with the server.

getServerMajorVersion

public int getServerMajorVersion()
                          throws RequestException
Return the server major release version number.

Returns:
The server major release number as an integer.
Throws:
RequestException - If there is a problem communicating with the server.

getServerMinorVersion

public int getServerMinorVersion()
                          throws RequestException
Return ther server minor release version number.

Returns:
The server minor release number as an integer.
Throws:
RequestException - If there is a problem communicating with the server.

getServerPatchVersion

public int getServerPatchVersion()
                          throws RequestException
Return ther server patch release version number.

Returns:
The server patch release number as an integer.
Throws:
RequestException - If there is a problem communicating with the server.

getSession

public Session getSession()
The Session object that created this object.

Returns:
A Session instance.

XCC/J 3.2-9

Copyright © 2003-2008 Mark Logic Corporation, All Rights Reserved.

Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com