|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xces.graf.uima.convert.Graf2CAS
public class Graf2CAS
uses App.java to utilize command line input. This class is an updated version of example.java by Madhav Krishna of how one can use the CASFactory class to convert a Graph to a CAS: updated to work with xmlns="http://www.xces.org/ns/GrAF/1.0/
| Field Summary | |
|---|---|
protected static org.slf4j.Logger |
logger
|
| Constructor Summary | |
|---|---|
Graf2CAS()
|
|
| Method Summary | |
|---|---|
void |
convert(File inputFile,
File outputDirectory,
File resourceHeaderFile,
ArrayList<String> sOFileTypes)
convert method, calls original convert method just accepts resource header as a file instead of resource header object this is the original convert header, however the method is new to UimaUtils 2.0.0. |
void |
convert(File inputFile,
File outputDirectory,
org.xces.graf.io.dom.ResourceHeader header,
ArrayList<String> sOFileTypes)
Runs Graf2CAS |
org.apache.uima.cas.CAS |
convertGraphToCas(org.xces.graf.api.IGraph graph,
org.xces.graf.util.NameMap map)
Converts a Graph to a CAS |
protected void |
copyIntoTypeSystem(org.apache.uima.cas.CAS cas,
org.xces.graf.util.NameMap nameMap,
org.xces.graf.api.IGraph aGraph)
copies TypeSystem from CAS to the global variable Master Type System |
void |
dumpCasToXmi(org.apache.uima.cas.CAS aCas,
File file,
File outputDirectory)
Serializes a CAS to XMI -- its representation in XML |
void |
generateTypeSystem(boolean generate)
set to false to disable the generation of a UIMA Type system file. |
static String |
getContents(String file)
Returns the contents of a file in the form of a String object |
void |
saveTypeSystem(org.apache.uima.cas.CAS aCas,
File destination)
Creates an ECORE file for the type system used for a CAS object |
void |
saveTypeSystem(org.apache.uima.cas.TypeSystem typeSystem,
File destination)
Creates an ECORE file for all the GrAF files that were converted to CAS objects |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.slf4j.Logger logger
| Constructor Detail |
|---|
public Graf2CAS()
| Method Detail |
|---|
public org.apache.uima.cas.CAS convertGraphToCas(org.xces.graf.api.IGraph graph,
org.xces.graf.util.NameMap map)
throws SAXException,
IOException,
org.apache.uima.cas.CASException,
org.xces.graf.api.GrafException,
TypeSystemException
graph -
IOException
SAXException
org.xces.graf.api.GrafException
org.apache.uima.cas.CASException
TypeSystemException
public void dumpCasToXmi(org.apache.uima.cas.CAS aCas,
File file,
File outputDirectory)
throws org.apache.uima.resource.ResourceProcessException,
IOException
aCas -
org.apache.uima.resource.ResourceProcessException
IOException
public void saveTypeSystem(org.apache.uima.cas.CAS aCas,
File destination)
throws IOException,
SAXException
aCas -
IOException,SAXException
IOException
SAXException
public void saveTypeSystem(org.apache.uima.cas.TypeSystem typeSystem,
File destination)
throws IOException,
SAXException
typeSystem - destination -
IOException
SAXExceptionpublic void generateTypeSystem(boolean generate)
generate -
public void convert(File inputFile,
File outputDirectory,
File resourceHeaderFile,
ArrayList<String> sOFileTypes)
throws org.xces.graf.api.GrafException,
org.apache.uima.resource.ResourceInitializationException,
TypeSystemException,
IOException
inputFile - outputDirectory - resourceHeaderFile - sOFileTypes -
org.xces.graf.api.GrafException
org.apache.uima.resource.ResourceInitializationException
TypeSystemException
IOException
public void convert(File inputFile,
File outputDirectory,
org.xces.graf.io.dom.ResourceHeader header,
ArrayList<String> sOFileTypes)
throws org.xces.graf.api.GrafException,
org.apache.uima.resource.ResourceInitializationException,
TypeSystemException,
IOException
org.xces.graf.api.GrafException
org.apache.uima.resource.ResourceInitializationException
TypeSystemException
IOException
public static String getContents(String file)
throws Exception
file -
IOException
Exception
protected void copyIntoTypeSystem(org.apache.uima.cas.CAS cas,
org.xces.graf.util.NameMap nameMap,
org.xces.graf.api.IGraph aGraph)
throws TypeSystemException
cas - nameMap - aGraph -
TypeSystemException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||