00001 
00002 
00003 
00004 
00005 
00006 
00007 
00009 interface TreebankAPI {
00010 
00012 
00024 AnnotationId
00025 tree_init_tree(const AnnotationType& type, const Id& id="AGTree");
00026 
00028 
00038 bool
00039 tree_move_down(const AnnotationId& anno,
00040                const AnnotationType& type="syn",
00041                AnnotationId new_anno="");
00042 
00044 
00051 bool
00052 tree_move_up(const AnnotationId& anno);
00053 
00055 
00063 bool
00064 tree_promote_right(const AnnotationId& anno);
00065 
00067 
00075 bool
00076 tree_promote_left(const AnnotationId& anno);
00077 
00079 
00086 bool
00087 tree_demote_right(const AnnotationId& anno);
00088 
00090 
00097 bool
00098 tree_demote_left(const AnnotationId& anno);
00099 
00101 
00107 AnnotationId
00108 tree_first_tree(const AGId& agId);
00109 
00111 
00117 AnnotationId
00118 tree_last_tree(const AGId& agId);
00119 
00121 
00132 bool
00133 tree_move(const AnnotationId& x, const AnnotationId& y);
00134 
00136 
00148 AnnotationId
00149 tree_insert_node_left(const AnnotationId& x,
00150                       const AnnotationType& type="wrd",
00151                       AnnotationId annoId="");
00152 
00154 
00166 AnnotationId
00167 tree_insert_node_right(const AnnotationId& x,
00168                        const AnnotationType& type="wrd",
00169                        AnnotationId annoId="");
00170 
00172 
00179 bool
00180 tree_delete_node_left(const AnnotationId& x);
00181 
00183 
00190 bool
00191 tree_delete_node_right(const AnnotationId& x);
00192 
00194 
00206 AnnotationId
00207 tree_root(AnnotationId x, int depth=1);
00208 
00210 
00216 AnnotationId
00217 tree_parent(const AnnotationId& x);
00218 
00220 
00226 list<AnnotationIds>
00227 tree_children(const AnnotationId& x);
00228 
00230 
00236 AnnotationId
00237 tree_left(const AnnotationId& x);
00238 
00240 
00246 AnnotationId
00247 tree_right(const AnnotationId& x);
00248 
00250 
00257 list<AnnotationId>
00258 tree_path(AnnotationId x);
00259 
00261 
00267 AnnotationId
00268 tree_common_ancestor(const AnnotationId& x, const AnnotationId& y);
00269 
00271 
00283 AnnotationId
00284 tree_insert_node(const AnnotationId& x,
00285                  const AnnotationId& y,
00286                  const AnnotationType& type="syn",
00287                  const AnnotationId& annoId="");
00288 
00290 
00296 bool
00297 tree_delete_node(const AnnotationId& x);
00298 
00299 }