Skip to content

Commit

Permalink
small fix for Logical definition with filtered tree (#86)
Browse files Browse the repository at this point in the history
* Replace spotify docker plugin with maven-exec plugin

This change is necessary because the spotify docker plugin does not work on Apple Silicon and the plugin itself is no longer maintained.

* Use maven-exec for docker push

* Fixes #46

* ci: version bump 6.0.2

* ci: version bump 6.0.3

* Moved tab presenter and related interfaces/classes to the tab package and removed "form" from the names

* Genericized TabBarPresenter and associated classes

* Use maven-exec for docker build and push

* ci: version bump 6.0.4

* -am is required

* ci: version bump 6.0.5

* ci: version bump 6.0.6

* Fixes #56

Apply correct property name for source

* ci: version bump 6.0.7

* Fixes #57

Allow non-prefixed names for types

* ci: version bump 6.0.8

* Fixes #59

* ci: version bump 6.0.9

* Fixes #63

* ci: version bump 6.0.10

* Fixes #65

* ci: version bump 6.0.11

* added postcoordination file upload

* added reading post coordination table. fetching scale value from backend

* reset on entity change.

* reset on entity change.

* save entity

* pulled from master-who added missing classes to Action.java Result.java and RpcWhiteList.java.

* fixed get scale value card values for postcoordination

* added edit buttons.

* fixed scale value card header row padding

* partially fix edit action for scale value cards. will finish it on Monday. Also will finish then the save action for the scale value cards.

* moved the default sync to cell. fixed serialization issue

* added some fixes for edit mode of post coordination table and scale value cards

* fixed a bug where initial state of scale value cards is not read only

* renamed postcoordination specifications field

* wip scale value cards selection view

* added tooltip.

* added icons for scale values selection mode (#73)

Co-authored-by: Gheorghe Soimu <[email protected]>

* removed tooltip from svg. ordering the rows and centered the labels.

* added check on moving from entity.

* In the customization of scales, show info about the cardinality of the axis (#74)

Co-authored-by: Gheorghe Soimu <[email protected]>

* added correct ordering of the scale value cards (#75)

Co-authored-by: Gheorghe Soimu <[email protected]>

* 38 fix postcoordinationportletpresenter to load data upon refresh page + changes from master (#76)

* scaffolding and ancestor fetching.

* wip ScaleValueSelectionView

* added scale value selection modal

* finished save of scale values in PostCoordinationPortletPresenter

* fixed a bug that was causing scale value cards to be save incorrectly.

* partial commit

* partial commit.

* finished the table.

* saving the values.

* fixed fetching data from BE

* Changes to implement hierarchy filtering

- Changed all hierarchy related actions to use hierarchy descriptors

* fixing the update call.

* fixed showing multiple rows.

* partial merge

* partially adding hierarchy

* merged filtered tree

* Add filtered three to scale value cards (#83)

added filtered tree to value cards.

* polishing logical definition ui.

* css fixes for postcoordination table and scale value cards (#84)

Co-authored-by: Gheorghe Soimu <[email protected]>

* some final polishes suggested in issue #121

* added info tooltip. changed ordering.

* Filtered hierarchies (#81)

* Changes to implement hierarchy filtering

- Changed all hierarchy related actions to use hierarchy descriptors

* Changes to support named hierarchies

- Added NamedHierarchy and tests
- Added HierarchyId tests and JSON serialization
- Removed AddNamedHierarchyAction and result
- Added SetNamedHierarchiesAction and result

* Bumped version to 7.0.0-SNAPSHOT

* ci: version bump 7.0.0

* fix missing comma

* updated to use SetNamedHierarchies instead of AddNamedHierarchy

---------

Co-authored-by: Matthew Horridge <[email protected]>
Co-authored-by: Automated Version Bump <[email protected]>
Co-authored-by: alexsilaghi <[email protected]>
Co-authored-by: Gheorghe Soimu <[email protected]>
  • Loading branch information
5 people authored Oct 28, 2024
1 parent 1f1213c commit 06b9330
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
package edu.stanford.bmir.protege.web.client.hierarchy;

import com.google.auto.factory.AutoFactory;
import com.google.auto.factory.Provided;
import com.google.gwt.user.client.Window;
import com.google.auto.factory.*;
import edu.stanford.bmir.protege.web.client.Messages;
import edu.stanford.bmir.protege.web.client.action.AbstractUiAction;
import edu.stanford.bmir.protege.web.client.dispatch.DispatchServiceManager;
import edu.stanford.bmir.protege.web.shared.dispatch.DispatchService;
import edu.stanford.bmir.protege.web.client.uuid.UuidV4Provider;
import edu.stanford.bmir.protege.web.shared.entity.EntityNode;
import edu.stanford.bmir.protege.web.shared.hierarchy.AddNamedHierarchyAction;
import edu.stanford.bmir.protege.web.shared.hierarchy.HierarchyId;
import edu.stanford.bmir.protege.web.shared.inject.ProjectSingleton;
import edu.stanford.bmir.protege.web.shared.hierarchy.*;
import edu.stanford.bmir.protege.web.shared.lang.LanguageMap;
import edu.stanford.bmir.protege.web.shared.project.ProjectId;
import edu.stanford.protege.gwt.graphtree.client.TreeWidget;
import edu.stanford.protege.gwt.graphtree.shared.tree.impl.GraphTreeNodeModel;
import org.semanticweb.owlapi.model.OWLClass;
import org.semanticweb.owlapi.model.OWLEntity;
import org.semanticweb.owlapi.model.*;

import javax.inject.Inject;
import java.util.Set;
import java.util.*;
import java.util.stream.Collectors;

@AutoFactory
Expand All @@ -33,35 +27,40 @@ public class ConfigureHierarchyAction extends AbstractUiAction {

private final ProjectId projectId;

private final UuidV4Provider uuidV4Provider;

public ConfigureHierarchyAction(@Provided Messages messages,
TreeWidget<EntityNode, OWLEntity> treeWidget,
EntityHierarchyModel model,
@Provided DispatchServiceManager dispatch,
@Provided UuidV4Provider uuidV4Provider,
@Provided ProjectId projectId) {
super(messages.hierarchy_configure());
this.treeWidget = treeWidget;
this.model = model;
this.dispatch = dispatch;
this.projectId = projectId;
this.uuidV4Provider = uuidV4Provider;
}

@Override
public void execute() {
Set<OWLClass> sel = treeWidget.getSelectedKeys()
.stream()
.filter(e -> e.isOWLClass())
.map(e -> e.asOWLClass())
.filter(OWLEntity::isOWLClass)
.map(OWLEntity::asOWLClass)
.collect(Collectors.toSet());
HierarchyDescriptor hierarchyDescriptor;
if(sel.isEmpty()) {
if (sel.isEmpty()) {
hierarchyDescriptor = ClassHierarchyDescriptor.get();
}
else {
} else {
hierarchyDescriptor = ClassHierarchyDescriptor.get(sel);
}
dispatch.execute(AddNamedHierarchyAction.get(projectId, LanguageMap.of("en", "Class hierarchy fragment"),

NamedHierarchy hierarchy = NamedHierarchy.get(HierarchyId.get(uuidV4Provider.get()), LanguageMap.of("en", "Class hierarchy fragment"),
LanguageMap.empty(),
hierarchyDescriptor),
hierarchyDescriptor);
dispatch.execute(SetNamedHierarchiesAction.get(projectId, Collections.singletonList(hierarchy)),
result -> {
model.setHierarchyDescriptor(hierarchyDescriptor);
treeWidget.setModel(GraphTreeNodeModel.create(model, EntityNode::getEntity));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,6 @@
@Type(value = UpdateLogicalDefinitionAction.class),
@Type(value = GetEntityLogicalDefinitionAction.class),
@Type(value = TranslateEventListAction.class),
@Type(value = AddNamedHierarchyAction.class),
@Type(value = TranslateEventListAction.class),
@Type(value = SetNamedHierarchiesAction.class)
})
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,6 @@
@JsonSubTypes.Type(GetEntityLogicalDefinitionResult.class),
@JsonSubTypes.Type(UpdateLogicalDefinitionResult.class),
@JsonSubTypes.Type(GetUserInfoResult.class),
@JsonSubTypes.Type(AddNamedHierarchyResult.class),
@JsonSubTypes.Type(GetUserInfoResult.class),
@JsonSubTypes.Type(SetNamedHierarchiesResult.class),
})
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,6 @@ public class RpcWhiteList implements IsSerializable, Action, Result {
PlainPropertyValue get_PlainPropertyValue;
PrimitiveFormControlData primitiveFormControlData;
AppEnvVariables _AppEnvVariables;
AddNamedHierarchyAction _AddNamedHierarchyAction;
AddNamedHierarchyResult _AddNamedHierarchyResult;
GetLinearizationDefinitionsResult _GetLinearizationDefinitionsResult;
ProcessUploadedCustomScalesResult _ProcessUploadedCustomScalesResult;
ProcessUploadedPostCoordinationResult _ProcessUploadedPostCoordinationResult;
Expand Down

0 comments on commit 06b9330

Please sign in to comment.