-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into master-who
- Loading branch information
Showing
19 changed files
with
189 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Verify | |
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
- master | ||
|
||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,7 @@ name: Release | |
on: | ||
push: | ||
branches: | ||
- master | ||
- main* | ||
- master* | ||
|
||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
.../main/java/edu/stanford/bmir/protege/web/client/download/FetchAndOpenInBrowserWindow.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package edu.stanford.bmir.protege.web.client.download; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
/** | ||
* Matthew Horridge | ||
* Stanford Center for Biomedical Informatics Research | ||
* 2024-06-14 | ||
*/ | ||
public class FetchAndOpenInBrowserWindow { | ||
|
||
/** | ||
* GET the specified path and open the result as a blob in a new window | ||
* @param path The path | ||
* @param token The access token to use. This will be set in the authorization header. | ||
*/ | ||
public static native void fetchUrlAndOpenInWindow(@Nonnull String path, | ||
@Nonnull String token, | ||
@Nonnull FetchAndOpenInBrowserWindowErrorHandler errorHandler)/*-{ | ||
var xhr = new XMLHttpRequest(); | ||
xhr.open('GET', path); | ||
xhr.onreadystatechange = handler; | ||
xhr.responseType = 'blob'; | ||
xhr.setRequestHeader('Authorization', 'Bearer ' + token); | ||
xhr.send(); | ||
function handler() { | ||
if (this.readyState === this.DONE) { | ||
if (this.status === 200) { | ||
// this.response is a Blob, because we set responseType above | ||
var data_url = URL.createObjectURL(this.response); | ||
$wnd.open(data_url, '_blank'); | ||
} else { | ||
console.error('Error'); | ||
errorHandler.@edu.stanford.bmir.protege.web.client.download.FetchAndOpenInBrowserWindowErrorHandler::handleError(*)(); | ||
} | ||
} | ||
} | ||
}-*/; | ||
} |
11 changes: 11 additions & 0 deletions
11
...du/stanford/bmir/protege/web/client/download/FetchAndOpenInBrowserWindowErrorHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package edu.stanford.bmir.protege.web.client.download; | ||
|
||
/** | ||
* Matthew Horridge | ||
* Stanford Center for Biomedical Informatics Research | ||
* 2024-06-14 | ||
*/ | ||
public interface FetchAndOpenInBrowserWindowErrorHandler { | ||
|
||
void handleError(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...shared/src/main/java/edu/stanford/bmir/protege/web/shared/form/SetProjectFormsAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package edu.stanford.bmir.protege.web.shared.form; | ||
|
||
import com.fasterxml.jackson.annotation.JsonTypeName; | ||
import com.google.auto.value.AutoValue; | ||
import com.google.common.annotations.GwtCompatible; | ||
import com.google.common.collect.ImmutableList; | ||
import edu.stanford.bmir.protege.web.shared.dispatch.*; | ||
import edu.stanford.bmir.protege.web.shared.project.ProjectId; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
/** | ||
* Matthew Horridge | ||
* Stanford Center for Biomedical Informatics Research | ||
* 2024-06-15 | ||
*/ | ||
@JsonTypeName("webprotege.forms.SetProjectForms") | ||
@AutoValue | ||
@GwtCompatible(serializable = true) | ||
public abstract class SetProjectFormsAction implements ProjectAction<SetProjectFormsResult> { | ||
|
||
public SetProjectFormsAction get(@Nonnull ProjectId projectId, | ||
@Nonnull ImmutableList<FormDescriptor> formDescriptors, | ||
@Nonnull ImmutableList<EntityFormSelector> formSelectors) { | ||
return new AutoValue_SetProjectFormsAction(projectId, formDescriptors, formSelectors); | ||
} | ||
|
||
@Nonnull | ||
public abstract ProjectId getProjectId(); | ||
|
||
public abstract ImmutableList<FormDescriptor> getFormDescriptors(); | ||
|
||
public abstract ImmutableList<EntityFormSelector> getFormSelectors(); | ||
} |
21 changes: 21 additions & 0 deletions
21
...shared/src/main/java/edu/stanford/bmir/protege/web/shared/form/SetProjectFormsResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package edu.stanford.bmir.protege.web.shared.form; | ||
|
||
import com.fasterxml.jackson.annotation.JsonTypeName; | ||
import com.google.auto.value.AutoValue; | ||
import com.google.common.annotations.GwtCompatible; | ||
import edu.stanford.bmir.protege.web.shared.dispatch.Result; | ||
|
||
/** | ||
* Matthew Horridge | ||
* Stanford Center for Biomedical Informatics Research | ||
* 2024-06-15 | ||
*/ | ||
@JsonTypeName("webprotege.forms.SetProjectForms") | ||
@AutoValue | ||
@GwtCompatible(serializable = true) | ||
public abstract class SetProjectFormsResult implements Result { | ||
|
||
public static SetProjectFormsResult get() { | ||
return new AutoValue_SetProjectFormsResult(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters