uima-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ala...@apache.org
Subject svn commit: r492218 - /incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/CasDefinition.java
Date Wed, 03 Jan 2007 16:54:25 GMT
Author: alally
Date: Wed Jan  3 08:54:24 2007
New Revision: 492218

URL: http://svn.apache.org/viewvc?view=rev&rev=492218
Log:
Add CasDefinition.getProcessingResourceMetaData

Modified:
    incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/CasDefinition.java

Modified: incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/CasDefinition.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/CasDefinition.java?view=diff&rev=492218&r1=492217&r2=492218
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/CasDefinition.java
(original)
+++ incubator/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/CasDefinition.java
Wed Jan  3 08:54:24 2007
@@ -25,6 +25,7 @@
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.uima.UIMAFramework;
 import org.apache.uima.resource.metadata.FsIndexCollection;
 import org.apache.uima.resource.metadata.FsIndexDescription;
 import org.apache.uima.resource.metadata.ProcessingResourceMetaData;
@@ -154,5 +155,23 @@
     } else {
       return null;
     }
+  }
+  
+  /**
+   * Constructs and returns a <code>ProcessingResourceMetaData</code> object
+   * that contains the type system, indexes, and type priorities definitions
+   * for the CAS.
+   * 
+   * @return processing resource metadata object containing the 
+   *   relevant parts of the CAS definition
+   */
+  public ProcessingResourceMetaData getProcessingResourceMetaData() {
+    ProcessingResourceMetaData md = UIMAFramework.getResourceSpecifierFactory().createProcessingResourceMetaData();
+    md.setTypeSystem(getTypeSystemDescription());
+    md.setTypePriorities(getTypePriorities());
+    FsIndexCollection indColl = UIMAFramework.getResourceSpecifierFactory().createFsIndexCollection();
+    indColl.setFsIndexes(getFsIndexDescriptions());
+    md.setFsIndexCollection(indColl);
+    return md;
   }
 }



Mime
View raw message