/** * Shortcut for {@link Context#objectDatabase()} */ protected ObjectDatabase objectDatabase() { return context.objectDatabase(); }
public WorkingTreeInsertHelper(Context context, RevTree workHead, final Function<Feature, String> treePathResolver, final ExecutorService treeBuildingService) { this.db = context.objectDatabase(); this.context = context; this.workHead = workHead; this.treePathResolver = treePathResolver; this.executorService = treeBuildingService; }
/** * Shortcut for {@link Context#objectDatabase()} */ protected ObjectDatabase objectDatabase() { return context.objectDatabase(); }
@Override public ObjectDatabase objectDatabase() { return context.objectDatabase(); }
public WorkingTreeInsertHelper(Context context, RevTree workHead, final Function<Feature, String> treePathResolver, final ExecutorService treeBuildingService) { this.db = context.objectDatabase(); this.context = context; this.workHead = workHead; this.treePathResolver = treePathResolver; this.executorService = treeBuildingService; }
@Inject public WorkingTreeImpl(final Context injector) { this.indexDatabase = injector.objectDatabase(); this.context = injector; }
@Inject public WorkingTreeImpl(final Context injector) { this.indexDatabase = injector.objectDatabase(); this.context = injector; }
/** * Gets the {@link RevCommit} with the given {@link ObjectId} from the object database. * * @param commitId the {@code ObjectId} for the commit * @return the {@code RevCommit} */ @Override public RevCommit getCommit(final ObjectId commitId) { RevCommit commit = context().objectDatabase().getCommit(commitId); return commit; }
/** * Gets the {@link RevCommit} with the given {@link ObjectId} from the object database. * * @param commitId the {@code ObjectId} for the commit * @return the {@code RevCommit} */ @Override public RevCommit getCommit(final ObjectId commitId) { RevCommit commit = context().objectDatabase().getCommit(commitId); return commit; }
/** * @param contentId the {@link ObjectId} of the feature to get * @return the {@link RevFeature} that was found in the object database */ @Override public RevFeature getFeature(final ObjectId contentId) { RevFeature revFeature = context().objectDatabase().getFeature(contentId); return revFeature; }
/** * Test if a blob exists in the object database * * @param id the ID of the blob in the object database * @return true if the blob exists with the parameter ID, false otherwise */ @Override public boolean blobExists(final ObjectId id) { return context().objectDatabase().exists(id); }
/** * Test if a blob exists in the object database * * @param id the ID of the blob in the object database * @return true if the blob exists with the parameter ID, false otherwise */ @Override public boolean blobExists(final ObjectId id) { return context().objectDatabase().exists(id); }
/** * @param contentId the {@link ObjectId} of the feature to get * @return the {@link RevFeature} that was found in the object database */ @Override public RevFeature getFeature(final ObjectId contentId) { RevFeature revFeature = context().objectDatabase().getFeature(contentId); return revFeature; }
private List<String> findAffectedLayers(ObjectId leftRef, ObjectId rightRef, Context leftContext, Context rightContext) { List<DiffEntry> entries = command(FindChangedTrees.class)// .setOldTreeIsh(leftRef)// .setLeftSource(leftContext.objectDatabase())// .setNewTreeIsh(rightRef)// .setRightSource(rightContext.objectDatabase())// .call(); return entries.stream().map(e -> e.path()).collect(Collectors.toList()); }
@Override protected void setUpInternal() throws Exception { context = super.repo.context(); odb = context.objectDatabase(); }
@Override protected void setUpInternal() throws Exception { context = super.repo.context(); odb = context.objectDatabase(); }
@Override public void configure() throws RepositoryConnectionException { context.refDatabase().configure(); context.objectDatabase().configure(); context.indexDatabase().configure(); }
public Map<String, RevFeatureType> getFeatureTypes(@NonNull String rootTreeIsh) { Context context = getContext(); List<NodeRef> treeNodes = context.command(FindFeatureTypeTrees.class) .setRootTreeRef(rootTreeIsh).call(); Iterator<RevFeatureType> types = context.objectDatabase().getAll( Iterables.transform(treeNodes, n -> n.getMetadataId()), BulkOpListener.NOOP_LISTENER, RevFeatureType.class); return Maps.uniqueIndex(types, t -> t.getName().getLocalPart()); }
RevFeatureType getNativeType() { GeogigContentState state = (GeogigContentState) getEntry().getState(getTransaction()); RevFeatureType nativeType = state.getNativeType(); if (nativeType == null) { final NodeRef typeRef = getTypeRef(); final ObjectId metadataId = typeRef.getMetadataId(); Context context = getCommandLocator(); nativeType = context.objectDatabase().getFeatureType(metadataId); state.setNativeType(nativeType); } return nativeType; }
RevFeatureType getNativeType() { GeogigContentState state = (GeogigContentState) getEntry().getState(getTransaction()); RevFeatureType nativeType = state.getNativeType(); if (nativeType == null) { final NodeRef typeRef = getTypeRef(); final ObjectId metadataId = typeRef.getMetadataId(); Context context = getCommandLocator(); nativeType = context.objectDatabase().getFeatureType(metadataId); state.setNativeType(nativeType); } return nativeType; }