/** @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 TreebankNode(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); 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 TreebankNode(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); 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 TreebankNode(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); 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 TreebankNode(JCas jcas, int begin, int end) { super(jcas); setBegin(begin); setEnd(end); readObject(); }
parent.setEnd(((TreebankNode)children.get(subtrees.length-1)).getEnd()); parent.setChildren(children);
parent.setEnd(((TreebankNode)children.get(subtrees.length-1)).getEnd()); parent.setChildren(children);
public static TreebankNode getTreeCopy(JCas jcas, TreebankNode orig){ TreebankNode copy = null; if(orig instanceof TerminalTreebankNode){ copy = new TerminalTreebankNode(jcas); copy.setLeaf(true); copy.setChildren(null); }else{ copy = new TreebankNode(jcas); copy.setChildren(new FSArray(jcas, orig.getChildren().size())); for(int i = 0; i < orig.getChildren().size(); i++){ copy.setChildren(i, getTreeCopy(jcas, orig.getChildren(i))); copy.getChildren(i).setParent(copy); } } copy.setNodeType(orig.getNodeType()); copy.setNodeValue(orig.getNodeValue()); copy.setBegin(orig.getBegin()); copy.setEnd(orig.getEnd()); return copy; }
public static TreebankNode getTreeCopy(JCas jcas, TreebankNode orig){ TreebankNode copy = null; if(orig instanceof TerminalTreebankNode){ copy = new TerminalTreebankNode(jcas); copy.setLeaf(true); copy.setChildren(null); }else{ copy = new TreebankNode(jcas); copy.setChildren(new FSArray(jcas, orig.getChildren().size())); for(int i = 0; i < orig.getChildren().size(); i++){ copy.setChildren(i, getTreeCopy(jcas, orig.getChildren(i))); copy.getChildren(i).setParent(copy); } } copy.setNodeType(orig.getNodeType()); copy.setNodeValue(orig.getNodeValue()); copy.setBegin(orig.getBegin()); copy.setEnd(orig.getEnd()); return copy; }