CMUtils
Date: 2013-06-18

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gcube.execution.ocrservice.utils
Class CMUtils

    java.lang.Object
      org.gcube.execution.ocrservice.utils.CMUtils

    public class CMUtils

extends java.lang.Object

Field Summary
`static java.lang.String` | `ocrOcropusCollectionPrefix`

Constructor Summary
`CMUtils()`

Method Summary
`static java.lang.String` | `createOCRDocument(DocumentWriter writer, java.lang.String documentName, java.io.InputStream bytestream, GCUBEScope scope)`
`static CollectionReference` | `createOCROcropusCollection(GCUBEScope scope)` Creates a new ocrOcropusCollection in the given scope The new created collection will be readable and writable and won't be a User collection
`static java.lang.String` | `deleteAllOCROcropusCollections(GCUBEScope scope)` This method deletes all collections of ocropus in this scope
`static java.lang.String` | `findDocumentCMReferenceFromName(DocumentReader reader, java.lang.String name, GCUBEScope scope)`
`static DocumentReader` | `getDocumentReaderByCollectionReference(CollectionReference colRef, GCUBEScope scope)`
`static DocumentReader` | `getDocumentReaderByID(java.lang.String collectionID, GCUBEScope scope)`
`static DocumentWriter` | `getDocumentWriterByCollectionReference(CollectionReference colRef, GCUBEScope scope)`
`static DocumentWriter` | `getDocumentWriterByID(java.lang.String collectionID, GCUBEScope scope)`
`static java.lang.String` | `getOCROcropusCollection(GCUBEScope scope)` This method retrieves the ID of OCR collection with ocropus.tar.gz.gz in a specific scope
`static void` | `main(java.lang.String[] args)`
`static void` | `printCollectionDocs(java.lang.String collectionId, GCUBEScope scope)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ocrOcropusCollectionPrefix

    public static java.lang.String ocrOcropusCollectionPrefix

Constructor Detail

### CMUtils

    public CMUtils()

Method Detail

### getOCROcropusCollection

    public static java.lang.String getOCROcropusCollection(GCUBEScope scope)

  This method retrieves the ID of OCR collection with ocropus.tar.gz.gz in a specific scope

  Parameters:
    `scope` - : the scope to search the collection
  Returns:
    : the collection's ID or null
  Throws:
    `GCUBEFault` - : an error occurred

### createOCROcropusCollection

    public static CollectionReference createOCROcropusCollection(GCUBEScope scope)

  Creates a new ocrOcropusCollection in the given scope The new created collection will be readable and writable and won't be a User collection

  Parameters:
    `scope` - : the scope in which the ocrOcropusCollection is created
  Returns:
    The ID of the collection

### createOCRDocument

    public static java.lang.String createOCRDocument(DocumentWriter writer,
                                                     java.lang.String documentName,
                                                     java.io.InputStream bytestream,
                                                     GCUBEScope scope)
                                              throws GCUBEFault

  Throws:
    `GCUBEFault`

### getDocumentReaderByID

    public static DocumentReader getDocumentReaderByID(java.lang.String collectionID,
                                                       GCUBEScope scope)
                                                throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### getDocumentReaderByCollectionReference

    public static DocumentReader getDocumentReaderByCollectionReference(CollectionReference colRef,
                                                                        GCUBEScope scope)
                                                                 throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### getDocumentWriterByID

    public static DocumentWriter getDocumentWriterByID(java.lang.String collectionID,
                                                       GCUBEScope scope)
                                                throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### getDocumentWriterByCollectionReference

    public static DocumentWriter getDocumentWriterByCollectionReference(CollectionReference colRef,
                                                                        GCUBEScope scope)
                                                                 throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### deleteAllOCROcropusCollections

    public static java.lang.String deleteAllOCROcropusCollections(GCUBEScope scope)

  This method deletes all collections of ocropus in this scope

  Parameters:
    `scope` - : the scope in which to delete all collections
  Returns:
    : the collection's ID or null
  Throws:
    `GCUBEFault` - : an error occurred

### findDocumentCMReferenceFromName

    public static java.lang.String findDocumentCMReferenceFromName(DocumentReader reader,
                                                                   java.lang.String name,
                                                                   GCUBEScope scope)
                                                            throws GCUBEFault

  Throws:
    `GCUBEFault`

### printCollectionDocs

    public static void printCollectionDocs(java.lang.String collectionId,
                                           GCUBEScope scope)

### main

    public static void main(java.lang.String[] args)
                     throws java.lang.Exception

  Throws:
    `java.lang.Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD