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 2009/10/21 18:41:56 UTC

svn commit: r828097 - in /incubator/uima/uimacpp/trunk/src/framework: taespecifier.cpp taespecifierbuilder.cpp uima/taespecifierbuilder.hpp uima/typesystemdescription.hpp

Author: eae
Date: Wed Oct 21 16:41:55 2009
New Revision: 828097

URL: http://svn.apache.org/viewvc?rev=828097&view=rev
Log:
UIMA-1628

Modified:
    incubator/uima/uimacpp/trunk/src/framework/taespecifier.cpp
    incubator/uima/uimacpp/trunk/src/framework/taespecifierbuilder.cpp
    incubator/uima/uimacpp/trunk/src/framework/uima/taespecifierbuilder.hpp
    incubator/uima/uimacpp/trunk/src/framework/uima/typesystemdescription.hpp

Modified: incubator/uima/uimacpp/trunk/src/framework/taespecifier.cpp
URL: http://svn.apache.org/viewvc/incubator/uima/uimacpp/trunk/src/framework/taespecifier.cpp?rev=828097&r1=828096&r2=828097&view=diff
==============================================================================
--- incubator/uima/uimacpp/trunk/src/framework/taespecifier.cpp (original)
+++ incubator/uima/uimacpp/trunk/src/framework/taespecifier.cpp Wed Oct 21 16:41:55 2009
@@ -1419,11 +1419,16 @@
               s.append("<rangeTypeName>");
               s.append(fs->getRangeTypeName());
               s.append("</rangeTypeName>");
-			        if (fs->isMultipleReferencesAllowed() ) {
-				        s.append("<multipleReferencesAllowed>");
+              if (0 < fs->getElementType().length() ) {
+                s.append("<elementType>");
+                s.append(fs->getElementType());
+                s.append("</elementType>");
+              }
+              if (fs->isMultipleReferencesAllowed() ) {
+                s.append("<multipleReferencesAllowed>");
                 s.append("true");
                 s.append("</multipleReferencesAllowed>");
-			        }
+              }
               s.append("</featureDescription>");
             }
             s.append("</features>");

Modified: incubator/uima/uimacpp/trunk/src/framework/taespecifierbuilder.cpp
URL: http://svn.apache.org/viewvc/incubator/uima/uimacpp/trunk/src/framework/taespecifierbuilder.cpp?rev=828097&r1=828096&r2=828097&view=diff
==============================================================================
--- incubator/uima/uimacpp/trunk/src/framework/taespecifierbuilder.cpp (original)
+++ incubator/uima/uimacpp/trunk/src/framework/taespecifierbuilder.cpp Wed Oct 21 16:41:55 2009
@@ -1101,6 +1101,8 @@
         featureDesc->setName(getSpannedText(child));
       } else if (childTag.compare(TAG_TYPE_DESC_FEAT_DESC_RANGE) == 0) {
         featureDesc->setRangeTypeName(getSpannedText(child));
+      } else if (childTag.compare(TAG_TYPE_DESC_FEAT_DESC_ELEMENT) == 0) {
+        featureDesc->setElementType(getSpannedText(child));
       } else if (childTag.compare(TAG_TYPE_DESC_FEAT_DESC_DESC) == 0) {
         featureDesc->setDescription(getSpannedText(child));
 	  } else if (childTag.compare(TAG_TYPE_DESC_FEAT_DESC_MULTREFS) == 0) {
@@ -2376,6 +2378,7 @@
   char const * XMLParser::TAG_TYPE_DESC_FEAT_DESC="featureDescription";
   char const * XMLParser::TAG_TYPE_DESC_FEAT_DESC_NAME="name";
   char const * XMLParser::TAG_TYPE_DESC_FEAT_DESC_RANGE="rangeTypeName";
+  char const * XMLParser::TAG_TYPE_DESC_FEAT_DESC_ELEMENT="elementType";
   char const * XMLParser::TAG_TYPE_DESC_FEAT_DESC_DESC="description";
   char const * XMLParser::TAG_TYPE_DESC_FEAT_DESC_MULTREFS="multipleReferencesAllowed";
 

Modified: incubator/uima/uimacpp/trunk/src/framework/uima/taespecifierbuilder.hpp
URL: http://svn.apache.org/viewvc/incubator/uima/uimacpp/trunk/src/framework/uima/taespecifierbuilder.hpp?rev=828097&r1=828096&r2=828097&view=diff
==============================================================================
--- incubator/uima/uimacpp/trunk/src/framework/uima/taespecifierbuilder.hpp (original)
+++ incubator/uima/uimacpp/trunk/src/framework/uima/taespecifierbuilder.hpp Wed Oct 21 16:41:55 2009
@@ -319,6 +319,7 @@
     static char const * TAG_TYPE_DESC_FEAT_DESC;
     static char const * TAG_TYPE_DESC_FEAT_DESC_NAME;
     static char const * TAG_TYPE_DESC_FEAT_DESC_RANGE;
+    static char const * TAG_TYPE_DESC_FEAT_DESC_ELEMENT;
     static char const * TAG_TYPE_DESC_FEAT_DESC_DESC;
 	static char const * TAG_TYPE_DESC_FEAT_DESC_MULTREFS;
     static char const * TAG_TYPE_PRIORITIES;

Modified: incubator/uima/uimacpp/trunk/src/framework/uima/typesystemdescription.hpp
URL: http://svn.apache.org/viewvc/incubator/uima/uimacpp/trunk/src/framework/uima/typesystemdescription.hpp?rev=828097&r1=828096&r2=828097&view=diff
==============================================================================
--- incubator/uima/uimacpp/trunk/src/framework/uima/typesystemdescription.hpp (original)
+++ incubator/uima/uimacpp/trunk/src/framework/uima/typesystemdescription.hpp Wed Oct 21 16:41:55 2009
@@ -104,12 +104,13 @@
 
     FeatureDescription()
         :MetaDataObject(), iv_name(), iv_description(), iv_rangeType(), 
-	                  iv_multipleRefsAllowed(false) {}
+              iv_elementType(), iv_multipleRefsAllowed(false) {}
 
     FeatureDescription(const FeatureDescription & crOther) {
       iv_name = crOther.getName();
       iv_description = crOther.getDescription();
       iv_rangeType = crOther.getRangeTypeName();
+      iv_elementType = crOther.getElementType();
       iv_multipleRefsAllowed =  crOther.isMultipleReferencesAllowed();
     }
 
@@ -137,6 +138,18 @@
       return iv_rangeType;
     }
 
+    TyErrorId setElementType(const icu::UnicodeString & elementName) {
+      if (! isModifiable()) {
+        return UIMA_ERR_CONFIG_OBJECT_COMITTED;
+      }
+      iv_elementType = elementName;
+      return UIMA_ERR_NONE;
+    }
+
+    const icu::UnicodeString & getElementType() const {
+      return iv_elementType;
+    }
+
     TyErrorId setDescription(const icu::UnicodeString & desc) {
       if (! isModifiable()) {
         return UIMA_ERR_CONFIG_OBJECT_COMITTED;
@@ -165,6 +178,7 @@
     icu::UnicodeString iv_name;
     icu::UnicodeString iv_description;
     icu::UnicodeString iv_rangeType;
+    icu::UnicodeString iv_elementType;
 	bool iv_multipleRefsAllowed;
   };