コード例 #1
0
ファイル: templating.py プロジェクト: ekansa/open-context-py
 def __init__(self, source_id):
     self.source_id = source_id
     pg = ProcessGeneral(source_id)
     pg.get_source()
     self.project_uuid = pg.project_uuid
     self.fields = []
     self.has_doc_field = False
     self.raw_field_annotations = []
     self.label = False
     self.has_subjects = False
     self.get_examples = False
     self.field_annotations = False
     self.PREDICATE_CONTAINS = Assertion.PREDICATES_CONTAINS
     self.PREDICATE_LINK = Assertion.PREDICATES_LINK
     self.PREDICATE_CONTAINED_IN = ImportFieldAnnotation.PRED_CONTAINED_IN
     self.PRED_DESCRIBES = ImportFieldAnnotation.PRED_DESCRIBES
     self.PRED_VALUE_OF = ImportFieldAnnotation.PRED_VALUE_OF
     self.PRED_MEDIA_PART_OF = ImportFieldAnnotation.PRED_MEDIA_PART_OF
     self.PRED_DOC_Text = ImportFieldAnnotation.PRED_DOC_Text
     self.PRED_GEO_LOCATION = ImportFieldAnnotation.PRED_GEO_LOCATION
     self.PRED_DATE_EVENT = ImportFieldAnnotation.PRED_DATE_EVENT
     self.PRED_OBS_NUM = ImportFieldAnnotation.PRED_OBS_NUM
     self.PRED_METADATA = ImportFieldAnnotation.PRED_METADATA
     self.PRED_DRAFT_CONTAINS = ImportFieldAnnotation.PRED_DRAFT_CONTAINS
     self.PRED_COMPLEX_DES = ImportFieldAnnotation.PRED_COMPLEX_DES
     self.PRED_COMPLEX_LABEL = ImportFieldAnnotation.PRED_COMPLEX_LABEL
     self.nav = False
     self.has_media_field = False
     self.has_doc_field = False
     self.has_complex_des_field = False
コード例 #2
0
ファイル: templating.py プロジェクト: rdhyee/open-context-py
 def __init__(self, source_id):
     self.source_id = source_id
     pg = ProcessGeneral(source_id)
     pg.get_source()
     self.project_uuid = pg.project_uuid
     self.fields = []
     self.has_doc_field = False
     self.raw_field_annotations = []
     self.label = False
     self.has_subjects = False
     self.get_examples = False
     self.field_annotations = False
     self.PREDICATE_CONTAINS = Assertion.PREDICATES_CONTAINS
     self.PREDICATE_LINK = Assertion.PREDICATES_LINK
     self.PREDICATE_CONTAINED_IN = ImportFieldAnnotation.PRED_CONTAINED_IN
     self.PRED_DESCRIBES = ImportFieldAnnotation.PRED_DESCRIBES
     self.PRED_VALUE_OF = ImportFieldAnnotation.PRED_VALUE_OF
     self.PRED_MEDIA_PART_OF = ImportFieldAnnotation.PRED_MEDIA_PART_OF
     self.PRED_DOC_Text = ImportFieldAnnotation.PRED_DOC_Text
     self.PRED_GEO_LOCATION = ImportFieldAnnotation.PRED_GEO_LOCATION
     self.PRED_DATE_EVENT = ImportFieldAnnotation.PRED_DATE_EVENT
     self.PRED_OBS_NUM = ImportFieldAnnotation.PRED_OBS_NUM
     self.PRED_METADATA = ImportFieldAnnotation.PRED_METADATA
     self.PRED_DRAFT_CONTAINS = ImportFieldAnnotation.PRED_DRAFT_CONTAINS
     self.PRED_COMPLEX_DES = ImportFieldAnnotation.PRED_COMPLEX_DES
     self.PRED_COMPLEX_LABEL = ImportFieldAnnotation.PRED_COMPLEX_LABEL
     self.nav = False
     self.has_media_field = False
     self.has_doc_field = False
     self.has_complex_des_field = False
コード例 #3
0
 def __init__(self, source_id):
     self.source_id = source_id
     pg = ProcessGeneral(source_id)
     pg.get_source()
     self.project_uuid = pg.project_uuid
     self.types_fields = False
     self.start_field = False
     self.stop_field = False
     self.start_row = 1
     self.batch_size = 250
     self.end_row = self.batch_size
     self.example_size = 5
コード例 #4
0
 def __init__(self, source_id):
     self.source_id = source_id
     pg = ProcessGeneral(source_id)
     pg.get_source()
     self.project_uuid = pg.project_uuid
     self.complex_des_fields = []
     self.start_row = 1
     self.batch_size = settings.IMPORT_BATCH_SIZE
     self.end_row = self.batch_size
     self.count_active_fields = 0
     self.count_new_assertions = 0
     self.obs_num_complex_description_assertions = 1
コード例 #5
0
ファイル: types.py プロジェクト: ekansa/open-context-py
 def __init__(self, source_id):
     self.source_id = source_id
     pg = ProcessGeneral(source_id)
     pg.get_source()
     self.project_uuid = pg.project_uuid
     self.types_fields = False
     self.start_field = False
     self.stop_field = False
     self.start_row = 1
     self.batch_size = 250
     self.end_row = self.batch_size
     self.example_size = 5
コード例 #6
0
ファイル: links.py プロジェクト: portableant/open-context-py
 def __init__(self, source_id):
     self.source_id = source_id
     pg = ProcessGeneral(source_id)
     pg.get_source()
     self.project_uuid = pg.project_uuid
     self.start_row = 1
     self.batch_size = settings.IMPORT_BATCH_SIZE
     self.end_row = self.batch_size
     self.example_size = 5
     self.link_rels = False
     self.count_active_fields = 0
     self.count_new_assertions = 0
コード例 #7
0
 def __init__(self, source_id):
     self.source_id = source_id
     pg = ProcessGeneral(source_id)
     pg.get_source()
     self.project_uuid = pg.project_uuid
     self.complex_des_fields = []
     self.start_row = 1
     self.batch_size = settings.IMPORT_BATCH_SIZE
     self.end_row = self.batch_size
     self.count_active_fields = 0
     self.count_new_assertions = 0
     self.obs_num_complex_description_assertions = 1
コード例 #8
0
ファイル: links.py プロジェクト: ekansa/open-context-py
 def __init__(self, source_id):
     self.source_id = source_id
     pg = ProcessGeneral(source_id)
     pg.get_source()
     self.project_uuid = pg.project_uuid
     self.start_row = 1
     self.batch_size = settings.IMPORT_BATCH_SIZE
     self.end_row = self.batch_size
     self.example_size = 5
     self.link_rels = False
     self.count_active_fields = 0
     self.count_new_assertions = 0
コード例 #9
0
ファイル: persons.py プロジェクト: ekansa/open-context-py
 def __init__(self, source_id):
     self.source_id = source_id
     pg = ProcessGeneral(source_id)
     pg.get_source()
     self.project_uuid = pg.project_uuid
     self.persons_fields = []
     self.start_row = 1
     self.batch_size = settings.IMPORT_BATCH_SIZE
     self.end_row = self.batch_size
     self.count_active_fields = 0
     self.new_entities = []
     self.reconciled_entities = []
     self.not_reconciled_entities = []
コード例 #10
0
ファイル: media.py プロジェクト: portableant/open-context-py
 def __init__(self, source_id):
     self.source_id = source_id
     pg = ProcessGeneral(source_id)
     pg.get_source()
     self.project_uuid = pg.project_uuid
     self.media_fields = []
     self.start_row = 1
     self.batch_size = settings.IMPORT_BATCH_SIZE
     self.end_row = self.batch_size
     self.count_active_fields = 0
     self.new_entities = []
     self.reconciled_entities = []
     self.not_reconciled_entities = []
コード例 #11
0
 def __init__(self, source_id):
     self.source_id = source_id
     pg = ProcessGeneral(source_id)
     pg.get_source()
     self.project_uuid = pg.project_uuid
     self.description_annotations = False
     self.des_rels = False
     self.start_row = 1
     self.batch_size = settings.IMPORT_BATCH_SIZE
     self.end_row = self.batch_size
     self.example_size = 5
     self.reconciled_predicates = {}
     self.reconciled_types = {}
     self.field_valueofs = {}
     self.count_active_fields = 0
     self.count_new_assertions = 0
コード例 #12
0
ファイル: media.py プロジェクト: ekansa/open-context-py
 def __init__(self, source_id):
     self.source_id = source_id
     pg = ProcessGeneral(source_id)
     pg.get_source()
     self.project_uuid = pg.project_uuid
     # object for associated metadata to new manifest objects
     self.metadata_obj = ManifestMetadata(self.source_id,
                                          self.project_uuid)
     self.media_fields = []
     self.start_row = 1
     self.batch_size = settings.IMPORT_BATCH_SIZE
     self.end_row = self.batch_size
     self.count_active_fields = 0
     self.new_entities = []
     self.reconciled_entities = []
     self.not_reconciled_entities = []
コード例 #13
0
ファイル: documents.py プロジェクト: rdhyee/open-context-py
 def __init__(self, source_id):
     self.source_id = source_id
     pg = ProcessGeneral(source_id)
     pg.get_source()
     self.project_uuid = pg.project_uuid
     # object for associated metadata to new manifest objects
     self.metadata_obj = ManifestMetadata(self.source_id,
                                          self.project_uuid)
     self.documents_fields = []
     self.start_row = 1
     self.batch_size = settings.IMPORT_BATCH_SIZE
     self.end_row = self.batch_size
     self.count_active_fields = 0
     self.new_entities = []
     self.reconciled_entities = []
     self.not_reconciled_entities = []
コード例 #14
0
 def __init__(self, source_id):
     self.source_id = source_id
     pg = ProcessGeneral(source_id)
     pg.get_source()
     self.project_uuid = pg.project_uuid
     self.subjects_fields = False
     self.contain_ordered_subjects = {}
     self.non_contain_subjects = []
     self.root_subject_field = False  # field_num for the root subject field
     self.field_parent_entities = {}  # Parent entities named for a given field
     self.start_row = 1
     self.batch_size = settings.IMPORT_BATCH_SIZE
     self.end_row = self.batch_size
     self.example_size = 5
     self.count_active_fields = 0
     self.new_entities = []
     self.reconciled_entities = []
     self.not_reconciled_entities = []
コード例 #15
0
 def __init__(self, source_id):
     self.source_id = source_id
     pg = ProcessGeneral(source_id)
     pg.get_source()
     self.project_uuid = pg.project_uuid
     self.imp_source_obj = False
     self.row_count = False
     self.imp_status = False
     self.start_row = False
     self.batch_size = settings.IMPORT_BATCH_SIZE
     self.end_row = self.batch_size
     self.act_process_num = False
     self.next_process_num = False
     self.done = False
     self.error = False
     self.ok = True
     self.active_processes = self.DEFAULT_PROCESS_STAGES
     self.get_refine_source_meta()
     self.get_active_stage_row()
コード例 #16
0
 def __init__(self, source_id):
     self.source_id = source_id
     pg = ProcessGeneral(source_id)
     pg.get_source()
     self.project_uuid = pg.project_uuid
     self.imp_source_obj = False
     self.row_count = False
     self.imp_status = False
     self.start_row = False
     self.batch_size = settings.IMPORT_BATCH_SIZE
     self.end_row = self.batch_size
     self.act_process_num = False
     self.next_process_num = False
     self.done = False
     self.error = False
     self.ok = True
     self.active_processes = self.DEFAULT_PROCESS_STAGES
     self.get_refine_source_meta()
     self.get_active_stage_row()
コード例 #17
0
 def __init__(self, source_id):
     self.source_id = source_id
     pg = ProcessGeneral(source_id)
     pg.get_source()
     self.project_uuid = pg.project_uuid
     self.fields = []
     self.has_media_field = False
     self.raw_field_annotations = []
     self.label = False
     self.has_subjects = False
     self.get_examples = False
     self.field_annotations = False
     self.PREDICATE_CONTAINS = Assertion.PREDICATES_CONTAINS
     self.PREDICATE_LINK = Assertion.PREDICATES_LINK
     self.PREDICATE_CONTAINED_IN = ImportFieldAnnotation.PRED_CONTAINED_IN
     self.PRED_DESCRIBES = ImportFieldAnnotation.PRED_DESCRIBES
     self.PRED_VALUE_OF = ImportFieldAnnotation.PRED_VALUE_OF
     self.PRED_MEDIA_PART_OF = ImportFieldAnnotation.PRED_MEDIA_PART_OF
     self.nav = False
コード例 #18
0
 def __init__(self, source_id):
     self.source_id = source_id
     pg = ProcessGeneral(source_id)
     pg.get_source()
     self.project_uuid = pg.project_uuid
     self.subjects_fields = False
     self.geospace_fields = {}  # subject field num is key, dict has valid lat + lon fields
     self.date_fields = {}  # subject field num is key, dict has early late fields
     self.geojson_rels = {}  # subject field_num is key, integer value is geojson field_num
     self.contain_ordered_subjects = {}
     self.non_contain_subjects = []
     self.root_subject_field = False  # field_num for the root subject field
     self.field_parent_entities = {}  # Parent entities named for a given field
     self.start_row = 1
     self.batch_size = settings.IMPORT_BATCH_SIZE
     self.end_row = self.batch_size
     self.example_size = 5
     self.count_active_fields = 0
     self.new_entities = []
     self.reconciled_entities = []
     self.not_reconciled_entities = []