tasks
Dataset
Bases: TaskMixin
, TimeStampMixin
, OwnableMixin
The internal dataset model.
Source code in backend/datasets/models.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
|
creator = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.SET_NULL, null=True)
class-attribute
instance-attribute
The user who created the dataset.
description = models.TextField(blank=True)
class-attribute
instance-attribute
The description of the dataset.
id = models.UUIDField(default=uuid.uuid4, primary_key=True)
class-attribute
instance-attribute
The identifier of the dataset.
import_task = models.OneToOneField('tasks.Task', on_delete=models.SET_NULL, null=True)
class-attribute
instance-attribute
The import task of the dataset.
local_database: str = models.CharField(max_length=255, null=True)
class-attribute
instance-attribute
The local blazegraph database identifier of the dataset.
mode = models.CharField(max_length=255, choices=Mode.choices, default=Mode.LOCAL)
class-attribute
instance-attribute
The mode of the dataset.
name = models.CharField(max_length=255)
class-attribute
instance-attribute
The name of the dataset.
namespaces = models.JSONField(null=True)
class-attribute
instance-attribute
The list of sparql namespaces/prefixes in the dataset.
search_index_name: str
property
The path to the search index of the dataset. :return:
search_mode = models.CharField(max_length=255, choices=SearchMode.choices, default=SearchMode.LOCAL)
class-attribute
instance-attribute
The search mode of the dataset.
source = models.JSONField()
class-attribute
instance-attribute
The source of the dataset.
sparql_endpoint = models.CharField(max_length=255, null=True)
class-attribute
instance-attribute
The SPARQL endpoint of the dataset.
state = models.CharField(choices=STATES, default=DatasetState.QUEUED.value, max_length=255)
class-attribute
instance-attribute
The import state of the dataset.
statistics = models.JSONField(null=True)
class-attribute
instance-attribute
The statistics of the dataset.
Mode
Bases: TextChoices
The Mode class is an enumeration of the possible modes of a dataset
Source code in backend/datasets/models.py
33 34 35 36 37 38 |
|
SearchMode
Bases: TextChoices
The SearchMode class is an enumeration of the possible search modes of a dataset
Source code in backend/datasets/models.py
40 41 42 43 44 45 46 |
|
get_query_service()
If the mode is local, return a local query service, otherwise return a SPARQL query service
Source code in backend/datasets/models.py
105 106 107 108 109 110 111 112 113 114 115 116 117 |
|
get_search_service()
Return appropriate search service depending on the search mode
Source code in backend/datasets/models.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
|