Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • arkindex/backend
1 result
Show changes
Commits on Source (5)
Showing
with 868 additions and 1400 deletions
......@@ -12,8 +12,10 @@ repos:
- 'flake8-debugger==3.1.0'
- 'flake8-quotes==3.3.2'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.11
# Ruff version.
rev: v0.3.7
hooks:
# Run the linter.
- id: ruff
args: [--fix]
- repo: https://github.com/pre-commit/pre-commit-hooks
......
1.6.0-rc2
1.6.0
......@@ -11,8 +11,6 @@ from arkindex.documents.models import (
Element,
ElementType,
Entity,
EntityLink,
EntityRole,
EntityType,
MetaData,
MLClass,
......@@ -135,29 +133,15 @@ class EntityMetaForm(forms.ModelForm):
metas = HStoreFormField()
class EntityLinkInLine(admin.TabularInline):
model = EntityLink
fk_name = "parent"
raw_id_fields = ("child", )
class EntityAdmin(admin.ModelAdmin):
list_display = ("id", "name", "type")
list_filter = ["corpus", "type"]
readonly_fields = ("id", )
raw_id_fields = ("worker_version", "worker_run", )
search_fields = ("name", )
inlines = (EntityLinkInLine, )
form = EntityMetaForm
class EntityRoleAdmin(admin.ModelAdmin):
list_display = ("id", "corpus", "parent_name", "child_name")
list_filter = ("corpus", )
readonly_fields = ("id", )
ordering = ("corpus", "parent_name", "child_name")
class EntityTypeAdmin(admin.ModelAdmin):
list_display = ("id", "corpus", "name", "color")
list_filter = ("corpus", )
......@@ -180,7 +164,6 @@ admin.site.register(Transcription, TranscriptionAdmin)
admin.site.register(MLClass, MLClassAdmin)
admin.site.register(MetaData, MetaDataAdmin)
admin.site.register(Entity, EntityAdmin)
admin.site.register(EntityRole, EntityRoleAdmin)
admin.site.register(EntityType, EntityTypeAdmin)
admin.site.register(AllowedMetaData, AllowedMetaDataAdmin)
admin.site.register(CorpusExport, CorpusExportAdmin)
......@@ -3,32 +3,18 @@ from textwrap import dedent
from uuid import UUID
from django.core.exceptions import ValidationError as DjangoValidationError
from django.db.models import Q
from django.shortcuts import get_object_or_404
from drf_spectacular.utils import OpenApiExample, OpenApiParameter, OpenApiResponse, extend_schema, extend_schema_view
from drf_spectacular.utils import OpenApiParameter, OpenApiResponse, extend_schema, extend_schema_view
from rest_framework import permissions, serializers, status
from rest_framework.exceptions import NotFound, PermissionDenied, ValidationError
from rest_framework.generics import CreateAPIView, ListAPIView, ListCreateAPIView, RetrieveUpdateDestroyAPIView
from rest_framework.generics import CreateAPIView, ListAPIView, RetrieveUpdateDestroyAPIView
from rest_framework.response import Response
from arkindex.documents.models import (
Corpus,
Element,
Entity,
EntityLink,
EntityRole,
EntityType,
Transcription,
TranscriptionEntity,
)
from arkindex.documents.models import Corpus, Element, Entity, EntityType, Transcription, TranscriptionEntity
from arkindex.documents.serializers.elements import ElementTinySerializer
from arkindex.documents.serializers.entities import (
BaseEntitySerializer,
CreateEntityRoleErrorResponseSerializer,
EntityCreateSerializer,
EntityLinkCreateSerializer,
EntityLinkSerializer,
EntityRoleSerializer,
EntitySerializer,
EntityTypeCreateSerializer,
EntityTypeSerializer,
......@@ -44,53 +30,6 @@ from arkindex.project.permissions import IsVerified, IsVerifiedOrReadOnly
from arkindex.users.models import Role
@extend_schema(tags=["entities"])
@extend_schema_view(
get=extend_schema(operation_id="ListCorpusRoles", description="List all roles of a corpus"),
post=extend_schema(
description="Create a new entity role",
responses={
200: EntityRoleSerializer,
400: CreateEntityRoleErrorResponseSerializer
},
examples=[OpenApiExample(
status_codes=["400"],
response_only=True,
name="role-exists",
value={"id": "55cd009d-cd4b-4ec2-a475-b060f98f9138", "corpus": ["Role already exists in this corpus"]},
description="Role already exists."
)]
)
)
class CorpusRoles(CorpusACLMixin, ListCreateAPIView):
"""
List all roles in a corpus
"""
permission_classes = (IsVerifiedOrReadOnly, )
serializer_class = EntityRoleSerializer
queryset = EntityRole.objects.none()
def get_queryset(self):
return EntityRole.objects \
.filter(corpus=self.get_corpus(self.kwargs["pk"])) \
.order_by("parent_name", "child_name")
def perform_create(self, serializer):
data = self.request.data
if EntityRole.objects.filter(
parent_name=data["parent_name"],
child_name=data["child_name"],
parent_type=data["parent_type_id"],
child_type=data["child_type_id"],
corpus_id=self.request.parser_context["kwargs"]["pk"]
).exists():
raise serializers.ValidationError({
"corpus": ["Role already exists in this corpus"],
"id": self.request.parser_context["kwargs"]["pk"]
})
super().perform_create(serializer)
@extend_schema(tags=["entities"])
@extend_schema_view(
get=extend_schema(operation_id="ListCorpusEntityTypes", description="List all entity types in a corpus"),
......@@ -173,8 +112,6 @@ class EntityTypeUpdate(ACLMixin, RetrieveUpdateDestroyAPIView):
def perform_destroy(self, instance):
if instance.entities.exists():
raise ValidationError({"detail": ["Some entities are using this entity type."]})
if EntityRole.objects.filter(Q(parent_type_id=instance.id) | Q(child_type_id=instance.id)).exists():
raise ValidationError({"detail": ["Some entity roles are using this entity type."]})
super().perform_destroy(instance)
......@@ -196,14 +133,6 @@ class EntityDetails(ACLMixin, RetrieveUpdateDestroyAPIView):
.select_related("corpus", "type") \
.filter(corpus__in=Corpus.objects.readable(self.request.user)) \
.prefetch_related(
"parents__role__parent_type",
"parents__role__child_type",
"children__role__parent_type",
"children__role__child_type",
"parents__child__type",
"parents__parent__type",
"children__parent__type",
"children__child__type",
"corpus",
)
......@@ -307,15 +236,6 @@ class EntityCreate(CreateAPIView):
return Response(entity.data, status=status_code, headers=headers)
@extend_schema_view(post=extend_schema(operation_id="CreateEntityLink", tags=["entities"]))
class EntityLinkCreate(CreateAPIView):
"""
Create a new link between two entities with a role
"""
permission_classes = (IsVerified, )
serializer_class = EntityLinkCreateSerializer
@extend_schema_view(post=extend_schema(
operation_id="CreateTranscriptionEntity",
tags=["entities"],
......@@ -519,41 +439,6 @@ class CorpusEntities(CorpusACLMixin, ListAPIView):
return queryset
@extend_schema_view(get=extend_schema(operation_id="ListElementLinks", tags=["entities"]))
class ElementLinks(CorpusACLMixin, ListAPIView):
"""
List all links where parent and child are linked to the element.\n\n
Requires a **guest** access to the element corpus
"""
serializer_class = EntityLinkSerializer
def get_queryset(self):
try:
element = Element.objects.select_related("corpus").only("id", "corpus").get(id=self.kwargs["pk"])
except Element.DoesNotExist:
raise NotFound
if not self.has_read_access(element.corpus):
raise PermissionDenied(detail="You do not have access to this element.")
# Load entities linked by transcriptions
entities_tr = Entity.objects.filter(transcriptions__element_id=element.id).prefetch_related("transcriptions")
# Load entities linked by metadatas
entities_meta = Entity.objects.filter(metadatas__element_id=element.id).prefetch_related("metadatas")
# Now load all links belonging to those entities
# It's several times faster to combine the queries in the final one
# than combining them at the lower level (entities is slower than entities_tr + entities_meta)
# We need to support cross references between transcriptions & metadata entities
return EntityLink.objects.filter(
Q(parent__in=entities_tr, child__in=entities_tr)
| Q(parent__in=entities_tr, child__in=entities_meta)
| Q(parent__in=entities_meta, child__in=entities_tr)
| Q(parent__in=entities_meta, child__in=entities_meta)
).select_related("role", "child__type", "parent__type").order_by("parent__name")
@extend_schema_view(
post=extend_schema(
operation_id="CreateTranscriptionEntities",
......
......@@ -38,8 +38,6 @@ EXPORT_QUERIES = [
"entity_type",
"entity",
"transcription_entity",
"entity_role",
"entity_link",
"metadata",
"dataset",
"dataset_element",
......
SELECT link.id, link.parent_id, link.child_id, link.role_id
FROM documents_entitylink link
INNER JOIN documents_entityrole role ON (link.role_id = role.id)
WHERE role.corpus_id = '{corpus_id}'::uuid
SELECT id, parent_name, child_name, parent_type_id, child_type_id
FROM documents_entityrole
WHERE corpus_id = '{corpus_id}'::uuid
......@@ -26,13 +26,6 @@ CREATE INDEX transcription_entity_entity_id ON transcription_entity (entity_id);
CREATE INDEX transcription_entity_worker_version_id ON transcription_entity (worker_version_id);
CREATE INDEX transcription_entity_worker_run_id ON transcription_entity (worker_run_id);
CREATE INDEX entity_link_parent_id ON entity_link (parent_id);
CREATE INDEX entity_link_child_id ON entity_link (child_id);
CREATE INDEX entity_link_role_id ON entity_link (role_id);
CREATE INDEX entity_role_parent_type_id ON entity_role (parent_type_id);
CREATE INDEX entity_role_child_type_id ON entity_role (child_type_id);
CREATE INDEX metadata_element_id ON metadata (element_id);
CREATE INDEX metadata_entity_id ON metadata (entity_id);
CREATE INDEX metadata_worker_version_id ON metadata (worker_version_id);
......
PRAGMA foreign_keys = ON;
CREATE TABLE export_version AS SELECT 8 AS version;
CREATE TABLE export_version AS SELECT 9 AS version;
CREATE TABLE image_server (
id INTEGER NOT NULL,
......@@ -168,29 +168,6 @@ CREATE TABLE transcription_entity (
CHECK (worker_run_id IS NULL OR worker_version_id IS NOT NULL)
);
CREATE TABLE entity_role (
id VARCHAR(37) NOT NULL,
parent_name VARCHAR(250) NOT NULL,
child_name VARCHAR(250) NOT NULL,
parent_type_id VARCHAR(37) NOT NULL,
child_type_id VARCHAR(37) NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (parent_type_id) REFERENCES entity_type (id) ON DELETE CASCADE,
FOREIGN KEY (child_type_id) REFERENCES entity_type (id) ON DELETE CASCADE,
UNIQUE (parent_name, child_name, parent_type_id, child_type_id)
);
CREATE TABLE entity_link (
id VARCHAR(37) NOT NULL,
parent_id VARCHAR(37) NOT NULL,
child_id VARCHAR(37) NOT NULL,
role_id VARCHAR(37) NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (parent_id) REFERENCES entity (id),
FOREIGN KEY (child_id) REFERENCES entity (id),
FOREIGN KEY (role_id) REFERENCES entity_role (id)
);
CREATE TABLE metadata (
id VARCHAR(37) NOT NULL,
element_id VARCHAR(37) NOT NULL,
......
[
{
"model": "process.process",
"pk": "9f2362e7-9e74-431a-8c5f-7a54a43fd5a8",
"pk": "3b0e2619-b37b-4b50-be6b-09139ba1b623",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"name": "Process fixture",
"creator": 2,
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"mode": "workers",
"name": null,
"creator": 1,
"corpus": null,
"mode": "local",
"activity_state": "disabled",
"started": null,
"finished": null,
"farm": "dd6f9265-24cf-4773-9e61-a42853278337",
"farm": null,
"element": null,
"folder_type": null,
"element_type": null,
......@@ -30,12 +30,12 @@
},
{
"model": "process.process",
"pk": "ca34111d-1329-4b71-b322-688239e27b33",
"pk": "bc123d15-5ee7-4c81-9d36-5488101dff32",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"name": null,
"creator": 1,
"creator": 2,
"corpus": null,
"mode": "local",
"activity_state": "disabled",
......@@ -59,18 +59,18 @@
},
{
"model": "process.process",
"pk": "de1be14d-6a0c-4229-8d45-886c03cd8781",
"pk": "dac9a8c6-f2a0-4cc6-8c57-f9c792fc9ee4",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"name": null,
"name": "Process fixture",
"creator": 2,
"corpus": null,
"mode": "local",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"mode": "workers",
"activity_state": "disabled",
"started": null,
"finished": null,
"farm": null,
"farm": "fc06b115-5d20-4cdf-950a-94932e668d8f",
"element": null,
"folder_type": null,
"element_type": null,
......@@ -88,25 +88,25 @@
},
{
"model": "process.repository",
"pk": "14f8f60b-d8ae-44a1-a45e-91ce272f4879",
"pk": "3d56bef6-3935-47c4-a355-aa187a245c71",
"fields": {
"url": "http://my_repo.fake/workers/worker"
}
},
{
"model": "process.repository",
"pk": "570e432a-870a-491a-b877-6acf8f864e19",
"pk": "f57ce63e-3355-427a-a09c-6c0ab65e3777",
"fields": {
"url": "http://gitlab/repo"
}
},
{
"model": "process.revision",
"pk": "11f73350-e6c8-452b-ac17-1dd07940f6b0",
"pk": "38c3c11f-f24b-4ce3-a450-ec2c848ac089",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"repo": "570e432a-870a-491a-b877-6acf8f864e19",
"repo": "f57ce63e-3355-427a-a09c-6c0ab65e3777",
"hash": "42",
"message": "Salve",
"author": "Some user"
......@@ -114,11 +114,11 @@
},
{
"model": "process.revision",
"pk": "76215c8a-9b35-4e69-97cd-2a363c471139",
"pk": "585d8da9-75ef-4772-a397-1234423861bc",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"repo": "14f8f60b-d8ae-44a1-a45e-91ce272f4879",
"repo": "3d56bef6-3935-47c4-a355-aa187a245c71",
"hash": "1337",
"message": "My w0rk3r",
"author": "Test user"
......@@ -126,180 +126,180 @@
},
{
"model": "process.worker",
"pk": "3d08cae6-8246-43a8-995c-46b12d319cca",
"pk": "36cb7853-c8e4-4907-982a-4417f784de01",
"fields": {
"name": "Custom worker",
"slug": "custom",
"type": "96d9c3ce-557e-4156-8a34-02e2dd500f2e",
"name": "Worker requiring a GPU",
"slug": "worker-gpu",
"type": "42800df6-f589-4211-8eca-160492de7335",
"description": "",
"repository": null,
"repository": "3d56bef6-3935-47c4-a355-aa187a245c71",
"public": false,
"archived": null
}
},
{
"model": "process.worker",
"pk": "487638f7-b88d-43a7-87c5-5523ec27374a",
"pk": "4000a3c6-f0dc-44dd-ad59-18c27c8fc5c4",
"fields": {
"name": "Generic worker with a Model",
"slug": "generic",
"type": "e9e38b3b-ca1a-439f-9e4f-30b14bc3ce75",
"name": "Recognizer",
"slug": "reco",
"type": "6ab037d7-a2c7-4cb0-bb2e-f57ba02c7950",
"description": "",
"repository": "14f8f60b-d8ae-44a1-a45e-91ce272f4879",
"repository": "3d56bef6-3935-47c4-a355-aa187a245c71",
"public": false,
"archived": null
}
},
{
"model": "process.worker",
"pk": "551f23ce-09d1-40f4-aec1-b8ed5fbc234f",
"pk": "5bee1c73-32e3-432b-a953-56f8859a9c77",
"fields": {
"name": "File import",
"slug": "file_import",
"type": "7c005c72-ea87-4226-b299-f42cb217550e",
"name": "Generic worker with a Model",
"slug": "generic",
"type": "6ab037d7-a2c7-4cb0-bb2e-f57ba02c7950",
"description": "",
"repository": "14f8f60b-d8ae-44a1-a45e-91ce272f4879",
"repository": "3d56bef6-3935-47c4-a355-aa187a245c71",
"public": false,
"archived": null
}
},
{
"model": "process.worker",
"pk": "958117cd-f5b7-49e7-80dd-872d26af6367",
"pk": "80aec27d-c6ee-43ef-9094-e49e8523d921",
"fields": {
"name": "Worker requiring a GPU",
"slug": "worker-gpu",
"type": "8f637bcd-038f-46ac-b727-1235a7d59134",
"name": "File import",
"slug": "file_import",
"type": "80ccac23-9a82-4d34-b068-f5232163c8da",
"description": "",
"repository": "14f8f60b-d8ae-44a1-a45e-91ce272f4879",
"repository": "3d56bef6-3935-47c4-a355-aa187a245c71",
"public": false,
"archived": null
}
},
{
"model": "process.worker",
"pk": "a2b24ca6-c4b0-4867-bae2-fcf9e7135032",
"pk": "b39c54b7-fefa-406d-acf8-db667ba41b97",
"fields": {
"name": "Document layout analyser",
"slug": "dla",
"type": "76f9adf0-2fb7-4ebe-9ae8-ed7535407bdd",
"type": "996b72f8-ff36-4837-8a98-b4f2fbf5fef1",
"description": "",
"repository": "14f8f60b-d8ae-44a1-a45e-91ce272f4879",
"repository": "3d56bef6-3935-47c4-a355-aa187a245c71",
"public": false,
"archived": null
}
},
{
"model": "process.worker",
"pk": "b7b4f769-4ccb-4b1e-a701-280ba8013e0b",
"pk": "da144682-c6e2-420b-8eb2-f0318994a401",
"fields": {
"name": "Recognizer",
"slug": "reco",
"type": "e9e38b3b-ca1a-439f-9e4f-30b14bc3ce75",
"name": "Custom worker",
"slug": "custom",
"type": "eadd1903-dd57-43cd-aca7-c1c47d33bb05",
"description": "",
"repository": "14f8f60b-d8ae-44a1-a45e-91ce272f4879",
"repository": null,
"public": false,
"archived": null
}
},
{
"model": "process.workertype",
"pk": "76f9adf0-2fb7-4ebe-9ae8-ed7535407bdd",
"pk": "42800df6-f589-4211-8eca-160492de7335",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"slug": "dla",
"display_name": "Document Layout Analysis"
"slug": "worker",
"display_name": "Worker requiring a GPU"
}
},
{
"model": "process.workertype",
"pk": "7c005c72-ea87-4226-b299-f42cb217550e",
"pk": "6ab037d7-a2c7-4cb0-bb2e-f57ba02c7950",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"slug": "import",
"display_name": "Import"
"slug": "recognizer",
"display_name": "Recognizer"
}
},
{
"model": "process.workertype",
"pk": "8f637bcd-038f-46ac-b727-1235a7d59134",
"pk": "80ccac23-9a82-4d34-b068-f5232163c8da",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"slug": "worker",
"display_name": "Worker requiring a GPU"
"slug": "import",
"display_name": "Import"
}
},
{
"model": "process.workertype",
"pk": "96d9c3ce-557e-4156-8a34-02e2dd500f2e",
"pk": "996b72f8-ff36-4837-8a98-b4f2fbf5fef1",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"slug": "custom",
"display_name": "Custom"
"slug": "dla",
"display_name": "Document Layout Analysis"
}
},
{
"model": "process.workertype",
"pk": "e9e38b3b-ca1a-439f-9e4f-30b14bc3ce75",
"pk": "eadd1903-dd57-43cd-aca7-c1c47d33bb05",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"slug": "recognizer",
"display_name": "Recognizer"
"slug": "custom",
"display_name": "Custom"
}
},
{
"model": "process.workerversion",
"pk": "0306d1e0-39e0-401f-840b-4ab885f2d627",
"pk": "34980b31-1d05-4a75-8b98-bd23f594b477",
"fields": {
"worker": "551f23ce-09d1-40f4-aec1-b8ed5fbc234f",
"revision": "76215c8a-9b35-4e69-97cd-2a363c471139",
"version": null,
"configuration": {},
"state": "available",
"worker": "da144682-c6e2-420b-8eb2-f0318994a401",
"revision": null,
"version": 1,
"configuration": {
"custom": "value"
},
"state": "created",
"gpu_usage": "disabled",
"model_usage": "disabled",
"docker_image": null,
"docker_image_iid": "registry.somewhere.com/something:latest",
"docker_image_iid": null,
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z"
}
},
{
"model": "process.workerversion",
"pk": "51d03bd9-0ca8-40fd-a231-f03ad9d301c6",
"pk": "c974cf9f-5b99-40c2-af03-39b86594555b",
"fields": {
"worker": "3d08cae6-8246-43a8-995c-46b12d319cca",
"revision": null,
"version": 1,
"worker": "b39c54b7-fefa-406d-acf8-db667ba41b97",
"revision": "585d8da9-75ef-4772-a397-1234423861bc",
"version": null,
"configuration": {
"custom": "value"
"test": 42
},
"state": "created",
"state": "available",
"gpu_usage": "disabled",
"model_usage": "disabled",
"docker_image": null,
"docker_image_iid": null,
"docker_image_iid": "registry.somewhere.com/something:latest",
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z"
}
},
{
"model": "process.workerversion",
"pk": "8359b5f9-c69f-4709-9736-090c51c70d07",
"pk": "ca71e6e1-9add-44cc-a904-71bfff00518d",
"fields": {
"worker": "958117cd-f5b7-49e7-80dd-872d26af6367",
"revision": "76215c8a-9b35-4e69-97cd-2a363c471139",
"worker": "80aec27d-c6ee-43ef-9094-e49e8523d921",
"revision": "585d8da9-75ef-4772-a397-1234423861bc",
"version": null,
"configuration": {
"test": 42
},
"configuration": {},
"state": "available",
"gpu_usage": "required",
"gpu_usage": "disabled",
"model_usage": "disabled",
"docker_image": null,
"docker_image_iid": "registry.somewhere.com/something:latest",
......@@ -309,10 +309,10 @@
},
{
"model": "process.workerversion",
"pk": "89cdf4f7-efe9-4387-91cc-fc7aa9bac2f7",
"pk": "f1369efb-13da-4f38-a3c6-0c9d9cca1336",
"fields": {
"worker": "a2b24ca6-c4b0-4867-bae2-fcf9e7135032",
"revision": "76215c8a-9b35-4e69-97cd-2a363c471139",
"worker": "4000a3c6-f0dc-44dd-ad59-18c27c8fc5c4",
"revision": "585d8da9-75ef-4772-a397-1234423861bc",
"version": null,
"configuration": {
"test": 42
......@@ -328,10 +328,10 @@
},
{
"model": "process.workerversion",
"pk": "d856b4de-d72b-46a5-a396-34cbf1a9b333",
"pk": "f1585930-dccf-44ac-be9a-ff6b15efd833",
"fields": {
"worker": "487638f7-b88d-43a7-87c5-5523ec27374a",
"revision": "76215c8a-9b35-4e69-97cd-2a363c471139",
"worker": "5bee1c73-32e3-432b-a953-56f8859a9c77",
"revision": "585d8da9-75ef-4772-a397-1234423861bc",
"version": null,
"configuration": {
"test": 42
......@@ -347,16 +347,16 @@
},
{
"model": "process.workerversion",
"pk": "e14c27a7-2525-42e8-8aea-2f9c8b38c708",
"pk": "f6d10a73-c357-4a4c-b354-7a7d3199d14d",
"fields": {
"worker": "b7b4f769-4ccb-4b1e-a701-280ba8013e0b",
"revision": "76215c8a-9b35-4e69-97cd-2a363c471139",
"worker": "36cb7853-c8e4-4907-982a-4417f784de01",
"revision": "585d8da9-75ef-4772-a397-1234423861bc",
"version": null,
"configuration": {
"test": 42
},
"state": "available",
"gpu_usage": "disabled",
"gpu_usage": "required",
"model_usage": "disabled",
"docker_image": null,
"docker_image_iid": "registry.somewhere.com/something:latest",
......@@ -366,10 +366,10 @@
},
{
"model": "process.workerrun",
"pk": "4a6c05a1-9f5f-41b1-8c55-9942d68f4fbe",
"pk": "18a363dd-cbc3-44e5-9d0a-5f9c13f16743",
"fields": {
"process": "ca34111d-1329-4b71-b322-688239e27b33",
"version": "51d03bd9-0ca8-40fd-a231-f03ad9d301c6",
"process": "3b0e2619-b37b-4b50-be6b-09139ba1b623",
"version": "34980b31-1d05-4a75-8b98-bd23f594b477",
"model_version": null,
"parents": "[]",
"configuration": null,
......@@ -381,14 +381,14 @@
},
{
"model": "process.workerrun",
"pk": "561ff70e-282b-4ef0-9405-065658bee696",
"pk": "3b33b369-c75e-4e20-bce1-af98f5f2431c",
"fields": {
"process": "de1be14d-6a0c-4229-8d45-886c03cd8781",
"version": "51d03bd9-0ca8-40fd-a231-f03ad9d301c6",
"process": "dac9a8c6-f2a0-4cc6-8c57-f9c792fc9ee4",
"version": "c974cf9f-5b99-40c2-af03-39b86594555b",
"model_version": null,
"parents": "[]",
"configuration": null,
"summary": "Worker Custom worker @ version 1",
"summary": "Worker Document layout analyser @ c974cf",
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"has_results": false
......@@ -396,14 +396,14 @@
},
{
"model": "process.workerrun",
"pk": "75dc71dd-4eb2-45d3-bbb6-ad05bf7f252e",
"pk": "52bcb794-1160-4bb4-b8b9-cf37490eb94c",
"fields": {
"process": "9f2362e7-9e74-431a-8c5f-7a54a43fd5a8",
"version": "89cdf4f7-efe9-4387-91cc-fc7aa9bac2f7",
"process": "bc123d15-5ee7-4c81-9d36-5488101dff32",
"version": "34980b31-1d05-4a75-8b98-bd23f594b477",
"model_version": null,
"parents": "[]",
"configuration": null,
"summary": "Worker Document layout analyser @ 89cdf4",
"summary": "Worker Custom worker @ version 1",
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"has_results": false
......@@ -411,14 +411,14 @@
},
{
"model": "process.workerrun",
"pk": "527f297e-25be-4cf0-a557-f2679d605c14",
"pk": "58808d2d-23a0-45b5-bc21-2df37067069d",
"fields": {
"process": "9f2362e7-9e74-431a-8c5f-7a54a43fd5a8",
"version": "e14c27a7-2525-42e8-8aea-2f9c8b38c708",
"process": "dac9a8c6-f2a0-4cc6-8c57-f9c792fc9ee4",
"version": "f1369efb-13da-4f38-a3c6-0c9d9cca1336",
"model_version": null,
"parents": "[\"75dc71dd-4eb2-45d3-bbb6-ad05bf7f252e\"]",
"parents": "[\"3b33b369-c75e-4e20-bce1-af98f5f2431c\"]",
"configuration": null,
"summary": "Worker Recognizer @ e14c27",
"summary": "Worker Recognizer @ f1369e",
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"has_results": false
......@@ -426,7 +426,7 @@
},
{
"model": "documents.corpus",
"pk": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"pk": "16490023-f435-4357-89dd-ee718950e3e2",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
......@@ -439,11 +439,11 @@
},
{
"model": "documents.elementtype",
"pk": "335ef2dc-5f04-45d5-8847-bfddc373b272",
"pk": "1029cd2f-d99f-4f65-a582-a890d6a44544",
"fields": {
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"slug": "act",
"display_name": "Act",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"slug": "page",
"display_name": "Page",
"folder": false,
"indexable": false,
"color": "28b62c"
......@@ -451,11 +451,11 @@
},
{
"model": "documents.elementtype",
"pk": "3d2df1f8-d332-463d-8d49-a65927742b18",
"pk": "20c588e0-0261-4895-9f9c-8ff1d8b1675b",
"fields": {
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"slug": "text_line",
"display_name": "Line",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"slug": "surface",
"display_name": "Surface",
"folder": false,
"indexable": false,
"color": "28b62c"
......@@ -463,23 +463,23 @@
},
{
"model": "documents.elementtype",
"pk": "4267d9ca-5619-4238-8743-7d0dbf40c89d",
"pk": "22abc518-90f2-4fdb-95f4-56e40576c5b4",
"fields": {
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"slug": "volume",
"display_name": "Volume",
"folder": true,
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"slug": "act",
"display_name": "Act",
"folder": false,
"indexable": false,
"color": "28b62c"
}
},
{
"model": "documents.elementtype",
"pk": "6c30e0df-fddc-497c-b775-2b9a13300fbc",
"pk": "9ec5f75a-9c28-4675-8187-90a3ab815c8e",
"fields": {
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"slug": "surface",
"display_name": "Surface",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"slug": "text_line",
"display_name": "Line",
"folder": false,
"indexable": false,
"color": "28b62c"
......@@ -487,11 +487,11 @@
},
{
"model": "documents.elementtype",
"pk": "cd2f76df-19ca-45a3-9e15-184058e0744d",
"pk": "9f70f37f-579a-4635-baa7-5106b0f79bb7",
"fields": {
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"slug": "page",
"display_name": "Page",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"slug": "word",
"display_name": "Word",
"folder": false,
"indexable": false,
"color": "28b62c"
......@@ -499,291 +499,291 @@
},
{
"model": "documents.elementtype",
"pk": "f5a5752a-21a2-4185-ac55-83bfe769de5d",
"pk": "e9b348c9-41fd-4af5-ac72-73a5cdd9c706",
"fields": {
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"slug": "word",
"display_name": "Word",
"folder": false,
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"slug": "volume",
"display_name": "Volume",
"folder": true,
"indexable": false,
"color": "28b62c"
}
},
{
"model": "documents.elementpath",
"pk": "00078e58-059c-46da-951e-bbd506f6d198",
"pk": "0450967e-2e11-414b-a868-d9e5f84c25a1",
"fields": {
"element": "f72770d3-d49c-4bf4-9e9f-99ff9934b94f",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\", \"92a40b24-7f3d-49a0-9244-18857ef3472d\"]",
"ordering": 1
"element": "ce0edaab-0524-4edf-966d-dfe709017da0",
"path": "[\"33992074-54cc-4b9c-a0ab-8fcbcc2dd7e1\"]",
"ordering": 2
}
},
{
"model": "documents.elementpath",
"pk": "102e9d9e-80cd-4c9e-b8ac-0662887081ab",
"pk": "0724cab0-a874-497a-9514-879f86aa610f",
"fields": {
"element": "2744c570-21f3-4ab7-8283-2b60ac1ef1d7",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\", \"b0e720f7-2cfb-4ec1-aa3c-df623c3b24c7\"]",
"ordering": 2
"element": "b988060b-682a-4d88-99bb-4b830ce6140d",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\", \"96f9147c-bfb6-46db-b4b3-b606518fe6da\"]",
"ordering": 3
}
},
{
"model": "documents.elementpath",
"pk": "199d2b0a-c218-4b82-8443-24eb22a024ed",
"pk": "07ac006c-a524-41fd-a872-218fe377f738",
"fields": {
"element": "29ce75c4-1429-410e-bb71-deb1babf8fd9",
"path": "[\"2eb44fc9-837a-4d64-b9d2-5d4f6c16f0e5\"]",
"ordering": 2
"element": "cbce3a87-e722-48df-9702-1a4659479198",
"path": "[\"33992074-54cc-4b9c-a0ab-8fcbcc2dd7e1\"]",
"ordering": 1
}
},
{
"model": "documents.elementpath",
"pk": "29f262e4-c00f-422b-99da-9f120f349d4d",
"pk": "25d41c24-9eed-4de4-a038-5e1fb7f6f78d",
"fields": {
"element": "aef007bf-09f9-43f5-9110-42feef0ff720",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\"]",
"ordering": 5
"element": "2c69f69e-595a-41e9-89de-5acfde7bd006",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\", \"9e3d7a7a-9993-4d9c-909d-39581ef294fa\"]",
"ordering": 0
}
},
{
"model": "documents.elementpath",
"pk": "33733e49-42d4-43f3-941c-5b8c298ac6c0",
"pk": "465e3fd3-cfa8-4736-a9b5-4cc0ec906e83",
"fields": {
"element": "fc0f79c4-d219-416b-ba2d-942fc1f7e257",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\", \"b0e720f7-2cfb-4ec1-aa3c-df623c3b24c7\"]",
"ordering": 1
"element": "9e3d7a7a-9993-4d9c-909d-39581ef294fa",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\"]",
"ordering": 4
}
},
{
"model": "documents.elementpath",
"pk": "369b348e-c13d-44cc-8ba3-54054d5e6b36",
"pk": "46cc4835-771a-4dbc-892d-fe9ba8a2c730",
"fields": {
"element": "00cf69ea-f401-4223-bb11-3143fc45b734",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\", \"92a40b24-7f3d-49a0-9244-18857ef3472d\"]",
"ordering": 0
"element": "5d75b1cf-de97-46df-a1fb-ed89ffd03aab",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\"]",
"ordering": 3
}
},
{
"model": "documents.elementpath",
"pk": "36bccd78-72c7-4f4b-81e9-8e46c3795d72",
"pk": "5439a3f6-9058-4dcc-8610-57edef2229cd",
"fields": {
"element": "677bc0da-2881-499f-817d-805e1dba35bf",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\"]",
"ordering": 6
"element": "2d081b14-e889-438e-9e1f-f9d14e39a20d",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\", \"329e1474-1fb8-4051-8d77-7218d331450e\"]",
"ordering": 0
}
},
{
"model": "documents.elementpath",
"pk": "392c1ee0-1c8d-4d9f-8d92-9ed2a69d2703",
"pk": "574befc7-4beb-43f6-81e9-62c2ee36a99c",
"fields": {
"element": "81a94dae-4fdc-49e4-a96a-e6c2640f5ad7",
"path": "[\"2eb44fc9-837a-4d64-b9d2-5d4f6c16f0e5\"]",
"ordering": 1
"element": "82bea30e-4b27-4351-9461-d0ebe18a527e",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\"]",
"ordering": 7
}
},
{
"model": "documents.elementpath",
"pk": "41f43bbe-cc86-4407-a6e5-f253c8199e39",
"pk": "5a2d78c7-b999-4958-98c7-28486dda45e0",
"fields": {
"element": "73c8186b-1456-4292-876b-0b8c48fa9501",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\", \"ba868f93-f024-4501-9405-454536822065\"]",
"ordering": 0
"element": "73c4819b-24a4-497c-86e8-5151a556db35",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\", \"96f9147c-bfb6-46db-b4b3-b606518fe6da\"]",
"ordering": 2
}
},
{
"model": "documents.elementpath",
"pk": "4479f9d2-6e11-4945-8400-3b70340e5324",
"pk": "62bbe831-d9e0-49cb-975b-1de5c12aaf91",
"fields": {
"element": "7a541071-7dfb-4331-8476-0234ca1d6313",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\", \"677bc0da-2881-499f-817d-805e1dba35bf\"]",
"element": "cd7c6808-9f90-45b9-a237-f42a6e12fa5a",
"path": "[\"33992074-54cc-4b9c-a0ab-8fcbcc2dd7e1\"]",
"ordering": 0
}
},
{
"model": "documents.elementpath",
"pk": "4e7a2f71-db38-4186-993e-95b89ef1f17c",
"pk": "6364ca94-521e-46d4-812c-1fcf08f8ad3d",
"fields": {
"element": "f78a95f0-6980-4c2b-acf6-57965f9273de",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\", \"ba868f93-f024-4501-9405-454536822065\"]",
"ordering": 1
"element": "b8955c38-75cf-41b5-b00b-fee6ea454406",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\"]",
"ordering": 2
}
},
{
"model": "documents.elementpath",
"pk": "6031e1ee-b6e2-4cf6-a340-63dc76a6def3",
"pk": "7210e063-caaa-41b2-afd9-06341cddd8f7",
"fields": {
"element": "021bfcd2-239a-4d9b-948a-e3db7deb0f30",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\", \"dc12e918-17f0-4672-b767-4c9c7a229785\"]",
"ordering": 3
"element": "2d62d627-c99b-44e1-844c-876bc46ccc17",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\", \"8225df9f-fa29-4713-b742-e6ac16e7b212\"]",
"ordering": 0
}
},
{
"model": "documents.elementpath",
"pk": "6340fbe9-e66d-4dfd-9418-4b0a79f4f337",
"pk": "7f4c9b4b-61a2-4578-8d4f-6c429a45c187",
"fields": {
"element": "92a40b24-7f3d-49a0-9244-18857ef3472d",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\"]",
"ordering": 4
"element": "91886a2b-3c09-43c3-8d74-828000b8ef87",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\", \"80bec332-0fd2-4764-a297-04cde5d2bde4\"]",
"ordering": 0
}
},
{
"model": "documents.elementpath",
"pk": "6e8678b6-e9fb-467c-ae3f-ea5c4cdf13f0",
"pk": "80c59a5c-b75e-48b7-90f6-fd0c3fc2e645",
"fields": {
"element": "3c8195e1-a172-43dd-89e9-4db0ec39438c",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\", \"dc12e918-17f0-4672-b767-4c9c7a229785\"]",
"ordering": 2
"element": "33992074-54cc-4b9c-a0ab-8fcbcc2dd7e1",
"path": "[]",
"ordering": 0
}
},
{
"model": "documents.elementpath",
"pk": "79e2e1d0-2b4f-47c5-9084-d50734636674",
"pk": "821faabc-52ec-4f8e-b2ab-29a42c78b27c",
"fields": {
"element": "d06899de-4201-48ec-8d4f-2414b1e8ea9e",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\"]",
"ordering": 3
"element": "c3692686-c6a9-4b1e-a1d9-2d0984726167",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\", \"96f9147c-bfb6-46db-b4b3-b606518fe6da\"]",
"ordering": 1
}
},
{
"model": "documents.elementpath",
"pk": "92f1ac10-958c-451b-9d87-46348e750d73",
"pk": "975e8f97-add1-451b-98bf-231629a83e52",
"fields": {
"element": "a96b1536-3ab8-4394-a2e4-1a243e71ba71",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\", \"b0e720f7-2cfb-4ec1-aa3c-df623c3b24c7\"]",
"element": "84079231-c188-4753-887f-02a57c5ee50f",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\", \"82bea30e-4b27-4351-9461-d0ebe18a527e\"]",
"ordering": 0
}
},
{
"model": "documents.elementpath",
"pk": "9995019d-8f5d-4bdb-90a3-5a82cf1bc68d",
"pk": "9984dee3-a3cc-484c-b16b-3acd0f2b3382",
"fields": {
"element": "dc12e918-17f0-4672-b767-4c9c7a229785",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\"]",
"ordering": 0
"element": "8225df9f-fa29-4713-b742-e6ac16e7b212",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\"]",
"ordering": 1
}
},
{
"model": "documents.elementpath",
"pk": "a0d9a6c2-288a-4a84-bdea-dec7013e7260",
"pk": "9ef50c25-ed7a-4378-94f2-8ae05512c5d3",
"fields": {
"element": "ba868f93-f024-4501-9405-454536822065",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\"]",
"element": "a907ff62-5cde-4122-8809-99dd9ccdc6ac",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\", \"8225df9f-fa29-4713-b742-e6ac16e7b212\"]",
"ordering": 2
}
},
{
"model": "documents.elementpath",
"pk": "a35025d4-a2fd-4278-950e-506f7c0a7428",
"pk": "a8616d7b-5ef7-409e-949f-4c25137145d8",
"fields": {
"element": "e47b0388-970d-40b1-afed-f0de9f0b31a0",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\", \"dc12e918-17f0-4672-b767-4c9c7a229785\"]",
"ordering": 0
"element": "54b1369b-5d7b-4bb8-a9c1-16d77528c249",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\", \"8225df9f-fa29-4713-b742-e6ac16e7b212\"]",
"ordering": 1
}
},
{
"model": "documents.elementpath",
"pk": "b5895b16-85bb-4ee0-83ae-0dbe8d70e74e",
"pk": "b182450d-f63f-4ec9-966f-22f3da61b163",
"fields": {
"element": "c9f0ed74-71a7-4a6c-aa6e-4af9a10a7b07",
"path": "[\"2eb44fc9-837a-4d64-b9d2-5d4f6c16f0e5\"]",
"ordering": 0
"element": "80bec332-0fd2-4764-a297-04cde5d2bde4",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\"]",
"ordering": 5
}
},
{
"model": "documents.elementpath",
"pk": "bbad373e-eece-423c-8ce9-d96306ffa708",
"pk": "b1dbe688-b77e-41ad-828a-3a8bbf30d64a",
"fields": {
"element": "f2500bfd-5296-46bf-b039-7a52fa5501fe",
"path": "[]",
"ordering": 0
"element": "958dbff2-5f5f-42a7-949f-58d890e92bc0",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\", \"b8955c38-75cf-41b5-b00b-fee6ea454406\"]",
"ordering": 2
}
},
{
"model": "documents.elementpath",
"pk": "c92d9ba6-45e0-4059-901f-e725fc607988",
"pk": "b2c7ec01-aaa6-4313-90fe-38b14f514e17",
"fields": {
"element": "5f5a3194-9d00-4977-bd8e-69fd1c80f896",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\"]",
"ordering": 7
"element": "aa31ec93-9f8e-4576-a881-4227fa855b63",
"path": "[]",
"ordering": 0
}
},
{
"model": "documents.elementpath",
"pk": "d3a1093c-940e-46e9-a699-9116420087ce",
"pk": "bcf2fdd2-9559-40ba-9b65-dafa6fda4c6b",
"fields": {
"element": "2eb44fc9-837a-4d64-b9d2-5d4f6c16f0e5",
"path": "[]",
"ordering": 0
"element": "18ae1504-fde8-4f66-bde8-ae882576b4b7",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\", \"b8955c38-75cf-41b5-b00b-fee6ea454406\"]",
"ordering": 1
}
},
{
"model": "documents.elementpath",
"pk": "dd5241cc-99b6-4ff6-925c-25101f29585e",
"pk": "c0646b86-3c91-4499-b635-2ca0e11844ad",
"fields": {
"element": "386c28f6-9b6f-49b4-ba7b-b31d864a1231",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\", \"d06899de-4201-48ec-8d4f-2414b1e8ea9e\"]",
"element": "6332a162-d5df-4f51-b8f5-7639ad3bc75c",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\", \"5d75b1cf-de97-46df-a1fb-ed89ffd03aab\"]",
"ordering": 0
}
},
{
"model": "documents.elementpath",
"pk": "de29171f-6de7-43ec-90aa-f6e13940d65f",
"pk": "cda7d8e7-c189-4a38-b2f5-7c6745d2bd1b",
"fields": {
"element": "b0e720f7-2cfb-4ec1-aa3c-df623c3b24c7",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\"]",
"ordering": 1
"element": "d2e8e9ac-2130-4014-8c55-78b54b3e0670",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\", \"96f9147c-bfb6-46db-b4b3-b606518fe6da\"]",
"ordering": 0
}
},
{
"model": "documents.elementpath",
"pk": "e31fb634-0412-4d66-b6db-df24d4815c41",
"pk": "d73c88ff-5c34-436a-a7c9-b3ca8cb94afa",
"fields": {
"element": "2da972f0-55f7-4bc9-ae8a-f4952fec9ac7",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\", \"5f5a3194-9d00-4977-bd8e-69fd1c80f896\"]",
"ordering": 0
"element": "9955253b-a758-4414-95ef-88658973380f",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\", \"9e3d7a7a-9993-4d9c-909d-39581ef294fa\"]",
"ordering": 1
}
},
{
"model": "documents.elementpath",
"pk": "ec948cad-e91a-4211-9170-fdcbf4030bf4",
"pk": "dec5860b-a2d2-4086-9d91-05d6fa006477",
"fields": {
"element": "cd73870c-7b2c-4308-b216-196cf6f4f086",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\", \"dc12e918-17f0-4672-b767-4c9c7a229785\"]",
"ordering": 1
"element": "96f9147c-bfb6-46db-b4b3-b606518fe6da",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\"]",
"ordering": 0
}
},
{
"model": "documents.elementpath",
"pk": "ed870e4c-10a8-4d7a-8bd7-bd124b745872",
"pk": "deeebddd-4f51-4170-8cff-804936bcbd56",
"fields": {
"element": "e0c9fec4-a6a1-4eab-95da-26b7718bd021",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\", \"ba868f93-f024-4501-9405-454536822065\"]",
"ordering": 2
"element": "329e1474-1fb8-4051-8d77-7218d331450e",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\"]",
"ordering": 6
}
},
{
"model": "documents.elementpath",
"pk": "f893d7bf-9154-4130-9097-2e8f92e6a234",
"pk": "e6281d56-5a58-463e-8b97-55a778c5ca04",
"fields": {
"element": "714d988a-bb54-4d39-9d0a-cab528af5c9c",
"path": "[\"f2500bfd-5296-46bf-b039-7a52fa5501fe\", \"aef007bf-09f9-43f5-9110-42feef0ff720\"]",
"element": "9025ad65-e724-4b89-a97d-aa61d0878160",
"path": "[\"aa31ec93-9f8e-4576-a881-4227fa855b63\", \"b8955c38-75cf-41b5-b00b-fee6ea454406\"]",
"ordering": 0
}
},
{
"model": "documents.element",
"pk": "00cf69ea-f401-4223-bb11-3143fc45b734",
"pk": "18ae1504-fde8-4f66-bde8-ae882576b4b7",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "6c30e0df-fddc-497c-b775-2b9a13300fbc",
"name": "Surface B",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "9f70f37f-579a-4635-baa7-5106b0f79bb7",
"name": "ROY",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "e3e69ede-2d38-4ad9-adeb-7cf37da22a85",
"polygon": "LINEARRING (600 600, 600 1000, 1000 1000, 1000 600, 600 600)",
"image": "0e726ee0-42e7-4f6c-b9df-a80aceb8d7b6",
"polygon": "LINEARRING (400 400, 400 500, 500 500, 500 400, 400 400)",
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -791,18 +791,18 @@
},
{
"model": "documents.element",
"pk": "021bfcd2-239a-4d9b-948a-e3db7deb0f30",
"pk": "2c69f69e-595a-41e9-89de-5acfde7bd006",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "3d2df1f8-d332-463d-8d49-a65927742b18",
"name": "Text line",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "20c588e0-0261-4895-9f9c-8ff1d8b1675b",
"name": "Surface B",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "e3e69ede-2d38-4ad9-adeb-7cf37da22a85",
"polygon": "LINEARRING (400 400, 400 500, 500 500, 500 400, 400 400)",
"image": "7ca898be-8000-4b28-bc5b-733edc3da0fe",
"polygon": "LINEARRING (600 600, 600 1000, 1000 1000, 1000 600, 600 600)",
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -810,18 +810,18 @@
},
{
"model": "documents.element",
"pk": "2744c570-21f3-4ab7-8283-2b60ac1ef1d7",
"pk": "2d081b14-e889-438e-9e1f-f9d14e39a20d",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "f5a5752a-21a2-4185-ac55-83bfe769de5d",
"name": "DATUM",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "20c588e0-0261-4895-9f9c-8ff1d8b1675b",
"name": "Surface E",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "32ce959e-a9a0-4f6b-be79-e185b7181055",
"polygon": "LINEARRING (700 700, 700 800, 800 800, 800 700, 700 700)",
"image": "0e726ee0-42e7-4f6c-b9df-a80aceb8d7b6",
"polygon": "LINEARRING (300 300, 300 600, 600 600, 600 300, 300 300)",
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -829,18 +829,18 @@
},
{
"model": "documents.element",
"pk": "29ce75c4-1429-410e-bb71-deb1babf8fd9",
"pk": "2d62d627-c99b-44e1-844c-876bc46ccc17",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "cd2f76df-19ca-45a3-9e15-184058e0744d",
"name": "Volume 2, page 2r",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "9f70f37f-579a-4635-baa7-5106b0f79bb7",
"name": "PARIS",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "83e3f3a6-c940-4439-b9c8-72c60ad280fa",
"polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)",
"image": "41d51adf-4b81-4afc-9884-77575d971d49",
"polygon": "LINEARRING (100 100, 100 200, 200 200, 200 100, 100 100)",
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -848,18 +848,18 @@
},
{
"model": "documents.element",
"pk": "2da972f0-55f7-4bc9-ae8a-f4952fec9ac7",
"pk": "329e1474-1fb8-4051-8d77-7218d331450e",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "6c30e0df-fddc-497c-b775-2b9a13300fbc",
"name": "Surface F",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "22abc518-90f2-4fdb-95f4-56e40576c5b4",
"name": "Act 4",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "1cbb097f-9577-44ea-960e-54a2f81eca06",
"polygon": "LINEARRING (600 600, 600 1000, 1000 1000, 1000 600, 600 600)",
"image": null,
"polygon": null,
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -867,12 +867,12 @@
},
{
"model": "documents.element",
"pk": "2eb44fc9-837a-4d64-b9d2-5d4f6c16f0e5",
"pk": "33992074-54cc-4b9c-a0ab-8fcbcc2dd7e1",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "4267d9ca-5619-4238-8743-7d0dbf40c89d",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "e9b348c9-41fd-4af5-ac72-73a5cdd9c706",
"name": "Volume 2",
"creator": null,
"worker_version": null,
......@@ -886,18 +886,18 @@
},
{
"model": "documents.element",
"pk": "386c28f6-9b6f-49b4-ba7b-b31d864a1231",
"pk": "54b1369b-5d7b-4bb8-a9c1-16d77528c249",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "6c30e0df-fddc-497c-b775-2b9a13300fbc",
"name": "Surface A",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "9f70f37f-579a-4635-baa7-5106b0f79bb7",
"name": "ROY",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "e3e69ede-2d38-4ad9-adeb-7cf37da22a85",
"polygon": "LINEARRING (0 0, 0 600, 600 600, 600 0, 0 0)",
"image": "41d51adf-4b81-4afc-9884-77575d971d49",
"polygon": "LINEARRING (400 400, 400 500, 500 500, 500 400, 400 400)",
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -905,18 +905,18 @@
},
{
"model": "documents.element",
"pk": "3c8195e1-a172-43dd-89e9-4db0ec39438c",
"pk": "5d75b1cf-de97-46df-a1fb-ed89ffd03aab",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "f5a5752a-21a2-4185-ac55-83bfe769de5d",
"name": "DATUM",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "22abc518-90f2-4fdb-95f4-56e40576c5b4",
"name": "Act 1",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "e3e69ede-2d38-4ad9-adeb-7cf37da22a85",
"polygon": "LINEARRING (700 700, 700 800, 800 800, 800 700, 700 700)",
"image": null,
"polygon": null,
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -924,18 +924,18 @@
},
{
"model": "documents.element",
"pk": "5f5a3194-9d00-4977-bd8e-69fd1c80f896",
"pk": "6332a162-d5df-4f51-b8f5-7639ad3bc75c",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "335ef2dc-5f04-45d5-8847-bfddc373b272",
"name": "Act 5",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "20c588e0-0261-4895-9f9c-8ff1d8b1675b",
"name": "Surface A",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": null,
"polygon": null,
"image": "7ca898be-8000-4b28-bc5b-733edc3da0fe",
"polygon": "LINEARRING (0 0, 0 600, 600 600, 600 0, 0 0)",
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -943,18 +943,18 @@
},
{
"model": "documents.element",
"pk": "677bc0da-2881-499f-817d-805e1dba35bf",
"pk": "73c4819b-24a4-497c-86e8-5151a556db35",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "335ef2dc-5f04-45d5-8847-bfddc373b272",
"name": "Act 4",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "9f70f37f-579a-4635-baa7-5106b0f79bb7",
"name": "DATUM",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": null,
"polygon": null,
"image": "7ca898be-8000-4b28-bc5b-733edc3da0fe",
"polygon": "LINEARRING (700 700, 700 800, 800 800, 800 700, 700 700)",
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -962,18 +962,18 @@
},
{
"model": "documents.element",
"pk": "714d988a-bb54-4d39-9d0a-cab528af5c9c",
"pk": "80bec332-0fd2-4764-a297-04cde5d2bde4",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "6c30e0df-fddc-497c-b775-2b9a13300fbc",
"name": "Surface D",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "22abc518-90f2-4fdb-95f4-56e40576c5b4",
"name": "Act 3",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "1cbb097f-9577-44ea-960e-54a2f81eca06",
"polygon": "LINEARRING (0 0, 0 300, 300 300, 300 0, 0 0)",
"image": null,
"polygon": null,
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -981,18 +981,18 @@
},
{
"model": "documents.element",
"pk": "73c8186b-1456-4292-876b-0b8c48fa9501",
"pk": "8225df9f-fa29-4713-b742-e6ac16e7b212",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "f5a5752a-21a2-4185-ac55-83bfe769de5d",
"name": "PARIS",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "1029cd2f-d99f-4f65-a582-a890d6a44544",
"name": "Volume 1, page 1v",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "1cbb097f-9577-44ea-960e-54a2f81eca06",
"polygon": "LINEARRING (100 100, 100 200, 200 200, 200 100, 100 100)",
"image": "41d51adf-4b81-4afc-9884-77575d971d49",
"polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)",
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -1000,18 +1000,18 @@
},
{
"model": "documents.element",
"pk": "7a541071-7dfb-4331-8476-0234ca1d6313",
"pk": "82bea30e-4b27-4351-9461-d0ebe18a527e",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "6c30e0df-fddc-497c-b775-2b9a13300fbc",
"name": "Surface E",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "22abc518-90f2-4fdb-95f4-56e40576c5b4",
"name": "Act 5",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "1cbb097f-9577-44ea-960e-54a2f81eca06",
"polygon": "LINEARRING (300 300, 300 600, 600 600, 600 300, 300 300)",
"image": null,
"polygon": null,
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -1019,18 +1019,18 @@
},
{
"model": "documents.element",
"pk": "81a94dae-4fdc-49e4-a96a-e6c2640f5ad7",
"pk": "84079231-c188-4753-887f-02a57c5ee50f",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "cd2f76df-19ca-45a3-9e15-184058e0744d",
"name": "Volume 2, page 1v",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "20c588e0-0261-4895-9f9c-8ff1d8b1675b",
"name": "Surface F",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "4c59cb4d-7832-4362-82e3-2b62370ea778",
"polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)",
"image": "0e726ee0-42e7-4f6c-b9df-a80aceb8d7b6",
"polygon": "LINEARRING (600 600, 600 1000, 1000 1000, 1000 600, 600 600)",
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -1038,18 +1038,18 @@
},
{
"model": "documents.element",
"pk": "92a40b24-7f3d-49a0-9244-18857ef3472d",
"pk": "9025ad65-e724-4b89-a97d-aa61d0878160",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "335ef2dc-5f04-45d5-8847-bfddc373b272",
"name": "Act 2",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "9f70f37f-579a-4635-baa7-5106b0f79bb7",
"name": "PARIS",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": null,
"polygon": null,
"image": "0e726ee0-42e7-4f6c-b9df-a80aceb8d7b6",
"polygon": "LINEARRING (100 100, 100 200, 200 200, 200 100, 100 100)",
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -1057,18 +1057,18 @@
},
{
"model": "documents.element",
"pk": "a96b1536-3ab8-4394-a2e4-1a243e71ba71",
"pk": "91886a2b-3c09-43c3-8d74-828000b8ef87",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "f5a5752a-21a2-4185-ac55-83bfe769de5d",
"name": "PARIS",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "20c588e0-0261-4895-9f9c-8ff1d8b1675b",
"name": "Surface D",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "32ce959e-a9a0-4f6b-be79-e185b7181055",
"polygon": "LINEARRING (100 100, 100 200, 200 200, 200 100, 100 100)",
"image": "0e726ee0-42e7-4f6c-b9df-a80aceb8d7b6",
"polygon": "LINEARRING (0 0, 0 300, 300 300, 300 0, 0 0)",
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -1076,18 +1076,18 @@
},
{
"model": "documents.element",
"pk": "aef007bf-09f9-43f5-9110-42feef0ff720",
"pk": "958dbff2-5f5f-42a7-949f-58d890e92bc0",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "335ef2dc-5f04-45d5-8847-bfddc373b272",
"name": "Act 3",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "9f70f37f-579a-4635-baa7-5106b0f79bb7",
"name": "DATUM",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": null,
"polygon": null,
"image": "0e726ee0-42e7-4f6c-b9df-a80aceb8d7b6",
"polygon": "LINEARRING (700 700, 700 800, 800 800, 800 700, 700 700)",
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -1095,17 +1095,17 @@
},
{
"model": "documents.element",
"pk": "b0e720f7-2cfb-4ec1-aa3c-df623c3b24c7",
"pk": "96f9147c-bfb6-46db-b4b3-b606518fe6da",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "cd2f76df-19ca-45a3-9e15-184058e0744d",
"name": "Volume 1, page 1v",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "1029cd2f-d99f-4f65-a582-a890d6a44544",
"name": "Volume 1, page 1r",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "32ce959e-a9a0-4f6b-be79-e185b7181055",
"image": "7ca898be-8000-4b28-bc5b-733edc3da0fe",
"polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)",
"rotation_angle": 0,
"mirrored": false,
......@@ -1114,17 +1114,17 @@
},
{
"model": "documents.element",
"pk": "ba868f93-f024-4501-9405-454536822065",
"pk": "9955253b-a758-4414-95ef-88658973380f",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "cd2f76df-19ca-45a3-9e15-184058e0744d",
"name": "Volume 1, page 2r",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "20c588e0-0261-4895-9f9c-8ff1d8b1675b",
"name": "Surface C",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "1cbb097f-9577-44ea-960e-54a2f81eca06",
"image": "41d51adf-4b81-4afc-9884-77575d971d49",
"polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)",
"rotation_angle": 0,
"mirrored": false,
......@@ -1133,18 +1133,18 @@
},
{
"model": "documents.element",
"pk": "c9f0ed74-71a7-4a6c-aa6e-4af9a10a7b07",
"pk": "9e3d7a7a-9993-4d9c-909d-39581ef294fa",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "cd2f76df-19ca-45a3-9e15-184058e0744d",
"name": "Volume 2, page 1r",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "22abc518-90f2-4fdb-95f4-56e40576c5b4",
"name": "Act 2",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "749a8cd8-e467-40dd-a04f-1078460d59c5",
"polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)",
"image": null,
"polygon": null,
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -1152,18 +1152,18 @@
},
{
"model": "documents.element",
"pk": "cd73870c-7b2c-4308-b216-196cf6f4f086",
"pk": "a907ff62-5cde-4122-8809-99dd9ccdc6ac",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "f5a5752a-21a2-4185-ac55-83bfe769de5d",
"name": "ROY",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "9f70f37f-579a-4635-baa7-5106b0f79bb7",
"name": "DATUM",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "e3e69ede-2d38-4ad9-adeb-7cf37da22a85",
"polygon": "LINEARRING (400 400, 400 500, 500 500, 500 400, 400 400)",
"image": "41d51adf-4b81-4afc-9884-77575d971d49",
"polygon": "LINEARRING (700 700, 700 800, 800 800, 800 700, 700 700)",
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -1171,13 +1171,13 @@
},
{
"model": "documents.element",
"pk": "d06899de-4201-48ec-8d4f-2414b1e8ea9e",
"pk": "aa31ec93-9f8e-4576-a881-4227fa855b63",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "335ef2dc-5f04-45d5-8847-bfddc373b272",
"name": "Act 1",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "e9b348c9-41fd-4af5-ac72-73a5cdd9c706",
"name": "Volume 1",
"creator": null,
"worker_version": null,
"worker_run": null,
......@@ -1190,17 +1190,17 @@
},
{
"model": "documents.element",
"pk": "dc12e918-17f0-4672-b767-4c9c7a229785",
"pk": "b8955c38-75cf-41b5-b00b-fee6ea454406",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "cd2f76df-19ca-45a3-9e15-184058e0744d",
"name": "Volume 1, page 1r",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "1029cd2f-d99f-4f65-a582-a890d6a44544",
"name": "Volume 1, page 2r",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "e3e69ede-2d38-4ad9-adeb-7cf37da22a85",
"image": "0e726ee0-42e7-4f6c-b9df-a80aceb8d7b6",
"polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)",
"rotation_angle": 0,
"mirrored": false,
......@@ -1209,18 +1209,18 @@
},
{
"model": "documents.element",
"pk": "e0c9fec4-a6a1-4eab-95da-26b7718bd021",
"pk": "b988060b-682a-4d88-99bb-4b830ce6140d",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "f5a5752a-21a2-4185-ac55-83bfe769de5d",
"name": "DATUM",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "9ec5f75a-9c28-4675-8187-90a3ab815c8e",
"name": "Text line",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "1cbb097f-9577-44ea-960e-54a2f81eca06",
"polygon": "LINEARRING (700 700, 700 800, 800 800, 800 700, 700 700)",
"image": "7ca898be-8000-4b28-bc5b-733edc3da0fe",
"polygon": "LINEARRING (400 400, 400 500, 500 500, 500 400, 400 400)",
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -1228,18 +1228,18 @@
},
{
"model": "documents.element",
"pk": "e47b0388-970d-40b1-afed-f0de9f0b31a0",
"pk": "c3692686-c6a9-4b1e-a1d9-2d0984726167",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "f5a5752a-21a2-4185-ac55-83bfe769de5d",
"name": "PARIS",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "9f70f37f-579a-4635-baa7-5106b0f79bb7",
"name": "ROY",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "e3e69ede-2d38-4ad9-adeb-7cf37da22a85",
"polygon": "LINEARRING (100 100, 100 200, 200 200, 200 100, 100 100)",
"image": "7ca898be-8000-4b28-bc5b-733edc3da0fe",
"polygon": "LINEARRING (400 400, 400 500, 500 500, 500 400, 400 400)",
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -1247,18 +1247,18 @@
},
{
"model": "documents.element",
"pk": "f2500bfd-5296-46bf-b039-7a52fa5501fe",
"pk": "cbce3a87-e722-48df-9702-1a4659479198",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "4267d9ca-5619-4238-8743-7d0dbf40c89d",
"name": "Volume 1",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "1029cd2f-d99f-4f65-a582-a890d6a44544",
"name": "Volume 2, page 1v",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": null,
"polygon": null,
"image": "777877d8-f9ff-4687-a5e4-be8f9e5c9e5b",
"polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)",
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -1266,17 +1266,17 @@
},
{
"model": "documents.element",
"pk": "f72770d3-d49c-4bf4-9e9f-99ff9934b94f",
"pk": "cd7c6808-9f90-45b9-a237-f42a6e12fa5a",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "6c30e0df-fddc-497c-b775-2b9a13300fbc",
"name": "Surface C",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "1029cd2f-d99f-4f65-a582-a890d6a44544",
"name": "Volume 2, page 1r",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "32ce959e-a9a0-4f6b-be79-e185b7181055",
"image": "d41aee46-bec1-42e4-84f6-bb15ba513b56",
"polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)",
"rotation_angle": 0,
"mirrored": false,
......@@ -1285,18 +1285,18 @@
},
{
"model": "documents.element",
"pk": "f78a95f0-6980-4c2b-acf6-57965f9273de",
"pk": "ce0edaab-0524-4edf-966d-dfe709017da0",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "f5a5752a-21a2-4185-ac55-83bfe769de5d",
"name": "ROY",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "1029cd2f-d99f-4f65-a582-a890d6a44544",
"name": "Volume 2, page 2r",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "1cbb097f-9577-44ea-960e-54a2f81eca06",
"polygon": "LINEARRING (400 400, 400 500, 500 500, 500 400, 400 400)",
"image": "0bbb30a0-6e41-4cd3-a69c-21f85eb8ca68",
"polygon": "LINEARRING (0 0, 0 1000, 1000 1000, 1000 0, 0 0)",
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -1304,18 +1304,18 @@
},
{
"model": "documents.element",
"pk": "fc0f79c4-d219-416b-ba2d-942fc1f7e257",
"pk": "d2e8e9ac-2130-4014-8c55-78b54b3e0670",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "f5a5752a-21a2-4185-ac55-83bfe769de5d",
"name": "ROY",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "9f70f37f-579a-4635-baa7-5106b0f79bb7",
"name": "PARIS",
"creator": null,
"worker_version": null,
"worker_run": null,
"image": "32ce959e-a9a0-4f6b-be79-e185b7181055",
"polygon": "LINEARRING (400 400, 400 500, 500 500, 500 400, 400 400)",
"image": "7ca898be-8000-4b28-bc5b-733edc3da0fe",
"polygon": "LINEARRING (100 100, 100 200, 200 200, 200 100, 100 100)",
"rotation_angle": 0,
"mirrored": false,
"confidence": null
......@@ -1323,67 +1323,67 @@
},
{
"model": "documents.entitytype",
"pk": "0cdeebff-edd0-4cd9-bab9-fdb8ef6ad755",
"pk": "52f5cfa1-9b01-40eb-97b0-9f4ccd4fb65d",
"fields": {
"name": "number",
"name": "location",
"color": "ff0000",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3"
"corpus": "16490023-f435-4357-89dd-ee718950e3e2"
}
},
{
"model": "documents.entitytype",
"pk": "29f18118-dd12-46a9-a409-e16036ec7571",
"pk": "9af88a1e-bb53-475e-a838-78dbfc327f49",
"fields": {
"name": "date",
"name": "organization",
"color": "ff0000",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3"
"corpus": "16490023-f435-4357-89dd-ee718950e3e2"
}
},
{
"model": "documents.entitytype",
"pk": "2fb67db9-bcba-4c08-8022-304098543c13",
"pk": "c7a8b62a-7dd7-4522-95b0-eeafa4b26c3c",
"fields": {
"name": "person",
"color": "ff0000",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3"
"corpus": "16490023-f435-4357-89dd-ee718950e3e2"
}
},
{
"model": "documents.entitytype",
"pk": "6df8d1e3-5af5-4511-993a-7d128b513ec4",
"pk": "d39b7a3d-60c7-4872-b9cb-f6b7497d72f7",
"fields": {
"name": "location",
"name": "number",
"color": "ff0000",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3"
"corpus": "16490023-f435-4357-89dd-ee718950e3e2"
}
},
{
"model": "documents.entitytype",
"pk": "89f521e3-35f2-4863-b382-d4bc1824a126",
"pk": "dc9a8bb7-4a9f-4cff-8983-91c4a4b54661",
"fields": {
"name": "organization",
"name": "date",
"color": "ff0000",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3"
"corpus": "16490023-f435-4357-89dd-ee718950e3e2"
}
},
{
"model": "documents.transcription",
"pk": "0948ae28-223e-4ece-881e-0346461d5f70",
"pk": "6a0463e2-2bbc-46c3-bcc1-285658ed8fe1",
"fields": {
"element": "2744c570-21f3-4ab7-8283-2b60ac1ef1d7",
"worker_version": "e14c27a7-2525-42e8-8aea-2f9c8b38c708",
"element": "2d62d627-c99b-44e1-844c-876bc46ccc17",
"worker_version": "f1369efb-13da-4f38-a3c6-0c9d9cca1336",
"worker_run": null,
"text": "DATUM",
"text": "PARIS",
"orientation": "horizontal-lr",
"confidence": 1.0
}
},
{
"model": "documents.transcription",
"pk": "1d0231a0-65a7-4d5f-ade5-c882df774a8a",
"pk": "6b4699d9-11bf-483d-a3c2-b1ca85c343c9",
"fields": {
"element": "e47b0388-970d-40b1-afed-f0de9f0b31a0",
"worker_version": "e14c27a7-2525-42e8-8aea-2f9c8b38c708",
"element": "9025ad65-e724-4b89-a97d-aa61d0878160",
"worker_version": "f1369efb-13da-4f38-a3c6-0c9d9cca1336",
"worker_run": null,
"text": "PARIS",
"orientation": "horizontal-lr",
......@@ -1392,10 +1392,10 @@
},
{
"model": "documents.transcription",
"pk": "1e97abec-02e1-4b1b-b3f5-c9c4e5ba2350",
"pk": "6bbcf5e6-3841-4eb1-98dc-5e61b7b6b1cb",
"fields": {
"element": "cd73870c-7b2c-4308-b216-196cf6f4f086",
"worker_version": "e14c27a7-2525-42e8-8aea-2f9c8b38c708",
"element": "54b1369b-5d7b-4bb8-a9c1-16d77528c249",
"worker_version": "f1369efb-13da-4f38-a3c6-0c9d9cca1336",
"worker_run": null,
"text": "ROY",
"orientation": "horizontal-lr",
......@@ -1404,22 +1404,22 @@
},
{
"model": "documents.transcription",
"pk": "2d53623b-e3f9-4e17-a694-cc92bb81364e",
"pk": "6d0783cc-2b0b-47df-b2ee-3580a0e1658e",
"fields": {
"element": "fc0f79c4-d219-416b-ba2d-942fc1f7e257",
"worker_version": "e14c27a7-2525-42e8-8aea-2f9c8b38c708",
"element": "96f9147c-bfb6-46db-b4b3-b606518fe6da",
"worker_version": "f1369efb-13da-4f38-a3c6-0c9d9cca1336",
"worker_run": null,
"text": "ROY",
"text": "Lorem ipsum dolor sit amet",
"orientation": "horizontal-lr",
"confidence": 1.0
}
},
{
"model": "documents.transcription",
"pk": "3e745322-d041-47f8-a6cf-60d6c93c6c5d",
"pk": "6e797229-6f76-409c-b850-bea49a075728",
"fields": {
"element": "f78a95f0-6980-4c2b-acf6-57965f9273de",
"worker_version": "e14c27a7-2525-42e8-8aea-2f9c8b38c708",
"element": "c3692686-c6a9-4b1e-a1d9-2d0984726167",
"worker_version": "f1369efb-13da-4f38-a3c6-0c9d9cca1336",
"worker_run": null,
"text": "ROY",
"orientation": "horizontal-lr",
......@@ -1428,10 +1428,10 @@
},
{
"model": "documents.transcription",
"pk": "66079256-1d7e-4b41-be22-4fe9fec0a743",
"pk": "987d01ae-d4ea-4038-9125-470e8f093c76",
"fields": {
"element": "a96b1536-3ab8-4394-a2e4-1a243e71ba71",
"worker_version": "e14c27a7-2525-42e8-8aea-2f9c8b38c708",
"element": "d2e8e9ac-2130-4014-8c55-78b54b3e0670",
"worker_version": "f1369efb-13da-4f38-a3c6-0c9d9cca1336",
"worker_run": null,
"text": "PARIS",
"orientation": "horizontal-lr",
......@@ -1440,34 +1440,34 @@
},
{
"model": "documents.transcription",
"pk": "b09aeb72-4610-4b12-8684-a0b3264652b4",
"pk": "c6d01f58-5401-4bad-9d74-b07bedb1abea",
"fields": {
"element": "73c8186b-1456-4292-876b-0b8c48fa9501",
"worker_version": "e14c27a7-2525-42e8-8aea-2f9c8b38c708",
"element": "958dbff2-5f5f-42a7-949f-58d890e92bc0",
"worker_version": "f1369efb-13da-4f38-a3c6-0c9d9cca1336",
"worker_run": null,
"text": "PARIS",
"text": "DATUM",
"orientation": "horizontal-lr",
"confidence": 1.0
}
},
{
"model": "documents.transcription",
"pk": "c1d6d0c8-2820-4891-b872-81650df49e8c",
"pk": "e6c3f1d1-8d60-424b-8437-c9627665b9cc",
"fields": {
"element": "dc12e918-17f0-4672-b767-4c9c7a229785",
"worker_version": "e14c27a7-2525-42e8-8aea-2f9c8b38c708",
"element": "73c4819b-24a4-497c-86e8-5151a556db35",
"worker_version": "f1369efb-13da-4f38-a3c6-0c9d9cca1336",
"worker_run": null,
"text": "Lorem ipsum dolor sit amet",
"text": "DATUM",
"orientation": "horizontal-lr",
"confidence": 1.0
}
},
{
"model": "documents.transcription",
"pk": "ccf46e07-70c9-4050-be62-4d8adc1bd76f",
"pk": "ee4a1f22-3a4f-4d40-86cd-753b43c29d62",
"fields": {
"element": "e0c9fec4-a6a1-4eab-95da-26b7718bd021",
"worker_version": "e14c27a7-2525-42e8-8aea-2f9c8b38c708",
"element": "a907ff62-5cde-4122-8809-99dd9ccdc6ac",
"worker_version": "f1369efb-13da-4f38-a3c6-0c9d9cca1336",
"worker_run": null,
"text": "DATUM",
"orientation": "horizontal-lr",
......@@ -1476,51 +1476,51 @@
},
{
"model": "documents.transcription",
"pk": "d33e9dcc-4411-4a31-937e-0b5bbbccc2bc",
"pk": "f9717c67-2a31-4a88-957b-b5a5d8c06174",
"fields": {
"element": "3c8195e1-a172-43dd-89e9-4db0ec39438c",
"worker_version": "e14c27a7-2525-42e8-8aea-2f9c8b38c708",
"element": "18ae1504-fde8-4f66-bde8-ae882576b4b7",
"worker_version": "f1369efb-13da-4f38-a3c6-0c9d9cca1336",
"worker_run": null,
"text": "DATUM",
"text": "ROY",
"orientation": "horizontal-lr",
"confidence": 1.0
}
},
{
"model": "documents.allowedmetadata",
"pk": "248f6ac6-5ee3-4a5f-b6bd-44dfd38974e5",
"pk": "154fd065-e59a-48d4-9109-64e9bfc9aba0",
"fields": {
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "location",
"name": "location"
}
},
{
"model": "documents.allowedmetadata",
"pk": "c5d77da5-a270-4cc7-ae2c-00f3c2a76ca0",
"pk": "b39925b2-0534-4876-9d12-8d7504f77486",
"fields": {
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "text",
"name": "folio"
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "date",
"name": "date"
}
},
{
"model": "documents.allowedmetadata",
"pk": "ebf52c92-9329-422a-83dd-013f64fd69b8",
"pk": "fad99953-b54e-465d-baec-e374dd41b13d",
"fields": {
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"type": "date",
"name": "date"
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"type": "text",
"name": "folio"
}
},
{
"model": "documents.metadata",
"pk": "19470d61-045c-49e0-838b-7553b6f96b73",
"pk": "019a5b6e-0020-4ec6-af26-cb96b6b125b1",
"fields": {
"element": "aef007bf-09f9-43f5-9110-42feef0ff720",
"name": "number",
"element": "cd7c6808-9f90-45b9-a237-f42a6e12fa5a",
"name": "folio",
"type": "text",
"value": "3",
"value": "1r",
"entity": null,
"worker_version": null,
"worker_run": null
......@@ -1528,12 +1528,12 @@
},
{
"model": "documents.metadata",
"pk": "4d208b74-48ee-4a7f-9491-7b031654a83d",
"pk": "3f376923-658c-41c3-86af-e7b11e1a05a0",
"fields": {
"element": "81a94dae-4fdc-49e4-a96a-e6c2640f5ad7",
"name": "folio",
"element": "5d75b1cf-de97-46df-a1fb-ed89ffd03aab",
"name": "number",
"type": "text",
"value": "1v",
"value": "1",
"entity": null,
"worker_version": null,
"worker_run": null
......@@ -1541,12 +1541,12 @@
},
{
"model": "documents.metadata",
"pk": "4da1ca8d-7f6c-4150-8bb3-3777158907e9",
"pk": "55a646c4-d18f-4b96-b5ec-4529f6b5a90a",
"fields": {
"element": "dc12e918-17f0-4672-b767-4c9c7a229785",
"element": "b8955c38-75cf-41b5-b00b-fee6ea454406",
"name": "folio",
"type": "text",
"value": "1r",
"value": "2r",
"entity": null,
"worker_version": null,
"worker_run": null
......@@ -1554,12 +1554,12 @@
},
{
"model": "documents.metadata",
"pk": "5386ae6b-3f68-4798-91d8-1dffc86f9e3b",
"pk": "5627a600-5dac-48c6-824a-04acdef0d78a",
"fields": {
"element": "92a40b24-7f3d-49a0-9244-18857ef3472d",
"element": "329e1474-1fb8-4051-8d77-7218d331450e",
"name": "number",
"type": "text",
"value": "2",
"value": "4",
"entity": null,
"worker_version": null,
"worker_run": null
......@@ -1567,9 +1567,9 @@
},
{
"model": "documents.metadata",
"pk": "5b4a8070-3021-4aa5-a8ea-8cd32576605d",
"pk": "562a24fc-acfd-4c6f-b3d9-48d4d81b592b",
"fields": {
"element": "c9f0ed74-71a7-4a6c-aa6e-4af9a10a7b07",
"element": "96f9147c-bfb6-46db-b4b3-b606518fe6da",
"name": "folio",
"type": "text",
"value": "1r",
......@@ -1580,12 +1580,12 @@
},
{
"model": "documents.metadata",
"pk": "61fe6253-a49c-46bf-a1ee-dd541d2870f8",
"pk": "5efd411a-79d4-4d01-971e-be11349b2346",
"fields": {
"element": "ba868f93-f024-4501-9405-454536822065",
"name": "folio",
"element": "80bec332-0fd2-4764-a297-04cde5d2bde4",
"name": "number",
"type": "text",
"value": "2r",
"value": "3",
"entity": null,
"worker_version": null,
"worker_run": null
......@@ -1593,12 +1593,12 @@
},
{
"model": "documents.metadata",
"pk": "9a9607bf-623e-4976-bea0-24e2ec2a93ab",
"pk": "754eb65d-6697-433d-b0f7-969d1227852e",
"fields": {
"element": "5f5a3194-9d00-4977-bd8e-69fd1c80f896",
"name": "number",
"element": "cbce3a87-e722-48df-9702-1a4659479198",
"name": "folio",
"type": "text",
"value": "5",
"value": "1v",
"entity": null,
"worker_version": null,
"worker_run": null
......@@ -1606,12 +1606,12 @@
},
{
"model": "documents.metadata",
"pk": "c03c034a-2d4d-4ac8-a76d-a3a0ba76e018",
"pk": "812e0b1f-ac02-4e48-8add-ef825cb5cb8d",
"fields": {
"element": "b0e720f7-2cfb-4ec1-aa3c-df623c3b24c7",
"name": "folio",
"element": "82bea30e-4b27-4351-9461-d0ebe18a527e",
"name": "number",
"type": "text",
"value": "1v",
"value": "5",
"entity": null,
"worker_version": null,
"worker_run": null
......@@ -1619,12 +1619,12 @@
},
{
"model": "documents.metadata",
"pk": "c2229da6-59ed-4635-a611-8d69c50207b8",
"pk": "a3937d07-1be8-4b68-a431-50ac5145528f",
"fields": {
"element": "29ce75c4-1429-410e-bb71-deb1babf8fd9",
"element": "8225df9f-fa29-4713-b742-e6ac16e7b212",
"name": "folio",
"type": "text",
"value": "2r",
"value": "1v",
"entity": null,
"worker_version": null,
"worker_run": null
......@@ -1632,12 +1632,12 @@
},
{
"model": "documents.metadata",
"pk": "d32794ff-aba4-4257-b59a-01b398e470c8",
"pk": "a703a85c-0b96-4dce-80a8-993870fee6d0",
"fields": {
"element": "677bc0da-2881-499f-817d-805e1dba35bf",
"name": "number",
"element": "ce0edaab-0524-4edf-966d-dfe709017da0",
"name": "folio",
"type": "text",
"value": "4",
"value": "2r",
"entity": null,
"worker_version": null,
"worker_run": null
......@@ -1645,12 +1645,12 @@
},
{
"model": "documents.metadata",
"pk": "f86c291d-b1de-4c92-9bc6-c150ba08ab83",
"pk": "fb06cf66-f9fa-4ebd-bb31-2f35117455a5",
"fields": {
"element": "d06899de-4201-48ec-8d4f-2414b1e8ea9e",
"element": "9e3d7a7a-9993-4d9c-909d-39581ef294fa",
"name": "number",
"type": "text",
"value": "1",
"value": "2",
"entity": null,
"worker_version": null,
"worker_run": null
......@@ -1673,12 +1673,12 @@
},
{
"model": "images.image",
"pk": "1cbb097f-9577-44ea-960e-54a2f81eca06",
"pk": "0bbb30a0-6e41-4cd3-a69c-21f85eb8ca68",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"server": 1,
"path": "img3",
"path": "img6",
"width": 1000,
"height": 1000,
"hash": null,
......@@ -1687,12 +1687,12 @@
},
{
"model": "images.image",
"pk": "32ce959e-a9a0-4f6b-be79-e185b7181055",
"pk": "0e726ee0-42e7-4f6c-b9df-a80aceb8d7b6",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"server": 1,
"path": "img2",
"path": "img3",
"width": 1000,
"height": 1000,
"hash": null,
......@@ -1701,12 +1701,12 @@
},
{
"model": "images.image",
"pk": "4c59cb4d-7832-4362-82e3-2b62370ea778",
"pk": "41d51adf-4b81-4afc-9884-77575d971d49",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"server": 1,
"path": "img5",
"path": "img2",
"width": 1000,
"height": 1000,
"hash": null,
......@@ -1715,12 +1715,12 @@
},
{
"model": "images.image",
"pk": "749a8cd8-e467-40dd-a04f-1078460d59c5",
"pk": "777877d8-f9ff-4687-a5e4-be8f9e5c9e5b",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"server": 1,
"path": "img4",
"path": "img5",
"width": 1000,
"height": 1000,
"hash": null,
......@@ -1729,12 +1729,12 @@
},
{
"model": "images.image",
"pk": "83e3f3a6-c940-4439-b9c8-72c60ad280fa",
"pk": "7ca898be-8000-4b28-bc5b-733edc3da0fe",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"server": 1,
"path": "img6",
"path": "img1",
"width": 1000,
"height": 1000,
"hash": null,
......@@ -1743,12 +1743,12 @@
},
{
"model": "images.image",
"pk": "e3e69ede-2d38-4ad9-adeb-7cf37da22a85",
"pk": "d41aee46-bec1-42e4-84f6-bb15ba513b56",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"server": 1,
"path": "img1",
"path": "img4",
"width": 1000,
"height": 1000,
"hash": null,
......@@ -1757,64 +1757,64 @@
},
{
"model": "users.right",
"pk": "4792d973-4724-4e9e-b524-4559fa3629ba",
"pk": "0af07607-b121-42dd-90fd-c90ffd830375",
"fields": {
"user": 4,
"user": 2,
"group": null,
"content_type": 34,
"content_id": "cc190b64-fc54-4ae6-8907-9866df928d6d",
"level": 10
"content_type": 32,
"content_id": "2165dcd9-14d6-4bf8-b2c5-372d93d5b0e3",
"level": 100
}
},
{
"model": "users.right",
"pk": "68e7e725-68ea-4804-a707-56fa812c484d",
"pk": "adbd5d73-c846-4b0e-aa9d-4e6b09158cdf",
"fields": {
"user": 3,
"user": 2,
"group": null,
"content_type": 34,
"content_id": "cc190b64-fc54-4ae6-8907-9866df928d6d",
"level": 50
"content_type": 19,
"content_id": "16490023-f435-4357-89dd-ee718950e3e2",
"level": 100
}
},
{
"model": "users.right",
"pk": "b180fd9c-826a-41f5-8e62-2410e67d39e3",
"pk": "c7ac7f64-c8ae-4cd2-b91e-3fb5fe437c6a",
"fields": {
"user": 2,
"group": null,
"content_type": 11,
"content_id": "dd6f9265-24cf-4773-9e61-a42853278337",
"content_id": "fc06b115-5d20-4cdf-950a-94932e668d8f",
"level": 10
}
},
{
"model": "users.right",
"pk": "cf3580b2-1b6c-4ba7-aa25-29549bca89ae",
"pk": "e1ff9802-595e-4953-b44b-210a0047acf3",
"fields": {
"user": 2,
"user": 4,
"group": null,
"content_type": 19,
"content_id": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"level": 100
"content_type": 32,
"content_id": "2165dcd9-14d6-4bf8-b2c5-372d93d5b0e3",
"level": 10
}
},
{
"model": "users.right",
"pk": "d78873f2-9c48-4451-bf4e-eacfb1f4902b",
"pk": "f0a4fffa-8ac3-4422-9811-de29c7fdd87f",
"fields": {
"user": 2,
"user": 3,
"group": null,
"content_type": 34,
"content_id": "cc190b64-fc54-4ae6-8907-9866df928d6d",
"level": 100
"content_type": 32,
"content_id": "2165dcd9-14d6-4bf8-b2c5-372d93d5b0e3",
"level": 50
}
},
{
"model": "users.user",
"pk": 1,
"fields": {
"password": "pbkdf2_sha256$390000$Lp3r8epd7MAvwpnIvJlfyz$EvnViNTJylIcdh3xVfE0ZYRPrZlFIyMTl8mBzqOHzKo=",
"password": "pbkdf2_sha256$390000$21kCeQPu6DGqSoK3E5ZM9R$nSYoFUQLA0yrsd36ZWP+SvmN+42nPWzCSSbzSBa+BF0=",
"last_login": null,
"email": "root@root.fr",
"display_name": "Admin",
......@@ -1829,7 +1829,7 @@
"model": "users.user",
"pk": 2,
"fields": {
"password": "pbkdf2_sha256$390000$G1mEZRqMbJxh2GKqYnE48G$9dRtzWLGIepaEOCg5QH9X0d0nH+adcvrTU2UHs8SUDs=",
"password": "pbkdf2_sha256$390000$idGLCJkqOQWBdp3Mgokh8n$4dLUHiEh6Fty+Dy1EQW49VYGPml8eo4J5Z4+Rve/RUs=",
"last_login": null,
"email": "user@user.fr",
"display_name": "Test user",
......@@ -1872,7 +1872,7 @@
},
{
"model": "users.group",
"pk": "cc190b64-fc54-4ae6-8907-9866df928d6d",
"pk": "2165dcd9-14d6-4bf8-b2c5-372d93d5b0e3",
"fields": {
"name": "User group",
"public": false,
......@@ -2720,1272 +2720,1202 @@
"model": "auth.permission",
"pk": 94,
"fields": {
"name": "Can add entity link",
"name": "Can add entity type",
"content_type": 25,
"codename": "add_entitylink"
"codename": "add_entitytype"
}
},
{
"model": "auth.permission",
"pk": 95,
"fields": {
"name": "Can change entity link",
"name": "Can change entity type",
"content_type": 25,
"codename": "change_entitylink"
"codename": "change_entitytype"
}
},
{
"model": "auth.permission",
"pk": 96,
"fields": {
"name": "Can delete entity link",
"name": "Can delete entity type",
"content_type": 25,
"codename": "delete_entitylink"
"codename": "delete_entitytype"
}
},
{
"model": "auth.permission",
"pk": 97,
"fields": {
"name": "Can view entity link",
"name": "Can view entity type",
"content_type": 25,
"codename": "view_entitylink"
"codename": "view_entitytype"
}
},
{
"model": "auth.permission",
"pk": 98,
"fields": {
"name": "Can add entity role",
"name": "Can add meta data",
"content_type": 26,
"codename": "add_entityrole"
"codename": "add_metadata"
}
},
{
"model": "auth.permission",
"pk": 99,
"fields": {
"name": "Can change entity role",
"name": "Can change meta data",
"content_type": 26,
"codename": "change_entityrole"
"codename": "change_metadata"
}
},
{
"model": "auth.permission",
"pk": 100,
"fields": {
"name": "Can delete entity role",
"name": "Can delete meta data",
"content_type": 26,
"codename": "delete_entityrole"
"codename": "delete_metadata"
}
},
{
"model": "auth.permission",
"pk": 101,
"fields": {
"name": "Can view entity role",
"name": "Can view meta data",
"content_type": 26,
"codename": "view_entityrole"
"codename": "view_metadata"
}
},
{
"model": "auth.permission",
"pk": 102,
"fields": {
"name": "Can add entity type",
"name": "Can add ml class",
"content_type": 27,
"codename": "add_entitytype"
"codename": "add_mlclass"
}
},
{
"model": "auth.permission",
"pk": 103,
"fields": {
"name": "Can change entity type",
"name": "Can change ml class",
"content_type": 27,
"codename": "change_entitytype"
"codename": "change_mlclass"
}
},
{
"model": "auth.permission",
"pk": 104,
"fields": {
"name": "Can delete entity type",
"name": "Can delete ml class",
"content_type": 27,
"codename": "delete_entitytype"
"codename": "delete_mlclass"
}
},
{
"model": "auth.permission",
"pk": 105,
"fields": {
"name": "Can view entity type",
"name": "Can view ml class",
"content_type": 27,
"codename": "view_entitytype"
"codename": "view_mlclass"
}
},
{
"model": "auth.permission",
"pk": 106,
"fields": {
"name": "Can add meta data",
"name": "Can add selection",
"content_type": 28,
"codename": "add_metadata"
"codename": "add_selection"
}
},
{
"model": "auth.permission",
"pk": 107,
"fields": {
"name": "Can change meta data",
"name": "Can change selection",
"content_type": 28,
"codename": "change_metadata"
"codename": "change_selection"
}
},
{
"model": "auth.permission",
"pk": 108,
"fields": {
"name": "Can delete meta data",
"name": "Can delete selection",
"content_type": 28,
"codename": "delete_metadata"
"codename": "delete_selection"
}
},
{
"model": "auth.permission",
"pk": 109,
"fields": {
"name": "Can view meta data",
"name": "Can view selection",
"content_type": 28,
"codename": "view_metadata"
"codename": "view_selection"
}
},
{
"model": "auth.permission",
"pk": 110,
"fields": {
"name": "Can add ml class",
"name": "Can add transcription",
"content_type": 29,
"codename": "add_mlclass"
"codename": "add_transcription"
}
},
{
"model": "auth.permission",
"pk": 111,
"fields": {
"name": "Can change ml class",
"name": "Can change transcription",
"content_type": 29,
"codename": "change_mlclass"
"codename": "change_transcription"
}
},
{
"model": "auth.permission",
"pk": 112,
"fields": {
"name": "Can delete ml class",
"name": "Can delete transcription",
"content_type": 29,
"codename": "delete_mlclass"
"codename": "delete_transcription"
}
},
{
"model": "auth.permission",
"pk": 113,
"fields": {
"name": "Can view ml class",
"name": "Can view transcription",
"content_type": 29,
"codename": "view_mlclass"
"codename": "view_transcription"
}
},
{
"model": "auth.permission",
"pk": 114,
"fields": {
"name": "Can add selection",
"name": "Can add transcription entity",
"content_type": 30,
"codename": "add_selection"
"codename": "add_transcriptionentity"
}
},
{
"model": "auth.permission",
"pk": 115,
"fields": {
"name": "Can change selection",
"name": "Can change transcription entity",
"content_type": 30,
"codename": "change_selection"
"codename": "change_transcriptionentity"
}
},
{
"model": "auth.permission",
"pk": 116,
"fields": {
"name": "Can delete selection",
"name": "Can delete transcription entity",
"content_type": 30,
"codename": "delete_selection"
"codename": "delete_transcriptionentity"
}
},
{
"model": "auth.permission",
"pk": 117,
"fields": {
"name": "Can view selection",
"name": "Can view transcription entity",
"content_type": 30,
"codename": "view_selection"
"codename": "view_transcriptionentity"
}
},
{
"model": "auth.permission",
"pk": 118,
"fields": {
"name": "Can add transcription",
"name": "Can add user",
"content_type": 31,
"codename": "add_transcription"
"codename": "add_user"
}
},
{
"model": "auth.permission",
"pk": 119,
"fields": {
"name": "Can change transcription",
"name": "Can change user",
"content_type": 31,
"codename": "change_transcription"
"codename": "change_user"
}
},
{
"model": "auth.permission",
"pk": 120,
"fields": {
"name": "Can delete transcription",
"name": "Can delete user",
"content_type": 31,
"codename": "delete_transcription"
"codename": "delete_user"
}
},
{
"model": "auth.permission",
"pk": 121,
"fields": {
"name": "Can view transcription",
"name": "Can view user",
"content_type": 31,
"codename": "view_transcription"
"codename": "view_user"
}
},
{
"model": "auth.permission",
"pk": 122,
"fields": {
"name": "Can add transcription entity",
"name": "Can add group",
"content_type": 32,
"codename": "add_transcriptionentity"
"codename": "add_group"
}
},
{
"model": "auth.permission",
"pk": 123,
"fields": {
"name": "Can change transcription entity",
"name": "Can change group",
"content_type": 32,
"codename": "change_transcriptionentity"
"codename": "change_group"
}
},
{
"model": "auth.permission",
"pk": 124,
"fields": {
"name": "Can delete transcription entity",
"name": "Can delete group",
"content_type": 32,
"codename": "delete_transcriptionentity"
"codename": "delete_group"
}
},
{
"model": "auth.permission",
"pk": 125,
"fields": {
"name": "Can view transcription entity",
"name": "Can view group",
"content_type": 32,
"codename": "view_transcriptionentity"
"codename": "view_group"
}
},
{
"model": "auth.permission",
"pk": 126,
"fields": {
"name": "Can add user",
"name": "Can add right",
"content_type": 33,
"codename": "add_user"
"codename": "add_right"
}
},
{
"model": "auth.permission",
"pk": 127,
"fields": {
"name": "Can change user",
"name": "Can change right",
"content_type": 33,
"codename": "change_user"
"codename": "change_right"
}
},
{
"model": "auth.permission",
"pk": 128,
"fields": {
"name": "Can delete user",
"name": "Can delete right",
"content_type": 33,
"codename": "delete_user"
"codename": "delete_right"
}
},
{
"model": "auth.permission",
"pk": 129,
"fields": {
"name": "Can view user",
"name": "Can view right",
"content_type": 33,
"codename": "view_user"
"codename": "view_right"
}
},
{
"model": "auth.permission",
"pk": 130,
"fields": {
"name": "Can add group",
"name": "Can add user scope",
"content_type": 34,
"codename": "add_group"
"codename": "add_userscope"
}
},
{
"model": "auth.permission",
"pk": 131,
"fields": {
"name": "Can change group",
"name": "Can change user scope",
"content_type": 34,
"codename": "change_group"
"codename": "change_userscope"
}
},
{
"model": "auth.permission",
"pk": 132,
"fields": {
"name": "Can delete group",
"name": "Can delete user scope",
"content_type": 34,
"codename": "delete_group"
"codename": "delete_userscope"
}
},
{
"model": "auth.permission",
"pk": 133,
"fields": {
"name": "Can view group",
"name": "Can view user scope",
"content_type": 34,
"codename": "view_group"
"codename": "view_userscope"
}
},
{
"model": "auth.permission",
"pk": 134,
"fields": {
"name": "Can add right",
"name": "Can add corpus worker version",
"content_type": 35,
"codename": "add_right"
"codename": "add_corpusworkerversion"
}
},
{
"model": "auth.permission",
"pk": 135,
"fields": {
"name": "Can change right",
"name": "Can change corpus worker version",
"content_type": 35,
"codename": "change_right"
"codename": "change_corpusworkerversion"
}
},
{
"model": "auth.permission",
"pk": 136,
"fields": {
"name": "Can delete right",
"name": "Can delete corpus worker version",
"content_type": 35,
"codename": "delete_right"
"codename": "delete_corpusworkerversion"
}
},
{
"model": "auth.permission",
"pk": 137,
"fields": {
"name": "Can view right",
"name": "Can view corpus worker version",
"content_type": 35,
"codename": "view_right"
"codename": "view_corpusworkerversion"
}
},
{
"model": "auth.permission",
"pk": 138,
"fields": {
"name": "Can add user scope",
"name": "Can add data file",
"content_type": 36,
"codename": "add_userscope"
"codename": "add_datafile"
}
},
{
"model": "auth.permission",
"pk": 139,
"fields": {
"name": "Can change user scope",
"name": "Can change data file",
"content_type": 36,
"codename": "change_userscope"
"codename": "change_datafile"
}
},
{
"model": "auth.permission",
"pk": 140,
"fields": {
"name": "Can delete user scope",
"name": "Can delete data file",
"content_type": 36,
"codename": "delete_userscope"
"codename": "delete_datafile"
}
},
{
"model": "auth.permission",
"pk": 141,
"fields": {
"name": "Can view user scope",
"name": "Can view data file",
"content_type": 36,
"codename": "view_userscope"
"codename": "view_datafile"
}
},
{
"model": "auth.permission",
"pk": 142,
"fields": {
"name": "Can add corpus worker version",
"name": "Can add git ref",
"content_type": 37,
"codename": "add_corpusworkerversion"
"codename": "add_gitref"
}
},
{
"model": "auth.permission",
"pk": 143,
"fields": {
"name": "Can change corpus worker version",
"name": "Can change git ref",
"content_type": 37,
"codename": "change_corpusworkerversion"
"codename": "change_gitref"
}
},
{
"model": "auth.permission",
"pk": 144,
"fields": {
"name": "Can delete corpus worker version",
"name": "Can delete git ref",
"content_type": 37,
"codename": "delete_corpusworkerversion"
"codename": "delete_gitref"
}
},
{
"model": "auth.permission",
"pk": 145,
"fields": {
"name": "Can view corpus worker version",
"name": "Can view git ref",
"content_type": 37,
"codename": "view_corpusworkerversion"
"codename": "view_gitref"
}
},
{
"model": "auth.permission",
"pk": 146,
"fields": {
"name": "Can add data file",
"name": "Can add process",
"content_type": 38,
"codename": "add_datafile"
"codename": "add_process"
}
},
{
"model": "auth.permission",
"pk": 147,
"fields": {
"name": "Can change data file",
"name": "Can change process",
"content_type": 38,
"codename": "change_datafile"
"codename": "change_process"
}
},
{
"model": "auth.permission",
"pk": 148,
"fields": {
"name": "Can delete data file",
"name": "Can delete process",
"content_type": 38,
"codename": "delete_datafile"
"codename": "delete_process"
}
},
{
"model": "auth.permission",
"pk": 149,
"fields": {
"name": "Can view data file",
"name": "Can view process",
"content_type": 38,
"codename": "view_datafile"
"codename": "view_process"
}
},
{
"model": "auth.permission",
"pk": 150,
"fields": {
"name": "Can add git ref",
"name": "Can add process element",
"content_type": 39,
"codename": "add_gitref"
"codename": "add_processelement"
}
},
{
"model": "auth.permission",
"pk": 151,
"fields": {
"name": "Can change git ref",
"name": "Can change process element",
"content_type": 39,
"codename": "change_gitref"
"codename": "change_processelement"
}
},
{
"model": "auth.permission",
"pk": 152,
"fields": {
"name": "Can delete git ref",
"name": "Can delete process element",
"content_type": 39,
"codename": "delete_gitref"
"codename": "delete_processelement"
}
},
{
"model": "auth.permission",
"pk": 153,
"fields": {
"name": "Can view git ref",
"name": "Can view process element",
"content_type": 39,
"codename": "view_gitref"
"codename": "view_processelement"
}
},
{
"model": "auth.permission",
"pk": 154,
"fields": {
"name": "Can add process",
"name": "Can add repository",
"content_type": 40,
"codename": "add_process"
"codename": "add_repository"
}
},
{
"model": "auth.permission",
"pk": 155,
"fields": {
"name": "Can change process",
"name": "Can change repository",
"content_type": 40,
"codename": "change_process"
"codename": "change_repository"
}
},
{
"model": "auth.permission",
"pk": 156,
"fields": {
"name": "Can delete process",
"name": "Can delete repository",
"content_type": 40,
"codename": "delete_process"
"codename": "delete_repository"
}
},
{
"model": "auth.permission",
"pk": 157,
"fields": {
"name": "Can view process",
"name": "Can view repository",
"content_type": 40,
"codename": "view_process"
"codename": "view_repository"
}
},
{
"model": "auth.permission",
"pk": 158,
"fields": {
"name": "Can add process element",
"name": "Can add revision",
"content_type": 41,
"codename": "add_processelement"
"codename": "add_revision"
}
},
{
"model": "auth.permission",
"pk": 159,
"fields": {
"name": "Can change process element",
"name": "Can change revision",
"content_type": 41,
"codename": "change_processelement"
"codename": "change_revision"
}
},
{
"model": "auth.permission",
"pk": 160,
"fields": {
"name": "Can delete process element",
"name": "Can delete revision",
"content_type": 41,
"codename": "delete_processelement"
"codename": "delete_revision"
}
},
{
"model": "auth.permission",
"pk": 161,
"fields": {
"name": "Can view process element",
"name": "Can view revision",
"content_type": 41,
"codename": "view_processelement"
"codename": "view_revision"
}
},
{
"model": "auth.permission",
"pk": 162,
"fields": {
"name": "Can add repository",
"name": "Can add worker",
"content_type": 42,
"codename": "add_repository"
"codename": "add_worker"
}
},
{
"model": "auth.permission",
"pk": 163,
"fields": {
"name": "Can change repository",
"name": "Can change worker",
"content_type": 42,
"codename": "change_repository"
"codename": "change_worker"
}
},
{
"model": "auth.permission",
"pk": 164,
"fields": {
"name": "Can delete repository",
"name": "Can delete worker",
"content_type": 42,
"codename": "delete_repository"
"codename": "delete_worker"
}
},
{
"model": "auth.permission",
"pk": 165,
"fields": {
"name": "Can view repository",
"name": "Can view worker",
"content_type": 42,
"codename": "view_repository"
"codename": "view_worker"
}
},
{
"model": "auth.permission",
"pk": 166,
"fields": {
"name": "Can add revision",
"name": "Can add worker activity",
"content_type": 43,
"codename": "add_revision"
"codename": "add_workeractivity"
}
},
{
"model": "auth.permission",
"pk": 167,
"fields": {
"name": "Can change revision",
"name": "Can change worker activity",
"content_type": 43,
"codename": "change_revision"
"codename": "change_workeractivity"
}
},
{
"model": "auth.permission",
"pk": 168,
"fields": {
"name": "Can delete revision",
"name": "Can delete worker activity",
"content_type": 43,
"codename": "delete_revision"
"codename": "delete_workeractivity"
}
},
{
"model": "auth.permission",
"pk": 169,
"fields": {
"name": "Can view revision",
"name": "Can view worker activity",
"content_type": 43,
"codename": "view_revision"
"codename": "view_workeractivity"
}
},
{
"model": "auth.permission",
"pk": 170,
"fields": {
"name": "Can add worker",
"name": "Can add worker configuration",
"content_type": 44,
"codename": "add_worker"
"codename": "add_workerconfiguration"
}
},
{
"model": "auth.permission",
"pk": 171,
"fields": {
"name": "Can change worker",
"name": "Can change worker configuration",
"content_type": 44,
"codename": "change_worker"
"codename": "change_workerconfiguration"
}
},
{
"model": "auth.permission",
"pk": 172,
"fields": {
"name": "Can delete worker",
"name": "Can delete worker configuration",
"content_type": 44,
"codename": "delete_worker"
"codename": "delete_workerconfiguration"
}
},
{
"model": "auth.permission",
"pk": 173,
"fields": {
"name": "Can view worker",
"name": "Can view worker configuration",
"content_type": 44,
"codename": "view_worker"
"codename": "view_workerconfiguration"
}
},
{
"model": "auth.permission",
"pk": 174,
"fields": {
"name": "Can add worker activity",
"name": "Can add worker type",
"content_type": 45,
"codename": "add_workeractivity"
"codename": "add_workertype"
}
},
{
"model": "auth.permission",
"pk": 175,
"fields": {
"name": "Can change worker activity",
"name": "Can change worker type",
"content_type": 45,
"codename": "change_workeractivity"
"codename": "change_workertype"
}
},
{
"model": "auth.permission",
"pk": 176,
"fields": {
"name": "Can delete worker activity",
"name": "Can delete worker type",
"content_type": 45,
"codename": "delete_workeractivity"
"codename": "delete_workertype"
}
},
{
"model": "auth.permission",
"pk": 177,
"fields": {
"name": "Can view worker activity",
"name": "Can view worker type",
"content_type": 45,
"codename": "view_workeractivity"
"codename": "view_workertype"
}
},
{
"model": "auth.permission",
"pk": 178,
"fields": {
"name": "Can add worker configuration",
"name": "Can add worker version",
"content_type": 46,
"codename": "add_workerconfiguration"
"codename": "add_workerversion"
}
},
{
"model": "auth.permission",
"pk": 179,
"fields": {
"name": "Can change worker configuration",
"name": "Can change worker version",
"content_type": 46,
"codename": "change_workerconfiguration"
"codename": "change_workerversion"
}
},
{
"model": "auth.permission",
"pk": 180,
"fields": {
"name": "Can delete worker configuration",
"name": "Can delete worker version",
"content_type": 46,
"codename": "delete_workerconfiguration"
"codename": "delete_workerversion"
}
},
{
"model": "auth.permission",
"pk": 181,
"fields": {
"name": "Can view worker configuration",
"name": "Can view worker version",
"content_type": 46,
"codename": "view_workerconfiguration"
"codename": "view_workerversion"
}
},
{
"model": "auth.permission",
"pk": 182,
"fields": {
"name": "Can add worker type",
"name": "Can add worker run",
"content_type": 47,
"codename": "add_workertype"
"codename": "add_workerrun"
}
},
{
"model": "auth.permission",
"pk": 183,
"fields": {
"name": "Can change worker type",
"name": "Can change worker run",
"content_type": 47,
"codename": "change_workertype"
"codename": "change_workerrun"
}
},
{
"model": "auth.permission",
"pk": 184,
"fields": {
"name": "Can delete worker type",
"name": "Can delete worker run",
"content_type": 47,
"codename": "delete_workertype"
"codename": "delete_workerrun"
}
},
{
"model": "auth.permission",
"pk": 185,
"fields": {
"name": "Can view worker type",
"name": "Can view worker run",
"content_type": 47,
"codename": "view_workertype"
"codename": "view_workerrun"
}
},
{
"model": "auth.permission",
"pk": 186,
"fields": {
"name": "Can add worker version",
"name": "Can add process dataset set",
"content_type": 48,
"codename": "add_workerversion"
"codename": "add_processdatasetset"
}
},
{
"model": "auth.permission",
"pk": 187,
"fields": {
"name": "Can change worker version",
"name": "Can change process dataset set",
"content_type": 48,
"codename": "change_workerversion"
"codename": "change_processdatasetset"
}
},
{
"model": "auth.permission",
"pk": 188,
"fields": {
"name": "Can delete worker version",
"name": "Can delete process dataset set",
"content_type": 48,
"codename": "delete_workerversion"
"codename": "delete_processdatasetset"
}
},
{
"model": "auth.permission",
"pk": 189,
"fields": {
"name": "Can view worker version",
"name": "Can view process dataset set",
"content_type": 48,
"codename": "view_workerversion"
"codename": "view_processdatasetset"
}
},
{
"model": "auth.permission",
"pk": 190,
"fields": {
"name": "Can add worker run",
"content_type": 49,
"codename": "add_workerrun"
}
},
{
"model": "auth.permission",
"pk": 191,
"fields": {
"name": "Can change worker run",
"content_type": 49,
"codename": "change_workerrun"
}
},
{
"model": "auth.permission",
"pk": 192,
"fields": {
"name": "Can delete worker run",
"content_type": 49,
"codename": "delete_workerrun"
}
},
{
"model": "auth.permission",
"pk": 193,
"fields": {
"name": "Can view worker run",
"content_type": 49,
"codename": "view_workerrun"
}
},
{
"model": "auth.permission",
"pk": 194,
"fields": {
"name": "Can add process dataset",
"content_type": 50,
"codename": "add_processdataset"
}
},
{
"model": "auth.permission",
"pk": 195,
"fields": {
"name": "Can change process dataset",
"content_type": 50,
"codename": "change_processdataset"
}
},
{
"model": "auth.permission",
"pk": 196,
"fields": {
"name": "Can delete process dataset",
"content_type": 50,
"codename": "delete_processdataset"
}
},
{
"model": "auth.permission",
"pk": 197,
"fields": {
"name": "Can view process dataset",
"content_type": 50,
"codename": "view_processdataset"
}
},
{
"model": "auth.permission",
"pk": 198,
"fields": {
"name": "Can add dataset",
"content_type": 51,
"content_type": 49,
"codename": "add_dataset"
}
},
{
"model": "auth.permission",
"pk": 199,
"pk": 191,
"fields": {
"name": "Can change dataset",
"content_type": 51,
"content_type": 49,
"codename": "change_dataset"
}
},
{
"model": "auth.permission",
"pk": 200,
"pk": 192,
"fields": {
"name": "Can delete dataset",
"content_type": 51,
"content_type": 49,
"codename": "delete_dataset"
}
},
{
"model": "auth.permission",
"pk": 201,
"pk": 193,
"fields": {
"name": "Can view dataset",
"content_type": 51,
"content_type": 49,
"codename": "view_dataset"
}
},
{
"model": "auth.permission",
"pk": 202,
"pk": 194,
"fields": {
"name": "Can add metric key",
"content_type": 52,
"content_type": 50,
"codename": "add_metrickey"
}
},
{
"model": "auth.permission",
"pk": 203,
"pk": 195,
"fields": {
"name": "Can change metric key",
"content_type": 52,
"content_type": 50,
"codename": "change_metrickey"
}
},
{
"model": "auth.permission",
"pk": 204,
"pk": 196,
"fields": {
"name": "Can delete metric key",
"content_type": 52,
"content_type": 50,
"codename": "delete_metrickey"
}
},
{
"model": "auth.permission",
"pk": 205,
"pk": 197,
"fields": {
"name": "Can view metric key",
"content_type": 52,
"content_type": 50,
"codename": "view_metrickey"
}
},
{
"model": "auth.permission",
"pk": 206,
"pk": 198,
"fields": {
"name": "Can add model",
"content_type": 53,
"content_type": 51,
"codename": "add_model"
}
},
{
"model": "auth.permission",
"pk": 207,
"pk": 199,
"fields": {
"name": "Can change model",
"content_type": 53,
"content_type": 51,
"codename": "change_model"
}
},
{
"model": "auth.permission",
"pk": 208,
"pk": 200,
"fields": {
"name": "Can delete model",
"content_type": 53,
"content_type": 51,
"codename": "delete_model"
}
},
{
"model": "auth.permission",
"pk": 209,
"pk": 201,
"fields": {
"name": "Can view model",
"content_type": 53,
"content_type": 51,
"codename": "view_model"
}
},
{
"model": "auth.permission",
"pk": 210,
"pk": 202,
"fields": {
"name": "Can add model version",
"content_type": 54,
"content_type": 52,
"codename": "add_modelversion"
}
},
{
"model": "auth.permission",
"pk": 211,
"pk": 203,
"fields": {
"name": "Can change model version",
"content_type": 54,
"content_type": 52,
"codename": "change_modelversion"
}
},
{
"model": "auth.permission",
"pk": 212,
"pk": 204,
"fields": {
"name": "Can delete model version",
"content_type": 54,
"content_type": 52,
"codename": "delete_modelversion"
}
},
{
"model": "auth.permission",
"pk": 213,
"pk": 205,
"fields": {
"name": "Can view model version",
"content_type": 54,
"content_type": 52,
"codename": "view_modelversion"
}
},
{
"model": "auth.permission",
"pk": 214,
"pk": 206,
"fields": {
"name": "Can add metric value",
"content_type": 55,
"content_type": 53,
"codename": "add_metricvalue"
}
},
{
"model": "auth.permission",
"pk": 215,
"pk": 207,
"fields": {
"name": "Can change metric value",
"content_type": 55,
"content_type": 53,
"codename": "change_metricvalue"
}
},
{
"model": "auth.permission",
"pk": 216,
"pk": 208,
"fields": {
"name": "Can delete metric value",
"content_type": 55,
"content_type": 53,
"codename": "delete_metricvalue"
}
},
{
"model": "auth.permission",
"pk": 217,
"pk": 209,
"fields": {
"name": "Can view metric value",
"content_type": 55,
"content_type": 53,
"codename": "view_metricvalue"
}
},
{
"model": "auth.permission",
"pk": 218,
"pk": 210,
"fields": {
"name": "Can add dataset element",
"content_type": 56,
"content_type": 54,
"codename": "add_datasetelement"
}
},
{
"model": "auth.permission",
"pk": 219,
"pk": 211,
"fields": {
"name": "Can change dataset element",
"content_type": 56,
"content_type": 54,
"codename": "change_datasetelement"
}
},
{
"model": "auth.permission",
"pk": 220,
"pk": 212,
"fields": {
"name": "Can delete dataset element",
"content_type": 56,
"content_type": 54,
"codename": "delete_datasetelement"
}
},
{
"model": "auth.permission",
"pk": 221,
"pk": 213,
"fields": {
"name": "Can view dataset element",
"content_type": 56,
"content_type": 54,
"codename": "view_datasetelement"
}
},
{
"model": "auth.permission",
"pk": 222,
"pk": 214,
"fields": {
"name": "Can add dataset set",
"content_type": 57,
"content_type": 55,
"codename": "add_datasetset"
}
},
{
"model": "auth.permission",
"pk": 223,
"pk": 215,
"fields": {
"name": "Can change dataset set",
"content_type": 57,
"content_type": 55,
"codename": "change_datasetset"
}
},
{
"model": "auth.permission",
"pk": 224,
"pk": 216,
"fields": {
"name": "Can delete dataset set",
"content_type": 57,
"content_type": 55,
"codename": "delete_datasetset"
}
},
{
"model": "auth.permission",
"pk": 225,
"pk": 217,
"fields": {
"name": "Can view dataset set",
"content_type": 57,
"content_type": 55,
"codename": "view_datasetset"
}
},
{
"model": "ponos.farm",
"pk": "dd6f9265-24cf-4773-9e61-a42853278337",
"pk": "fc06b115-5d20-4cdf-950a-94932e668d8f",
"fields": {
"name": "Wheat farm",
"seed": "9deb13000bdfc3a10d044b7e03b0c45f6d82f2824159198e9f89177c7e499684"
"seed": "65546ce865390189e1d8ab7987073d27e7c873fbbf4f73ad56d64778604cb709"
}
},
{
"model": "training.dataset",
"pk": "b9d67974-4bb9-47f7-b1e8-62577fe2c831",
"pk": "840fce45-a966-410b-a87d-869caae38fd6",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"creator": 2,
"task": null,
"name": "First Dataset",
"description": "dataset number one",
"state": "open"
"state": "open",
"unique_elements": true
}
},
{
"model": "training.dataset",
"pk": "f0391be7-aca4-4c28-adca-756822a79193",
"pk": "d9034da2-1fcb-4409-b54a-de5474de1891",
"fields": {
"created": "2020-02-02T01:23:45.678Z",
"updated": "2020-02-02T01:23:45.678Z",
"corpus": "206d6f86-a96c-4fd7-a097-0e5fa82de5d3",
"corpus": "16490023-f435-4357-89dd-ee718950e3e2",
"creator": 2,
"task": null,
"name": "Second Dataset",
"description": "dataset number two",
"state": "open"
"state": "open",
"unique_elements": true
}
},
{
"model": "training.datasetset",
"pk": "0117927b-cf13-4352-9e57-2f32697b4e6e",
"pk": "0a206255-f057-4c31-9064-a916b35fd847",
"fields": {
"name": "test",
"dataset": "f0391be7-aca4-4c28-adca-756822a79193"
"name": "training",
"dataset": "840fce45-a966-410b-a87d-869caae38fd6"
}
},
{
"model": "training.datasetset",
"pk": "4dc67765-b447-49c3-8cc9-8171bdfaaecb",
"pk": "28de5f8d-7589-47c4-b4aa-ebc613448203",
"fields": {
"name": "validation",
"dataset": "f0391be7-aca4-4c28-adca-756822a79193"
"name": "test",
"dataset": "840fce45-a966-410b-a87d-869caae38fd6"
}
},
{
"model": "training.datasetset",
"pk": "6d44b8d1-a821-4bf3-a0a2-bafcc3503ffd",
"pk": "65d238ff-5456-4413-b4ab-ad483fc3ce55",
"fields": {
"name": "training",
"dataset": "f0391be7-aca4-4c28-adca-756822a79193"
"name": "test",
"dataset": "d9034da2-1fcb-4409-b54a-de5474de1891"
}
},
{
"model": "training.datasetset",
"pk": "7ea0c470-a45f-4365-8d25-d723143d8208",
"pk": "c7e69307-5f1c-4b55-a54f-c26bdc5daa0c",
"fields": {
"name": "training",
"dataset": "b9d67974-4bb9-47f7-b1e8-62577fe2c831"
"name": "validation",
"dataset": "d9034da2-1fcb-4409-b54a-de5474de1891"
}
},
{
"model": "training.datasetset",
"pk": "d02fcb33-bce7-4bea-a605-b97f8c26542c",
"pk": "d64257e5-f543-4ce6-830c-a3c64679a162",
"fields": {
"name": "test",
"dataset": "b9d67974-4bb9-47f7-b1e8-62577fe2c831"
"name": "training",
"dataset": "d9034da2-1fcb-4409-b54a-de5474de1891"
}
},
{
"model": "training.datasetset",
"pk": "da1c1b41-6290-4f32-8087-fdb925dc6643",
"pk": "e81cc61b-ef5b-4a60-b441-fc2d3af510a0",
"fields": {
"name": "validation",
"dataset": "b9d67974-4bb9-47f7-b1e8-62577fe2c831"
"dataset": "840fce45-a966-410b-a87d-869caae38fd6"
}
}
]
......@@ -6,12 +6,10 @@ from django.core.management.base import BaseCommand
from django.db import transaction
from django.db.models import Q
from django.db.utils import IntegrityError
from rest_framework.authtoken.models import Token
from arkindex.images.models import ImageServer
from arkindex.ponos.models import Farm
from arkindex.process.models import FeatureUsage, Repository, Worker, WorkerType, WorkerVersion, WorkerVersionState
from arkindex.users.models import User
# Constants used in architecture project
UPLOADS_IMAGE_SERVER_ID = 12345
......@@ -30,7 +28,6 @@ IMPORT_WORKER_SLUG = "file_import"
IMPORT_WORKER_REPO = "https://gitlab.teklia.com/arkindex/tasks"
IMPORT_WORKER_REVISION_MESSAGE = "File import worker bootstrap"
IMPORT_WORKER_REVISION_AUTHOR = "Dev Bootstrap"
ADMIN_API_TOKEN = "deadbeefTestToken"
class Command(BaseCommand):
......@@ -48,15 +45,6 @@ class Command(BaseCommand):
"""Helper to display error messages"""
self.stdout.write(self.style.ERROR(f"{msg}"))
def check_user(self, user):
"""Ensure a user is admin"""
if user.is_admin:
self.success(f"Admin user for legacy worker API tokens {user} is valid")
else:
user.is_admin = True
user.save()
self.warn(f"Updated user {user} to admin")
def create_image_server(self, id, url, bucket, region, display_name):
try:
server = ImageServer.objects.get(Q(id=id) | Q(url=url))
......@@ -129,29 +117,6 @@ class Command(BaseCommand):
)
self.success("Ponos farm created")
# An admin API user with a specific token
try:
token = Token.objects.get(key=ADMIN_API_TOKEN)
self.check_user(token.user)
except Token.DoesNotExist:
# Create a new internal user
user, _ = User.objects.get_or_create(
email="internal+bootstrap@teklia.com",
defaults={
"display_name": "Bootstrap Admin user",
"is_admin": True,
}
)
self.success("Created internal user")
self.check_user(user)
# Finally create a specific token for that user
if hasattr(user, "auth_token"):
# Support One-To-One relation
user.auth_token.delete()
Token.objects.create(key=ADMIN_API_TOKEN, user=user)
self.success(f"Created token {ADMIN_API_TOKEN}")
# an image server for local cantaloupe https://ark.localhost/iiif/2
uploads_server = self.create_image_server(UPLOADS_IMAGE_SERVER_ID , UPLOADS_IMAGE_SERVER_URL, UPLOADS_IMAGE_SERVER_BUCKET , UPLOADS_IMAGE_SERVER_REGION , "Local IIIF server for user uploaded files through frontend")
if uploads_server is None:
......
......@@ -49,7 +49,7 @@ class Command(BaseCommand):
img5 = Image.objects.create(path="img5", width=1000, height=1000, server=imgsrv)
img6 = Image.objects.create(path="img6", width=1000, height=1000, server=imgsrv)
# Create an admin, an internal and a normal user
# Create an admin and a normal user
superuser = User.objects.create_superuser("root@root.fr", "Pa$$w0rd", display_name="Admin")
superuser.verified_email = True
superuser.save()
......
......@@ -18,8 +18,6 @@ from arkindex.documents.models import (
ElementPath,
ElementType,
Entity,
EntityLink,
EntityRole,
EntityType,
MetaData,
MLClass,
......@@ -40,7 +38,7 @@ from arkindex.process.models import (
from arkindex.training.models import Dataset, DatasetElement, DatasetSet, Model
from arkindex.users.models import Role, User
EXPORT_VERSION = 8
EXPORT_VERSION = 9
TABLE_NAMES = {
"export_version",
......@@ -52,8 +50,6 @@ TABLE_NAMES = {
"element_path",
"entity",
"entity_type",
"entity_role",
"entity_link",
"transcription",
"transcription_entity",
"metadata",
......@@ -132,8 +128,6 @@ SQL_TOP_LEVEL_PATH_QUERY = """
SQL_ENTITY_QUERY = "SELECT * FROM entity"
SQL_ENTITY_TYPE_QUERY = "SELECT * FROM entity_type"
SQL_ENTITY_ROLE_QUERY = "SELECT * FROM entity_role"
SQL_ENTITY_LINK_QUERY = "SELECT * FROM entity_link"
SQL_TRANSCRIPTION_QUERY = "SELECT * FROM transcription"
SQL_TRANSCRIPTION_ENTITY_QUERY = "SELECT * FROM transcription_entity"
......@@ -249,24 +243,6 @@ class Command(BaseCommand):
corpus=self.corpus
)]
def convert_entity_roles(self, row):
return [EntityRole(
id=row["id"],
parent_name=row["parent_name"],
child_name=row["child_name"],
parent_type_id=row["parent_type_id"],
child_type_id=row["child_type_id"],
corpus=self.corpus
)]
def convert_entity_links(self, row):
return [EntityLink(
id=row["id"],
parent_id=row["parent_id"],
child_id=row["child_id"],
role_id=row["role_id"],
)]
def convert_transcriptions(self, row):
return [Transcription(
id=row["id"],
......@@ -597,11 +573,9 @@ class Command(BaseCommand):
self.bulk_create_objects(ElementPath, self.convert_element_paths, SQL_ELEMENT_PATH_QUERY, ignore_conflicts=False)
self.bulk_create_objects(ElementPath, self.convert_top_level_paths, SQL_TOP_LEVEL_PATH_QUERY, ignore_conflicts=False)
# Create entities, entity types, roles and links
# Create entities and entity types
self.bulk_create_objects(EntityType, self.convert_entity_types, SQL_ENTITY_TYPE_QUERY)
self.bulk_create_objects(Entity, self.convert_entities, SQL_ENTITY_QUERY)
self.bulk_create_objects(EntityRole, self.convert_entity_roles, SQL_ENTITY_ROLE_QUERY)
self.bulk_create_objects(EntityLink, self.convert_entity_links, SQL_ENTITY_LINK_QUERY)
# Create transcriptions and transcription entities
self.bulk_create_objects(Transcription, self.convert_transcriptions, SQL_TRANSCRIPTION_QUERY)
......
......@@ -135,24 +135,6 @@ class Command(BaseCommand):
""")
self.stdout.write(f"Updated {cursor.rowcount} TranscriptionEntities.")
self.stdout.write("Updating child entity IDs on entity links…")
cursor.execute("""
UPDATE documents_entitylink
SET child_id = keep_id
FROM duplicated_entities
WHERE child_id = remove_id;
""")
self.stdout.write(f"Updated {cursor.rowcount} entity links.")
self.stdout.write("Updating parent entity IDs on entity links…")
cursor.execute("""
UPDATE documents_entitylink
SET parent_id = keep_id
FROM duplicated_entities
WHERE parent_id = remove_id;
""")
self.stdout.write(f"Updated {cursor.rowcount} entity links.")
self.stdout.write("Removing duplicate entities…")
cursor.execute("""
DELETE FROM documents_entity
......
# Generated by Django 4.1.7 on 2024-04-15 12:36
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("documents", "0009_corpusexport_source"),
]
operations = [
migrations.AlterUniqueTogether(
name="entityrole",
unique_together=None,
),
migrations.RemoveField(
model_name="entityrole",
name="child_type",
),
migrations.RemoveField(
model_name="entityrole",
name="corpus",
),
migrations.RemoveField(
model_name="entityrole",
name="parent_type",
),
migrations.DeleteModel(
name="EntityLink",
),
migrations.DeleteModel(
name="EntityRole",
),
]
......@@ -769,63 +769,6 @@ class Entity(models.Model):
return self.name
class EntityRole(models.Model):
"""
Role's type between a parent and a child
"""
parent_name = models.CharField(max_length=250)
child_name = models.CharField(max_length=250)
parent_type = models.ForeignKey(EntityType, related_name="parent_role", on_delete=models.DO_NOTHING)
child_type = models.ForeignKey(EntityType, related_name="child_role", on_delete=models.DO_NOTHING)
corpus = models.ForeignKey(Corpus, related_name="roles", on_delete=models.CASCADE)
class Meta:
unique_together = (
("parent_name", "child_name", "parent_type", "child_type", "corpus"),
)
def __str__(self):
return "{} -> {}".format(self.parent_name, self.child_name)
class EntityLink(models.Model):
"""
Link between two entities with a role
"""
id = models.UUIDField(default=uuid.uuid4, primary_key=True, editable=False)
parent = models.ForeignKey(Entity, related_name="parents", on_delete=models.CASCADE)
child = models.ForeignKey(Entity, related_name="children", on_delete=models.CASCADE)
role = models.ForeignKey(EntityRole, related_name="links", on_delete=models.CASCADE)
def clean(self):
if self.role is None:
return
if self.parent is None:
return
if self.parent.type_id != self.role.parent_type_id:
raise ValidationError("Parent's type {} is different from the expected type {}".format(
self.parent.type_id,
self.role.parent_type_id))
if self.parent.corpus_id != self.role.corpus_id:
raise ValidationError("Parent's corpus {} is different from the expected corpus {}".format(
self.parent.corpus_id,
self.role.corpus_id))
if self.child is None:
return
if self.child.type_id != self.role.child_type_id:
raise ValidationError("Child's type {} is different from the expected type {}".format(
self.child.type_id,
self.role.child_type_id))
if self.child.corpus_id != self.role.corpus_id:
raise ValidationError("Child's corpus {} is different from the expected corpus {}".format(
self.child.corpus_id,
self.role.corpus_id))
def save(self, *args, **kwargs):
self.full_clean()
super().save(*args, **kwargs)
class TextOrientation(Enum):
HorizontalLeftToRight = "horizontal-lr"
HorizontalRightToLeft = "horizontal-rl"
......
......@@ -6,7 +6,7 @@ from drf_spectacular.utils import extend_schema_serializer
from rest_framework import serializers
from rest_framework.exceptions import ValidationError
from arkindex.documents.models import Corpus, Entity, EntityLink, EntityRole, EntityType, TranscriptionEntity
from arkindex.documents.models import Corpus, Entity, EntityType, TranscriptionEntity
from arkindex.documents.serializers.light import CorpusLightSerializer, EntityTypeLightSerializer
from arkindex.documents.serializers.ml import WorkerRunSummarySerializer
from arkindex.project.serializer_fields import ForbiddenField, WorkerRunIDField
......@@ -31,7 +31,7 @@ class EntityTypeSerializer(serializers.ModelSerializer):
# Get an error if a request tries to change an entity type's corpus
corpus = data.get("corpus")
if self.instance and corpus:
raise ValidationError({"corpus": ["It is not possible to update an Entity Type\'s corpus."]})
raise ValidationError({"corpus": ["It is not possible to update an Entity Type's corpus."]})
data = super().to_internal_value(data)
return data
......@@ -86,79 +86,6 @@ class BaseEntitySerializer(serializers.ModelSerializer):
)
class EntityRoleSerializer(serializers.ModelSerializer):
"""
Serialize a role between two types of entity
"""
parent_type_id = serializers.PrimaryKeyRelatedField(
queryset=EntityType.objects.all(),
style={"base_template": "input.html"},
source="parent_type",
)
child_type_id = serializers.PrimaryKeyRelatedField(
queryset=EntityType.objects.all(),
style={"base_template": "input.html"},
source="child_type",
)
class Meta:
model = EntityRole
fields = (
"id",
"parent_name",
"child_name",
"parent_type_id",
"child_type_id"
)
def validate(self, data):
errors = defaultdict(list)
assert "corpus" not in data
assert self.context.get("request") is not None
corpus_id = self.context["request"].parser_context["kwargs"]["pk"]
corpus = Corpus.objects.writable(self.context["request"].user).filter(id=corpus_id).first()
if corpus is None:
raise serializers.ValidationError({
"corpus": ["You do not have write access to this corpus"],
"id": corpus_id,
})
parent_type = data.get("parent_type")
child_type = data.get("child_type")
if parent_type.corpus_id != corpus.id:
errors["parent_type_id"].append(f"Type {parent_type.id} does not exist in corpus {corpus}.")
if child_type.corpus_id != corpus.id:
errors["child_type_id"].append(f"Type {child_type.id} does not exist in corpus {corpus}.")
if errors:
raise ValidationError(errors)
data["corpus"] = corpus
return data
class CreateEntityRoleErrorResponseSerializer(serializers.Serializer):
id = serializers.UUIDField(required=False, help_text="The corpus ID.")
corpus = serializers.ListField(child=serializers.CharField(), required=False, help_text="Errors that occurred during corpus ID field validation.")
class EntityLinkSerializer(serializers.ModelSerializer):
"""
Serialize an entity link with its child, parent and role
"""
parent = BaseEntitySerializer()
child = BaseEntitySerializer()
role = EntityRoleSerializer()
class Meta:
model = EntityLink
fields = (
"id",
"parent",
"child",
"role"
)
@extend_schema_serializer(
deprecate_fields=("worker_version_id")
)
......@@ -167,8 +94,6 @@ class EntitySerializer(BaseEntitySerializer):
Serialize an entity with its metadata
"""
corpus = CorpusLightSerializer(read_only=True)
children = EntityLinkSerializer(many=True, read_only=True)
parents = EntityLinkSerializer(many=True, read_only=True)
# When updating an entity, the type can be set either by using its EntityType UUID, or its name
# (in which case the serializer checks that an EntityType with this name exists in the corpus)
type_id = serializers.PrimaryKeyRelatedField(
......@@ -183,14 +108,10 @@ class EntitySerializer(BaseEntitySerializer):
model = Entity
fields = BaseEntitySerializer.Meta.fields + (
"corpus",
"children",
"parents",
"type_id"
)
read_only_fields = BaseEntitySerializer.Meta.read_only_fields = (
"corpus",
"children",
"parents",
)
def validate(self, data):
......@@ -221,8 +142,6 @@ class EntityCreateSerializer(BaseEntitySerializer):
style={"base_template": "input.html"},
)
metas = serializers.HStoreField(child=serializers.CharField(), required=False)
children = EntityLinkSerializer(many=True, read_only=True)
parents = EntityLinkSerializer(many=True, read_only=True)
worker_version = serializers.UUIDField(
allow_null=True,
required=False,
......@@ -262,15 +181,11 @@ class EntityCreateSerializer(BaseEntitySerializer):
"metas",
"validated",
"corpus",
"parents",
"children",
"worker_version",
"worker_run_id"
)
read_only_fields = (
"id",
"children",
"parents",
)
def __init__(self, *args, **kwargs):
......@@ -300,46 +215,6 @@ class EntityCreateSerializer(BaseEntitySerializer):
return data
class EntityLinkCreateSerializer(EntityLinkSerializer):
"""
Serialize an entity with a possible parents and children
"""
parent = serializers.PrimaryKeyRelatedField(
queryset=Entity.objects.none(),
style={"base_template": "input.html"},
)
child = serializers.PrimaryKeyRelatedField(
queryset=Entity.objects.none(),
style={"base_template": "input.html"},
)
role = serializers.PrimaryKeyRelatedField(
queryset=EntityRole.objects.none(),
style={"base_template": "input.html"},
)
class Meta:
model = EntityLink
fields = EntityLinkSerializer.Meta.fields
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
if not self.context.get("request"):
# Do not raise Error in order to create OpenAPI schema
return
corpora = Corpus.objects.writable(self.context["request"].user)
entities = Entity.objects.all().filter(corpus__in=corpora)
roles = EntityRole.objects.all().filter(corpus__in=corpora)
self.fields["parent"].queryset = entities
self.fields["child"].queryset = entities
self.fields["role"].queryset = roles
def validate(self, data):
data = super().validate(data)
link = EntityLink(**data)
link.full_clean()
return data
class TranscriptionEntityCreateSerializer(serializers.ModelSerializer):
"""
Serialise the link between an entity and a transcription
......
......@@ -16,7 +16,6 @@ from arkindex.documents.models import (
Corpus,
Element,
ElementPath,
EntityLink,
MetaData,
Selection,
Transcription,
......@@ -58,8 +57,6 @@ def corpus_delete(corpus_id: str) -> None:
WorkerActivity.objects.filter(process__corpus_id=corpus_id),
corpus.files.all(),
MetaData.objects.filter(element__corpus_id=corpus_id),
EntityLink.objects.filter(role__corpus_id=corpus_id),
corpus.roles.all(),
TranscriptionEntity.objects.filter(entity__corpus_id=corpus_id),
TranscriptionEntity.objects.filter(transcription__element__corpus_id=corpus_id),
corpus.entities.all(),
......
......@@ -48,8 +48,6 @@ class TestLoadExport(FixtureTestCase):
"documents.elementpath": [],
"documents.entity": [],
"documents.entitytype": [],
"documents.entityrole": [],
"documents.entitylink": [],
"documents.transcription": [],
"documents.transcriptionentity": [],
"documents.metadata": ["index"],
......@@ -162,13 +160,6 @@ class TestLoadExport(FixtureTestCase):
validated=True,
moderator=self.superuser,
)
role = self.corpus.roles.create(
parent_name="parent",
child_name="child",
parent_type=location_type,
child_type=person_type,
)
role.links.create(parent=entity1, child=entity2)
transcription.transcription_entities.create(
entity=entity1,
......@@ -251,7 +242,6 @@ class TestLoadExport(FixtureTestCase):
self.assertEqual(corpus.ml_classes.all().count(), 0)
self.assertEqual(corpus.elements.all().count(), 0)
self.assertEqual(corpus.entities.all().count(), 0)
self.assertEqual(corpus.roles.all().count(), 0)
@patch("arkindex.documents.export.os.unlink")
@patch("arkindex.project.aws.s3.Object")
......@@ -273,10 +263,6 @@ class TestLoadExport(FixtureTestCase):
dataset_set = Dataset.objects.first().sets.first()
DatasetElement.objects.create(set=dataset_set, element=element)
person_type = EntityType.objects.get(
name="person",
corpus=self.corpus
)
location_type = EntityType.objects.get(
name="location",
corpus=self.corpus
......@@ -286,19 +272,6 @@ class TestLoadExport(FixtureTestCase):
name="Arrokuda",
type=location_type,
)
entity2 = self.corpus.entities.create(
name="Stonjourner",
type=person_type,
validated=True,
moderator=self.superuser,
)
role = self.corpus.roles.create(
parent_name="parent",
child_name="child",
parent_type=location_type,
child_type=person_type,
)
role.links.create(parent=entity1, child=entity2)
transcription.transcription_entities.create(
entity=entity1,
......@@ -329,7 +302,6 @@ class TestLoadExport(FixtureTestCase):
self.assertEqual(corpus.ml_classes.all().count(), 1)
self.assertEqual(corpus.elements.all().count(), 0)
self.assertEqual(corpus.entities.all().count(), 0)
self.assertEqual(corpus.roles.all().count(), 0)
def test_create_worker(self):
repo_uuid = Repository.objects.get(url="http://my_repo.fake/workers/worker").id
......
......@@ -72,20 +72,6 @@ class TestMergeEntities(FixtureTestCase):
element.metadatas.create(type=MetaType.Text, name="something", value="dupe", entity=entity1)
element.metadatas.create(type=MetaType.Text, name="something", value="dupe", entity=entity2)
role = self.corpus.roles.create(
parent_type=self.person_type,
child_type=self.person_type,
parent_name="parent",
child_name="child",
)
# entity1 and entity2 are duplicates, so the deduplication would cause those links to be duplicates,
# but there are no constraints at all on EntityLinks, so there will not be any deletions.
role.links.create(parent=entity1, child=unique_entity)
role.links.create(parent=entity2, child=unique_entity)
# Nothing will stop an entity from being linked to itself either.
role.links.create(parent=entity1, child=entity2)
transcription = element.transcriptions.get()
worker_version = WorkerVersion.objects.first()
worker_run = WorkerRun.objects.first()
......@@ -158,10 +144,6 @@ class TestMergeEntities(FixtureTestCase):
Deleted 1 TranscriptionEntities.
Updating entity IDs on TranscriptionEntities…
Updated 1 TranscriptionEntities.
Updating child entity IDs on entity links…
Updated 1 entity links.
Updating parent entity IDs on entity links…
Updated 1 entity links.
Removing duplicate entities…
Removed 1 duplicate entities from corpus Unit Tests.
""").strip()
......@@ -195,24 +177,6 @@ class TestMergeEntities(FixtureTestCase):
]
)
self.assertListEqual(
list(role.links.order_by("parent_id", "child_id").values("parent_id", "child_id")),
[
{
"parent_id": entity1.id,
"child_id": entity1.id,
},
{
"parent_id": entity1.id,
"child_id": unique_entity.id,
},
{
"parent_id": entity1.id,
"child_id": unique_entity.id,
},
]
)
self.assertListEqual(
list(transcription.transcription_entities.order_by("id").values("entity_id", "offset", "length", "worker_version_id", "worker_run_id")),
[
......