Skip to content

Commit

Permalink
Merge pull request #4319 from inception-project/feature/4229-Better-p…
Browse files Browse the repository at this point in the history
…roject-template-selection

#4229 - Better project template selection
  • Loading branch information
reckart authored Nov 22, 2023
2 parents b7d928f + 39c02c6 commit e70064a
Show file tree
Hide file tree
Showing 19 changed files with 3,712 additions and 8 deletions.
4 changes: 4 additions & 0 deletions inception/inception-project-initializers-basic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
</dependency>

<!-- Spring dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
Expand Down
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.
4 changes: 4 additions & 0 deletions inception/inception-project-initializers-doclabeling/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
</dependency>

<!-- Spring dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
Expand Down
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 @@ -59,6 +59,10 @@
</dependency>

<!-- Spring dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
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
14 changes: 13 additions & 1 deletion inception/inception-project-initializers-ud/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>de.tudarmstadt.ukp.inception.app</groupId>
Expand All @@ -38,9 +40,19 @@
<artifactId>inception-project-initializers</artifactId>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>

<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-core</artifactId>
</dependency>

</dependencies>
</project>
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 e70064a

Please sign in to comment.