From 6499b811dc01f74fda6b803b905a6e99f4f9ca9a Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Tue, 7 Nov 2023 19:45:15 +0100 Subject: [PATCH] #4229 - Better project template selection - Added more project initializer thumbnails --- .../project/initializers/basic/thumbnail.svg | 676 +++++++-- .../pom.xml | 5 + ...sicDocumentLabelingProjectInitializer.java | 13 + .../initializers/doclabeling/thumbnail.svg | 1282 +++++++++++++++++ .../pom.xml | 5 + .../SentenceLabelingProjectInitializer.java | 12 + .../sentencelabeling/thumbnail.svg | 803 +++++++++++ 7 files changed, 2696 insertions(+), 100 deletions(-) create mode 100644 inception/inception-project-initializers-doclabeling/src/main/resources/de/tudarmstadt/ukp/inception/project/initializers/doclabeling/thumbnail.svg create mode 100644 inception/inception-project-initializers-sentencelabeling/src/main/resources/de/tudarmstadt/ukp/inception/project/initializers/sentencelabeling/thumbnail.svg diff --git a/inception/inception-project-initializers-basic/src/main/resources/de/tudarmstadt/ukp/inception/project/initializers/basic/thumbnail.svg b/inception/inception-project-initializers-basic/src/main/resources/de/tudarmstadt/ukp/inception/project/initializers/basic/thumbnail.svg index 94d46694cee..8c41ffaa4eb 100644 --- a/inception/inception-project-initializers-basic/src/main/resources/de/tudarmstadt/ukp/inception/project/initializers/basic/thumbnail.svg +++ b/inception/inception-project-initializers-basic/src/main/resources/de/tudarmstadt/ukp/inception/project/initializers/basic/thumbnail.svg @@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ---> +--> + + - - - - - - - - - - - - I - like - IActor - ActorTarget - TargetINCEpTIONINCEpTION - - - - - + d="m 40.5355,68.296303 c 0,0 3.341511,6.290511 0,0 z" + id="path6" />like diff --git a/inception/inception-project-initializers-doclabeling/pom.xml b/inception/inception-project-initializers-doclabeling/pom.xml index 4cb84ec04fa..cca1fb9e586 100644 --- a/inception/inception-project-initializers-doclabeling/pom.xml +++ b/inception/inception-project-initializers-doclabeling/pom.xml @@ -76,6 +76,11 @@ spring-boot-autoconfigure + + org.apache.wicket + wicket-core + + org.apache.uima diff --git a/inception/inception-project-initializers-doclabeling/src/main/java/de/tudarmstadt/ukp/inception/project/initializers/doclabeling/BasicDocumentLabelingProjectInitializer.java b/inception/inception-project-initializers-doclabeling/src/main/java/de/tudarmstadt/ukp/inception/project/initializers/doclabeling/BasicDocumentLabelingProjectInitializer.java index 7bb54619f53..8d91f09dfef 100644 --- a/inception/inception-project-initializers-doclabeling/src/main/java/de/tudarmstadt/ukp/inception/project/initializers/doclabeling/BasicDocumentLabelingProjectInitializer.java +++ b/inception/inception-project-initializers-doclabeling/src/main/java/de/tudarmstadt/ukp/inception/project/initializers/doclabeling/BasicDocumentLabelingProjectInitializer.java @@ -21,9 +21,13 @@ import static java.util.Arrays.asList; import java.io.IOException; +import java.lang.invoke.MethodHandles; import java.util.List; import java.util.Optional; +import org.apache.wicket.request.resource.PackageResourceReference; +import org.apache.wicket.request.resource.ResourceReference; + import de.tudarmstadt.ukp.clarin.webanno.api.project.ProjectInitializer; import de.tudarmstadt.ukp.clarin.webanno.model.Project; import de.tudarmstadt.ukp.clarin.webanno.project.initializers.QuickProjectInitializer; @@ -46,6 +50,9 @@ public class BasicDocumentLabelingProjectInitializer implements QuickProjectInitializer { + private static final PackageResourceReference THUMBNAIL = new PackageResourceReference( + MethodHandles.lookup().lookupClass(), "thumbnail.svg"); + private final PreferencesService prefService; private final DocumentMetadataSidebarFactory docMetaSidebar; private final WorkloadManagementService workloadManagementService; @@ -68,6 +75,12 @@ public String getName() return "Document classification"; } + @Override + public Optional getThumbnail() + { + return Optional.of(THUMBNAIL); + } + @Override public boolean alreadyApplied(Project aProject) { diff --git a/inception/inception-project-initializers-doclabeling/src/main/resources/de/tudarmstadt/ukp/inception/project/initializers/doclabeling/thumbnail.svg b/inception/inception-project-initializers-doclabeling/src/main/resources/de/tudarmstadt/ukp/inception/project/initializers/doclabeling/thumbnail.svg new file mode 100644 index 00000000000..72f5a9d1cb6 --- /dev/null +++ b/inception/inception-project-initializers-doclabeling/src/main/resources/de/tudarmstadt/ukp/inception/project/initializers/doclabeling/thumbnail.svg @@ -0,0 +1,1282 @@ + + + + + + diff --git a/inception/inception-project-initializers-sentencelabeling/pom.xml b/inception/inception-project-initializers-sentencelabeling/pom.xml index 3e8b60caf56..86f607c972d 100644 --- a/inception/inception-project-initializers-sentencelabeling/pom.xml +++ b/inception/inception-project-initializers-sentencelabeling/pom.xml @@ -71,6 +71,11 @@ org.springframework.boot spring-boot-autoconfigure + + + org.apache.wicket + wicket-core + diff --git a/inception/inception-project-initializers-sentencelabeling/src/main/java/de/tudarmstadt/ukp/inception/project/initializers/sentencelabeling/SentenceLabelingProjectInitializer.java b/inception/inception-project-initializers-sentencelabeling/src/main/java/de/tudarmstadt/ukp/inception/project/initializers/sentencelabeling/SentenceLabelingProjectInitializer.java index f74e58b0721..b83d5f2d78e 100644 --- a/inception/inception-project-initializers-sentencelabeling/src/main/java/de/tudarmstadt/ukp/inception/project/initializers/sentencelabeling/SentenceLabelingProjectInitializer.java +++ b/inception/inception-project-initializers-sentencelabeling/src/main/java/de/tudarmstadt/ukp/inception/project/initializers/sentencelabeling/SentenceLabelingProjectInitializer.java @@ -21,11 +21,14 @@ import static java.util.Arrays.asList; import java.io.IOException; +import java.lang.invoke.MethodHandles; import java.net.URL; import java.util.List; import java.util.Optional; import org.apache.commons.io.IOUtils; +import org.apache.wicket.request.resource.PackageResourceReference; +import org.apache.wicket.request.resource.ResourceReference; import de.tudarmstadt.ukp.clarin.webanno.api.project.ProjectInitializer; import de.tudarmstadt.ukp.clarin.webanno.model.Project; @@ -42,12 +45,21 @@ public class SentenceLabelingProjectInitializer implements QuickProjectInitializer { + private static final PackageResourceReference THUMBNAIL = new PackageResourceReference( + MethodHandles.lookup().lookupClass(), "thumbnail.svg"); + @Override public String getName() { return "Sentence classification"; } + @Override + public Optional getThumbnail() + { + return Optional.of(THUMBNAIL); + } + @Override public boolean alreadyApplied(Project aProject) { diff --git a/inception/inception-project-initializers-sentencelabeling/src/main/resources/de/tudarmstadt/ukp/inception/project/initializers/sentencelabeling/thumbnail.svg b/inception/inception-project-initializers-sentencelabeling/src/main/resources/de/tudarmstadt/ukp/inception/project/initializers/sentencelabeling/thumbnail.svg new file mode 100644 index 00000000000..4524ceb2958 --- /dev/null +++ b/inception/inception-project-initializers-sentencelabeling/src/main/resources/de/tudarmstadt/ukp/inception/project/initializers/sentencelabeling/thumbnail.svg @@ -0,0 +1,803 @@ + + + + + +