signature:
public class TableBatchOperation { /** * Reserved for internal use . Executes this batch operation on the specified table , using the specified
 * { @ link TableRequestOptions } and { @ link OperationContext } .
 * This method will invoke the Storage Service REST API to execute this batch operation , using the Table service
 * endpoint and storage account credentials in the { @ link CloudTableClient } object .
 * @ param client
 * A { @ link CloudTableClient } instance specifying the Table service endpoint and storage account
 * credentials to use .
 * @ param tableName
 * A < code > String < / code > containing the name of the table .
 * @ param options
 * A { @ link TableRequestOptions } object that specifies execution options such as retry policy and timeout
 * settings for the operation .
 * @ param opContext
 * An { @ link OperationContext } object for tracking the current operation .
 * @ return
 * An < code > ArrayList < / code > of { @ link TableResult } containing the results of executing the operation .
 * @ throws StorageException
 * if an error occurs in the storage operation . */
protected ArrayList < TableResult > execute ( final CloudTableClient client , final String tableName , final TableRequestOptions options , final OperationContext opContext ) throws StorageException { } }

implementation: Utility . assertNotNullOrEmpty ( TableConstants . TABLE_NAME , tableName ) ; if ( this . size ( ) == 0 ) { throw new IllegalArgumentException ( SR . EMPTY_BATCH_NOT_ALLOWED ) ; } return ExecutionEngine . executeWithRetry ( client , this , this . executeImpl ( client , tableName , options , opContext ) , options . getRetryPolicyFactory ( ) , opContext ) ;


signature:
public class StorageCredentialsSharedAccessSignature { /** * Transforms a resource URI into a shared access signature URI , by appending a shared access token and using the
 * specified operation context .
 * @ param resourceUri
 * A < code > java . net . URI < / code > object that represents the resource URI to be transformed .
 * @ param opContext
 * An { @ link OperationContext } object that represents the context for the current operation . This object
 * is used to track requests to the storage service , and to provide additional runtime information about
 * the operation .
 * @ return A < code > java . net . URI < / code > object that represents the signature , including the resource URI and the
 * shared access token .
 * @ throws StorageException
 * If a storage service error occurred .
 * @ throws URISyntaxException
 * If the resource URI is not properly formatted . */
@ Override public URI transformUri ( final URI resourceUri , final OperationContext opContext ) throws URISyntaxException , StorageException { } }

implementation:
if ( resourceUri == null ) { return null ; } if ( this . isHttpsOnly ( ) && ! resourceUri . getScheme ( ) . equals ( Constants . HTTPS ) ) { throw new IllegalArgumentException ( SR . CANNOT_TRANSFORM_NON_HTTPS_URI_WITH_HTTPS_ONLY_CREDENTIALS ) ; } // append the sas token to the resource uri
URI sasUri = PathUtility . addToQuery ( resourceUri , this . token ) ; // append the api version parameter to the sas uri
String apiVersion = Constants . QueryConstants . API_VERSION + "=" + Constants . HeaderConstants . TARGET_STORAGE_VERSION ; return PathUtility . addToQuery ( sasUri , apiVersion ) ;


signature:
public class StorageCredentialsSharedAccessSignature { /** * Transforms a resource URI into a shared access signature URI , by appending a shared access token and using the
 * specified operation context .
 * @ param resourceUri
 * A < code > StorageUri < / code > object that represents the resource URI to be transformed .
 * @ param opContext
 * An { @ link OperationContext } object that represents the context for the current operation . This object
 * is used to track requests to the storage service , and to provide additional runtime information about
 * the operation .
 * @ return A < code > StorageUri < / code > object that represents the signature , including the resource URI and the
 * shared access token .
 * @ throws StorageException
 * If a storage service error occurred .
 * @ throws URISyntaxException
 * If the resource URI is not properly formatted . */
@ Override public StorageUri transformUri ( StorageUri resourceUri , OperationContext opContext ) throws URISyntaxException , StorageException { } }

implementation: return new StorageUri ( this . transformUri ( resourceUri . getPrimaryUri ( ) , opContext ) , this . transformUri ( resourceUri . getSecondaryUri ( ) , opContext ) ) ;


signature:
public class TableResponse { /** * Reserved for internal use . A static factory method that constructs a { @ link ResultContinuation } instance from the
 * continuation token information in a table operation response , if any .
 * @ param queryRequest
 * The < code > java . net . HttpURLConnection < code > request response to parse for continuation token
 * information .
 * @ return
 * A { @ link ResultContinuation } instance from continuation token information in the response , or
 * < code > null < / code > if none is found . */
protected static ResultContinuation getTableContinuationFromResponse ( final HttpURLConnection queryRequest ) { } }

implementation: final ResultContinuation retVal = new ResultContinuation ( ) ; retVal . setContinuationType ( ResultContinuationType . TABLE ) ; boolean foundToken = false ; String tString = queryRequest . getHeaderField ( TableConstants . TABLE_SERVICE_PREFIX_FOR_TABLE_CONTINUATION . concat ( TableConstants . TABLE_SERVICE_NEXT_PARTITION_KEY ) ) ; if ( tString != null ) { retVal . setNextPartitionKey ( tString ) ; foundToken = true ; } tString = queryRequest . getHeaderField ( TableConstants . TABLE_SERVICE_PREFIX_FOR_TABLE_CONTINUATION . concat ( TableConstants . TABLE_SERVICE_NEXT_ROW_KEY ) ) ; if ( tString != null ) { retVal . setNextRowKey ( tString ) ; foundToken = true ; } tString = queryRequest . getHeaderField ( TableConstants . TABLE_SERVICE_PREFIX_FOR_TABLE_CONTINUATION . concat ( TableConstants . TABLE_SERVICE_NEXT_MARKER ) ) ; if ( tString != null ) { retVal . setNextMarker ( tString ) ; foundToken = true ; } tString = queryRequest . getHeaderField ( TableConstants . TABLE_SERVICE_PREFIX_FOR_TABLE_CONTINUATION . concat ( TableConstants . TABLE_SERVICE_NEXT_TABLE_NAME ) ) ; if ( tString != null ) { retVal . setNextTableName ( tString ) ; foundToken = true ; } return foundToken ? retVal : null ;


signature:
public class CloudFileShare { /** * Creates the share using the specified options and operation context .
 * @ param options
 * A { @ link FileRequestOptions } object that specifies any additional options for the request . Specifying
 * < code > null < / code > will use the default request options from the associated service client (
 * { @ link CloudFileClient } ) .
 * @ param opContext
 * An { @ link OperationContext } object that represents the context for the current operation . This object
 * is used to track requests to the storage service , and to provide additional runtime information about
 * the operation .
 * @ throws StorageException
 * If a storage service error occurred . */
@ DoesServiceRequest public void create ( FileRequestOptions options , OperationContext opContext ) throws StorageException { } }

implementation: if ( opContext == null ) { opContext = new OperationContext ( ) ; } assertNoSnapshot ( ) ; if ( this . properties != null && this . properties . getShareQuota ( ) != null ) { Utility . assertInBounds ( "Share Quota" , this . properties . getShareQuota ( ) , 1 , FileConstants . MAX_SHARE_QUOTA ) ; } opContext . initialize ( ) ; options = FileRequestOptions . populateAndApplyDefaults ( options , this . fileServiceClient ) ; ExecutionEngine . executeWithRetry ( this . fileServiceClient , this , createImpl ( options ) , options . getRetryPolicyFactory ( ) , opContext ) ;


signature:
public class CloudFileShare { /** * Deletes the share using the specified snapshot and request options , and operation context .
 * A share that has snapshots cannot be deleted unless the snapshots are also deleted . If a share has snapshots , use
 * the { @ link DeleteShareSnapshotsOption # INCLUDE _ SNAPSHOTS } value
 * in the < code > deleteSnapshotsOption < / code > parameter to include the snapshots when deleting the base share .
 * @ param deleteSnapshotsOption
 * A { @ link DeleteShareSnapshotsOption } object that indicates whether to delete only snapshots , or the share
 * and its snapshots .
 * @ param accessCondition
 * An { @ link AccessCondition } object that represents the access conditions for the share .
 * @ param options
 * A { @ link FileRequestOptions } object that specifies any additional options for the request . Specifying
 * < code > null < / code > will use the default request options from the associated service client (
 * { @ link CloudFileClient } ) .
 * @ param opContext
 * An { @ link OperationContext } object that represents the context for the current operation . This object
 * is used to track requests to the storage service , and to provide additional runtime information about
 * the operation .
 * @ throws StorageException
 * If a storage service error occurred . */
@ DoesServiceRequest public void delete ( DeleteShareSnapshotsOption deleteSnapshotsOption , AccessCondition accessCondition , FileRequestOptions options , OperationContext opContext ) throws StorageException { } }

implementation: if ( opContext == null ) { opContext = new OperationContext ( ) ; } opContext . initialize ( ) ; options = FileRequestOptions . populateAndApplyDefaults ( options , this . fileServiceClient ) ; ExecutionEngine . executeWithRetry ( this . fileServiceClient , this , deleteImpl ( deleteSnapshotsOption , accessCondition , options ) , options . getRetryPolicyFactory ( ) , opContext ) ;


signature:
public class CloudFileShare { /** * Deletes the share if it exists using the specified request options and operation context .
 * @ param accessCondition
 * An { @ link AccessCondition } object that represents the access conditions for the share .
 * @ param options
 * A { @ link FileRequestOptions } object that specifies any additional options for the request . Specifying
 * < code > null < / code > will use the default request options from the associated service client (
 * { @ link CloudFileClient } ) .
 * @ param opContext
 * An { @ link OperationContext } object that represents the context for the current operation . This object
 * is used to track requests to the storage service , and to provide additional runtime information about
 * the operation .
 * @ return < code > true < / code > if the share existed and was deleted ; otherwise , < code > false < / code > .
 * @ throws StorageException
 * If a storage service error occurred . */
@ DoesServiceRequest public boolean deleteIfExists ( AccessCondition accessCondition , FileRequestOptions options , OperationContext opContext ) throws StorageException { } }

implementation: return this . deleteIfExists ( DeleteShareSnapshotsOption . NONE , accessCondition , options , opContext ) ;


signature:
public class CloudFileShare { /** * Downloads the permissions settings for the share using the specified request options and operation context .
 * @ param accessCondition
 * An { @ link AccessCondition } object that represents the access conditions for the share .
 * @ param options
 * A { @ link FileRequestOptions } object that specifies any additional options for the request . Specifying
 * < code > null < / code > will use the default request options from the associated service client (
 * { @ link CloudFileClient } ) .
 * @ param opContext
 * An { @ link OperationContext } object that represents the context for the current operation . This object
 * is used to track requests to the storage service , and to provide additional runtime information about
 * the operation .
 * @ return A { @ link FileSharePermissions } object that represents the share ' s permissions .
 * @ throws StorageException
 * If a storage service error occurred . */
@ DoesServiceRequest public FileSharePermissions downloadPermissions ( AccessCondition accessCondition , FileRequestOptions options , OperationContext opContext ) throws StorageException { } }

implementation: if ( opContext == null ) { opContext = new OperationContext ( ) ; } assertNoSnapshot ( ) ; opContext . initialize ( ) ; options = FileRequestOptions . populateAndApplyDefaults ( options , this . fileServiceClient ) ; return ExecutionEngine . executeWithRetry ( this . fileServiceClient , this , downloadPermissionsImpl ( accessCondition , options ) , options . getRetryPolicyFactory ( ) , opContext ) ;


signature:
public class CloudFileShare { /** * Creates a snapshot of the file share using the specified request options and operation context .
 * @ param accessCondition
 * An { @ link AccessCondition } object that represents the access conditions for the share .
 * @ param options
 * A { @ link FileRequestOptions } object that specifies any additional options for the request . Specifying
 * < code > null < / code > will use the default request options from the associated service client (
 * { @ link CloudFileClient } ) .
 * @ param opContext
 * An { @ link OperationContext } object that represents the context for the current operation . This object
 * is used to track requests to the storage service , and to provide additional runtime information about
 * the operation .
 * @ return A < code > CloudFileShare < / code > object that represents the snapshot of the file share .
 * @ throws StorageException
 * If a storage service error occurred . */
@ DoesServiceRequest public final CloudFileShare createSnapshot ( final AccessCondition accessCondition , FileRequestOptions options , OperationContext opContext ) throws StorageException { } }

implementation:
return this . createSnapshot ( null /* metadata */
, accessCondition , options , opContext ) ;


signature:
public class CloudFileShare { /** * Creates a snapshot of the file share using the specified request options and operation context .
 * @ param metadata
 * A collection of name - value pairs defining the metadata of the snapshot , or null .
 * @ param accessCondition
 * An { @ link AccessCondition } object that represents the access conditions for the file share .
 * @ param options
 * A { @ link FileRequestOptions } object that specifies any additional options for the request . Specifying
 * < code > null < / code > will use the default request options from the associated service client (
 * { @ link CloudFileClient } ) .
 * @ param opContext
 * An { @ link OperationContext } object that represents the context for the current operation . This object
 * is used to track requests to the storage service , and to provide additional runtime information about
 * the operation .
 * @ return A < code > CloudFileShare < / code > object that represents the snapshot of the file share .
 * @ throws StorageException
 * If a storage service error occurred . */
@ DoesServiceRequest public final CloudFileShare createSnapshot ( final HashMap < String , String > metadata , final AccessCondition accessCondition , FileRequestOptions options , OperationContext opContext ) throws StorageException { } }

implementation: assertNoSnapshot ( ) ; if ( opContext == null ) { opContext = new OperationContext ( ) ; } opContext . initialize ( ) ; options = FileRequestOptions . populateAndApplyDefaults ( options , this . fileServiceClient ) ; return ExecutionEngine . executeWithRetry ( this . fileServiceClient , this , this . createSnapshotImpl ( metadata , accessCondition , options ) , options . getRetryPolicyFactory ( ) , opContext ) ;


signature:
public class CloudFileShare { /** * Queries the service for this share ' s { @ link ShareStats } .
 * @ param options
 * A { @ link FileRequestOptions } object that specifies any additional options for the request . Specifying
 * < code > null < / code > will use the default request options from the associated service client
 * ( { @ link CloudFileClient } ) .
 * @ param opContext
 * An { @ link OperationContext } object that represents the context for the current operation . This object
 * is used to track requests to the storage service , and to provide additional runtime information about
 * the operation .
 * @ return A { @ link ShareStats } object for the given storage service .
 * @ throws StorageException
 * If a storage service error occurred . */
@ DoesServiceRequest public ShareStats getStats ( FileRequestOptions options , OperationContext opContext ) throws StorageException { } }

implementation: if ( opContext == null ) { opContext = new OperationContext ( ) ; } assertNoSnapshot ( ) ; opContext . initialize ( ) ; options = FileRequestOptions . populateAndApplyDefaults ( options , this . fileServiceClient ) ; return ExecutionEngine . executeWithRetry ( this . fileServiceClient , this , getStatsImpl ( options ) , options . getRetryPolicyFactory ( ) , opContext ) ;


signature:
public class CloudFileShare { /** * Returns a shared access signature for the share . Note this does not contain the leading " ? " .
 * @ param policy
 * An { @ link SharedAccessFilePolicy } object that represents the access policy for the
 * shared access signature .
 * @ param groupPolicyIdentifier
 * A < code > String < / code > which represents the share - level access policy .
 * @ param ipRange
 * A { @ link IPRange } object containing the range of allowed IP addresses .
 * @ param protocols
 * A { @ link SharedAccessProtocols } representing the allowed Internet protocols .
 * @ return A < code > String < / code > which represents a shared access signature for the share .
 * @ throws StorageException
 * If a storage service error occurred .
 * @ throws InvalidKeyException
 * If the key is invalid . */
public String generateSharedAccessSignature ( final SharedAccessFilePolicy policy , final String groupPolicyIdentifier , final IPRange ipRange , final SharedAccessProtocols protocols ) throws InvalidKeyException , StorageException { } }

implementation:
if ( ! StorageCredentialsHelper . canCredentialsSignRequest ( this . fileServiceClient . getCredentials ( ) ) ) { final String errorMessage = SR . CANNOT_CREATE_SAS_WITHOUT_ACCOUNT_KEY ; throw new IllegalArgumentException ( errorMessage ) ; } final String resourceName = this . getSharedAccessCanonicalName ( ) ; final String signature = SharedAccessSignatureHelper . generateSharedAccessSignatureHashForBlobAndFile ( policy , null /* SharedAccessHeaders */
, groupPolicyIdentifier , resourceName , ipRange , protocols , this . fileServiceClient ) ; final UriQueryBuilder builder = SharedAccessSignatureHelper . generateSharedAccessSignatureForBlobAndFile ( policy , null /* SharedAccessHeaders */
, groupPolicyIdentifier , "s" , ipRange , protocols , signature ) ; return builder . toString ( ) ;


signature:
public class CloudFileShare { /** * Returns the canonical name for shared access .
 * @ return the canonical name for shared access . */
private String getSharedAccessCanonicalName ( ) { } }

implementation: String accountName = this . getServiceClient ( ) . getCredentials ( ) . getAccountName ( ) ; String shareName = this . getName ( ) ; return String . format ( "/%s/%s/%s" , SR . FILE , accountName , shareName ) ;


signature:
public class CloudFileShare { /** * Updates the share ' s properties using the request options , and operation context .
 * Use { @ link CloudFileShare # downloadAttributes } to retrieve the latest values for
 * the share ' s properties and metadata from the Microsoft Azure storage service .
 * @ param accessCondition
 * An { @ link AccessCondition } object that represents the access conditions for the share .
 * @ param options
 * A { @ link FileRequestOptions } object that specifies any additional options for the request . Specifying
 * < code > null < / code > will use the default request options from the associated service client (
 * { @ link CloudFileClient } ) .
 * @ param opContext
 * An { @ link OperationContext } object that represents the context for the current operation . This object
 * is used to track requests to the storage service , and to provide additional runtime information about
 * the operation .
 * @ throws StorageException
 * If a storage service error occurred . */
@ DoesServiceRequest public final void uploadProperties ( AccessCondition accessCondition , FileRequestOptions options , OperationContext opContext ) throws StorageException { } }

implementation: assertNoSnapshot ( ) ; if ( this . properties != null && this . properties . getShareQuota ( ) != null ) { Utility . assertInBounds ( "Share Quota" , this . properties . getShareQuota ( ) , 1 , FileConstants . MAX_SHARE_QUOTA ) ; } if ( opContext == null ) { opContext = new OperationContext ( ) ; } opContext . initialize ( ) ; options = FileRequestOptions . populateAndApplyDefaults ( options , this . fileServiceClient ) ; ExecutionEngine . executeWithRetry ( this . fileServiceClient , this , this . uploadPropertiesImpl ( accessCondition , options ) , options . getRetryPolicyFactory ( ) , opContext ) ;


signature:
public class CloudFileShare { /** * Uploads the share ' s permissions .
 * @ param permissions
 * A { @ link FileSharePermissions } object that represents the permissions to upload .
 * @ throws StorageException
 * If a storage service error occurred . */
@ DoesServiceRequest public void uploadPermissions ( final FileSharePermissions permissions ) throws StorageException { } }

implementation:
this . uploadPermissions ( permissions , null /* accessCondition */
, null /* options */
, null /* opContext */
) ;


signature:
public class CloudFileShare { /** * Uploads the share ' s permissions using the specified request options and operation context .
 * @ param permissions
 * A { @ link FileSharePermissions } object that represents the permissions to upload .
 * @ param accessCondition
 * An { @ link AccessCondition } object that represents the access conditions for the share .
 * @ param options
 * A { @ link FileRequestOptions } object that specifies any additional options for the request . Specifying
 * < code > null < / code > will use the default request options from the associated service client (
 * { @ link CloudFileClient } ) .
 * @ param opContext
 * An { @ link OperationContext } object that represents the context for the current operation . This object
 * is used to track requests to the storage service , and to provide additional runtime information about
 * the operation .
 * @ throws StorageException
 * If a storage service error occurred . */
@ DoesServiceRequest public void uploadPermissions ( final FileSharePermissions permissions , final AccessCondition accessCondition , FileRequestOptions options , OperationContext opContext ) throws StorageException { } }

implementation: assertNoSnapshot ( ) ; if ( opContext == null ) { opContext = new OperationContext ( ) ; } opContext . initialize ( ) ; options = FileRequestOptions . populateAndApplyDefaults ( options , this . fileServiceClient ) ; ExecutionEngine . executeWithRetry ( this . fileServiceClient , this , uploadPermissionsImpl ( permissions , accessCondition , options ) , options . getRetryPolicyFactory ( ) , opContext ) ;


signature:
public class CloudFileShare { /** * Returns the snapshot or shared access signature qualified URI for this share .
 * @ return A < code > java . net . URI < / code > object that represents the snapshot or shared access signature .
 * @ throws StorageException
 * If a storage service error occurred .
 * @ throws URISyntaxException
 * If the resource URI is invalid . */
public final URI getQualifiedUri ( ) throws URISyntaxException , StorageException { } }

implementation: if ( this . isSnapshot ( ) ) { return PathUtility . addToQuery ( this . getUri ( ) , String . format ( "sharesnapshot=%s" , this . snapshotID ) ) ; } return this . fileServiceClient . getCredentials ( ) . transformUri ( this . getUri ( ) ) ;


signature:
public class TableGettingStartedTask { /** * Illustrates how to form and execute a single insert operation .
 * @ throws StorageException */
public void BasicInsertEntity ( ) throws StorageException { } }

implementation:
// Note : the limitations on an insert operation are
// - the serialized payload must be 1 MB or less
// - up to 252 properties in addition to the partition key , row key and
// timestamp . 255 properties in total
// - the serialized payload of each property must be 64 KB or less
// Create a new customer entity .
CustomerEntity customer1 = new CustomerEntity ( "Harp" , "Walter" ) ; customer1 . setEmail ( "Walter@contoso.com" ) ; customer1 . setPhoneNumber ( "425-555-0101" ) ; // Create an operation to add the new customer to the tablebasics table .
TableOperation insertCustomer1 = TableOperation . insert ( customer1 ) ; // Submit the operation to the table service .
table . execute ( insertCustomer1 ) ;


signature:
public class TableGettingStartedTask { /** * Illustrates how to form and execute a batch operation .
 * @ throws StorageException */
public void BasicBatch ( ) throws StorageException { } }

implementation:
// Note : the limitations on a batch operation are
// - up to 100 operations
// - all operations must share the same PartitionKey
// - if a retrieve is used it can be the only operation in the batch
// - the serialized batch payload must be 4 MB or less
// Define a batch operation .
TableBatchOperation batchOperation = new TableBatchOperation ( ) ; // Create a customer entity to add to the table .
CustomerEntity customer = new CustomerEntity ( "Smith" , "Jeff" ) ; customer . setEmail ( "Jeff@contoso.com" ) ; customer . setPhoneNumber ( "425-555-0104" ) ; batchOperation . insert ( customer ) ; // Create another customer entity to add to the table .
CustomerEntity customer2 = new CustomerEntity ( "Smith" , "Ben" ) ; customer2 . setEmail ( "Ben@contoso.com" ) ; customer2 . setPhoneNumber ( "425-555-0102" ) ; batchOperation . insert ( customer2 ) ; // Create a third customer entity to add to the table .
CustomerEntity customer3 = new CustomerEntity ( "Smith" , "Denise" ) ; customer3 . setEmail ( "Denise@contoso.com" ) ; customer3 . setPhoneNumber ( "425-555-0103" ) ; batchOperation . insert ( customer3 ) ; // Execute the batch of operations on the " tablebasics " table .
table . execute ( batchOperation ) ;


signature:
public class TableGettingStartedTask { /** * Illustrates how to form and execute a query operation .
 * @ throws StorageException */
public void BasicQuery ( ) throws StorageException { } }

implementation:
// Retrieve a single entity .
// Retrieve the entity with partition key of " Smith " and row key of
// " Jeff " .
TableOperation retrieveSmithJeff = TableOperation . retrieve ( "Smith" , "Jeff" , CustomerEntity . class ) ; // Submit the operation to the table service and get the specific
// entity .
@ SuppressWarnings ( "unused" ) CustomerEntity specificEntity = table . execute ( retrieveSmithJeff ) . getResultAsType ( ) ; // Retrieve all entities in a partition .
// Create a filter condition where the partition key is " Smith " .
String partitionFilter = TableQuery . generateFilterCondition ( "PartitionKey" , QueryComparisons . EQUAL , "Smith" ) ; // Specify a partition query , using " Smith " as the partition key filter .
TableQuery < CustomerEntity > partitionQuery = TableQuery . from ( CustomerEntity . class ) . where ( partitionFilter ) ; // Loop through the results , displaying information about the entity .
for ( CustomerEntity entity : table . execute ( partitionQuery ) ) { act . outputText ( view , entity . getPartitionKey ( ) + " " + entity . getRowKey ( ) + "\t" + entity . getEmail ( ) + "\t" + entity . getPhoneNumber ( ) ) ; }


signature:
public class TableGettingStartedTask { /** * Illustrates how to form and execute an upsert operation .
 * @ throws StorageException */
public void BasicUpsert ( ) throws StorageException { } }

implementation:
// Retrieve the entity with partition key of " Smith " and row key of
// " Jeff " .
TableOperation retrieveSmithJeff = TableOperation . retrieve ( "Smith" , "Jeff" , CustomerEntity . class ) ; // Submit the operation to the table service and get the specific
// entity .
CustomerEntity specificEntity = table . execute ( retrieveSmithJeff ) . getResultAsType ( ) ; // Specify a new phone number .
specificEntity . setPhoneNumber ( "425-555-0105" ) ; // Create an operation to replace the entity .
TableOperation replaceEntity = TableOperation . merge ( specificEntity ) ; // Submit the operation to the table service .
table . execute ( replaceEntity ) ;


signature:
public class TableGettingStartedTask { /** * Illustrates how to form and execute an entity delete operation .
 * @ throws StorageException */
public void BasicDeleteEntity ( ) throws StorageException { } }

implementation:
// Create an operation to retrieve the entity with partition key of
// " Smith " and row key of " Jeff " .
TableOperation retrieveSmithJeff = TableOperation . retrieve ( "Smith" , "Jeff" , CustomerEntity . class ) ; // Retrieve the entity with partition key of " Smith " and row key of
// " Jeff " .
CustomerEntity entitySmithJeff = table . execute ( retrieveSmithJeff ) . getResultAsType ( ) ; // Create an operation to delete the entity .
TableOperation deleteSmithJeff = TableOperation . delete ( entitySmithJeff ) ; // Submit the delete operation to the table service .
table . execute ( deleteSmithJeff ) ;


signature:
public class TableGettingStartedTask { /** * Illustrates how to list the tables . */
public void BasicListing ( ) { } }

implementation:
// List the tables with a given prefix .
Iterable < String > listTables = tableClient . listTables ( tableName , null , null ) ; for ( String s : listTables ) { act . outputText ( view , String . format ( "List of tables: %s" , s ) ) ; }


signature:
public class CloudTableClient { /** * Lists the table names in the storage account that match the specified prefix .
 * This method invokes the < a href = " http : / / msdn . microsoft . com / en - us / library / azure / dd179405 . aspx " > Query Tables < / a >
 * REST API to list the table names that match the prefix , using the Table service endpoint and storage account
 * credentials of this instance .
 * @ param prefix
 * A < code > String < / code > containing the prefix to match on table names to return .
 * @ return
 * An < code > Iterable < / code > collection of the table names in the storage account retrieved lazily that match
 * the specified prefix . */
@ DoesServiceRequest public Iterable < String > listTables ( final String prefix ) { } }

implementation:
return this . listTables ( prefix , null /* options */
, null /* opContext */
) ;


signature:
public class CloudTableClient { /** * Lists the table names in the storage account that match the specified prefix , using the specified
 * { @ link TableRequestOptions } and { @ link OperationContext } .
 * This method invokes the < a href = " http : / / msdn . microsoft . com / en - us / library / azure / dd179405 . aspx " > Query Tables < / a >
 * REST API to list the table names that match the prefix , using the Table service endpoint and storage account
 * credentials of this instance .
 * Use the { @ link TableRequestOptions } to override execution options such as the timeout or retry policy for the
 * operation .
 * @ param prefix
 * A < code > String < / code > containing the prefix to match on table names to return .
 * @ param options
 * A { @ link TableRequestOptions } object that specifies execution options such as retry policy and timeout
 * settings for the operation . Specify < code > null < / code > to use the request options specified on the
 * { @ link CloudTableClient } .
 * @ param opContext
 * An { @ link OperationContext } object for tracking the current operation . Specify < code > null < / code > to
 * safely ignore operation context .
 * @ return
 * An < code > Iterable < / code > collection of the table names in the storage account retrieved lazily that match
 * the specified
 * prefix . */
@ SuppressWarnings ( "unchecked" ) @ DoesServiceRequest public Iterable < String > listTables ( final String prefix , final TableRequestOptions options , final OperationContext opContext ) { } }

implementation: return ( Iterable < String > ) this . generateIteratorForQuery ( this . generateListTablesQuery ( prefix ) , this . tableNameResolver , options , opContext ) ;


signature:
public class CloudTableClient { /** * Lists the table names in the storage account that match the specified prefix in segmented mode . This method
 * allows listing of tables to be resumed after returning a partial set of results , using information returned by
 * the server in the { @ link ResultSegment } object .
 * This method invokes the < a href = " http : / / msdn . microsoft . com / en - us / library / azure / dd179405 . aspx " > Query Tables < / a >
 * REST API to list the table names that match the prefix , using the Table service endpoint and storage account
 * credentials of this instance .
 * @ param prefix
 * A < code > String < / code > containing the prefix to match on table names to return .
 * @ return
 * A { @ link ResultSegment } of < code > String < / code > objects containing table names matching the prefix in the
 * storage account .
 * @ throws StorageException
 * if a storage service error occurred during the operation . */
@ DoesServiceRequest public ResultSegment < String > listTablesSegmented ( final String prefix ) throws StorageException { } }

implementation:
return this . listTablesSegmented ( prefix , null /* maxResults */
, null /* continuationToken */
, null /* options */
, null /* opContext */
) ;


signature:
public class CloudTableClient { /** * Lists up to the specified maximum of the table names in the storage account that match the specified prefix in a
 * resumable mode with the specified { @ link ResultContinuation } continuation token , using the specified
 * { @ link TableRequestOptions } and { @ link OperationContext } . This method allows listing of tables to be resumed
 * after returning a page of results , using information returned by the server in the { @ link ResultSegment } object .
 * This method invokes the < a href = " http : / / msdn . microsoft . com / en - us / library / azure / dd179405 . aspx " > Query Tables < / a >
 * REST API to list the table names that match the prefix , using the Table service endpoint and storage account
 * credentials of this instance .
 * Use the { @ link TableRequestOptions } to override execution options such as the timeout or retry policy for the
 * operation .
 * @ param prefix
 * A < code > String < / code > containing the prefix to match on table names to return .
 * @ param maxResults
 * The maximum number of table names to return in the { @ link ResultSegment } . If this parameter is null ,
 * the query will list up to the maximum 1,000 results .
 * @ param continuationToken
 * A { @ link ResultContinuation } object representing a continuation token from the server when the
 * operation returns a partial result . Specify < code > null < / code > on the initial call . Call the
 * { @ link ResultSegment # getContinuationToken ( ) } method on the result to obtain the
 * { @ link ResultContinuation } object to use in the next call to resume the query .
 * @ param options
 * A { @ link TableRequestOptions } object that specifies execution options such as retry policy and timeout
 * settings for the operation . Specify < code > null < / code > to use the request options specified on the
 * { @ link CloudTableClient } .
 * @ param opContext
 * An { @ link OperationContext } object for tracking the current operation . Specify < code > null < / code > to
 * safely ignore operation context .
 * @ return
 * A { @ link ResultSegment } of < code > String < / code > objects containing table names in the storage account .
 * @ throws StorageException
 * if a storage service error occurred during the operation . */
@ SuppressWarnings ( "unchecked" ) @ DoesServiceRequest public ResultSegment < String > listTablesSegmented ( final String prefix , final Integer maxResults , final ResultContinuation continuationToken , final TableRequestOptions options , final OperationContext opContext ) throws StorageException { } }

implementation: if ( null != maxResults ) { Utility . assertGreaterThanOrEqual ( "maxResults" , maxResults , 1 ) ; } return ( ResultSegment < String > ) this . executeQuerySegmentedImpl ( this . generateListTablesQuery ( prefix ) . take ( maxResults ) , this . tableNameResolver , continuationToken , options , opContext ) ;


signature:
public class CloudTableClient { /** * Reserved for internal use . Generates a query to list table names with the given prefix .
 * @ param prefix
 * A < code > String < / code > containing the prefix to match on table names to return .
 * @ return
 * A { @ link TableQuery } instance for listing table names with the specified prefix . */
private TableQuery < TableServiceEntity > generateListTablesQuery ( final String prefix ) { } }

implementation:
TableQuery < TableServiceEntity > listQuery = TableQuery . < TableServiceEntity > from ( TableServiceEntity . class ) ; listQuery . setSourceTableName ( TableConstants . TABLES_SERVICE_TABLES_NAME ) ; if ( ! Utility . isNullOrEmpty ( prefix ) ) { // Append Max char to end ' { ' is 1 + ' z ' in AsciiTable > uppperBound = prefix + ' { '
final String prefixFilter = String . format ( "(%s ge '%s') and (%s lt '%s{')" , TableConstants . TABLE_NAME , prefix , TableConstants . TABLE_NAME , prefix ) ; listQuery = listQuery . where ( prefixFilter ) ; } return listQuery ;


signature:
public class CloudTableClient { /** * Reserved for internal use . Executes a segmented query operation using the specified retry and timeout policies .
 * @ param queryToExecute
 * The { @ link TableQuery } to execute .
 * @ param resolver
 * An { @ link EntityResolver } instance which creates a projection of the table query result entities into
 * the specified type < code > R < / code > . Pass < code > null < / code > to return the results as the table entity
 * type .
 * @ param continuationToken
 * The { @ link ResultContinuation } to pass with the operation to resume a query , if any . Pass
 * < code > null < / code > for an initial query .
 * @ param options
 * A { @ link TableRequestOptions } object that specifies execution options such as retry policy and timeout
 * settings for the operation . Specify < code > null < / code > to use the request options specified on the
 * { @ link CloudTableClient } .
 * @ param opContext
 * An { @ link OperationContext } object for tracking the current operation . Specify < code > null < / code > to
 * safely ignore operation context .
 * @ return
 * A { @ link ResultSegment } containing a collection of the query results specialized for the
 * { @ link TableEntity } or { @ link EntityResolver } type returned by the query .
 * @ throws StorageException
 * if a Storage service error occurs . */
protected < T extends TableEntity , R > ResultSegment < ? > executeQuerySegmentedImpl ( final TableQuery < T > queryToExecute , final EntityResolver < R > resolver , final ResultContinuation continuationToken , TableRequestOptions options , OperationContext opContext ) throws StorageException { } }

implementation: if ( opContext == null ) { opContext = new OperationContext ( ) ; } opContext . initialize ( ) ; options = TableRequestOptions . populateAndApplyDefaults ( options , this ) ; Utility . assertContinuationType ( continuationToken , ResultContinuationType . TABLE ) ; SegmentedStorageRequest segmentedRequest = new SegmentedStorageRequest ( ) ; segmentedRequest . setToken ( continuationToken ) ; return ExecutionEngine . executeWithRetry ( this , queryToExecute , this . executeQuerySegmentedWithResolverCoreImpl ( queryToExecute , resolver , options , segmentedRequest ) , options . getRetryPolicyFactory ( ) , opContext ) ;


signature:
public class CloudTableClient { /** * Reserved for internal use . Generates an iterator for a segmented query operation .
 * @ param queryRef
 * The { @ link TableQuery } to execute .
 * @ param resolver
 * An { @ link EntityResolver } instance which creates a projection of the table query result entities into
 * the specified type < code > R < / code > . Pass < code > null < / code > to return the results as the table entity
 * type .
 * @ param options
 * A { @ link TableRequestOptions } object that specifies execution options such as retry policy and timeout
 * settings for the operation . Specify < code > null < / code > to use the request options specified on the
 * { @ link CloudTableClient } .
 * @ param opContext
 * An { @ link OperationContext } object for tracking the current operation . Specify < code > null < / code > to
 * safely ignore operation context .
 * @ return
 * An instance of < code > Iterable < / code > specialized for the { @ link TableEntity } or { @ link EntityResolver }
 * type returned by the query . */
protected < T extends TableEntity , R > Iterable < ? > generateIteratorForQuery ( final TableQuery < T > queryRef , final EntityResolver < R > resolver , TableRequestOptions options , OperationContext opContext ) { } }

implementation: if ( opContext == null ) { opContext = new OperationContext ( ) ; } opContext . initialize ( ) ; options = TableRequestOptions . populateAndApplyDefaults ( options , this ) ; SegmentedStorageRequest segmentedRequest = new SegmentedStorageRequest ( ) ; if ( resolver == null ) { return new LazySegmentedIterable < CloudTableClient , TableQuery < T > , T > ( this . executeQuerySegmentedCoreImpl ( queryRef , resolver , options , segmentedRequest ) , this , queryRef , options . getRetryPolicyFactory ( ) , opContext ) ; } else { return new LazySegmentedIterable < CloudTableClient , TableQuery < T > , R > ( this . executeQuerySegmentedWithResolverCoreImpl ( queryRef , resolver , options , segmentedRequest ) , this , queryRef , options . getRetryPolicyFactory ( ) , opContext ) ; }


signature:
public class CloudTableClient { /** * Queries the given storage service for the { @ link ServiceStats } .
 * @ param options
 * A { @ link BlobRequestOptions } object that specifies any additional options for the request . Specifying
 * < code > null < / code > will use the default request options from the associated service client (
 * { @ link CloudBlobClient } ) .
 * @ param opContext
 * An { @ link OperationContext } object that represents the context for the current operation . This object
 * is used to track requests to the storage service , and to provide additional runtime information about
 * the operation .
 * @ return { @ link ServiceStats } for the given storage service
 * @ throws StorageException
 * If a storage service error occurred . */
@ DoesServiceRequest public ServiceStats getServiceStats ( TableRequestOptions options , OperationContext opContext ) throws StorageException { } }

implementation: if ( opContext == null ) { opContext = new OperationContext ( ) ; } opContext . initialize ( ) ; options = TableRequestOptions . populateAndApplyDefaults ( options , this ) ; return ExecutionEngine . executeWithRetry ( this , null , this . getServiceStatsImpl ( options , true ) , options . getRetryPolicyFactory ( ) , opContext ) ;


signature:
public class CloudTableClient { /** * Retrieves the current { @ link ServiceProperties } for the given storage service . This includes Logging ,
 * HourMetrics , MinuteMetrics and CORS configurations .
 * @ param options
 * A { @ link BlobRequestOptions } object that specifies any additional options for the request . Specifying
 * < code > null < / code > will use the default request options from the associated service client (
 * { @ link CloudBlobClient } ) .
 * @ param opContext
 * An { @ link OperationContext } object that represents the context for the current operation . This object
 * is used to track requests to the storage service , and to provide additional runtime information about
 * the operation .
 * @ return the { @ link ServiceProperties } object representing the current configuration of the service .
 * @ throws StorageException
 * If a storage service error occurred . */
@ DoesServiceRequest public final ServiceProperties downloadServiceProperties ( TableRequestOptions options , OperationContext opContext ) throws StorageException { } }

implementation: if ( opContext == null ) { opContext = new OperationContext ( ) ; } opContext . initialize ( ) ; options = TableRequestOptions . populateAndApplyDefaults ( options , this ) ; return ExecutionEngine . executeWithRetry ( this , null , this . downloadServicePropertiesImpl ( options , true ) , options . getRetryPolicyFactory ( ) , opContext ) ;


signature:
public class LogRecord { /** * Populates a LogRecord using the Version 1.0 schema and the given LogRecordStreamReader .
 * @ param reader
 * the LogRecordStreamReader to use to populate the LogRecord .
 * @ throws IOException
 * @ throws ParseException
 * @ throws URISyntaxException */
private void populateVersion1Log ( LogRecordStreamReader reader ) throws IOException , ParseException , URISyntaxException { } }

implementation: this . requestStartTime = reader . readDate ( LogRecord . REQUEST_START_TIME_FORMAT ) ; this . operationType = reader . readString ( ) ; this . requestStatus = reader . readString ( ) ; this . httpStatusCode = reader . readString ( ) ; this . endToEndLatencyInMS = reader . readInteger ( ) ; this . serverLatencyInMS = reader . readInteger ( ) ; this . authenticationType = reader . readString ( ) ; this . requesterAccountName = reader . readString ( ) ; this . ownerAccountName = reader . readString ( ) ; this . serviceType = reader . readString ( ) ; this . requestUrl = reader . readUri ( ) ; this . requestedObjectKey = reader . readQuotedString ( ) ; this . requestIdHeader = reader . readUuid ( ) ; this . operationCount = reader . readInteger ( ) ; this . requesterIPAddress = reader . readString ( ) ; this . requestVersionHeader = reader . readString ( ) ; this . requestHeaderSize = reader . readLong ( ) ; this . requestPacketSize = reader . readLong ( ) ; this . responseHeaderSize = reader . readLong ( ) ; this . responsePacketSize = reader . readLong ( ) ; this . requestContentLength = reader . readLong ( ) ; this . requestMD5 = reader . readQuotedString ( ) ; this . serverMD5 = reader . readQuotedString ( ) ; this . eTagIdentifier = reader . readQuotedString ( ) ; this . lastModifiedTime = reader . readDate ( LogRecord . LAST_MODIFIED_TIME_FORMAT ) ; this . conditionsUsed = reader . readQuotedString ( ) ; this . userAgentHeader = reader . readQuotedString ( ) ; this . referrerHeader = reader . readQuotedString ( ) ; this . clientRequestId = reader . readQuotedString ( ) ; reader . endCurrentRecord ( ) ;


signature:
public class QueueListHandler { /** * Parses the input stream containing the response body of the list queues request result and populates the class
 * data .
 * @ param stream
 * The < code > InputStream < / code > object to deserialize from .
 * @ param serviceClient
 * A { @ link CloudQueueClient } object associated with the storage
 * service .
 * @ throws IOException
 * @ throws SAXException
 * @ throws ParserConfigurationException */
public static ListResponse < CloudQueue > getQueues ( final InputStream stream , final CloudQueueClient serviceClient ) throws SAXException , IOException , ParserConfigurationException { } }

implementation: SAXParser saxParser = Utility . getSAXParser ( ) ; QueueListHandler handler = new QueueListHandler ( serviceClient ) ; saxParser . parse ( stream , handler ) ; return handler . response ;


signature:
public class StorageException { /** * RESERVED FOR INTERNAL USE . Translates the specified exception into a storage exception .
 * @ param cause
 * An < code > Exception < / code > object that represents the exception to translate .
 * @ return A < code > StorageException < / code > object that represents translated exception . */
public static StorageException translateClientException ( final Exception cause ) { } }

implementation: return new StorageException ( "Client error" , "A Client side exception occurred, please check the inner exception for details" , Constants . HeaderConstants . HTTP_UNUSED_306 , null , cause ) ;


signature:
public class StorageException { /** * RESERVED FOR INTERNAL USE . Translates the specified exception into a storage exception .
 * @ param request
 * An < code > HttpURLConnection < / code > object that represents the request whose exception is being
 * translated .
 * @ param cause
 * An < code > Exception < / code > object that represents the exception to translate .
 * @ return A < code > StorageException < / code > object that represents translated exception . */
public static StorageException translateException ( final StorageRequest < ? , ? , ? > request , final Exception cause , final OperationContext opContext ) { } }

implementation:
if ( request == null || request . getConnection ( ) == null ) { return translateClientException ( cause ) ; } if ( cause instanceof SocketException ) { String message = cause == null ? Constants . EMPTY_STRING : cause . getMessage ( ) ; return new StorageException ( StorageErrorCode . SERVICE_INTERNAL_ERROR . toString ( ) , "An unknown failure occurred : " . concat ( message ) , HttpURLConnection . HTTP_INTERNAL_ERROR , null , cause ) ; } StorageException translatedException = null ; String responseMessage = null ; int responseCode = 0 ; try { responseCode = request . getConnection ( ) . getResponseCode ( ) ; responseMessage = request . getConnection ( ) . getResponseMessage ( ) ; } catch ( final IOException e ) { // ignore errors
} if ( responseMessage == null ) { responseMessage = Constants . EMPTY_STRING ; } StorageExtendedErrorInformation extendedError = request . parseErrorDetails ( ) ; if ( extendedError != null ) { // 1 . If extended information is available use it
translatedException = new StorageException ( extendedError . getErrorCode ( ) , responseMessage , responseCode , extendedError , cause ) ; } else { // 2 . If extended information is unavailable , translate exception based
// on status code
translatedException = translateFromHttpStatus ( responseCode , responseMessage , cause ) ; } if ( translatedException != null ) { Utility . logHttpError ( translatedException , opContext ) ; return translatedException ; } else { return new StorageException ( StorageErrorCode . SERVICE_INTERNAL_ERROR . toString ( ) , "The server encountered an unknown failure: " . concat ( responseMessage ) , HttpURLConnection . HTTP_INTERNAL_ERROR , null , cause ) ; }


signature:
public class StorageException { /** * Translates the specified HTTP status code into a storage exception .
 * @ param statusCode
 * The HTTP status code returned by the operation .
 * @ param statusDescription
 * A < code > String < / code > that represents the status description .
 * @ param inner
 * An < code > Exception < / code > object that represents a reference to the initial exception , if one exists .
 * @ return A < code > StorageException < / code > object that represents translated exception . */
protected static StorageException translateFromHttpStatus ( final int statusCode , final String statusDescription , final Exception inner ) { } }

implementation:
String errorCode ; switch ( statusCode ) { case HttpURLConnection . HTTP_FORBIDDEN : errorCode = StorageErrorCode . ACCESS_DENIED . toString ( ) ; break ; case HttpURLConnection . HTTP_GONE : case HttpURLConnection . HTTP_NOT_FOUND : errorCode = StorageErrorCode . RESOURCE_NOT_FOUND . toString ( ) ; break ; case 416 : case HttpURLConnection . HTTP_BAD_REQUEST : // 416 : RequestedRangeNotSatisfiable - No corresponding enum in HttpURLConnection
errorCode = StorageErrorCode . BAD_REQUEST . toString ( ) ; break ; case HttpURLConnection . HTTP_PRECON_FAILED : case HttpURLConnection . HTTP_NOT_MODIFIED : errorCode = StorageErrorCode . CONDITION_FAILED . toString ( ) ; break ; case HttpURLConnection . HTTP_CONFLICT : errorCode = StorageErrorCode . RESOURCE_ALREADY_EXISTS . toString ( ) ; break ; case HttpURLConnection . HTTP_UNAVAILABLE : errorCode = StorageErrorCode . SERVER_BUSY . toString ( ) ; break ; case HttpURLConnection . HTTP_GATEWAY_TIMEOUT : errorCode = StorageErrorCode . SERVICE_TIMEOUT . toString ( ) ; break ; case HttpURLConnection . HTTP_INTERNAL_ERROR : errorCode = StorageErrorCode . SERVICE_INTERNAL_ERROR . toString ( ) ; break ; case HttpURLConnection . HTTP_NOT_IMPLEMENTED : errorCode = StorageErrorCode . NOT_IMPLEMENTED . toString ( ) ; break ; case HttpURLConnection . HTTP_BAD_GATEWAY : errorCode = StorageErrorCode . BAD_GATEWAY . toString ( ) ; break ; case HttpURLConnection . HTTP_VERSION : errorCode = StorageErrorCode . HTTP_VERSION_NOT_SUPPORTED . toString ( ) ; break ; default : errorCode = null ; } if ( errorCode == null ) { return null ; } else { return new StorageException ( errorCode , statusDescription , statusCode , null , inner ) ; }


signature:
public class CloudQueueClient { /** * Gets an iterable collection of queues for this queue service client .
 * @ return An iterable collection of { @ link CloudQueue } objects retrieved lazily that
 * represent the queues in this client . */
@ DoesServiceRequest public Iterable < CloudQueue > listQueues ( ) { } }

implementation: return this . listQueues ( null , QueueListingDetails . NONE , null , null ) ;


signature:
public class CloudQueueClient { /** * Returns an iterable collection of queues whose names begin with the
 * specified prefix in this Queue service client .
 * @ param prefix
 * A < code > String < / code > that represents the queue name prefix .
 * @ return An iterable collection of { @ link CloudQueue } objects retrieved lazily that
 * represent the queues in this client whose names begin with the
 * specified prefix . */
@ DoesServiceRequest public Iterable < CloudQueue > listQueues ( final String prefix ) { } }

implementation: return this . listQueues ( prefix , QueueListingDetails . NONE , null , null ) ;


signature:
public class CloudQueueClient { /** * Returns an iterable collection of queues whose names begin with the
 * specified prefix for this Queue service client , using the specified
 * details setting , request options , and operation context .
 * @ param prefix
 * A < code > String < / code > that represents the queue name prefix .
 * @ param detailsIncluded
 * A { @ link QueueListingDetails } value that indicates whether
 * queue metadata will be returned .
 * @ param options
 * A { @ link QueueRequestOptions } object that specifies any
 * additional options for the request . Specifying < code > null < / code > will use the default request options
 * from
 * the associated service client ( { @ link CloudQueue } ) .
 * @ param opContext
 * An { @ link OperationContext } object that represents the context
 * for the current operation . This object is used to track
 * requests to the storage service , and to provide additional
 * runtime information about the operation .
 * @ return An iterable collection of { @ link CloudQueue } objects retrieved lazily that
 * represents the specified queues for this client . */
@ DoesServiceRequest public Iterable < CloudQueue > listQueues ( final String prefix , final QueueListingDetails detailsIncluded , QueueRequestOptions options , OperationContext opContext ) { } }

implementation: if ( opContext == null ) { opContext = new OperationContext ( ) ; } opContext . initialize ( ) ; options = QueueRequestOptions . populateAndApplyDefaults ( options , this ) ; SegmentedStorageRequest segmentedRequest = new SegmentedStorageRequest ( ) ; return new LazySegmentedIterable < CloudQueueClient , Void , CloudQueue > ( this . listQueuesSegmentedImpl ( prefix , detailsIncluded , null , options , segmentedRequest ) , this , null , options . getRetryPolicyFactory ( ) , opContext ) ;


signature:
public class CloudQueueClient { /** * Gets a result segment of an iterable collection of queues for this Queue
 * service client .
 * @ return A { @ link ResultSegment } of { @ link CloudQueue } objects that
 * contains a segment of the iterable collection of { @ link CloudQueue } objects that represent the requested
 * queues in
 * the storage service .
 * @ throws StorageException
 * If a storage service error occurred during the operation . */
@ DoesServiceRequest public ResultSegment < CloudQueue > listQueuesSegmented ( ) throws StorageException { } }

implementation: return this . listQueuesSegmented ( null , QueueListingDetails . NONE , null , null , null , null ) ;


signature:
public class CloudQueueClient { /** * Gets a result segment of an iterable collection of queues whose names
 * begin with the specified prefix for this queue , using the specified
 * listing details options , request options , and operation context .
 * @ param prefix
 * A < code > String < / code > that represents the prefix of the queue
 * name to match .
 * @ param detailsIncluded
 * A { @ link QueueListingDetails } value that indicates whether
 * queue metadata will be returned .
 * @ param maxResults
 * The maximum number of results to retrieve . If < code > null < / code > or greater
 * than 5000 , the server will return up to 5,000 items . Must be at least 1.
 * @ param continuationToken
 * A { @ link ResultContinuation } object that represents a
 * continuation token returned by a previous listing operation .
 * @ param options
 * A { @ link QueueRequestOptions } object that specifies any additional options for
 * the request . Specifying < code > null < / code > will use the default request options
 * from the associated service client ( { @ link CloudQueue } ) .
 * @ param opContext
 * An { @ link OperationContext } object that represents the context
 * for the current operation . This object is used to track
 * requests to the storage service , and to provide additional
 * runtime information about the operation .
 * @ return A { @ link ResultSegment } of { @ link CloudQueue } objects that contains a segment of
 * the iterable collection of { @ link CloudQueue } objects that represent the requested
 * queues in the storage service .
 * @ throws StorageException
 * If a storage service error occurred during the operation . */
@ DoesServiceRequest public ResultSegment < CloudQueue > listQueuesSegmented ( final String prefix , final QueueListingDetails detailsIncluded , final Integer maxResults , final ResultContinuation continuationToken , QueueRequestOptions options , OperationContext opContext ) throws StorageException { } }

implementation: if ( opContext == null ) { opContext = new OperationContext ( ) ; } opContext . initialize ( ) ; options = QueueRequestOptions . populateAndApplyDefaults ( options , this ) ; SegmentedStorageRequest segmentedRequest = new SegmentedStorageRequest ( ) ; segmentedRequest . setToken ( continuationToken ) ; return ExecutionEngine . executeWithRetry ( this , null , this . listQueuesSegmentedImpl ( prefix , detailsIncluded , maxResults , options , segmentedRequest ) , options . getRetryPolicyFactory ( ) , opContext ) ;


signature:
public class CloudQueueClient { /** * Queries the service for the { @ link ServiceStats } .
 * @ param options
 * A { @ link QueueRequestOptions } object that specifies any additional options for the request . Specifying
 * < code > null < / code > will use the default request options from the associated service client (
 * { @ link CloudQueueClient } ) .
 * @ param opContext
 * An { @ link OperationContext } object that represents the context for the current operation . This object
 * is used to track requests to the storage service , and to provide additional runtime information about
 * the operation .
 * @ return { @ link ServiceStats } for the given storage service
 * @ throws StorageException
 * If a storage service error occurred . */
@ DoesServiceRequest public ServiceStats getServiceStats ( QueueRequestOptions options , OperationContext opContext ) throws StorageException { } }

implementation: if ( opContext == null ) { opContext = new OperationContext ( ) ; } opContext . initialize ( ) ; options = QueueRequestOptions . populateAndApplyDefaults ( options , this ) ; return ExecutionEngine . executeWithRetry ( this , null , this . getServiceStatsImpl ( options , false ) , options . getRetryPolicyFactory ( ) , opContext ) ;


signature:
public class CloudQueueClient { /** * Retrieves the current { @ link ServiceProperties } for the given storage service . This includes Logging ,
 * HourMetrics , MinuteMetrics and CORS configurations .
 * @ param options
 * A { @ link QueueRequestOptions } object that specifies any additional options for the request . Specifying
 * < code > null < / code > will use the default request options from the associated service client (
 * { @ link CloudQueueClient } ) .
 * @ param opContext
 * An { @ link OperationContext } object that represents the context for the current operation . This object
 * is used to track requests to the storage service , and to provide additional runtime information about
 * the operation .
 * @ return the { @ link ServiceProperties } object representing the current configuration of the service .
 * @ throws StorageException
 * If a storage service error occurred . */
@ DoesServiceRequest public final ServiceProperties downloadServiceProperties ( QueueRequestOptions options , OperationContext opContext ) throws StorageException { } }

implementation: if ( opContext == null ) { opContext = new OperationContext ( ) ; } opContext . initialize ( ) ; options = QueueRequestOptions . populateAndApplyDefaults ( options , this ) ; return ExecutionEngine . executeWithRetry ( this , null , this . downloadServicePropertiesImpl ( options , false ) , options . getRetryPolicyFactory ( ) , opContext ) ;


signature:
public class CloudQueueClient { /** * Uploads a new { @ link ServiceProperties } configuration to the given storage service . This includes Logging ,
 * HourMetrics , MinuteMetrics and CORS configurations .
 * @ param properties
 * The { @ link ServiceProperties } to upload .
 * @ param options
 * A { @ link BlobRequestOptions } object that specifies any additional options for the request . Specifying
 * < code > null < / code > will use the default request options from the associated service client (
 * { @ link CloudBlobClient } ) .
 * @ param opContext
 * An { @ link OperationContext } object that represents the context for the current operation . This object
 * is used to track requests to the storage service , and to provide additional runtime information about
 * the operation .
 * @ throws StorageException
 * If a storage service error occurred . */
@ DoesServiceRequest public void uploadServiceProperties ( final ServiceProperties properties , QueueRequestOptions options , OperationContext opContext ) throws StorageException { } }

implementation: if ( ! Utility . isNullOrEmpty ( properties . getDefaultServiceVersion ( ) ) ) { throw new IllegalArgumentException ( SR . DEFAULT_SERVICE_VERSION_ONLY_SET_FOR_BLOB_SERVICE ) ; } if ( opContext == null ) { opContext = new OperationContext ( ) ; } opContext . initialize ( ) ; options = QueueRequestOptions . populateAndApplyDefaults ( options , this ) ; Utility . assertNotNull ( "properties" , properties ) ; ExecutionEngine . executeWithRetry ( this , null , this . uploadServicePropertiesImpl ( properties , options , opContext , false ) , options . getRetryPolicyFactory ( ) , opContext ) ;


signature:
public class Schematron { /** * Add the catalog to our internal catalog
 * @ param aXmlCatalog
 * the XMLCatalog instance to use to look up DTDs */
public void addConfiguredXMLCatalog ( @ Nonnull final XMLCatalog aXmlCatalog ) { } }

implementation: m_aXmlCatalog . addConfiguredXMLCatalog ( aXmlCatalog ) ; log ( "Added XMLCatalog " + aXmlCatalog , Project . MSG_DEBUG ) ;


signature:
public class PreprocessorIDPool { /** * Create a unique ID based on the passed one . If the passed ID is not yet
 * contained , than a numeric index is appended until the ID is unique .
 * @ param sID
 * The source ID . May be < code > null < / code > .
 * @ return < code > null < / code > if the passed ID is < code > null < / code > indicating
 * that no ID is present . Otherwise a unique ID is returned . */
@ Nullable public String getUniqueID ( @ Nullable final String sID ) { } }

implementation:
if ( sID == null ) return null ; if ( m_aUsedIDs . add ( sID ) ) { // Unique ID
return sID ; } // Non - unique ID
int nIndex = 0 ; String sNewID = sID + nIndex ; do { if ( m_aUsedIDs . add ( sNewID ) ) { // Now it ' s unique
return sNewID ; } ++ nIndex ; sNewID = sID + nIndex ; } while ( true ) ;


signature:
public class SchematronResourcePure { /** * Set the Schematron phase to be evaluated . Changing the phase will result in
 * a newly bound schema !
 * @ param sPhase
 * The name of the phase to use . May be < code > null < / code > which means
 * all phases .
 * @ return this */
@ Nonnull public SchematronResourcePure setPhase ( @ Nullable final String sPhase ) { } }

implementation: if ( m_aBoundSchema != null ) throw new IllegalStateException ( "Schematron was already bound and can therefore not be altered!" ) ; m_sPhase = sPhase ; return this ;


signature:
public class SchematronResourcePure { /** * Set the error handler to be used during binding .
 * @ param aErrorHandler
 * The error handler . May be < code > null < / code > .
 * @ return this */
@ Nonnull public SchematronResourcePure setErrorHandler ( @ Nullable final IPSErrorHandler aErrorHandler ) { } }

implementation: if ( m_aBoundSchema != null ) throw new IllegalStateException ( "Schematron was already bound and can therefore not be altered!" ) ; m_aErrorHandler = aErrorHandler ; return this ;


signature:
public class SchematronResourcePure { /** * Set the variable resolver to be used in the XPath statements . This can only
 * be set before the Schematron is bound . If it is already bound an exception
 * is thrown to indicate the unnecessity of the call .
 * @ param aVariableResolver
 * The variable resolver to set . May be < code > null < / code > .
 * @ return this */
@ Nonnull public SchematronResourcePure setVariableResolver ( @ Nullable final XPathVariableResolver aVariableResolver ) { } }

implementation: if ( m_aBoundSchema != null ) throw new IllegalStateException ( "Schematron was already bound and can therefore not be altered!" ) ; m_aVariableResolver = aVariableResolver ; return this ;


signature:
public class SchematronResourcePure { /** * Set the function resolver to be used in the XPath statements . This can only
 * be set before the Schematron is bound . If it is already bound an exception
 * is thrown to indicate the unnecessity of the call .
 * @ param aFunctionResolver
 * The function resolver to set . May be < code > null < / code > .
 * @ return this */
@ Nonnull public SchematronResourcePure setFunctionResolver ( @ Nullable final XPathFunctionResolver aFunctionResolver ) { } }

implementation: if ( m_aBoundSchema != null ) throw new IllegalStateException ( "Schematron was already bound and can therefore not be altered!" ) ; m_aFunctionResolver = aFunctionResolver ; return this ;


signature:
public class SchematronResourcePure { /** * Set the XML entity resolver to be used when reading the Schematron or the
 * XML to be validated . This can only be set before the Schematron is bound .
 * If it is already bound an exception is thrown to indicate the unnecessity
 * of the call .
 * @ param aEntityResolver
 * The entity resolver to set . May be < code > null < / code > .
 * @ return this
 * @ since 4.1.1 */
@ Nonnull public SchematronResourcePure setEntityResolver ( @ Nullable final EntityResolver aEntityResolver ) { } }

implementation: if ( m_aBoundSchema != null ) throw new IllegalStateException ( "Schematron was already bound and can therefore not be altered!" ) ; internalSetEntityResolver ( aEntityResolver ) ; return this ;


signature:
public class SchematronResourcePure { /** * Get the cached bound schema or create a new one .
 * @ return The bound schema . Never < code > null < / code > . */
@ Nonnull public IPSBoundSchema getOrCreateBoundSchema ( ) { } }

implementation: if ( m_aBoundSchema == null ) try { m_aBoundSchema = createBoundSchema ( ) ; } catch ( final RuntimeException ex ) { if ( m_aErrorHandler != null ) m_aErrorHandler . error ( getResource ( ) , null , "Error creating bound schema" , ex ) ; throw ex ; } return m_aBoundSchema ;


signature:
public class SchematronResourcePure { /** * Use the provided error handler to validate all elements in the schematron .
 * It tries to catch as many errors as possible .
 * @ param aErrorHandler
 * The error handler to use . May not be < code > null < / code > . */
public void validateCompletely ( @ Nonnull final IPSErrorHandler aErrorHandler ) { } }

implementation:
ValueEnforcer . notNull ( aErrorHandler , "ErrorHandler" ) ; try { getOrCreateBoundSchema ( ) . getOriginalSchema ( ) . validateCompletely ( aErrorHandler ) ; } catch ( final RuntimeException ex ) { // May happen when XPath errors are contained
}


signature:
public class SchematronResourcePure { /** * The main method to convert a node to an SVRL document .
 * @ param aXMLNode
 * The source node to be validated . May not be < code > null < / code > .
 * @ param sBaseURI
 * Base URI of the XML document to be validated . May be
 * < code > null < / code > .
 * @ return The SVRL document . Never < code > null < / code > .
 * @ throws SchematronException
 * in case of a sever error validating the schema */
@ Nonnull public SchematronOutputType applySchematronValidationToSVRL ( @ Nonnull final Node aXMLNode , @ Nullable final String sBaseURI ) throws SchematronException { } }

implementation:
ValueEnforcer . notNull ( aXMLNode , "XMLNode" ) ; final SchematronOutputType aSOT = getOrCreateBoundSchema ( ) . validateComplete ( aXMLNode , sBaseURI ) ; // Debug print the created SVRL document
if ( SchematronDebug . isShowCreatedSVRL ( ) ) LOGGER . info ( "Created SVRL:\n" + new SVRLMarshaller ( false ) . getAsString ( aSOT ) ) ; return aSOT ;


signature:
public class SchematronResourcePure { /** * Create a new { @ link SchematronResourcePure } from a Classpath Schematron
 * rules
 * @ param sSCHPath
 * The classpath relative path to the Schematron rules .
 * @ return Never < code > null < / code > . */
@ Nonnull public static SchematronResourcePure fromClassPath ( @ Nonnull @ Nonempty final String sSCHPath ) { } }

implementation: return new SchematronResourcePure ( new ClassPathResource ( sSCHPath ) ) ;


signature:
public class SchematronResourcePure { /** * Create a new { @ link SchematronResourcePure } from file system Schematron
 * rules
 * @ param sSCHPath
 * The file system path to the Schematron rules .
 * @ return Never < code > null < / code > . */
@ Nonnull public static SchematronResourcePure fromFile ( @ Nonnull @ Nonempty final String sSCHPath ) { } }

implementation: return new SchematronResourcePure ( new FileSystemResource ( sSCHPath ) ) ;


signature:
public class SchematronResourcePure { /** * Create a new { @ link SchematronResourcePure } from Schematron rules provided
 * at a URL
 * @ param sSCHURL
 * The URL to the Schematron rules . May neither be < code > null < / code >
 * nor empty .
 * @ return Never < code > null < / code > .
 * @ throws MalformedURLException
 * In case an invalid URL is provided */
@ Nonnull public static SchematronResourcePure fromURL ( @ Nonnull @ Nonempty final String sSCHURL ) throws MalformedURLException { } }

implementation: return new SchematronResourcePure ( new URLResource ( sSCHURL ) ) ;


signature:
public class SchematronResourcePure { /** * Create a new { @ link SchematronResourcePure } from Schematron rules provided
 * by an arbitrary String . < br >
 * < b > Important : < / b > in this case , no include resolution will be performed ! !
 * @ param sSchematron
 * The String representing the Schematron . May not be < code > null < / code >
 * @ param aCharset
 * The charset to be used to convert the String to a byte array .
 * @ return Never < code > null < / code > . */
@ Nonnull public static SchematronResourcePure fromString ( @ Nonnull final String sSchematron , @ Nonnull final Charset aCharset ) { } }

implementation: return fromByteArray ( sSchematron . getBytes ( aCharset ) ) ;


signature:
public class SchematronResourcePure { /** * Create a new { @ link SchematronResourcePure } from Schematron rules provided
 * by a domain model . < br >
 * < b > Important : < / b > in this case , no include resolution will be performed ! !
 * @ param aSchematron
 * The Schematron model to be used . May not be < code > null < / code > .
 * @ return Never < code > null < / code > . */
@ Nonnull public static SchematronResourcePure fromSchema ( @ Nonnull final PSSchema aSchematron ) { } }

implementation: return fromString ( new PSWriter ( ) . getXMLString ( aSchematron ) , XMLWriterSettings . DEFAULT_XML_CHARSET_OBJ ) ;


signature:
public class PSPreprocessor { /** * Resolve all & lt ; extends & gt ; elements . This method calls itself recursively
 * until all extends elements are resolved .
 * @ param aRuleContent
 * A list consisting of { @ link PSAssertReport } and { @ link PSExtends }
 * objects . Never < code > null < / code > .
 * @ param aLookup
 * The rule lookup object
 * @ throws SchematronPreprocessException
 * If the base rule of an extends object could not be resolved . */
private void _resolveRuleContent ( @ Nonnull final ICommonsList < IPSElement > aRuleContent , @ Nonnull final PreprocessorLookup aLookup , @ Nonnull final PreprocessorIDPool aIDPool , @ Nullable final ICommonsMap < String , String > aParamValueMap , @ Nonnull final PSRule aTargetRule ) throws SchematronPreprocessException { } }

implementation:
for ( final IPSElement aElement : aRuleContent ) { if ( aElement instanceof PSAssertReport ) { final PSAssertReport aAssertReport = ( PSAssertReport ) aElement ; aTargetRule . addAssertReport ( _getPreprocessedAssert ( aAssertReport , aIDPool , aParamValueMap ) ) ; } else { final PSExtends aExtends = ( PSExtends ) aElement ; final String sRuleID = aExtends . getRule ( ) ; final PSRule aBaseRule = aLookup . getAbstractRuleOfID ( sRuleID ) ; if ( aBaseRule == null ) throw new SchematronPreprocessException ( "Failed to resolve rule ID '" + sRuleID + "' in extends statement. Available rules are: " + aLookup . getAllAbstractRuleIDs ( ) ) ; // Recursively resolve the extends of the base rule
_resolveRuleContent ( aBaseRule . getAllContentElements ( ) , aLookup , aIDPool , aParamValueMap , aTargetRule ) ; // Copy all lets
for ( final PSLet aBaseLet : aBaseRule . getAllLets ( ) ) aTargetRule . addLet ( aBaseLet . getClone ( ) ) ; } }


signature:
public class PSPreprocessor { /** * Convert the passed schema to a minimal schema .
 * @ param aSchema
 * The schema to be made minimal . May not be < code > null < / code >
 * @ return The original schema object , if it is already minimal - a minimal
 * copy otherwise ! May be < code > null < / code > if the original schema is
 * not yet minimal and { @ link # isKeepEmptySchema ( ) } is set to
 * < code > false < / code > .
 * @ throws SchematronPreprocessException
 * In case a preprocessing error occurs */
@ Nullable public PSSchema getAsMinimalSchema ( @ Nonnull final PSSchema aSchema ) throws SchematronPreprocessException { } }

implementation:
ValueEnforcer . notNull ( aSchema , "Schema" ) ; // Anything to do ?
if ( aSchema . isMinimal ( ) ) return aSchema ; return getForcedPreprocessedSchema ( aSchema ) ;


signature:
public class PSPreprocessor { /** * Convert the passed schema to a pre - processed schema .
 * @ param aSchema
 * The schema to pre - process . May not be < code > null < / code >
 * @ return The original schema object , if it is already pre - processed - a
 * pre - processed copy otherwise ! May be < code > null < / code > if the
 * original schema is not yet pre - processed and
 * { @ link # isKeepEmptySchema ( ) } is set to < code > false < / code > .
 * @ throws SchematronPreprocessException
 * In case a preprocessing error occurs */
@ Nullable public PSSchema getAsPreprocessedSchema ( @ Nonnull final PSSchema aSchema ) throws SchematronPreprocessException { } }

implementation:
ValueEnforcer . notNull ( aSchema , "Schema" ) ; // Anything to do ?
if ( aSchema . isPreprocessed ( ) ) return aSchema ; return getForcedPreprocessedSchema ( aSchema ) ;


signature:
public class PSPreprocessor { /** * Convert the passed schema to a pre - processed schema independent if it is
 * already minimal or not .
 * @ param aSchema
 * The schema to be made minimal . May not be < code > null < / code >
 * @ return A minimal copy of the schema . May be < code > null < / code > if the
 * original schema is not yet minimal and { @ link # isKeepEmptySchema ( ) }
 * is set to < code > false < / code > .
 * @ throws SchematronPreprocessException
 * In case a preprocessing error occurs */
@ Nullable public PSSchema getForcedPreprocessedSchema ( @ Nonnull final PSSchema aSchema ) throws SchematronPreprocessException { } }

implementation:
ValueEnforcer . notNull ( aSchema , "Schema" ) ; final PreprocessorLookup aLookup = new PreprocessorLookup ( aSchema ) ; final PreprocessorIDPool aIDPool = new PreprocessorIDPool ( ) ; final PSSchema ret = new PSSchema ( aSchema . getResource ( ) ) ; ret . setID ( aIDPool . getUniqueID ( aSchema . getID ( ) ) ) ; ret . setRich ( aSchema . getRichClone ( ) ) ; ret . setSchemaVersion ( aSchema . getSchemaVersion ( ) ) ; ret . setDefaultPhase ( aSchema . getDefaultPhase ( ) ) ; ret . setQueryBinding ( aSchema . getQueryBinding ( ) ) ; if ( m_bKeepTitles && aSchema . hasTitle ( ) ) ret . setTitle ( aSchema . getTitle ( ) . getClone ( ) ) ; if ( aSchema . hasAnyInclude ( ) ) throw new SchematronPreprocessException ( "Cannot preprocess <schema> with an <include>" ) ; for ( final PSNS aNS : aSchema . getAllNSs ( ) ) ret . addNS ( aNS . getClone ( ) ) ; // start ps are skipped
for ( final PSLet aLet : aSchema . getAllLets ( ) ) ret . addLet ( aLet . getClone ( ) ) ; for ( final PSPhase aPhase : aSchema . getAllPhases ( ) ) ret . addPhase ( _getPreprocessedPhase ( aPhase , aIDPool ) ) ; for ( final PSPattern aPattern : aSchema . getAllPatterns ( ) ) { final PSPattern aMinifiedPattern = _getPreprocessedPattern ( aPattern , aLookup , aIDPool ) ; if ( aMinifiedPattern != null ) { // Pattern without rules ?
if ( aMinifiedPattern . getRuleCount ( ) > 0 || m_bKeepEmptyPatterns ) ret . addPattern ( aMinifiedPattern ) ; } } // Schema without patterns ?
if ( aSchema . getPatternCount ( ) == 0 && ! m_bKeepEmptySchema ) return null ; // end ps are skipped
if ( m_bKeepDiagnostics && aSchema . hasDiagnostics ( ) ) ret . setDiagnostics ( _getPreprocessedDiagnostics ( aSchema . getDiagnostics ( ) ) ) ; ret . addForeignElements ( aSchema . getAllForeignElements ( ) ) ; ret . addForeignAttributes ( aSchema . getAllForeignAttributes ( ) ) ; return ret ;


signature:
public class SchematronDebug { /** * Globally enable / disable debug mode
 * @ param bDebugMode
 * < code > true < / code > to enable debug mode , < code > false < / code >
 * otherwise .
 * @ see # setSaveIntermediateXSLTFiles ( boolean )
 * @ see # setShowCreatedXSLT ( boolean )
 * @ see # setShowCreatedSVRL ( boolean )
 * @ see # setShowResolvedSourceSchematron ( boolean )
 * @ see # setShowPreprocessedSchematron ( boolean ) */
public static void setDebugMode ( final boolean bDebugMode ) { } }

implementation: setSaveIntermediateXSLTFiles ( bDebugMode ) ; setShowCreatedXSLT ( bDebugMode ) ; setShowCreatedSVRL ( bDebugMode ) ; setShowResolvedSourceSchematron ( bDebugMode ) ; setShowPreprocessedSchematron ( bDebugMode ) ;


signature:
public class PSBoundSchemaCacheKey { /** * Read the specified schema from the passed resource .
 * @ param aResource
 * The resource to read from . Never < code > null < / code > .
 * @ param aErrorHandler
 * The error handler to use . May be < code > null < / code > .
 * @ param aEntityResolver
 * The XML entity resolver to be used . May be < code > null < / code > .
 * @ return The read schema . May not be < code > null < / code > .
 * @ throws SchematronException
 * In case there is an error reading . */
@ Nonnull @ OverrideOnDemand public PSSchema readSchema ( @ Nonnull final IReadableResource aResource , @ Nullable final IPSErrorHandler aErrorHandler , @ Nullable final EntityResolver aEntityResolver ) throws SchematronException { } }

implementation: return new PSReader ( aResource , aErrorHandler , aEntityResolver ) . readSchema ( ) ;


signature:
public class PSBoundSchemaCacheKey { /** * Determine the query binding for the read schema .
 * @ param aSchema
 * The read schema . Never < code > null < / code > .
 * @ return The query binding to use . Never < code > null < / code > .
 * @ throws SchematronException
 * In case the determination fails . */
@ Nonnull @ OverrideOnDemand public IPSQueryBinding getQueryBinding ( @ Nonnull final PSSchema aSchema ) throws SchematronException { } }

implementation: return PSQueryBindingRegistry . getQueryBindingOfNameOrThrow ( aSchema . getQueryBinding ( ) ) ;


signature:
public class PSBoundSchemaCacheKey { /** * Create the pre - processor to be used for
 * { @ link # createPreprocessedSchema ( PSSchema , IPSQueryBinding ) } .
 * @ param aQueryBinding
 * The query binding to be determined from the read schema . Never
 * < code > null < / code > .
 * @ return The pre - processor to be used . */
@ Nonnull @ OverrideOnDemand public PSPreprocessor createPreprocessor ( @ Nonnull final IPSQueryBinding aQueryBinding ) { } }

implementation: final PSPreprocessor aPreprocessor = PSPreprocessor . createPreprocessorWithoutInformationLoss ( aQueryBinding ) ; return aPreprocessor ;


signature:
public class PSBoundSchemaCacheKey { /** * Pre - process the read schema , using the determined query binding .
 * @ param aSchema
 * The read schema . Never < code > null < / code > .
 * @ param aQueryBinding
 * The determined query binding . Never < code > null < / code > .
 * @ return The pre - processed schema and never < code > null < / code > .
 * @ throws SchematronException
 * In case pre - processing fails */
@ Nonnull @ OverrideOnDemand public PSSchema createPreprocessedSchema ( @ Nonnull final PSSchema aSchema , @ Nonnull final IPSQueryBinding aQueryBinding ) throws SchematronException { } }

implementation: final PSPreprocessor aPreprocessor = createPreprocessor ( aQueryBinding ) ; final PSSchema aPreprocessedSchema = aPreprocessor . getAsPreprocessedSchema ( aSchema ) ; if ( aPreprocessedSchema == null ) throw new SchematronPreprocessException ( "Failed to preprocess schema " + aSchema + " with query binding " + aQueryBinding ) ; if ( SchematronDebug . isShowPreprocessedSchematron ( ) ) LOGGER . info ( "Preprocessed Schematron:\n" + MicroWriter . getNodeAsString ( aPreprocessedSchema . getAsMicroElement ( ) ) ) ; return aPreprocessedSchema ;


signature:
public class PSBoundSchemaCacheKey { /** * The main routine to create a bound schema from the passed resource and
 * phase . The usual routine is to
 * < ol >
 * < li > read the schema from the resource - see
 * { @ link # readSchema ( IReadableResource , IPSErrorHandler , EntityResolver ) } < / li >
 * < li > resolve the query binding - see { @ link # getQueryBinding ( PSSchema ) } < / li >
 * < li > pre - process the schema -
 * { @ link # createPreprocessedSchema ( PSSchema , IPSQueryBinding ) } < / li >
 * < li > and finally bind it -
 * { @ link IPSQueryBinding # bind ( PSSchema , String , IPSErrorHandler , javax . xml . xpath . XPathVariableResolver , javax . xml . xpath . XPathFunctionResolver ) }
 * < / li >
 * < / ol >
 * @ return The bound schema . Never < code > null < / code > .
 * @ throws SchematronException
 * In case reading or binding fails . */
@ Nonnull public IPSBoundSchema createBoundSchema ( ) throws SchematronException { } }

implementation:
// Read schema from resource
final PSSchema aSchema = readSchema ( getResource ( ) , getErrorHandler ( ) , getEntityResolver ( ) ) ; // Resolve the query binding to be used
final IPSQueryBinding aQueryBinding = getQueryBinding ( aSchema ) ; // Pre - process schema
final PSSchema aPreprocessedSchema = createPreprocessedSchema ( aSchema , aQueryBinding ) ; // And finally bind the pre - processed schema
return aQueryBinding . bind ( aPreprocessedSchema , getPhase ( ) , getErrorHandler ( ) , getVariableResolver ( ) , getFunctionResolver ( ) ) ;


signature:
public class PSWriter { /** * Write the passed Schematron element to the passed file .
 * @ param aPSElement
 * The schematron element to write . May not be < code > null < / code > .
 * @ param aFile
 * The file to write things to . May not be < code > null < / code > .
 * @ return { @ link ESuccess } . */
@ Nonnull public ESuccess writeToFile ( @ Nonnull final IPSElement aPSElement , @ Nonnull final File aFile ) { } }

implementation: ValueEnforcer . notNull ( aPSElement , "PSElement" ) ; final IMicroElement eXML = aPSElement . getAsMicroElement ( ) ; return MicroWriter . writeToFile ( getAsDocument ( eXML ) , aFile , m_aWriterSettings . getXMLWriterSettings ( ) ) ;


signature:
public class PSWriter { /** * Write the passed Schematron element to the passed output stream .
 * @ param aPSElement
 * The schematron element to write . May not be < code > null < / code > .
 * @ param aOS
 * The output stream to write things to . May not be < code > null < / code > .
 * The stream is automatically closed .
 * @ return { @ link ESuccess } . */
@ Nonnull public ESuccess writeToStream ( @ Nonnull final IPSElement aPSElement , @ Nonnull @ WillClose final OutputStream aOS ) { } }

implementation: ValueEnforcer . notNull ( aPSElement , "PSElement" ) ; final IMicroElement eXML = aPSElement . getAsMicroElement ( ) ; return MicroWriter . writeToStream ( getAsDocument ( eXML ) , aOS , m_aWriterSettings . getXMLWriterSettings ( ) ) ;


signature:
public class PSWriter { /** * Write the passed Schematron element to the passed writer .
 * @ param aPSElement
 * The schematron element to write . May not be < code > null < / code > .
 * @ param aWriter
 * The writer to write things to . May not be < code > null < / code > . The
 * writer is automatically closed .
 * @ return { @ link ESuccess } . */
@ Nonnull public ESuccess writeToWriter ( @ Nonnull final IPSElement aPSElement , @ Nonnull @ WillClose final Writer aWriter ) { } }

implementation: ValueEnforcer . notNull ( aPSElement , "PSElement" ) ; final IMicroElement eXML = aPSElement . getAsMicroElement ( ) ; return MicroWriter . writeToWriter ( getAsDocument ( eXML ) , aWriter , m_aWriterSettings . getXMLWriterSettings ( ) ) ;


signature:
public class PSWriter { /** * Get the passed Schematron element as a String
 * @ param aPSElement
 * The schematron element to convert to a string . May not be
 * < code > null < / code > .
 * @ return The passed element as a string or < code > null < / code > if
 * serialization failed . */
@ Nullable public String getXMLString ( @ Nonnull final IPSElement aPSElement ) { } }

implementation: ValueEnforcer . notNull ( aPSElement , "PSElement" ) ; final IMicroElement eXML = aPSElement . getAsMicroElement ( ) ; return MicroWriter . getNodeAsString ( getAsDocument ( eXML ) , m_aWriterSettings . getXMLWriterSettings ( ) ) ;


signature:
public class PSWriter { /** * Get the passed Schematron element as a String
 * @ param aPSElement
 * The schematron element to convert to a string . May not be
 * < code > null < / code > .
 * @ return The passed element as a string and never < code > null < / code > .
 * @ throws IllegalStateException
 * if serialization failed */
@ Nullable public String getXMLStringNotNull ( @ Nonnull final IPSElement aPSElement ) { } }

implementation: final String ret = getXMLString ( aPSElement ) ; if ( ret == null ) throw new IllegalStateException ( "Failed to serialize the passed PS element: " + aPSElement ) ; return ret ;


signature:
public class SchematronHelper { /** * Apply the passed schematron on the passed XML resource using a custom error
 * handler .
 * @ param aSchematron
 * The Schematron resource . May not be < code > null < / code > .
 * @ param aXML
 * The XML resource . May not be < code > null < / code > .
 * @ return < code > null < / code > if either the Schematron or the XML could not be
 * read .
 * @ throws IllegalStateException
 * if the processing throws an unexpected exception . */
@ Nullable public static SchematronOutputType applySchematron ( @ Nonnull final ISchematronResource aSchematron , @ Nonnull final IReadableResource aXML ) { } }

implementation:
ValueEnforcer . notNull ( aSchematron , "SchematronResource" ) ; ValueEnforcer . notNull ( aXML , "XMLSource" ) ; try { // Apply Schematron on XML
return aSchematron . applySchematronValidationToSVRL ( aXML ) ; } catch ( final Exception ex ) { throw new IllegalArgumentException ( "Failed to apply Schematron " + aSchematron . getID ( ) + " onto XML resource " + aXML . getResourceID ( ) , ex ) ; }


signature:
public class SchematronHelper { /** * Apply the passed schematron on the passed XML node .
 * @ param aSchematron
 * The Schematron resource . May not be < code > null < / code > .
 * @ param aNode
 * The XML node . May not be < code > null < / code > .
 * @ return < code > null < / code > if either the Schematron or the XML could not be
 * read .
 * @ throws IllegalStateException
 * if the processing throws an unexpected exception . */
@ Nullable public static SchematronOutputType applySchematron ( @ Nonnull final ISchematronResource aSchematron , @ Nonnull final Node aNode ) { } }

implementation: ValueEnforcer . notNull ( aSchematron , "SchematronResource" ) ; ValueEnforcer . notNull ( aNode , "Node" ) ; return applySchematron ( aSchematron , new DOMSource ( aNode ) ) ;


signature:
public class SchematronHelper { /** * Convert a { @ link SchematronOutputType } to an { @ link IErrorList } .
 * @ param aSchematronOutput
 * The result of Schematron validation
 * @ param sResourceName
 * The name of the resource that was validated ( may be a file path
 * etc . )
 * @ return List non - < code > null < / code > error list of { @ link SVRLResourceError }
 * objects . */
@ Nonnull public static IErrorList convertToErrorList ( @ Nonnull final SchematronOutputType aSchematronOutput , @ Nullable final String sResourceName ) { } }

implementation: ValueEnforcer . notNull ( aSchematronOutput , "SchematronOutput" ) ; final ErrorList ret = new ErrorList ( ) ; for ( final SVRLFailedAssert aFailedAssert : SVRLHelper . getAllFailedAssertions ( aSchematronOutput ) ) ret . add ( aFailedAssert . getAsResourceError ( sResourceName ) ) ; return ret ;


signature:
public class SchematronHelper { /** * Resolve all Schematron includes of the passed resource .
 * @ param aResource
 * The Schematron resource to read . May not be < code > null < / code > .
 * @ return < code > null < / code > if the passed resource could not be read as XML
 * document */
@ Nullable public static IMicroDocument getWithResolvedSchematronIncludes ( @ Nonnull final IReadableResource aResource ) { } }

implementation: return getWithResolvedSchematronIncludes ( aResource , ( ISAXReaderSettings ) null , new LoggingPSErrorHandler ( ) ) ;


signature:
public class SchematronHelper { /** * Resolve all Schematron includes of the passed resource .
 * @ param aResource
 * The Schematron resource to read . May not be < code > null < / code > .
 * @ param aSettings
 * The SAX reader settings to be used . May be < code > null < / code > to use
 * the default settings .
 * @ param aErrorHandler
 * The error handler to be used . May not be < code > null < / code > .
 * @ return < code > null < / code > if the passed resource could not be read as XML
 * document */
@ Nullable public static IMicroDocument getWithResolvedSchematronIncludes ( @ Nonnull final IReadableResource aResource , @ Nullable final ISAXReaderSettings aSettings , @ Nonnull final IPSErrorHandler aErrorHandler ) { } }

implementation:
final InputSource aIS = InputSourceFactory . create ( aResource ) ; final IMicroDocument aDoc = MicroReader . readMicroXML ( aIS , aSettings ) ; if ( aDoc != null ) { // Resolve all Schematron includes
if ( _recursiveResolveAllSchematronIncludes ( aDoc . getDocumentElement ( ) , aResource , aSettings , aErrorHandler ) . isFailure ( ) ) { // Error resolving includes
return null ; } } return aDoc ;


signature:
public class SchematronResourceSCH { /** * Create a new Schematron resource .
 * @ param sSCHPath
 * The classpath relative path to the Schematron file . May neither be
 * < code > null < / code > nor empty .
 * @ return Never < code > null < / code > . */
@ Nonnull public static SchematronResourceSCH fromClassPath ( @ Nonnull @ Nonempty final String sSCHPath ) { } }

implementation: return new SchematronResourceSCH ( new ClassPathResource ( sSCHPath ) ) ;


signature:
public class SchematronResourceSCH { /** * Create a new Schematron resource .
 * @ param sSCHPath
 * The file system path to the Schematron file . May neither be
 * < code > null < / code > nor empty .
 * @ return Never < code > null < / code > . */
@ Nonnull public static SchematronResourceSCH fromFile ( @ Nonnull @ Nonempty final String sSCHPath ) { } }

implementation: return new SchematronResourceSCH ( new FileSystemResource ( sSCHPath ) ) ;


signature:
public class PSXPathVariables { /** * Add a new variable .
 * @ param aEntry
 * The entry to be added - key is the variable name and value is the
 * variable value . May not be < code > null < / code > .
 * @ return { @ link EChange # UNCHANGED } if a variable with the same name is
 * already present . Never < code > null < / code > . */
@ Nonnull public EChange add ( @ Nonnull final Map . Entry < String , String > aEntry ) { } }

implementation: return add ( aEntry . getKey ( ) , aEntry . getValue ( ) ) ;


signature:
public class PSXPathVariables { /** * Add a new variable .
 * @ param sName
 * The name of the variable . May neither be < code > null < / code > nor
 * empty .
 * @ param sValue
 * The value of the variable . May neither be < code > null < / code > nor
 * empty .
 * @ return { @ link EChange # UNCHANGED } if a variable with the same name is
 * already present . Never < code > null < / code > . */
@ Nonnull public EChange add ( @ Nonnull @ Nonempty final String sName , @ Nonnull @ Nonempty final String sValue ) { } }

implementation:
ValueEnforcer . notEmpty ( sName , "Name" ) ; ValueEnforcer . notEmpty ( sValue , "Value" ) ; // Prepend the " $ " prefix to the variable name
final String sRealName = PSXPathQueryBinding . PARAM_VARIABLE_PREFIX + sName ; if ( m_aMap . containsKey ( sRealName ) ) return EChange . UNCHANGED ; // Apply all existing variables to this variable value !
// This ensures that all variables used in variables are resolved correctly
// as long as the order of declaration is correct .
// Additionally this means that the order of the variables in this class is
// irrelevant
final String sRealValue = getAppliedReplacement ( sValue ) ; m_aMap . put ( sRealName , sRealValue ) ; return EChange . CHANGED ;


signature:
public class PSXPathVariables { /** * Remove the variable with the specified name
 * @ param sVarName
 * The name of the variable to be removed . May be < code > null < / code > .
 * @ return { @ link EChange # CHANGED } if the variable was removed successfully .
 * Never < code > null < / code > . */
@ Nonnull public EChange remove ( @ Nullable final String sVarName ) { } }

implementation: if ( StringHelper . hasText ( sVarName ) ) if ( m_aMap . remove ( PSXPathQueryBinding . PARAM_VARIABLE_PREFIX + sVarName ) == null ) return EChange . CHANGED ; return EChange . UNCHANGED ;


signature:
public class PSXPathVariables { /** * Remove all variables with the specified names
 * @ param aVars
 * A list of variable names to be removed . May be < code > null < / code > .
 * @ return { @ link EChange # CHANGED } if at least one variable was removed
 * successfully . Never < code > null < / code > . */
@ Nonnull public EChange removeAll ( @ Nullable final Iterable < String > aVars ) { } }

implementation: EChange eChange = EChange . UNCHANGED ; if ( aVars != null ) for ( final String sName : aVars ) eChange = eChange . or ( remove ( sName ) ) ; return eChange ; } @ Nonnull @ ReturnsMutableCopy public ICommonsNavigableMap < String , String > getAll ( ) { return m_aMap . getClone ( ) ; } public boolean contains ( @ Nullable final String sName ) { if ( StringHelper . hasNoText ( sName ) ) return false ; return m_aMap . containsKey ( sName ) ;


signature:
public class SVRLHelper { /** * Get a list of all failed assertions in a given schematron output .
 * @ param aSchematronOutput
 * The schematron output to be used . May be < code > null < / code > .
 * @ return A non - < code > null < / code > list with all failed assertions . */
@ Nonnull @ ReturnsMutableCopy public static ICommonsList < SVRLFailedAssert > getAllFailedAssertions ( @ Nullable final SchematronOutputType aSchematronOutput ) { } }

implementation: final ICommonsList < SVRLFailedAssert > ret = new CommonsArrayList < > ( ) ; if ( aSchematronOutput != null ) for ( final Object aObj : aSchematronOutput . getActivePatternAndFiredRuleAndFailedAssert ( ) ) if ( aObj instanceof FailedAssert ) ret . add ( new SVRLFailedAssert ( ( FailedAssert ) aObj ) ) ; return ret ;


signature:
public class SVRLHelper { /** * Get a list of all failed assertions in a given schematron output , with an
 * error level equally or more severe than the passed error level .
 * @ param aSchematronOutput
 * The schematron output to be used . May be < code > null < / code > .
 * @ param aErrorLevel
 * Minimum error level to be queried
 * @ return A non - < code > null < / code > list with all failed assertions . */
@ Nonnull @ ReturnsMutableCopy public static ICommonsList < SVRLFailedAssert > getAllFailedAssertionsMoreOrEqualSevereThan ( @ Nullable final SchematronOutputType aSchematronOutput , @ Nonnull final IErrorLevel aErrorLevel ) { } }

implementation: final ICommonsList < SVRLFailedAssert > ret = new CommonsArrayList < > ( ) ; if ( aSchematronOutput != null ) for ( final Object aObj : aSchematronOutput . getActivePatternAndFiredRuleAndFailedAssert ( ) ) if ( aObj instanceof FailedAssert ) { final SVRLFailedAssert aFA = new SVRLFailedAssert ( ( FailedAssert ) aObj ) ; if ( aFA . getFlag ( ) . isGE ( aErrorLevel ) ) ret . add ( aFA ) ; } return ret ;


signature:
public class SVRLHelper { /** * Get a list of all successful reports in a given schematron output .
 * @ param aSchematronOutput
 * The schematron output to be used . May be < code > null < / code > .
 * @ return A non - < code > null < / code > list with all successful reports . */
@ Nonnull @ ReturnsMutableCopy public static ICommonsList < SVRLSuccessfulReport > getAllSuccessfulReports ( @ Nullable final SchematronOutputType aSchematronOutput ) { } }

implementation: final ICommonsList < SVRLSuccessfulReport > ret = new CommonsArrayList < > ( ) ; if ( aSchematronOutput != null ) for ( final Object aObj : aSchematronOutput . getActivePatternAndFiredRuleAndFailedAssert ( ) ) if ( aObj instanceof SuccessfulReport ) ret . add ( new SVRLSuccessfulReport ( ( SuccessfulReport ) aObj ) ) ; return ret ;