/** * Update the progress of the task. Also updates the parent progress listener accordingly. * * @param progress the new progress */ @Override public void setProgress(float progress) { super.setProgress(progress); float percent = progress / getMaxProgress(); parentProgressListener.setProgress(start + (amount * percent)); }
public @Override <T extends AbstractGeoGigOp<?>> T command(Class<T> commandClass) { T command = context.command(commandClass); command.setContext(this); return command; }
/** * Called when the task is completed. This will update the progress to the maximum progress * value. Also updates the parent progress listener accordingly. */ @Override public void complete() { parentProgressListener.setProgress(start + amount); super.complete(); }
@Override protected void setUpInternal() throws Exception { context = super.repo.context(); odb = context.objectDatabase(); }
@Override protected void setUpInternal() throws Exception { index = repo.context().stagingArea(); }
/** * @return {@code true} if the objects in this entry represent an added feature */ public boolean isAdd() { return ChangeType.ADDED.equals(changeType()); }
/** * Constructs a new progress listener based on a specified sub progress amount. * * @param amount amount of progress * @return the newly constructed progress listener */ protected ProgressListener subProgress(float amount) { return new SubProgressListener(getProgressListener(), amount); }
@Override public ConflictsDatabase conflictsDatabase() { return transactionIndex != null ? transactionIndex.conflictsDatabase() : context.conflictsDatabase(); }
/** * Called when a task begins tracking progress. */ @Override public void started() { setProgress(0.f); }
/** * Finds and returns an instance of a command of the specified class. * * @param commandClass the kind of command to locate and instantiate * @return a new instance of the requested command class, with its dependencies resolved */ @Override public <T extends AbstractGeoGigOp<?>> T command(Class<T> commandClass) { T instance = context.command(commandClass); instance.setContext(this); return instance; }
@Override protected void setUpInternal() throws Exception { context = super.repo.context(); odb = context.objectDatabase(); }
@Override protected void setUpInternal() throws Exception { index = repo.context().stagingArea(); }
/** * @return {@code true} if the objects in this entry represent a changed feature */ public boolean isChange() { return ChangeType.MODIFIED.equals(changeType()); }
/** * Update the progress of the task. Also updates the parent progress listener accordingly. * * @param progress the new progress */ @Override public void setProgress(float progress) { super.setProgress(progress); float percent = progress / getMaxProgress(); parentProgressListener.setProgress(start + (amount * percent)); }
/** * Called when the task is completed. This will update the progress to the maximum progress * value. Also updates the parent progress listener accordingly. */ @Override public void complete() { parentProgressListener.setProgress(start + amount); super.complete(); }
/** * Constructs a new progress listener based on a specified sub progress amount. * * @param amount amount of progress * @return the newly constructed progress listener */ protected ProgressListener subProgress(float amount) { return new SubProgressListener(getProgressListener(), amount); }
@Override public ConflictsDatabase conflictsDatabase() { return transactionIndex != null ? transactionIndex.conflictsDatabase() : context.conflictsDatabase(); }
@Override public <T extends AbstractGeoGigOp<?>> T command(Class<T> commandClass) { T command = context.command(commandClass); command.setContext(this); return command; }
/** * @return {@code true} if the objects in this entry represent a deleted feature */ public boolean isDelete() { return ChangeType.REMOVED.equals(changeType()); }
/** * Finds and returns an instance of a command of the specified class. * * @param commandClass the kind of command to locate and instantiate * @return a new instance of the requested command class, with its dependencies resolved */ @Override public <T extends AbstractGeoGigOp<?>> T command(Class<T> commandClass) { T instance = context.command(commandClass); instance.setContext(this); return instance; }