class Analysis(RelatedEntity): model_name = 'designsafe.project.hybrid_simulation.analysis' title = fields.CharField('Title', max_length=1024) description = fields.CharField('Description', max_length=1024, default='') refs = fields.ListField('References') project = fields.RelatedObjectField(HybridSimulationProject) hybrid_simulations = fields.RelatedObjectField(HybridSimulation) files = fields.RelatedObjectField(FileModel, multiple=True) file_tags = fields.ListField('File Tags', list_cls=DataTag)
class SimSubstructureTags(MetadataModel): _is_nested = True simulation_model = fields.ListField( 'Simulation Model', list_cls=DataTag ) connectivity_file = fields.ListField( 'Connectivity File', list_cls=DataTag )
class Planning(RelatedEntity): model_name = 'designsafe.project.field_recon.planning' title = fields.CharField('Title', max_length=1024) data_collectors = fields.ListField('Data Collectors') referenced_data = fields.ListField('Reference Data', list_cls=ReferencedData) description = fields.CharField('Description', max_length=1024, default='') project = fields.RelatedObjectField(FieldReconProject) missions = fields.RelatedObjectField(Mission) files = fields.RelatedObjectField(FileModel, multiple=True) file_tags = fields.ListField('File Tags', list_cls=DataTag)
class Analysis(RelatedEntity): model_name = 'designsafe.project.analysis' analysis_type = fields.CharField('Analysis Type', max_length=255, default='other') title = fields.CharField('Title', max_length=1024) refs = fields.ListField('References') description = fields.CharField('Description', max_length=1024, default='') analysis_data = fields.CharField('Analysis Data', max_length=1024, default='') application = fields.CharField('Analysis Data', max_length=1024, default='') script = fields.RelatedObjectField(FileModel, multiple=True) project = fields.RelatedObjectField(ExperimentalProject) experiments = fields.RelatedObjectField(Experiment) files = fields.RelatedObjectField(FileModel, multiple=True) file_tags = fields.ListField('File Tags', list_cls=DataTag)
class EventTagCentrifuge(MetadataModel): _is_nested = True centrifuge_speed = fields.ListField('Centrifuge Speed', list_cls=DataTag) slow_data = fields.ListField('Slow Data', list_cls=DataTag) fast_data = fields.ListField('Fast Data', list_cls=DataTag) t_bar_test = fields.ListField('T-Bar Test', list_cls=DataTag) bender_element_test = fields.ListField('Bender Element Test', list_cls=DataTag) actuator = fields.ListField('Actuator', list_cls=DataTag) cone_penetrometer = fields.ListField('Cone Penetrometer', list_cls=DataTag) shaking = fields.ListField('Shaking', list_cls=DataTag) raw = fields.ListField('Raw', list_cls=DataTag) calibrated = fields.ListField('Calibrated', list_cls=DataTag)
class Experiment(RelatedEntity): model_name = 'designsafe.project.experiment' experiment_type = fields.CharField('Experiment Type', max_length=255, default='other') experiment_type_other = fields.CharField('Experiment Type Other', max_length=255, default='') description = fields.CharField('Description', max_length=1024, default='') title = fields.CharField('Title', max_length=1024) experimental_facility = fields.CharField('Experimental Facility', max_length=1024) experimental_facility_other = fields.CharField('Experimental Facility Other', max_length=1024) equipment_type = fields.CharField('Equipment Type') equipment_type_other = fields.CharField('Equipment Type Other') procedure_start = fields.CharField('Procedure Start', max_length=1024, default='') procedure_end = fields.CharField('Procedure End', max_length=1024, default='') authors = fields.ListField('Authors') project = fields.RelatedObjectField(ExperimentalProject) dois = fields.ListField('Dois') def to_datacite_json(self): """Serialize object to datacite JSON.""" attributes = super(Experiment, self).to_datacite_json() attributes["subjects"] = attributes.get("subjects", []) + [ {"subject": self.experimental_facility.title(), } ] attributes["contributors"] = attributes.get("contributors", []) + [ { "contributorType": "HostingInstitution", "nameType": "Organizational", "name": self.experimental_facility, } ] attributes['types']['resourceType'] = "Experiment/{experiment_type}".format( experiment_type=self.experiment_type.title() ) return attributes def to_dataset_json(self): """Serialize object to dataset JSON.""" attributes = super(Experiment, self).to_dataset_json() attributes["subjects"] = attributes.get("subjects", []) + [ {"subject": self.experimental_facility.title(), } ] attributes["contributors"] = attributes.get("contributors", []) + [ { "contributorType": "HostingInstitution", "nameType": "Organizational", "name": self.experimental_facility, } ] attributes['types']['resourceType'] = "Experiment/{experiment_type}".format( experiment_type=self.experiment_type.title() ) return attributes
class ExpSubstructureTags(MetadataModel): _is_nested = True model_configuration = fields.ListField( 'Model Configuration', list_cls=DataTag ) sensor_information = fields.ListField( 'Sensor Information', list_cls=DataTag ) model_component = fields.ListField( 'Model Component', list_cls=DataTag )
class ExperimentalProject(Project): model_name = 'designsafe.project' team_members = fields.ListField('Team Members') co_pis = fields.ListField('Co PIs') project_type = fields.CharField('Project Type', max_length=255, default='other') project_id = fields.CharField('Project Id') description = fields.CharField('Description', max_length=1024, default='') title = fields.CharField('Title', max_length=255, default='') pi = fields.CharField('PI', max_length=255) award_number = fields.CharField('Award Number', max_length=255) associated_projects = fields.ListField('Associated Project') ef = fields.CharField('Experimental Facility', max_length=512) keywords = fields.CharField('Keywords')
class Report(RelatedEntity): model_name = 'designsafe.project.report' title = fields.CharField('Title', max_length=1024) description = fields.CharField('Description', max_length=1024, default='') project = fields.RelatedObjectField(ExperimentalProject) experiments = fields.RelatedObjectField(Experiment) files = fields.RelatedObjectField(FileModel, multiple=True) file_tags = fields.ListField('File Tags', list_cls=DataTag)
class Report(RelatedEntity): model_name = 'designsafe.project.field_recon.report' title = fields.CharField('Title', max_length=1024) authors = fields.ListField('Authors') referenced_data = fields.ListField('Reference Data', list_cls=ReferencedData) description = fields.CharField('Description', max_length=1024, default='') project = fields.RelatedObjectField(FieldReconProject) # missions = fields.RelatedObjectField(Mission) files = fields.RelatedObjectField(FileModel, multiple=True) file_tags = fields.ListField('File Tags', list_cls=DataTag) dois = fields.ListField('Dois') def to_datacite_json(self): """Serialize object to datacite JSON.""" attributes = super(Report, self).to_datacite_json() attributes['types']['resourceType'] = "Project/Report" return attributes
class Geoscience(RelatedEntity): model_name = 'designsafe.project.field_recon.geoscience' title = fields.CharField('Title', max_length=1024) observation_types = fields.ListField('Observation Type') date_start = fields.CharField('Date Start', max_length=1024, default='') date_end = fields.CharField('Date End', max_length=1024, default='') data_collectors = fields.ListField('Data Collectors') location = fields.CharField('Site Location', max_length=1024) latitude = fields.CharField('Location Latitude', max_length=1024) longitude = fields.CharField('Location Longitude', max_length=1024) equipment = fields.ListField('Equipment', list_cls=Equipment) referenced_data = fields.ListField('Reference Data', list_cls=ReferencedData) description = fields.CharField('Description', max_length=1024, default='') project = fields.RelatedObjectField(FieldReconProject) missions = fields.RelatedObjectField(Mission) files = fields.RelatedObjectField(FileModel, multiple=True) file_tags = fields.ListField('File Tags', list_cls=DataTag)
class Simulation(RelatedEntity): model_name = 'designsafe.project.simulation' title = fields.CharField('Title', max_length=1024) simulation_type = fields.CharField('Simulation Type', max_length=1024) simulation_type_other = fields.CharField('Simulation Type Other', max_length=1024) description = fields.CharField('Description', max_length=1024, default='') authors = fields.ListField('Authors') project = fields.RelatedObjectField(SimulationProject)
class Input(RelatedEntity): model_name = 'designsafe.project.simulation.input' title = fields.CharField('Title', max_length=512) description = fields.CharField('Description', max_length=1024, default='') project = fields.RelatedObjectField(SimulationProject) simulations = fields.RelatedObjectField(Simulation) model_configs = fields.RelatedObjectField(Model) files = fields.RelatedObjectField(FileModel, multiple=True) file_tags = fields.ListField('File Tags', list_cls=DataTag)
class CoordinatorTags(MetadataModel): _is_nested = True load = fields.ListField( 'Load', list_cls=DataTag ) simulation_model = fields.ListField( 'Simulation Model', list_cls=DataTag ) simulation_script = fields.ListField( 'Simulation Script', list_cls=DataTag ) simulation_input = fields.ListField( 'Simulation Input', list_cls=DataTag )
class SensorListTagCentrifuge(MetadataModel): _is_nested = True strain_gauge = fields.ListField('Strain Gauge', list_cls=DataTag) bender_element = fields.ListField('Bender Element', list_cls=DataTag) load_cell = fields.ListField('Load Cell', list_cls=DataTag) lineal_potentiometer = fields.ListField('Lineal Potentiometer', list_cls=DataTag) tactile_pressure = fields.ListField('Tactile Pressure', list_cls=DataTag) pore_pressure_transducer = fields.ListField('Pore Pressure Transducer', list_cls=DataTag) linear_variable_differential_transformer = fields.ListField( 'Linear Variable Differential Transformer', list_cls=DataTag) accelerometer = fields.ListField('Accelerometer', list_cls=DataTag) sensor_calibration = fields.ListField('Sensor Calibration', list_cls=DataTag)
class SensorListTagWave(MetadataModel): _is_nested = True wave_gauge_calibration = fields.ListField('Wave Gauge Calibration', list_cls=DataTag) synchronization = fields.ListField('Synchronization', list_cls=DataTag) sample_synchronization = fields.ListField('Sample Synchronization', list_cls=DataTag) project_instrumentation_locations = fields.ListField( 'Project Instrumentation Locations', list_cls=DataTag) self_calibrating = fields.ListField('Self Calibrating', list_cls=DataTag) instrument_survey = fields.ListField('Instrument Survey', list_cls=DataTag) absolute_timing = fields.ListField('Absolute Timing', list_cls=DataTag) wiring_details = fields.ListField('Wiring Details', list_cls=DataTag) calibration_summary = fields.ListField('Calibration Summary', list_cls=DataTag)
class ExpOutput(RelatedEntity): model_name = 'designsafe.project.hybrid_simulation.exp_output' title = fields.CharField('Title', max_length=512) description = fields.CharField('Description', max_length=1024, default='') project = fields.RelatedObjectField(HybridSimulationProject) hybrid_simulations = fields.RelatedObjectField(HybridSimulation) global_models = fields.RelatedObjectField(GlobalModel) exp_substructures = fields.RelatedObjectField(ExpSubstructure) files = fields.RelatedObjectField(FileModel, multiple=True) file_tags = fields.ListField('File Tags', list_cls=DataTag)
class SensorList(RelatedEntity): model_name = 'designsafe.project.sensor_list' sensor_list_type = fields.CharField('Sensor List Type', max_length=255, default='other') title = fields.CharField('Title', max_length=1024) description = fields.CharField('Description', max_length=1024, default='') project = fields.RelatedObjectField(ExperimentalProject) experiments = fields.RelatedObjectField(Experiment) model_configs = fields.RelatedObjectField(ModelConfig) files = fields.RelatedObjectField(FileModel, multiple=True) file_tags = fields.ListField('File Tags', list_cls=DataTag)
class Mission(RelatedEntity): model_name = 'designsafe.project.field_recon.mission' title = fields.CharField('Title', max_length=1024) date_start = fields.CharField('Date Start', max_length=1024, default='') date_end = fields.CharField('Date End', max_length=1024, default='') location = fields.CharField('Site Location', max_length=1024) latitude = fields.CharField('Location Latitude', max_length=1024) longitude = fields.CharField('Location Longitude', max_length=1024) elevation = fields.CharField('Location Elevation', max_length=1024) authors = fields.ListField('Authors') description = fields.CharField('Description', max_length=1024, default='') project = fields.RelatedObjectField(FieldReconProject) dois = fields.ListField('Dois') def to_datacite_json(self): """Serialize object to datacite JSON.""" attributes = super(Mission, self).to_datacite_json() attributes['types']['resourceType'] = "Mission/{location}".format( location=self.location.title()) return attributes
class AnalysisTagGeneral(MetadataModel): _is_nested = True analysis_data_graph = fields.ListField('Analysis Data Graph', list_cls=DataTag) analysis_data_visualization = fields.ListField( 'Analysis Data Visualization', list_cls=DataTag) analysis_data_table = fields.ListField('Analysis Data Table', list_cls=DataTag) application = fields.ListField('Application', list_cls=DataTag) application_matlab = fields.ListField('Application MATLAB', list_cls=DataTag) application_r = fields.ListField('Application R', list_cls=DataTag) application_jupiter_notebook = fields.ListField('Application Notebook', list_cls=DataTag) application_other = fields.ListField('Application Other', list_cls=DataTag) application_script = fields.ListField('Application Script', list_cls=DataTag)
class Coordinator(RelatedEntity): model_name = 'designsafe.project.hybrid_simulation.coordinator' title = fields.CharField('Title', max_length=512) project = fields.RelatedObjectField(HybridSimulationProject) description = fields.CharField('Description', max_length=1024, default='') application_version = fields.CharField('Application & Version', max_length=1024, default='') hybrid_simulations = fields.RelatedObjectField(HybridSimulation) global_models = fields.RelatedObjectField(GlobalModel) files = fields.RelatedObjectField(FileModel, multiple=True) file_tags = fields.ListField('File Tags', list_cls=DataTag)
class Mission(RelatedEntity): model_name = 'designsafe.project.field_recon.mission' title = fields.CharField('Title', max_length=1024) date_start = fields.CharField('Date Start', max_length=1024, default='') date_end = fields.CharField('Date End', max_length=1024, default='') location = fields.CharField('Site Location', max_length=1024) latitude = fields.CharField('Location Latitude', max_length=1024) longitude = fields.CharField('Location Longitude', max_length=1024) elevation = fields.CharField('Location Elevation', max_length=1024) authors = fields.ListField('Authors') description = fields.CharField('Description', max_length=1024, default='') project = fields.RelatedObjectField(FieldReconProject)
class FieldReconProject(Project): model_name = 'designsafe.project' team_members = fields.ListField('Team Members') co_pis = fields.ListField('Co PIs') guest_members = fields.ListField('Guest Members') project_type = fields.CharField('Project Type', max_length=255, default='other') project_id = fields.CharField('Project Id') description = fields.CharField('Description', max_length=1024, default='') title = fields.CharField('Title', max_length=255, default='') pi = fields.CharField('PI', max_length=255) award_number = fields.ListField('Award Number') associated_projects = fields.ListField('Associated Project') keywords = fields.CharField('Keywords') associated_projects = fields.ListField('Associated Project') nh_event = fields.CharField('Natural Hazard Event') nh_event_start = fields.CharField('Date Start', max_length=1024, default='') nh_event_end = fields.CharField('Date End', max_length=1024, default='') nh_type = fields.CharField('Natural Hazard Type', max_length=1024, default='') nh_type_other = fields.CharField('Natural Hazard Type', max_length=1024, default='')
class GlobalModelTags(MetadataModel): _is_nested = True assembly_document = fields.ListField( 'Assembly Document', list_cls=DataTag ) drawings = fields.ListField( 'Drawings', list_cls=DataTag ) photos = fields.ListField( 'Photos', list_cls=DataTag ) model_configuration = fields.ListField( 'Model Configuration', list_cls=DataTag ) model_component = fields.ListField( 'Model Component', list_cls=DataTag )
class HybridSimulation(RelatedEntity): model_name = 'designsafe.project.hybrid_simulation' title = fields.CharField('Title', max_length=1024) simulation_type = fields.CharField('Simulation Type', max_length=1024) simulation_type_other = fields.CharField('Simulation Type Other', max_length=1024) description = fields.CharField('Description', max_length=1024, default='') authors = fields.ListField('Authors') project = fields.RelatedObjectField(HybridSimulationProject) dois = fields.ListField('Dois') def to_datacite_json(self): """Serialize object to datacite JSON.""" attributes = super(HybridSimulation, self).to_datacite_json() if self.simulation_type_other: attributes['types'][ 'resourceType'] = "Simulation/{simulation_type}".format( simulation_type=self.simulation_type_other.title()) else: attributes['types'][ 'resourceType'] = "Simulation/{simulation_type}".format( simulation_type=self.simulation_type.title()) return attributes
class EventTagWave(MetadataModel): _is_nested = True bathymetric_survey_data = fields.ListField('Bathymetric Survey Data', list_cls=DataTag) instrumet_calibration_data = fields.ListField( 'Instrument Calibration Data', list_cls=DataTag) experimental_conditions = fields.ListField('Experimental Conditions', list_cls=DataTag) raw = fields.ListField('Raw', list_cls=DataTag) physical_units = fields.ListField('Physical Units', list_cls=DataTag) channel_name = fields.ListField('Channel Name', list_cls=DataTag) matlab_toolbox_source_code = fields.ListField('Matlab Toolbox Source Code', list_cls=DataTag)
class HybridSimulationProject(Project): model_name = 'designsafe.project' team_members = fields.ListField('Team Members') co_pis = fields.ListField('Co PIs') guest_members = fields.ListField('Guest Members') project_type = fields.CharField('Project Type', max_length=255, default='hybrid simulation') project_id = fields.CharField('Project Id') description = fields.CharField('Description', max_length=1024, default='') title = fields.CharField('Title', max_length=255, default='') pi = fields.CharField('PI', max_length=255) award_number = fields.ListField('Award Number') award_numbers = fields.ListField('Award Numbers') associated_projects = fields.ListField('Associated Project') ef = fields.CharField('Experimental Facility', max_length=512, default='') keywords = fields.CharField('Keywords', default='') nh_types = fields.ListField('Natural Hazard Type') dois = fields.ListField('Dois') hazmapper_maps = fields.ListField('Hazmapper Maps')
class SensorListTagShakeTable(MetadataModel): _is_nested = True accelerometer = fields.ListField('Accelerometer', list_cls=DataTag) linear_potentiometer = fields.ListField('Linear Potentiometer', list_cls=DataTag) displacement_sensor = fields.ListField('Displacement Sensor', list_cls=DataTag) load_cell = fields.ListField('Load Cell', list_cls=DataTag) soil_sensor = fields.ListField('Soil Sensor', list_cls=DataTag) strain_gauge = fields.ListField('Strain Gauge', list_cls=DataTag)
class Model(RelatedEntity): model_name = 'designsafe.project.simulation.model' title = fields.CharField('Title', max_length=512) application_version = fields.CharField('Application & Version', default='') application_version_other = fields.CharField('Application & Version Other', default='') application_version_desc = fields.CharField( 'Application & Version Description', default='') nh_type = fields.CharField('Natural Hazard Type', default='') nh_type_other = fields.CharField('Natural Hazard Type Other', default='') simulated_system = fields.CharField('Simulated System', default='') description = fields.CharField('Description', max_length=1024, default='') project = fields.RelatedObjectField(SimulationProject) simulations = fields.RelatedObjectField(Simulation) files = fields.RelatedObjectField(FileModel, multiple=True) file_tags = fields.ListField('File Tags', list_cls=DataTag)
class ModelConfigTagWave(MetadataModel): _is_nested = True large_wave_flume = fields.ListField('Large Wave Flume', list_cls=DataTag) directional_wave_basin = fields.ListField('Directional Wave Basin', list_cls=DataTag) wavemaker_input_file = fields.ListField('Wavemaker Input File', list_cls=DataTag) board_siplacement = fields.ListField('Board Siplacement', list_cls=DataTag) free_surface_height = fields.ListField('Free Surface Height', list_cls=DataTag) hydrodynamic_conditions = fields.ListField('Hydrodynamic Conditions', list_cls=DataTag)