/** @generated * @param jcas JCas to which this Feature Structure belongs */ public ManualDescriptor(JCas jcas) { super(jcas); readObject(); }
/** @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public Header(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
/** @generated * @param jcas JCas to which this Feature Structure belongs */ public Header(JCas jcas) { super(jcas); readObject(); }
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); } }
@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); }
/** @generated * @param jcas JCas to which this Feature Structure belongs * @param begin offset to the begin spot in the SofA * @param end offset to the end spot in the SofA */ public ManualDescriptor(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
public FeatureStructure createFS(int addr, CASImpl cas) { if (Header_Type.this.useExistingInstance) { // Return eq fs instance if already created FeatureStructure fs = Header_Type.this.jcas.getJfsFromCaddr(addr); if (null == fs) { fs = new Header(addr, Header_Type.this); Header_Type.this.jcas.putJfsFromCaddr(addr, fs); return fs; } return fs; } else return new Header(addr, Header_Type.this); } };
public FeatureStructure createFS(int addr, CASImpl cas) { if (ManualDescriptor_Type.this.useExistingInstance) { // Return eq fs instance if already created FeatureStructure fs = ManualDescriptor_Type.this.jcas.getJfsFromCaddr(addr); if (null == fs) { fs = new ManualDescriptor(addr, ManualDescriptor_Type.this); ManualDescriptor_Type.this.jcas.putJfsFromCaddr(addr, fs); return fs; } return fs; } else return new ManualDescriptor(addr, ManualDescriptor_Type.this); } };
/** initialize variables to correspond with Cas Type and Features * @generated * @param jcas JCas * @param casType Type */ public Header_Type(JCas jcas, Type casType) { super(jcas, casType); casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator()); casFeat_citationStatus = jcas.getRequiredFeatureDE(casType, "citationStatus", "de.julielab.jules.types.CitationStatus", featOkTst); casFeatCode_citationStatus = (null == casFeat_citationStatus) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_citationStatus).getCode(); } }
casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());
else 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()); else h.setTitle(""); h.addToIndexes();
/** Internal - constructor used by generator * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public ManualDescriptor(int addr, TOP_Type type) { super(addr, type); readObject(); }
/** Internal - constructor used by generator * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public Header(int addr, TOP_Type type) { super(addr, type); readObject(); }