Tabnine Logo
Header.setDocId
Code IndexAdd Tabnine to your IDE (free)

How to use
setDocId
method
in
de.julielab.jules.types.pubmed.Header

Best Java code snippets using de.julielab.jules.types.pubmed.Header.setDocId (Showing top 3 results out of 315)

origin: ch.epfl.bbp.nlp/bluima_mongodb

@Override
public void getNext(JCas jCas) throws IOException, CollectionException {
  DBObject doc = cur.next();
  Header h = new Header(jCas);
  h.setDocId(doc.get("_id").toString());
  h.addToIndexes();
  Map<String, Integer> dbDeleteKeys = new HashMap<String, Integer>();
  for (String deleteKeyName : keysToDelete) {
    if (doc.containsField(deleteKeyName))
      dbDeleteKeys.put(deleteKeyName, 1);
  }
  // insert all dbLists
  BasicDBObject updateQuery = new BasicDBObject("_id", doc.get("_id")
      .toString());
  BasicDBObject updateCommands = new BasicDBObject();
  updateCommands.put("$unset", dbDeleteKeys);
  coll.update(updateQuery, updateCommands, false, false);
}
origin: ch.epfl.bbp.nlp/bluima_db

static void getNext(JCas jcas, ResultSet res_, boolean expandAbbrevs_)
    throws CollectionException {
  try {
    int pmid = res_.getInt(1);
    String title = res_.getString(2);
    String abstrct = res_.getString(3);
    if (abstrct == null)
      abstrct = "";
    Header h = new Header(jcas);
    h.setDocId(pmid + "");
    h.setTitle(title);
    h.addToIndexes();
    if (expandAbbrevs_) {
      abstrct = AbbreviationExpander.expand(abstrct);
    }
    jcas.setDocumentText(abstrct);
  } catch (SQLException e) {
    throw new CollectionException(e);
  }
}
origin: ch.epfl.bbp.nlp/bluima_mongodb

  jCas.setDocumentText("");
Header h = new Header(jCas);
h.setDocId(doc.get(ID).toString());
if (doc.containsField(TITLE) && doc.get(TITLE) != null)
  h.setTitle(doc.get(TITLE).toString());
de.julielab.jules.types.pubmedHeadersetDocId

Popular methods of Header

  • <init>
  • addToIndexes
  • setTitle
  • readObject
    Write your own initialization here
  • setBegin
  • setEnd

Popular in Java

  • Updating database using SQL prepared statement
  • getSystemService (Context)
  • compareTo (BigDecimal)
  • setContentView (Activity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now