|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xces.graf.uima.example.Example
public class Example
This class is an example 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/
| Constructor Summary | |
|---|---|
Example()
|
|
| Method Summary | |
|---|---|
org.apache.uima.cas.CAS |
convertGraphToCas(org.xces.graf.api.IGraph graph,
org.xces.graf.util.NameMap map)
Converts a Graph to a CAS |
void |
dumpCasToXmi(org.apache.uima.cas.CAS aCas,
File file)
Serializes a CAS to XMI -- its representation in XML |
static String |
getContents(String file)
Returns the contents of a file in the form of a String object |
static void |
main(String[] args)
|
void |
run()
Runs the example |
void |
saveTypeSystem(org.apache.uima.cas.CAS aCas,
File destination)
Creates an ECORE file for the type system used for a CAS object |
org.xces.graf.api.IGraph |
toyGraph()
Returns a "Hello World." toy graph |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Example()
| Method Detail |
|---|
public org.apache.uima.cas.CAS convertGraphToCas(org.xces.graf.api.IGraph graph,
org.xces.graf.util.NameMap map)
throws TypeSystemException,
org.apache.uima.resource.ResourceInitializationException,
SAXException,
IOException
graph -
IOException
SAXException
TypeSystemException
org.apache.uima.resource.ResourceInitializationException
public void dumpCasToXmi(org.apache.uima.cas.CAS aCas,
File file)
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 -
SAXException
IOException
public org.xces.graf.api.IGraph toyGraph()
throws org.xces.graf.api.GrafException
org.xces.graf.api.GrafException
public void run()
throws org.xces.graf.api.GrafException,
org.apache.uima.resource.ResourceInitializationException,
TypeSystemException
org.xces.graf.api.GrafException
org.apache.uima.resource.ResourceInitializationException
TypeSystemException
public static String getContents(String file)
throws Exception
file -
IOException
Exceptionpublic static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||