Skip to content

Commit

Permalink
#4229 - Better project template selection
Browse files Browse the repository at this point in the history
- Added remaining project template thumbnails
  • Loading branch information
reckart committed Nov 22, 2023
1 parent b7d928f commit 4297ca1
Show file tree
Hide file tree
Showing 14 changed files with 3,678 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.apache.wicket.request.resource.PackageResourceReference;
import org.apache.wicket.request.resource.ResourceReference;
import org.springframework.context.ApplicationContext;
import org.springframework.core.annotation.Order;

import de.tudarmstadt.ukp.clarin.webanno.model.Project;
import de.tudarmstadt.ukp.clarin.webanno.project.initializers.QuickProjectInitializer;
Expand All @@ -38,6 +39,7 @@
* {@link InceptionBasicProjectInitializersAutoConfiguration#basicProjectInitializer}.
* </p>
*/
@Order(1000)
public class BasicProjectInitializer
implements QuickProjectInitializer
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import org.apache.wicket.request.resource.PackageResourceReference;
import org.apache.wicket.request.resource.ResourceReference;
import org.springframework.core.annotation.Order;

import de.tudarmstadt.ukp.clarin.webanno.model.Project;
import de.tudarmstadt.ukp.clarin.webanno.project.initializers.QuickProjectInitializer;
Expand All @@ -47,6 +48,7 @@
* {@link InceptionDocumentLabelingProjectInitializersAutoConfiguration#basicDocumentLabelingProjectInitializer}.
* </p>
*/
@Order(3000)
public class BasicDocumentLabelingProjectInitializer
implements QuickProjectInitializer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.apache.commons.io.IOUtils;
import org.apache.wicket.request.resource.PackageResourceReference;
import org.apache.wicket.request.resource.ResourceReference;
import org.springframework.core.annotation.Order;

import de.tudarmstadt.ukp.clarin.webanno.model.Project;
import de.tudarmstadt.ukp.clarin.webanno.project.initializers.QuickProjectInitializer;
Expand All @@ -42,6 +43,7 @@
* {@link InceptionSentenceLabelingProjectInitializersAutoConfiguration#sentenceLabelingProjectInitializer}.
* </p>
*/
@Order(2000)
public class SentenceLabelingProjectInitializer
implements QuickProjectInitializer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@
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 org.springframework.core.annotation.Order;

import de.tudarmstadt.ukp.clarin.webanno.model.Project;
import de.tudarmstadt.ukp.clarin.webanno.project.initializers.DependencyLayerInitializer;
import de.tudarmstadt.ukp.clarin.webanno.project.initializers.LemmaLayerInitializer;
Expand All @@ -40,15 +45,25 @@
* {@link ProjectInitializersAutoConfiguration#standardProjectInitializer}.
* </p>
*/
@Order(6000)
public class UniversalDependenciesProjectInitializer
implements QuickProjectInitializer
{
private static final PackageResourceReference THUMBNAIL = new PackageResourceReference(
MethodHandles.lookup().lookupClass(), "thumbnail.svg");

@Override
public String getName()
{
return "Universal Dependencies";
}

@Override
public Optional<ResourceReference> getThumbnail()
{
return Optional.of(THUMBNAIL);
}

@Override
public boolean alreadyApplied(Project aProject)
{
Expand Down
Loading

0 comments on commit 4297ca1

Please sign in to comment.