Package org.apache.uima.impl

Examples of org.apache.uima.impl.SofaID_impl


   */
  public void testMain() throws Exception {
    try {

      // Create a Sofa (using old APIs for now)
      SofaID_impl id = new SofaID_impl();
      id.setSofaID("EnglishDocument");
      SofaFS es = this.cas.createSofa(id, "text");
      // Initial View is #1!!!
      assertTrue(2 == es.getSofaRef());

      // Set the document text
View Full Code Here


    testView.setDocumentText("create a 2nd Sofa");
    assertTrue( this.cas.getViewName().equals("_InitialView"));
    assertTrue( testView.getViewName().equals("TestView"));
   
    this.cas.reset();
    SofaID_impl id = new SofaID_impl();
    id.setSofaID("TestView");
    SofaFS testSofa = this.cas.createSofa(id, "text");
    CAS newView = this.cas.getView(testSofa);
    assertTrue( newView.getViewName().equals("TestView"));
  }
View Full Code Here

   */
  public void testMain() throws Exception {
    try {

      // Create a Sofa using OLD APIs for now
      SofaID_impl id = new SofaID_impl();
      id.setSofaID("EnglishDocument");
      Sofa es = new Sofa(jcas, id, "text");
      // Initial View is #1!!!
      assertTrue(2 == es.getSofaRef());

      // Set the document text
View Full Code Here

      CAS newCas = CasCreationUtils.createCas(typeSystem, null, null);
      File xcasFile = JUnitExtension.getFile("ExampleCas/multiSofaCas.xml");
      XCASDeserializer.deserialize(new FileInputStream(xcasFile), newCas);
      JCas newJCas = newCas.getJCas();
     
      SofaID sofaId = new SofaID_impl("EnglishDocument");
      JCas view = newJCas.getView(newJCas.getSofa(sofaId));
    }
    catch (Exception e) {
      JUnitExtension.handleException(e);     
    }     
View Full Code Here

   */
  public void testMain() throws Exception {
    try {

      // Create a Sofa using OLD APIs for now
      SofaID_impl id = new SofaID_impl();
      id.setSofaID("EnglishDocument");
      Sofa es = new Sofa(jcas, id, "text");
      // Initial View is #1!!!
      assertTrue(2 == es.getSofaRef());

      // Set the document text
View Full Code Here

      CAS newCas = CasCreationUtils.createCas(typeSystem, null, null);
      File xcasFile = JUnitExtension.getFile("ExampleCas/multiSofaCas.xml");
      XCASDeserializer.deserialize(new FileInputStream(xcasFile), newCas);
      JCas newJCas = newCas.getJCas();
     
      SofaID sofaId = new SofaID_impl("EnglishDocument");
      JCas view = newJCas.getView(newJCas.getSofa(sofaId));
    }
    catch (Exception e) {
      JUnitExtension.handleException(e);     
    }     
View Full Code Here

   */
  public void testMain() throws Exception {
    try {

      // Create a Sofa (using old APIs for now)
      SofaID_impl id = new SofaID_impl();
      id.setSofaID("EnglishDocument");
      SofaFS es = this.cas.createSofa(id, "text");
      // Initial View is #1!!!
      assertTrue(2 == es.getSofaRef());

      // Set the document text
View Full Code Here

    testView.setDocumentText("create a 2nd Sofa");
    assertTrue( this.cas.getViewName().equals("_InitialView"));
    assertTrue( testView.getViewName().equals("TestView"));
   
    this.cas.reset();
    SofaID_impl id = new SofaID_impl();
    id.setSofaID("TestView");
    SofaFS testSofa = this.cas.createSofa(id, "text");
    CAS newView = this.cas.getView(testSofa);
    assertTrue( newView.getViewName().equals("TestView"));
  }
View Full Code Here

   */
  public void testMain() throws Exception {
    try {

      // Create a Sofa using OLD APIs for now
      SofaID_impl id = new SofaID_impl();
      id.setSofaID("EnglishDocument");
      Sofa es = new Sofa(jcas, id, "text");
      // Initial View is #1!!!
      assertTrue(2 == es.getSofaRef());

      // Set the document text
View Full Code Here

      CAS newCas = CasCreationUtils.createCas(typeSystem, null, null);
      File xcasFile = JUnitExtension.getFile("ExampleCas/multiSofaCas.xml");
      XCASDeserializer.deserialize(new FileInputStream(xcasFile), newCas);
      JCas newJCas = newCas.getJCas();
     
      SofaID sofaId = new SofaID_impl("EnglishDocument");
      JCas view = newJCas.getView(newJCas.getSofa(sofaId));
    }
    catch (Exception e) {
      JUnitExtension.handleException(e);     
    }     
View Full Code Here

TOP

Related Classes of org.apache.uima.impl.SofaID_impl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.