Home > Class Reference > %SYS namespace > %UIMA.AnnotationStore.Store

%UIMA.AnnotationStore.Store

abstract class %UIMA.AnnotationStore.Store

Parameters

parameter ASNAME;

Methods

final classmethod FileAnnotation(pAnnotation As %DynamicObject, pDocID As %String, pSofaID As %Integer = "_InitialView") as %Status [ Language = objectscript ]
Files a single manual annotation into the Annotation Store represented by this class. If no pSofaID is supplied, it will default to the default SofA for this document.
final classmethod FileAnnotations(pAnnotations As %DynamicArray, pDocID As %String, pSofaID As %Integer = "_InitialView") as %Status [ Language = objectscript ]
Files an array of manual annotations into the Annotation Store represented by this class. If no pSofaID is supplied, it will default to the default SofA for this document.
abstract classmethod GetAnnotationTableNames(Output pTables) as %Status [ Language = objectscript ]

Returns the names of the tables making up this Annotation Store

pTables(n) = tableName pTables(n, columnName) = type
classmethod GetAnnotations(pRequest As %DynamicObject = "", Output pOutput As %DynamicAbstractObject, pOutputFormat As %String = "raw") as %Status [ Language = objectscript ]
Retrieves an array of annotation objects satisfying the supplied request object:
{	"docIDs" : [ 123, 345, ... ], 						// (default is empty)
	"maxRows" : 500 (default = 500),
	"columns" : [ "docid", "begin", "end", "type" ],	// (default is "*", case insensitive)
	"tables" : [ "annotations", ... ], 					// (default is empty)
	"types" : [ "com.intersystems.uima.*", 
			"org.apache.uima.tcas.DocumentAnnotation" ] 	// (ORed together, default is empty)
}
classmethod GetAnnotationsRS(pRequest As %DynamicObject = "", Output pResultSet As %SQL.StatementResult, Output pColumnTypes) as %Status [ Language = objectscript ]
Retrieves a list of annotations satisfying pRequest as a result set. See also GetAnnotations() for more details on the request object. Values are returned through pResultSet, which has columns according to what was requested in the "columns" property of pRequest, which defaults to all regular columns.
final classmethod GetInfo(Output pInfo As %DynamicObject, pIncludeStatistics As %Boolean = 1) as %Status [ Language = objectscript ]
Retrieves an object describing this Annotation Store
abstract classmethod GetInternalSofaID(pDocID As %RawString, pSofaID As %String = "_InitialView") as %Integer [ Language = objectscript ]
Retrieves the SofA's ID for a given record and sofaID (such as "_InitialView")
abstract classmethod GetSofaText(pID As %Integer) as %String [ Language = objectscript ]
Retrieves the text contents of a given SofA, identified by its internal ID
classmethod Markup(Output pText As %String, pDocID As %RawString, pSofaID As %String = "_InitialView", pRequest As %DynamicObject = "", ByRef pMarkup As %DynamicObject = "") as %Status [ Language = objectscript ]
Marks up the default SofA for the record identified by pDocID For pRequest, see GetAnnotations(), but only the "types" and "tables" properties are supported. pMarkup object format:
{	"method" : "CSS", (= default)
	"feature" : "Type", (= default)
	"styleMap" : { 						// if supplied, this takes precedence over the top-level "types"
		"com.intersystems.*" : "myStyle" 	// if not supplied, it will be generated automatically per actual type
	}
}
abstract classmethod PurgeAllAnnotations(pPurgeManualAnnotations As %Boolean = 0) as %Status [ Language = objectscript ]
Purges all annotations in the store. If pPurgeManualAnnotations is false (default), any annotations added manually and the SofA they may refer to, will be preserved.
abstract classmethod PurgeDocumentAnnotations(pDocID As %String, pPurgeManualAnnotations As %Boolean = 0) as %Status [ Language = objectscript ]
Purges all annotations in the store for a given document. If pPurgeManualAnnotations is false (default), any annotations added manually and the SofA they may refer to, will be preserved.