Tabnine Logo
DiffCount.objectDatabase
Code IndexAdd Tabnine to your IDE (free)

How to use
objectDatabase
method
in
org.locationtech.geogig.plumbing.DiffCount

Best Java code snippets using org.locationtech.geogig.plumbing.DiffCount.objectDatabase (Showing top 3 results out of 315)

origin: org.locationtech.geogig/geogig-core

/**
 * @return the tree referenced by the old ref, or the head of the index.
 */
private RevTree getTree(@Nullable String refSpec, @Nullable ObjectId treeId) {
  checkState(refSpec == null || treeId == null);
  final RevTree headTree;
  Optional<ObjectId> resolved = refSpec == null ? Optional.of(treeId)
      : command(ResolveTreeish.class).setTreeish(refSpec).call();
  if (resolved.isPresent()) {
    ObjectId headTreeId = resolved.get();
    headTree = objectDatabase().getTree(headTreeId);
  } else {
    headTree = RevTree.EMPTY;
  }
  return headTree;
}
origin: locationtech/geogig

@Override
protected DiffObjectCount _call() {
  checkState(oldRefSpec != null || oldTreeId != null || oldTree != null,
      "old ref spec not provided");
  checkState(newRefSpec != null || newTreeId != null || newTree != null,
      "new ref spec not provided");
  final ObjectStore leftSource = this.leftSource == null ? objectDatabase() : this.leftSource;
  final ObjectStore rightSource = this.rightSource == null ? objectDatabase()
      : this.rightSource;
  final RevTree oldTree = getTree(oldRefSpec, oldTreeId, this.oldTree, leftSource);
  final RevTree newTree = getTree(newRefSpec, newTreeId, this.newTree, rightSource);
  DiffObjectCount diffCount;
  PreOrderDiffWalk visitor = new PreOrderDiffWalk(oldTree, newTree, leftSource, rightSource);
  DiffCountConsumer counter = new DiffCountConsumer(leftSource, rightSource);
  PreOrderDiffWalk.Consumer filter = counter;
  if (!pathFilters.isEmpty()) {
    filter = new PathFilteringDiffConsumer(pathFilters, counter);
  }
  visitor.walk(filter);
  diffCount = counter.get();
  return diffCount;
}
origin: org.locationtech.geogig/geogig-core

@Override
protected DiffObjectCount _call() {
  checkState(oldRefSpec != null || oldTreeId != null, "old ref spec not provided");
  checkState(newRefSpec != null || newTreeId != null, "new ref spec not provided");
  final RevTree oldTree = getTree(oldRefSpec, oldTreeId);
  final RevTree newTree = getTree(newRefSpec, newTreeId);
  DiffObjectCount diffCount;
  ObjectDatabase index = objectDatabase();
  PreOrderDiffWalk visitor = new PreOrderDiffWalk(oldTree, newTree, index, index);
  DiffCountConsumer counter = new DiffCountConsumer(index);
  PreOrderDiffWalk.Consumer filter = counter;
  if (!pathFilters.isEmpty()) {
    filter = new PathFilteringDiffConsumer(pathFilters, counter);
  }
  visitor.walk(filter);
  diffCount = counter.get();
  return diffCount;
}
org.locationtech.geogig.plumbingDiffCountobjectDatabase

Popular methods of DiffCount

  • call
  • setNewVersion
  • setOldVersion
  • setNewTree
  • setFilter
  • setOldTree
  • setProgressListener
  • addFilter
  • command
  • getTree
  • setLeftSource
  • setRightSource
  • setLeftSource,
  • setRightSource

Popular in Java

  • Reading from database using SQL prepared statement
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • setContentView (Activity)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • String (java.lang)
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now