Skip to content

#4699 - Ability to export all layers as json #5076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions inception/inception-export/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@
<groupId>de.tudarmstadt.ukp.inception.app</groupId>
<artifactId>inception-model</artifactId>
</dependency>
<dependency>
<groupId>de.tudarmstadt.ukp.inception.app</groupId>
<artifactId>inception-security</artifactId>
</dependency>
<dependency>
<groupId>de.tudarmstadt.ukp.inception.app</groupId>
<artifactId>inception-support</artifactId>
Expand Down Expand Up @@ -121,28 +117,24 @@
<groupId>org.dkpro.core</groupId>
<artifactId>dkpro-core-api-segmentation-asl</artifactId>
</dependency>
<dependency>
<groupId>org.dkpro.core</groupId>
<artifactId>dkpro-core-api-lexmorph-asl</artifactId>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>


<!-- TEST DEPENDENCIES -->
<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>de.tudarmstadt.ukp.inception.app</groupId>
<artifactId>inception-security</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>de.tudarmstadt.ukp.inception.app</groupId>
<artifactId>inception-documents-api</artifactId>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,9 @@ public class ExportedAnnotationLayer
@JsonProperty("multiple_tokens")
private boolean multipleTokens;

@JsonProperty("project_name")
private String projectName;

@JsonProperty("linked_list_behavior")
private boolean linkedListBehavior;

@JsonProperty("on_click_javascript_action")
private String onClickJavascriptAction;

@JsonProperty("traits")
private String traits;

Expand Down Expand Up @@ -315,16 +309,6 @@ public void setAttachFeature(ExportedAnnotationFeatureReference attachFeature)
this.attachFeature = attachFeature;
}

public String isProjectName()
{
return projectName;
}

public void setProjectName(String projectName)
{
this.projectName = projectName;
}

public boolean isLinkedListBehavior()
{
return linkedListBehavior;
Expand All @@ -345,16 +329,6 @@ public void setReadonly(boolean aReadonly)
readonly = aReadonly;
}

public String getOnClickJavascriptAction()
{
return onClickJavascriptAction;
}

public void setOnClickJavascriptAction(String onClickAction)
{
this.onClickJavascriptAction = onClickAction;
}

public String getTraits()
{
return traits;
Expand All @@ -371,14 +345,15 @@ public boolean equals(final Object other)
if (!(other instanceof ExportedAnnotationLayer)) {
return false;
}
ExportedAnnotationLayer castOther = (ExportedAnnotationLayer) other;

var castOther = (ExportedAnnotationLayer) other;
return new EqualsBuilder().append(name, castOther.name).append(type, castOther.type)
.append(projectName, castOther.projectName).isEquals();
.isEquals();
}

@Override
public int hashCode()
{
return new HashCodeBuilder().append(name).append(type).append(projectName).toHashCode();
return new HashCodeBuilder().append(name).append(type).toHashCode();
}
}
2 changes: 1 addition & 1 deletion inception/inception-project-initializers-phi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
</dependency>
<dependency>
<groupId>de.tudarmstadt.ukp.inception.app</groupId>
<artifactId>inception-export</artifactId>
<artifactId>inception-schema</artifactId>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
package de.tudarmstadt.ukp.inception.project.initializers.phi;

import static de.tudarmstadt.ukp.inception.export.JsonImportUtil.importTagSetFromJson;
import static de.tudarmstadt.ukp.inception.schema.exporters.TagsetImportExportUtils.importTagSetFromJson;
import static java.util.Collections.emptyList;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
</dependency>
<dependency>
<groupId>de.tudarmstadt.ukp.inception.app</groupId>
<artifactId>inception-export</artifactId>
<artifactId>inception-schema</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
package de.tudarmstadt.ukp.inception.project.initializers.neannotation;

import static de.tudarmstadt.ukp.inception.export.JsonImportUtil.importTagSetFromJson;
import static de.tudarmstadt.ukp.inception.schema.exporters.TagsetImportExportUtils.importTagSetFromJson;

import java.io.IOException;
import java.util.Collections;
Expand Down
8 changes: 4 additions & 4 deletions inception/inception-project-initializers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
<groupId>de.tudarmstadt.ukp.inception.app</groupId>
<artifactId>inception-model</artifactId>
</dependency>
<dependency>
<groupId>de.tudarmstadt.ukp.inception.app</groupId>
<artifactId>inception-export</artifactId>
</dependency>
<dependency>
<groupId>de.tudarmstadt.ukp.inception.app</groupId>
<artifactId>inception-project-api</artifactId>
Expand All @@ -45,6 +41,10 @@
<groupId>de.tudarmstadt.ukp.inception.app</groupId>
<artifactId>inception-schema-api</artifactId>
</dependency>
<dependency>
<groupId>de.tudarmstadt.ukp.inception.app</groupId>
<artifactId>inception-schema</artifactId>
</dependency>
<dependency>
<groupId>de.tudarmstadt.ukp.inception.app</groupId>
<artifactId>inception-support</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
package de.tudarmstadt.ukp.clarin.webanno.project.initializers;

import static de.tudarmstadt.ukp.inception.export.JsonImportUtil.importTagSetFromJson;
import static de.tudarmstadt.ukp.inception.schema.exporters.TagsetImportExportUtils.importTagSetFromJson;

import java.io.IOException;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
package de.tudarmstadt.ukp.clarin.webanno.project.initializers;

import static de.tudarmstadt.ukp.inception.export.JsonImportUtil.importTagSetFromJson;
import static de.tudarmstadt.ukp.inception.schema.exporters.TagsetImportExportUtils.importTagSetFromJson;

import java.io.IOException;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
package de.tudarmstadt.ukp.clarin.webanno.project.initializers;

import static de.tudarmstadt.ukp.inception.export.JsonImportUtil.importTagSetFromJson;
import static de.tudarmstadt.ukp.inception.schema.exporters.TagsetImportExportUtils.importTagSetFromJson;

import java.io.IOException;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
package de.tudarmstadt.ukp.clarin.webanno.project.initializers;

import static de.tudarmstadt.ukp.inception.export.JsonImportUtil.importTagSetFromJson;
import static de.tudarmstadt.ukp.inception.schema.exporters.TagsetImportExportUtils.importTagSetFromJson;

import java.io.IOException;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
package de.tudarmstadt.ukp.clarin.webanno.project.initializers;

import static de.tudarmstadt.ukp.inception.export.JsonImportUtil.importTagSetFromJson;
import static de.tudarmstadt.ukp.inception.schema.exporters.TagsetImportExportUtils.importTagSetFromJson;

import java.io.IOException;
import java.util.Collections;
Expand Down
5 changes: 5 additions & 0 deletions inception/inception-schema/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@
<artifactId>inception-constraints</artifactId>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>

<!-- Spring dependencies -->

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ private ExportedAnnotationLayer exportLayerDetails(
exLayer.setValidationMode(aLayer.getValidationMode());
exLayer.setLinkedListBehavior(aLayer.isLinkedListBehavior());
exLayer.setName(aLayer.getName());
exLayer.setProjectName(aLayer.getProject().getName());
exLayer.setType(aLayer.getType());
exLayer.setUiName(aLayer.getUiName());
exLayer.setTraits(aLayer.getTraits());
Expand All @@ -153,7 +152,7 @@ private ExportedAnnotationLayer exportLayerDetails(
// Export features
var exFeatures = new ArrayList<ExportedAnnotationFeature>();
for (var feature : annotationService.listAnnotationFeature(aLayer)) {
ExportedAnnotationFeature exFeature = exportFeatureDetails(feature);
var exFeature = exportFeatureDetails(feature);
exFeatures.add(exFeature);

if (aFeatureToExFeature != null) {
Expand Down
Loading