com.softwareag.tamino.db.api.accessor
Interface TSchemaDefinition3Accessor

All Superinterfaces:
TAccessor, TInvalidatableAccessor
All Known Implementing Classes:
TSchemaDefinition3AccessorImpl, TSchemaDefinition3AccessorTimeLoggingImpl

public interface TSchemaDefinition3Accessor
extends TAccessor

TSchemaDefinition3Accessor is the interface for the access of TSD3 schema information. The basic operations are define and undefine. Each of these operations returns a TResponse instance containing the information as returned by Tamino in its response document. TSD2 schema information can not be accessed by this type of accessor.

Version:
$Revision: 1.17 $
Author:
Marcus Schreyer

Method Summary
 TResponse define(TXMLObject schemaObject)
          Defines a schema represented by the schemaObject input parameter in the Tamino database.
 TResponse define(TXMLObject[] schemaObjects)
          Defines multiple schemas stored in an array of dataObjects.
 TResponse define(TXMLObject[] schemaObjects, TDefineMode defineMode)
          Defines multiple schemas stored in an array of dataObjects.
 TResponse define(TXMLObject schemaObject, boolean asTest)
          Deprecated. Please use the method define( TXMLObject schemaObject, TDefineMode defineMode ) instead.
 TResponse define(TXMLObject schemaObject, TDefineMode defineMode)
          Defines a Tamino schema depending on the defineMode indicator into the current database.
 java.util.Iterator<java.lang.String> getCollectionNames()
          Gets an iterator for the list of all collection names referenced by TSD3 schemas.
 java.util.Iterator<java.lang.String> getDoctypeNames(java.lang.String collection, java.lang.String schema)
          Gets an iterator for the list of all TSD3 doctype names in the specified collection and schema.
 java.util.Iterator<java.lang.String> getRootElementNames(java.lang.String collection)
          Gets the root element names within the specified collection.
 TResponse getSchema(java.lang.String collection, java.lang.String schema)
          Gets the schema or set of schemas for the given collection and schema name.
 java.util.Iterator<java.lang.String> getSchemaNames(java.lang.String collection)
          Gets an iterator for the list of all TSD3 schema names in the specified collection.
 java.util.Iterator<java.lang.String> getUndefinedRootElementNames(java.lang.String collection)
          Gets the root element names within the specified collection wich do not belong to any defined schema.
 TResponse undefine(java.lang.String collection, java.lang.String schema)
          Undefines a schema specified by its name from the specified collection.
 TResponse undefine(TUndefineItem[] undefineItems)
          In order to undefine a schema cluster, it is possible to specify a list of objects in an _UNDEFINE command: _UNDEFINE=undefineList where- undefineList -> undefineItem[, undefineItem]* undefineItem -> collection[/schema[/doctype]]
 
Methods inherited from interface com.softwareag.tamino.db.api.accessor.TAccessor
cancelRequests, getAccessLocation, getApplicationName, getCanBeCancelled, getLockMode, getLockwaitMode, getMaximumRequestDuration, setAccessLocation, setApplicationName, setCanBeCancelled, setLockMode, setLockwaitMode, setMaximumRequestDuration
 
Methods inherited from interface com.softwareag.tamino.db.api.accessor.TInvalidatableAccessor
invalidate
 

Method Detail

getCollectionNames

java.util.Iterator<java.lang.String> getCollectionNames()
                                                        throws TQueryException
Gets an iterator for the list of all collection names referenced by TSD3 schemas. The iterator returns the names of the collections as strings.

Returns:
Iterator an iterator over the collection names as strings. If no such collections are present, the iterator returned indicates this with iterator.hasNext() == false.
Throws:
TQueryException - signals an error while attempting to query for the collection names.

getSchemaNames

java.util.Iterator<java.lang.String> getSchemaNames(java.lang.String collection)
                                                    throws TQueryException
Gets an iterator for the list of all TSD3 schema names in the specified collection. The iterator returns the names of the schemas as strings. The collection parameter is optional. Depending on the parameter provided the following list of schema names is returned:
  1. collection != null, all schema names for the given collection.
  2. collection == null, all schema names in the database.

Parameters:
collection - the collection for which all TSD3 schema names are to be returned; null or an empty string indicates no collection is specified.
Returns:
Iterator an iterator over the list of returned schema names. If no schema names are found, the iterator indicates this with iterator.hasNext() == false.
Throws:
TQueryException - signals an error while attempting to query for the schema names.

getDoctypeNames

java.util.Iterator<java.lang.String> getDoctypeNames(java.lang.String collection,
                                                     java.lang.String schema)
                                                     throws TQueryException
Gets an iterator for the list of all TSD3 doctype names in the specified collection and schema. The iterator returns the names of the schemas as strings. The collection and schema parameters are optional. Depending on the parameters provided the following list of doctype names is returned:
  1. collection != null && schema != null , all doctype names for the given collection and schema.
  2. collection != null && schema == null , all doctype names for the given collection.
  3. collection == null && schema != null , all doctype names for the given schema.
  4. collection == null && schema == null , all doctype names in the database.

Parameters:
collection - the collection for which all TSD3 doctype names are to be returned; null or an empty string indicates no collection is specified.
schema - the schema for which all TSD3 doctype names are to be returned; null or an empty string indicates no schema is specified.
Returns:
Iterator an iterator over the returned doctype names. If no doctype names are found, the iterator indicates this with iterator.hasNext() == false.
Throws:
TQueryException - signals an error while attempting to query for the doctype names.

getSchema

TResponse getSchema(java.lang.String collection,
                    java.lang.String schema)
                    throws TQueryException
Gets the schema or set of schemas for the given collection and schema name. The collection and schema parameters are optional. Depending on the parameters provided the following list of schemas is returned:
  1. collection != null && schema != null , the schema with the given schema name in the given collection.
  2. collection != null && schema == null , all schemas in the given collection.
  3. collection == null && schema != null , all schemas with the given schema name.
  4. collection == null && schema == null , all schemas in the database.

Parameters:
collection - the collection for which all TSD3 schemas are to be returned; null or an empty string indicates no collection is specified.
schema - the schema which is to be returned; null or an empty string indicates no schema is specified.
Returns:
TResponse containing the Tamino result information of the schema query operation. You can use the TResponse object to obtain a TXMLObjectIterator to iterate over the result set of TXMLObject instances each representing a TSD3 schema.
Throws:
TQueryException - signals an error while attempting to query for the schemas.

getRootElementNames

java.util.Iterator<java.lang.String> getRootElementNames(java.lang.String collection)
                                                         throws TQueryException
Gets the root element names within the specified collection.

Parameters:
collection - the collection for which all root element names will be retrieved.
Returns:
Iterator an iterator over the returned root element names. If no root element names are found, the iterator indicates this with iterator.hasNext() == false.
Throws:
TQueryException - signals an error while attempting to query for the schemas.

getUndefinedRootElementNames

java.util.Iterator<java.lang.String> getUndefinedRootElementNames(java.lang.String collection)
                                                                  throws TQueryException
Gets the root element names within the specified collection wich do not belong to any defined schema.

Parameters:
collection - the collection for which all undefined root element names will be retrieved.
Returns:
Iterator an iterator over the returned root element names. If no root element names are found, the iterator indicates this with iterator.hasNext() == false.
Throws:
TQueryException - signals an error while attempting to query for the schemas.

define

TResponse define(TXMLObject schemaObject)
                 throws TDefineException
Defines a schema represented by the schemaObject input parameter in the Tamino database. The input schema must be TSD3 schema. If the schema already exists in the same collection, Tamino attempts to update the schema, otherwise a new schema is created. If the TXMLObject instance carries an id and/or a docname, these are ignored for the define operation.

Parameters:
schemaObject - containing the TSD3 schema to be defined in Tamino.
Returns:
TResponse containing the Tamino result information of the define operation.
Throws:
TDefineException - signals an error while attempting the define operation.

define

TResponse define(TXMLObject schemaObject,
                 boolean asTest)
                 throws TDefineException
Deprecated. Please use the method define( TXMLObject schemaObject, TDefineMode defineMode ) instead.

Defines a schema represented by the schemaObject input parameter in the Tamino database. The input schema must be TSD3 schema. If the asTest parameter is true, Tamino only tests the input schema, but the schema is not defined in the database. If asTest is false the behaviour is the same as the define(schemaObject). Please note, that the usage of this method is for Software AG internal use only.

Parameters:
dataObject - containing the TSD3 schema to be defined in Tamino.
asTest - indicates if the input schema should only be tested. If true the schema is tested otherwise the schema is physically defined.
Returns:
TResponse containing the Tamino result information of the define operation.
Throws:
TDefineException - signals an error while attempting the define operation.

define

TResponse define(TXMLObject schemaObject,
                 TDefineMode defineMode)
                 throws TDefineException
Defines a Tamino schema depending on the defineMode indicator into the current database. If defineMode.isTest() is true, Tamino only tests the input schema, but the schema is not defined in the database. If defineMode.isValidate() is true, first structure-based updefine tests are being performed for each doctype. If they fail, all instances of that doctype are validated against the new schema. No validation is being performed for the instances of non-XML doctypes. Please note, that the usage of this method is for Software AG internal use only.

Parameters:
schemaObject - denotes the schema instance which should be defined on Tamino.
defineMode - indicates if the input schema should only be tested and if it should be validated.
Returns:
TResponse containing the response information.
Throws:
TDefineException - if the define for the given schema instance fails. This is the case regardless of the value for the asTest parameter.

define

TResponse define(TXMLObject[] schemaObjects)
                 throws TDefineException
Defines multiple schemas stored in an array of dataObjects. If the schema already exists in the same collection, Tamino attempts to update the schema, otherwise a new schema is created.

Parameters:
array - of dataObjects containing the schemas to be defined in Tamino.
Returns:
TInputStream containing the Taminos response document.
Throws:
TDefineException - signals an error while attempting the define operation.

define

TResponse define(TXMLObject[] schemaObjects,
                 TDefineMode defineMode)
                 throws TDefineException
Defines multiple schemas stored in an array of dataObjects. If the schema already exists in the same collection, Tamino attempts to update the schema, otherwise a new schema is created.

Parameters:
array - of dataObjects containing the schemas to be defined in Tamino.
defineMode - indicates if the input schema should only be tested and if it should be validated.
Returns:
TInputStream containing the Taminos response document.
Throws:
TDefineException - signals an error while attempting the define operation.

undefine

TResponse undefine(java.lang.String collection,
                   java.lang.String schema)
                   throws TUndefineException
Undefines a schema specified by its name from the specified collection. If no schema name is specified Tamino is requested to undefine the entire collection.

Parameters:
collection - name of the Tamino collection.
schema - name of a Tamino schema, if null or an empty string the collection is undefined.
Returns:
TResponse containing the Tamino result information of the define operation.
Throws:
TUndefineException - signals an error while attempting the undefine operation.

undefine

TResponse undefine(TUndefineItem[] undefineItems)
                   throws TUndefineException
In order to undefine a schema cluster, it is possible to specify a list of objects in an _UNDEFINE command: _UNDEFINE=undefineList where- undefineList -> undefineItem[, undefineItem]* undefineItem -> collection[/schema[/doctype]]

Parameters:
undefineItems - Array of undefineItems.
Returns:
TResponse containing the Tamino result information of the undefine operation.
Throws:
TUndefineException - signals an error while attempting the undefine operation.
See Also:
TUndefineItem


Copyright (c) 2013 Software AG. All Rights Reserved.