Examples of DocumentId


Examples of com.bluetangstudio.searchcloud.client.model.DocumentId

            new DefaultHttpClientFactory(),
            URI.create("http://localhost:" + port), "apikey"
        );

        UserModelId modelId = new UserModelId(new UserId("test"), "testGetDocument");
        DocumentId docId = new DocumentId(10);
        Document document = client.getDocument(new GetDocumentRequest(modelId, docId));

        Assert.assertNotNull(document);
        Assert.assertEquals(document.getId(), docId);
    }
View Full Code Here

Examples of edu.stanford.bmir.protege.web.client.rpc.data.DocumentId

     * the documentId of the upload.
     * @return The document Id
     */
    public DocumentId getDocumentId() {
        if(jsonObject == null) {
            return new DocumentId("");
        }
        if(!wasUploadAccepted()) {
            return new DocumentId("");
        }
        JSONValue value = jsonObject.get(FileUploadResponseAttributes.UPLOAD_FILE_ID.name());
        if(value == null) {
            return new DocumentId("");
        }
        JSONString string = value.isString();
        if(string == null) {
            return new DocumentId("");
        }
        return new DocumentId(string.stringValue().trim());
    }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.structured.DocumentID

  public static class DocumentIDAnnotator extends JCasAnnotator_ImplBase {

    @Override
    public void process(JCas jCas) throws AnalysisEngineProcessException {
      String documentID = new File(ViewURIUtil.getURI(jCas)).getName();
      DocumentID documentIDAnnotation = new DocumentID(jCas);
      documentIDAnnotation.setDocumentID(documentID);
      documentIDAnnotation.addToIndexes();
    }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.structured.DocumentID

  public static class DocumentIDAnnotator extends JCasAnnotator_ImplBase {

    @Override
    public void process(JCas jCas) throws AnalysisEngineProcessException {
      String documentID = new File(ViewURIUtil.getURI(jCas)).getPath();
      DocumentID documentIDAnnotation = new DocumentID(jCas);
      documentIDAnnotation.setDocumentID(documentID);
      documentIDAnnotation.addToIndexes();
    }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.structured.DocumentID

    for (String knowtatorTextDirectoryPath : args) {
      File knowtatorTextDirectory = new File(knowtatorTextDirectoryPath);
      for (File textFile : knowtatorTextDirectory.listFiles()) {
        JCas jCas = engine.newJCas();
        jCas.setDocumentText(Files.toString(textFile, Charsets.US_ASCII));
        DocumentID documentID = new DocumentID(jCas);
        documentID.setDocumentID(textFile.toURI().toString());
        documentID.addToIndexes();
        engine.process(jCas);
        documentID.setDocumentID(textFile.getName());
        xWriter.process(jCas);
      }
    }

  }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.structured.DocumentID

                    // No CAS Initiliazer, so set document text ourselves.
                    // put document in CAS (assume CAS)
                    cas.getJCas().setDocumentText(document);
                }

                DocumentID docIdAnnot = new DocumentID(cas
                        .getJCas());
                docIdAnnot.setDocumentID(getDocumentID(rs));
                docIdAnnot.addToIndexes();

                logger.info("Reading document with ID="
                        + docIdAnnot.getDocumentID());
            } catch (Exception e)
            {
                logger.error("CasInitializer failed to process document: ");
                logger.error(document);
                throw e;
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.structured.DocumentID

          fileInputStream.close();
     
       
    }

    DocumentID documentIDAnnotation = new DocumentID(jCas);
    documentIDAnnotation.setDocumentID(filename);
    documentIDAnnotation.addToIndexes();

   
    this.completed += 1;
  }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.structured.DocumentID

 
  NegExAnnotation a = list.get(i);
  i++;

  jCas.setDocumentText(a.sentenceText);
  DocumentID documentID = new DocumentID(jCas);
  documentID.setDocumentID("doc" + a.lineNumber);
  documentID.addToIndexes();
  EventMention ia = new EventMention(jCas);
  ia.setBegin(Integer.parseInt(a.begin));
  ia.setEnd(Integer.parseInt(a.end));
  if (!skipReadingValuesJustReadText) ia.setPolarity(Integer.parseInt(a.polarity));
  ia.addToIndexes();
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.structured.DocumentID

      int i = knowtatorTextSourceFiles.length;
      LOGGER.info("Processing " + i + " knowtator text source files for this directory.");
      for (File textFile : knowtatorTextSourceFiles) {
        JCas jCas = mipacqReader.newJCas();
        jCas.setDocumentText(Files.toString(textFile, Charsets.US_ASCII));
        DocumentID documentID = new DocumentID(jCas);
        documentID.setDocumentID(textFile.toURI().toString());
        documentID.addToIndexes();
        mipacqReader.process(jCas);
        documentID.setDocumentID(textFile.getName());
        xWriter.process(jCas);
      }
    }

  }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.structured.DocumentID

      JFSIndexRepository indexes = jcas.getJFSIndexRepository();
     
     FSIterator<TOP> documentIDIterator = indexes.getAllIndexedFS(DocumentID.type);
      if(documentIDIterator.hasNext())
      {
        DocumentID dia = (DocumentID)documentIDIterator.next();
        iv_sb.append(dia.getDocumentID());
      }
      else
      {
        iv_sb.append("Error in CasInitializer(?) NO_DOC_ID");
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.