Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added postcoordination file upload #71

Merged
merged 71 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
f317c9d
Replace spotify docker plugin with maven-exec plugin
matthewhorridge Jul 30, 2024
a995d80
Use maven-exec for docker push
matthewhorridge Aug 1, 2024
afd22e3
Fixes #46
matthewhorridge Aug 2, 2024
d87997a
Merge pull request #47 from protegeproject/fix-issues-46
matthewhorridge Aug 3, 2024
af5fc8a
ci: version bump 6.0.2
Aug 3, 2024
2bc5e4d
Merge pull request #44 from protegeproject/replace-spotify-docker-plugin
matthewhorridge Aug 5, 2024
bec587d
ci: version bump 6.0.3
Aug 5, 2024
10aa8cc
Moved tab presenter and related interfaces/classes to the tab package…
matthewhorridge Aug 5, 2024
03fb8cf
Genericized TabBarPresenter and associated classes
matthewhorridge Aug 5, 2024
b334594
Use maven-exec for docker build and push
matthewhorridge Aug 5, 2024
3e6316b
Merge branch 'master' into docker-push-changes
matthewhorridge Aug 5, 2024
f721649
Merge pull request #49 from protegeproject/docker-push-changes
matthewhorridge Aug 5, 2024
1c49e28
ci: version bump 6.0.4
Aug 5, 2024
62e7625
-am is required
matthewhorridge Aug 6, 2024
9fa6157
Merge branch 'master' into docker-push-changes
matthewhorridge Aug 6, 2024
0e88426
Merge pull request #50 from protegeproject/docker-push-changes
matthewhorridge Aug 6, 2024
c26874d
ci: version bump 6.0.5
Aug 6, 2024
4fa7aa2
Merge branch 'master' into factor-out-tabs-from-forms
matthewhorridge Aug 6, 2024
d5cc278
Merge pull request #48 from protegeproject/factor-out-tabs-from-forms
matthewhorridge Aug 6, 2024
b35afe0
ci: version bump 6.0.6
Aug 6, 2024
d275146
Fixes #56
matthewhorridge Sep 5, 2024
279a4ef
Merge pull request #58 from protegeproject/Fix-56
matthewhorridge Sep 5, 2024
d11a4c1
ci: version bump 6.0.7
Sep 5, 2024
21a3038
Fixes #57
matthewhorridge Sep 5, 2024
c5d1b15
Merge pull request #60 from protegeproject/Fix-57
matthewhorridge Sep 5, 2024
4cfb074
ci: version bump 6.0.8
Sep 5, 2024
49ce7d3
Fixes #59
matthewhorridge Sep 6, 2024
ee50396
Merge pull request #61 from protegeproject/Fix-59
matthewhorridge Sep 6, 2024
1c2e548
ci: version bump 6.0.9
Sep 6, 2024
139a206
Fixes #63
matthewhorridge Sep 10, 2024
bb4737f
Merge pull request #64 from protegeproject/Fix-63
matthewhorridge Sep 10, 2024
341b6cc
ci: version bump 6.0.10
Sep 10, 2024
0df0ea5
Fixes #65
matthewhorridge Sep 10, 2024
19ce5a6
Merge pull request #66 from protegeproject/Fix-65
matthewhorridge Sep 10, 2024
0915cd3
ci: version bump 6.0.11
Sep 10, 2024
1b473a8
added postcoordination file upload
alexsilaghi Sep 16, 2024
21badc3
added reading post coordination table. fetching scale value from backend
alexsilaghi Sep 23, 2024
be89b6a
reset on entity change.
alexsilaghi Sep 23, 2024
2c33c37
reset on entity change.
alexsilaghi Sep 25, 2024
3d2f6a7
save entity
alexsilaghi Sep 26, 2024
7ff2c93
Merge branch 'master-who' of https://github.com/protegeproject/webpro…
soimugeo Sep 26, 2024
5487851
pulled from master-who added missing classes to Action.java Result.ja…
soimugeo Sep 26, 2024
9bf2bb2
fixed get scale value card values for postcoordination
soimugeo Sep 27, 2024
f94362a
added edit buttons.
alexsilaghi Sep 27, 2024
4a341b4
Merge remote-tracking branch 'origin/upload-postcoordination-file' in…
alexsilaghi Sep 27, 2024
56cd47f
fixed scale value card header row padding
soimugeo Sep 27, 2024
eb8e8f2
partially fix edit action for scale value cards. will finish it on Mo…
soimugeo Sep 27, 2024
170ae0b
moved the default sync to cell. fixed serialization issue
alexsilaghi Sep 30, 2024
564a081
Merge remote-tracking branch 'origin/upload-postcoordination-file' in…
alexsilaghi Sep 30, 2024
1723e62
added some fixes for edit mode of post coordination table and scale v…
soimugeo Sep 30, 2024
0ed274a
Merge branch 'upload-postcoordination-file' of https://github.com/pro…
soimugeo Sep 30, 2024
c28ffbd
fixed a bug where initial state of scale value cards is not read only
soimugeo Sep 30, 2024
ff14dc3
renamed postcoordination specifications field
alexsilaghi Sep 30, 2024
2cb7242
Merge remote-tracking branch 'origin/upload-postcoordination-file' in…
alexsilaghi Sep 30, 2024
69e2ae0
wip scale value cards selection view
soimugeo Oct 1, 2024
80053df
added tooltip.
alexsilaghi Oct 1, 2024
97d4242
added icons for scale values selection mode (#73)
soimugeoWB Oct 1, 2024
3391804
Merge branch 'upload-postcoordination-file' of https://github.com/pro…
soimugeo Oct 1, 2024
806c572
removed tooltip from svg. ordering the rows and centered the labels.
alexsilaghi Oct 2, 2024
8da034d
Merge remote-tracking branch 'origin/upload-postcoordination-file' in…
alexsilaghi Oct 2, 2024
d6f7a0f
added check on moving from entity.
alexsilaghi Oct 2, 2024
80a4119
In the customization of scales, show info about the cardinality of th…
soimugeoWB Oct 3, 2024
a13542d
added correct ordering of the scale value cards (#75)
soimugeoWB Oct 3, 2024
69bd389
Merge branch 'upload-postcoordination-file' of https://github.com/pro…
soimugeo Oct 3, 2024
e78eb11
38 fix postcoordinationportletpresenter to load data upon refresh pag…
soimugeoWB Oct 3, 2024
cfa4cc2
Merge branch 'upload-postcoordination-file' of https://github.com/pro…
soimugeo Oct 3, 2024
44c4277
wip ScaleValueSelectionView
soimugeo Oct 3, 2024
0e90371
added scale value selection modal
soimugeo Oct 4, 2024
45cd6a4
Merge branch 'master' of https://github.com/protegeproject/webprotege…
soimugeo Oct 4, 2024
5cb72d6
finished save of scale values in PostCoordinationPortletPresenter
soimugeo Oct 4, 2024
550cce1
fixed a bug that was causing scale value cards to be save incorrectly.
soimugeo Oct 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,16 @@ public interface Messages extends com.google.gwt.i18n.client.Messages {
@Key("linearization.upload")
String linearizationUpload();

@DefaultMessage("Apply PostCoordination changes")
@Key("postcoordination.upload")
String postCoordinationUpload();


@DefaultMessage("Apply PostCoordination custom scales")
@Key("postcoordination.customscales")
String postCoordinationCustomScales();


@DefaultMessage("Merge Ontologies")
@Key("uploadAndMergeAdditions")
String uploadAndMergeAdditions();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
package edu.stanford.bmir.protege.web.client.form.complexcheckbox;

import java.util.Objects;
import java.util.logging.Logger;

public class CheckboxValue {
private final String svgImage;

private final String value;

private final String tooltip;

public CheckboxValue(String svgImage, String value) {

public CheckboxValue(String svgImage, String value, String tooltip) {
this.svgImage = svgImage;
this.value = value;
this.tooltip = tooltip;
}


Expand All @@ -23,25 +25,21 @@ public String getValue() {
return value;
}

public String getTooltip() {
return tooltip;
}

@Override
public boolean equals(Object o) {

if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CheckboxValue that = (CheckboxValue) o;
return Objects.equals(value, that.value);
return Objects.equals(svgImage, that.svgImage) && Objects.equals(value, that.value) && Objects.equals(tooltip, that.tooltip);
}

@Override
public int hashCode() {
return Objects.hash(svgImage, value);
}

@Override
public String toString() {
return "CheckboxValue{" +
"value=" + value +
'}';
return Objects.hash(svgImage, value, tooltip);
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ private void toggleSelected() {
}
CheckboxValue nextSel = config.getNextValue(view.getValue());
view.setValue(nextSel);
view.asWidget().setTitle(nextSel.getTooltip());
isTouched = true;
}

Expand All @@ -80,6 +81,10 @@ public void setConfig(CheckBoxConfig config) {
this.config = config;
}

public void setTitle(String title) {
this.view.asWidget().setTitle(title);
}

@Override
public void setValue(CheckboxValue value, boolean fireEvents) {
view.setValue(value, fireEvents);
Expand All @@ -94,6 +99,10 @@ public boolean isTouched() {
return isTouched;
}

public void setTouched(Boolean touched) {
this.isTouched = touched;
}

@Override
public void fireEvent(GwtEvent<?> event) {
view.fireEvent(event);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import edu.stanford.bmir.protege.web.client.HasReadOnly;

import javax.annotation.Nonnull;
import java.util.logging.Logger;

public class ConfigurableCheckbox implements IsWidget, HasValue<CheckboxValue>, HasText, HasEnabled, HasReadOnly {
@Nonnull
Expand All @@ -26,20 +25,24 @@ public ConfigurableCheckbox(CheckBoxConfig checkBoxConfig, String initialValue)
presenter = new ConfigurableCheckBoxPresenter(new ConfigurableCheckBoxViewImpl());
presenter.start(container);


this.checkBoxConfig = checkBoxConfig;

presenter.setEnabled(checkBoxConfig.isEnabled());
presenter.setReadOnly(checkBoxConfig.isReadOnly());
presenter.setConfig(checkBoxConfig);
CheckboxValue checkboxValue = checkBoxConfig.findValue(initialValue);
this.setValue(checkboxValue);
presenter.setTitle(checkboxValue.getTooltip());
}

public boolean isTouched() {
return this.presenter.isTouched();
}

public void setTouched(boolean touched) {
this.presenter.setTouched(touched);
}

@Override
public Widget asWidget() {
return container;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
import edu.stanford.bmir.protege.web.client.portlet.PortletUiImpl;
import edu.stanford.bmir.protege.web.client.postcoordination.PostCoordinationPortletView;
import edu.stanford.bmir.protege.web.client.postcoordination.PostCoordinationPortletViewImpl;
import edu.stanford.bmir.protege.web.client.postcoordination.scaleValuesCard.scaleValueSelectionModal.*;
import edu.stanford.bmir.protege.web.client.primitive.PrimitiveDataEditorImageView;
import edu.stanford.bmir.protege.web.client.primitive.PrimitiveDataEditorImageViewImpl;
import edu.stanford.bmir.protege.web.client.progress.BusyView;
Expand Down Expand Up @@ -623,4 +624,9 @@ AcceptsOneWidget provideAcceptsOneWidget() {
CreateEntityFormView provideCreateEntityFormView(CreateEntityFormViewImpl impl) {
return impl;
}

@Provides
ScaleValueSelectionView provideScaleValueSelectionView(ScaleValueSelectionViewImpl impl) {
return impl;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import edu.stanford.bmir.protege.web.client.permissions.*;
import edu.stanford.bmir.protege.web.client.perspective.*;
import edu.stanford.bmir.protege.web.client.portlet.*;
import edu.stanford.bmir.protege.web.client.postcoordination.PostCoordinationChangesHandler;
import edu.stanford.bmir.protege.web.client.postcoordination.PostCoordinationChangesHandlerImpl;
import edu.stanford.bmir.protege.web.client.project.*;
import edu.stanford.bmir.protege.web.client.projectsettings.*;
import edu.stanford.bmir.protege.web.client.renderer.*;
Expand Down Expand Up @@ -96,6 +98,11 @@ UploadAndProcessLinearizationHandler provideUploadAndProcessLinearizationHandler
return handler;
}

@Provides
PostCoordinationChangesHandler provideProcessPostCoordinationHandler(PostCoordinationChangesHandlerImpl impl) {
return impl;
}

@Provides
UploadAndMergeAdditionsHandler provideUploadAndMergeAdditionsHandler(UploadAndMergeAdditionsHandlerImpl handler) {
return handler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ public class LinearizationCheckboxConfig extends CheckBoxConfig {

private final static String UNKNOWN_SVG = "<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" stroke=\"#828282\" stroke-width=\"0.24000000000000005\"><g id=\"SVGRepo_bgCarrier\" stroke-width=\"0\"></g><g id=\"SVGRepo_tracerCarrier\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></g><g id=\"SVGRepo_iconCarrier\"> <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M9.11241 7.82201C9.44756 6.83666 10.5551 6 12 6C13.7865 6 15 7.24054 15 8.5C15 9.75946 13.7865 11 12 11C11.4477 11 11 11.4477 11 12L11 14C11 14.5523 11.4477 15 12 15C12.5523 15 13 14.5523 13 14L13 12.9082C15.203 12.5001 17 10.7706 17 8.5C17 5.89347 14.6319 4 12 4C9.82097 4 7.86728 5.27185 7.21894 7.17799C7.0411 7.70085 7.3208 8.26889 7.84366 8.44673C8.36653 8.62458 8.93457 8.34488 9.11241 7.82201ZM12 20C12.8285 20 13.5 19.3284 13.5 18.5C13.5 17.6716 12.8285 17 12 17C11.1716 17 10.5 17.6716 10.5 18.5C10.5 19.3284 11.1716 20 12 20Z\" fill=\"#828282\"></path> </g></svg>";

public static List<CheckboxValue> AVAILABLE_VALUES_LIST = Arrays.asList(new CheckboxValue(UNKNOWN_SVG, "UNKNOWN"),
new CheckboxValue(CHECK_SVG, "TRUE"),
new CheckboxValue(X_SVG, "FALSE"));
public static List<CheckboxValue> AVAILABLE_VALUES_LIST = Arrays.asList(new CheckboxValue(UNKNOWN_SVG, "UNKNOWN", "Not set value"),
new CheckboxValue(CHECK_SVG, "TRUE", "Allowed"),
new CheckboxValue(X_SVG, "FALSE", "Not allowed"));


protected LinearizationCheckboxConfig() {
super(new CheckboxValue(UNKNOWN_SVG, "UNKNOWN"), AVAILABLE_VALUES_LIST);
super(new CheckboxValue(UNKNOWN_SVG, "UNKNOWN", "Not set value"), AVAILABLE_VALUES_LIST);
}


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package edu.stanford.bmir.protege.web.client.postcoordination;

public interface CancelButtonHandler {

void handleCancelButton();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package edu.stanford.bmir.protege.web.client.postcoordination;

public interface EditButtonHandler {

void enableEditMode();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package edu.stanford.bmir.protege.web.client.postcoordination;

public interface PostCoordinationChangesHandler {

void handleUploadPostCoordinationChanges();

void handlePostCoordinationCustomScales();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package edu.stanford.bmir.protege.web.client.postcoordination;

import edu.stanford.bmir.protege.web.shared.postcoordination.ProcessUploadedCustomScalesAction;
import edu.stanford.bmir.protege.web.shared.postcoordination.ProcessUploadedPostCoordinationAction;
import edu.stanford.bmir.protege.web.shared.project.ProjectId;

import javax.annotation.Nonnull;
import javax.inject.Inject;
import javax.inject.Provider;

public class PostCoordinationChangesHandlerImpl implements PostCoordinationChangesHandler {


@Nonnull
private final Provider<UploadPostCoordinationWorkflow> workflowProvider;
@Nonnull
private final ProjectId projectId;

@Inject
public PostCoordinationChangesHandlerImpl(@Nonnull Provider<UploadPostCoordinationWorkflow> workflowProvider, @Nonnull ProjectId projectId) {
this.workflowProvider = workflowProvider;
this.projectId = projectId;
}

@Override
public void handleUploadPostCoordinationChanges() {
UploadPostCoordinationWorkflow workflow = workflowProvider.get();

UploadPostCoordinationWorkflowConfiguration configuration = new UploadPostCoordinationWorkflowConfiguration("Upload PostCoordination changes",
"Process postcoordination",
"Applying postcoordination changes to ontologies. Please wait.",
"The postcoordination where successfully processes and added to the project",
ProcessUploadedPostCoordinationAction::create);

workflow.start(projectId, configuration);

}

@Override
public void handlePostCoordinationCustomScales() {
UploadPostCoordinationWorkflow workflow = workflowProvider.get();

UploadPostCoordinationWorkflowConfiguration configuration = new UploadPostCoordinationWorkflowConfiguration("Upload PostCoordination changes",
"Process postcoordination custom scales",
"Applying postcoordination custom scales changes to ontologies. Please wait.",
"The postcoordination scales where successfully processes and added to the project",
ProcessUploadedCustomScalesAction::create);

workflow.start(projectId, configuration);
}
}
Loading
Loading