Examples of TreeVisitor


Examples of com.foundationdb.server.service.tree.TreeVisitor

        AkibanInformationSchema newAIS = finishReader(reader);
        return createValidatedShared(session, newAIS, genValue, genMap);
    }

    private void loadFromStorage(Session session, final ProtobufReader reader) throws PersistitException {
        treeService.visitStorage(session, new TreeVisitor() {
            @Override
            public void visit(Exchange ex) throws PersistitException {
                loadPrimaryProtobuf(ex, reader, null);
            }},
            SCHEMA_TREE_NAME
View Full Code Here

Examples of com.foundationdb.server.service.tree.TreeVisitor

    /** Public for test only. Should not generally be called. */
    public void cleanupDelayedTrees(final Session session, final boolean clearMemoryTables) throws PersistitException {
        treeService.visitStorage(
                session,
                new TreeVisitor() {
                    @Override
                    public void visit(final Exchange ex) throws PersistitException {
                        if(clearMemoryTables) {
                            // Don't reload memory table definitions
                            ex.clear().append(S_K_PROTOBUF_MEM).remove();
View Full Code Here

Examples of edu.stanford.nlp.trees.TreeVisitor

    }
   
    TreeReaderFactory trf = new ArabicTreeReaderFactory();
    try {
      TreeReader tr = trf.newTreeReader(new BufferedReader(new InputStreamReader(new FileInputStream(args[0]), "UTF-8")));
      TreeVisitor visitor = new MWETreeVisitorExternal();
     
      int treeId = 0;
      for (Tree tree; (tree = tr.readTree()) != null; ++treeId) {
        if (tree.value().equals("ROOT")) {
          // Skip over the ROOT tag
          tree = tree.firstChild();
        }
        visitor.visitTree(tree);
        System.out.println(tree.toString());
      }
      tr.close();
     
      System.err.printf("Processed %d trees.%n", treeId);
View Full Code Here

Examples of melnorme.utilbox.tree.TreeVisitor

 
  public AbstractSourceColoringConfigurationBlock(IPreferenceStore store) {
    this.coloringOptionsList = new SourceColoringListRoot();
   
    final ArrayList<OverlayKey> prefKeys = new ArrayList<>()
    new TreeVisitor() {
     
      @Override
      protected boolean enterNode(IElement node) {
        if(node instanceof SourceColoringElement) {
          SourceColoringElement item = (SourceColoringElement) node;
View Full Code Here

Examples of org.antlr.runtime.tree.TreeVisitor

     *
     *  Parameter must be a token.
     *  todo: do we want?
     */
    public void expandParameterizedLoops(GrammarAST root) {
        TreeVisitor v = new TreeVisitor(new GrammarASTAdaptor());
        v.visit(root, new TreeVisitorAction() {
            @Override
            public Object pre(Object t) {
                if ( ((GrammarAST)t).getType() == 3 ) {
                    return expandParameterizedLoop((GrammarAST)t);
                }
View Full Code Here

Examples of org.antlr.runtime.tree.TreeVisitor

    /** Utility visitor that sets grammar ptr in each node */
  public static void setGrammarPtr(final Grammar g, GrammarAST tree) {
    if ( tree==null ) return;
    // ensure each node has pointer to surrounding grammar
    TreeVisitor v = new TreeVisitor(new GrammarASTAdaptor());
    v.visit(tree, new TreeVisitorAction() {
      @Override
      public Object pre(Object t) { ((GrammarAST)t).g = g; return t; }
      @Override
      public Object post(Object t) { return t; }
    });
View Full Code Here

Examples of org.antlr.runtime.tree.TreeVisitor

          @Override
          public Object post(Object t) {
            return t;
          }
        };
        new TreeVisitor(ParseDriver.adaptor).visit(havingExpr, action);

        if (aliasReferences.size() > 0) {
          String havingClause = SemanticAnalyzer.this.ctx
              .getTokenRewriteStream().toString(
                  havingExpr.getTokenStartIndex(),
View Full Code Here

Examples of org.antlr.runtime.tree.TreeVisitor

    return numberOfOnChannelTokens - 1;
  }

  private static int countAllTreeTokens(CommonTokenStream tokens, CommonTree tree) {
    CountNodesAction action = new CountNodesAction(tokens);
    TreeVisitor visitor = new TreeVisitor();
    visitor.visit(tree, action);
    return action.getCount();
  }
View Full Code Here

Examples of org.eclipselabs.mongoemf.perf.support.TreeVisitor

    long startTime = System.currentTimeMillis();
    Resource resultResource = resourceSet.getResource(root.eResource().getURI(), true);

    System.out.println("Traversing the object tree");

    new TreeVisitor().doSwitch(resultResource.getContents().get(0));
    long endTime = System.currentTimeMillis();

    System.out.println("Time to load " + numberObjects + " children using " + (useMongoResourceSet ? "custom map" : "default map") + ": " + (endTime - startTime) + " ms");
  }
View Full Code Here

Examples of org.olat.core.util.tree.TreeVisitor

          }
          insertParent.insert(moveCopyFrom, insertPos);

          moveCopyFrom.setDirty(true);
          //mark subtree as dirty
          TreeVisitor tv = new TreeVisitor( new Visitor() {
            public void visit(INode node) {
              CourseEditorTreeNode cetn = (CourseEditorTreeNode)node;
              cetn.setDirty(true);
            }
          },moveCopyFrom,true);
          tv.visitAll();         
          CourseFactory.saveCourseEditorTreeModel(course.getResourceableId()); // TODO: pb: Review : Add by chg to FIX OLAT-1662
          this.showInfo("movecopynode.info.condmoved");

          ThreadLocalUserActivityLogger.log(CourseLoggingAction.COURSE_EDITOR_NODE_MOVED, getClass());
          fireEvent(ureq, Event.DONE_EVENT);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.