/** @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 ArgumentMention(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
uimaArg = new ArgumentMention(aJCas, protein.getBegin(), protein.getEnd()); uimaArg.setRef(protein); uimaArg.setRole(determineArgumentRole(uimaEvent, uimaArg, argPos)); } else if (bioSemArg instanceof PData) { PData eventArg = (PData) bioSemArg; + eventArg.toString() + "\" failed, the UIMA EventMention is null."); uimaArg = new ArgumentMention(aJCas, uimaEventArg.getBegin(), uimaEventArg.getEnd()); uimaArg.setRef(uimaEventArg); uimaArg.setRole(determineArgumentRole(uimaEvent, uimaArg, argPos)); } else { throw new IllegalArgumentException(
ArgumentMention argument = (ArgumentMention) arguments.get(i); if (argument != null) { Annotation reference = argument.getRef(); if (null == reference) throw new IllegalArgumentException( + "; EventMention: " + event); line += argument.getRole() + ":" + reference.getId(); if (i < arguments.size() - 1) line += " ";
/** * * @param uimaEvent * @param uimaArg * @param argPos * @return * <ul> * <li><em>Theme</em> if <tt>argPos</tt> is 1</li> * <li><em>Theme2</em> when it's the second argument and it's a * protein (actually: when the argument is not another * <tt>EventMention</tt>) and the event type is "Binding"</li> * <li><em>Cause</em> otherwise</li> * </ul> */ private String determineArgumentRole(EventMention uimaEvent, ArgumentMention uimaArg, int argPos) { if (argPos == 1) { return "Theme"; } if (uimaEvent.getSpecificType().equals("Binding") && !(uimaArg.getRef() instanceof EventMention)) { return "Theme2"; } return "Cause"; }
/** @generated * @param jcas JCas to which this Feature Structure belongs */ public ArgumentMention(JCas jcas) { super(jcas); readObject(); }
/** Internal - constructor used by generator * @generated * @param addr low level Feature Structure reference * @param type the type of this Feature Structure */ public ArgumentMention(int addr, TOP_Type type) { super(addr, type); readObject(); }