You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by ea...@apache.org on 2008/07/03 03:51:41 UTC
svn commit: r673561 - in /incubator/uima/uimacpp/trunk: scriptators/uima.i
src/cas/uima/cas.hpp
Author: eae
Date: Wed Jul 2 18:51:40 2008
New Revision: 673561
URL: http://svn.apache.org/viewvc?rev=673561&view=rev
Log:
UIMA-1103 Add throw for selected APIs in uima.i. Clean up exception documentation in cas.hpp.
Modified:
incubator/uima/uimacpp/trunk/scriptators/uima.i
incubator/uima/uimacpp/trunk/src/cas/uima/cas.hpp
Modified: incubator/uima/uimacpp/trunk/scriptators/uima.i
URL: http://svn.apache.org/viewvc/incubator/uima/uimacpp/trunk/scriptators/uima.i?rev=673561&r1=673560&r2=673561&view=diff
==============================================================================
--- incubator/uima/uimacpp/trunk/scriptators/uima.i (original)
+++ incubator/uima/uimacpp/trunk/scriptators/uima.i Wed Jul 2 18:51:40 2008
@@ -255,18 +255,22 @@
%nodefault CAS;
class CAS {
public:
-// bool isTCAS() const;
FSIterator iterator();
- FSIndexRepository &getIndexRepository();
- FeatureStructure createFS(Type const &);
+ FSIndexRepository &getIndexRepository() throw (CASException);
+ FeatureStructure createFS(Type const &) throw (CASException);
TypeSystem const &getTypeSystem() const;
ANIndex getAnnotationIndex(Type const &type);
+ void setDocumentText(UnicodeStringRef const &text) throw (CASException);
UnicodeStringRef getDocumentText() const;
- AnnotationFS createAnnotation(Type const &type, size_t uiBeginPos, size_t uiEndPos);
+ void setSofaDataString(UnicodeStringRef const &text, UnicodeString const &mimetype) throw (CASException);
+ void setSofaDataArray(FeatureStructure array, UnicodeString const &mime) throw (CASException);
+ void setSofaDataURI(UnicodeString const &uri, UnicodeString const &mime) throw (CASException);
+ UnicodeStringRef getSofaDataURI();
+ AnnotationFS createAnnotation(Type const &type, size_t uiBeginPos, size_t uiEndPos) throw (CASException);
SofaFS getSofa();
-// SofaFS createSofa(const char* sofaName, const char* mimeType);
- CAS* getView(const char* viewName);
- CAS* createView(const char* sofaName);
+//Deprecated SofaFS createSofa(const char* sofaName, const char* mimeType);
+ CAS* getView(const char* viewName) throw (CASException);
+ CAS* createView(const char* sofaName) throw (CASException);
%extend {
SofaFS getSofa(AnnotatorContext &ac, const UnicodeString &sofaName) {
return self->getSofa(ac.mapToSofaID(sofaName));
@@ -298,7 +302,7 @@
size_t getBeginPosition() const;
size_t getEndPosition() const;
size_t getLength() const;
- UnicodeStringRef getCoveredText() const;
+ UnicodeStringRef getCoveredText() const throw (CASException);
};
class SofaFS : public FeatureStructure {
Modified: incubator/uima/uimacpp/trunk/src/cas/uima/cas.hpp
URL: http://svn.apache.org/viewvc/incubator/uima/uimacpp/trunk/src/cas/uima/cas.hpp?rev=673561&r1=673560&r2=673561&view=diff
==============================================================================
--- incubator/uima/uimacpp/trunk/src/cas/uima/cas.hpp (original)
+++ incubator/uima/uimacpp/trunk/src/cas/uima/cas.hpp Wed Jul 2 18:51:40 2008
@@ -499,6 +499,8 @@
/**
* Return the index repository for index use
+ * @throws CASException
+ * if View is the base CAS
*/
FSIndexRepository & getIndexRepository( void );
@@ -549,7 +551,7 @@
* same as the associated Sofa name).
*
* @return The view corresponding to this local name.
- * @throws CASRuntimeException
+ * @throws CASException
* if no View with this name exists in this CAS
*/
CAS* getView(const icu::UnicodeString & localViewName);
@@ -576,7 +578,7 @@
* same as the associated Sofa name).
*
* @return The view corresponding to this local name.
- * @throws CASRuntimeException
+ * @throws CASException
* if a View with this name already exists in this CAS
*/
CAS * createView(icu::UnicodeString const & localViewName);
@@ -595,8 +597,8 @@
*
* @param text
* The text to be analyzed.
- * @exception CASRuntimeException
- * If the Sofa data has already been set.
+ * @exception CASException
+ * If the Sofa data has already been set, or View is base CAS.
*/
void setDocumentText(UnicodeStringRef const text);
@@ -614,8 +616,8 @@
* The text to be analyzed.
* @param mime
* The mime type of the data
- * @exception CASRuntimeException
- * If the Sofa data has already been set.
+ * @exception CASException
+ * If the Sofa data has already been set, or View is base CAS.
*/
virtual void setSofaDataString(UnicodeStringRef const text, icu::UnicodeString const & mimetype);
@@ -641,8 +643,8 @@
* The ArrayFS to be analyzed.
* @param mime
* The mime type of the data
- * @exception CASRuntimeException
- * If the Sofa data has already been set.
+ * @exception CASException
+ * If the Sofa data has already been set, or View is base CAS.
*/
virtual void setSofaDataArray(FeatureStructure array, icu::UnicodeString const & mime);
@@ -661,8 +663,8 @@
* The URI of the data to be analyzed.
* @param mime
* The mime type of the data
- * @exception CASRuntimeException
- * If the Sofa data has already been set.
+ * @exception CASException
+ * If the Sofa data has already been set, or View is base CAS.
*/
virtual void setSofaDataURI(icu::UnicodeString const & uri, icu::UnicodeString const & mime);
@@ -707,6 +709,8 @@
* <code>type</code> must be a subtype of type Annotation.
* Note that this will not commit the new feature structure to the
* appropriate indexes. To do this CAS::commitFS() has to be called.
+ * @throws CASException
+ * if specified type is not an annotation, or View is base CAS.
*/
virtual AnnotationFS createAnnotation( Type const & type, size_t uiBeginPos, size_t uiEndPos );
@@ -1215,6 +1219,8 @@
size_t getLength( void ) const;
/**
* Get a reference to the text spanned by this annotation feature structure.
+ * @throws CASException
+ * if FS is not a valid annotation.
*/
UnicodeStringRef getCoveredText( void ) const;