class Report(RelatedEntity): model_name = 'designsafe.project.hybrid_simulation.report' title = fields.CharField('Title', max_length=1024) description = fields.CharField('Description', max_length=1024, default='') project = fields.RelatedObjectField(HybridSimulationProject) hybrid_simulations = fields.RelatedObjectField(HybridSimulation) files = fields.RelatedObjectField(FileModel, multiple=True)
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)
class GlobalModel(RelatedEntity): model_name = 'designsafe.project.hybrid_simulation.global_model' title = fields.CharField('Title', max_length=1024) description = fields.CharField('Description', max_length=1024, default='') 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 Analysis(RelatedEntity): model_name = 'designsafe.project.simulation.analysis' title = fields.CharField('Title', max_length=1024) description = fields.CharField('Description', max_length=1024, default='') project = fields.RelatedObjectField(SimulationProject) simulations = fields.RelatedObjectField(Simulation) sim_outputs = fields.RelatedObjectField(Output) files = fields.RelatedObjectField(FileModel, multiple=True)
class ModelConfig(RelatedEntity): model_name = 'designsafe.project.model_config' title = fields.CharField('Title', max_length=512) 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 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)
class CoordinatorOutput(RelatedEntity): model_name = 'designsafe.project.hybrid_simulation.coordinator_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) coordinators = fields.RelatedObjectField(Coordinator) files = fields.RelatedObjectField(FileModel, multiple=True)
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='') reference = fields.CharField('Reference Data', max_length=1024) referencedoi = fields.CharField('Reference DOI', max_length=1024) project = fields.RelatedObjectField(HybridSimulationProject) hybrid_simulations = fields.RelatedObjectField(HybridSimulation) files = fields.RelatedObjectField(FileModel, multiple=True)
class Report(RelatedEntity): model_name = 'designsafe.project.simulation.report' title = fields.CharField('Title', max_length=1024) description = fields.CharField('Description', max_length=1024, default='') project = fields.RelatedObjectField(SimulationProject) simulations = fields.RelatedObjectField(Simulation) sim_outputs = fields.RelatedObjectField(Output) files = fields.RelatedObjectField(FileModel, multiple=True) file_tags = fields.ListField('File Tags', 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)
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 ExpSubstructure(RelatedEntity): model_name = 'designsafe.project.hybrid_simulation.exp_substructure' 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) coordinators = fields.RelatedObjectField(Coordinator) files = fields.RelatedObjectField(FileModel, multiple=True) tags = fields.NestedObjectField(ExpSubstructureGeneralTags)
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 SimOutput(RelatedEntity): model_name = 'designsafe.project.hybrid_simulation.sim_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) sim_substructures = fields.RelatedObjectField(SimSubstructure) files = fields.RelatedObjectField(FileModel, multiple=True) file_tags = fields.ListField('File Tags', 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 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 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 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 Event(RelatedEntity): model_name = 'designsafe.project.event' event_type = fields.CharField('Event Type', max_length=255, default='other') title = fields.CharField('Title', max_length=1024) description = fields.CharField('Description', max_length=1024, default='') #load = fields.RelatedObjectField(FileModel, multiple=True) tags = fields.NestedObjectField(SensorListTag) analysis = fields.RelatedObjectField(Analysis) project = fields.RelatedObjectField(ExperimentalProject) experiments = fields.RelatedObjectField(Experiment) model_configs = fields.RelatedObjectField(ModelConfig) sensor_lists = fields.RelatedObjectField(SensorList) files = fields.RelatedObjectField(FileModel, multiple=True)
class ModelConfig(RelatedEntity): model_name = 'designsafe.project.model_config' title = fields.CharField('Title', max_length=512) description = fields.CharField('Description', max_length=1024, default='') #spatial = fields.CharField('Spatial', max_length=1024) #lat = fields.CharField('Lat', max_length=1024) #lon = fields.CharField('Lon', max_length=1024) #model_drawing = fields.RelatedObjectField(FileModel, multiple=True) #image = fields.NestedObjectField(DataTag) #video = fields.NestedObjectField(DataTag) tags = fields.NestedObjectField(ModelConfigTag) project = fields.RelatedObjectField(ExperimentalProject) experiments = fields.RelatedObjectField(Experiment) #events = fields.RelatedObjectField(Event) files = fields.RelatedObjectField(FileModel, multiple=True)
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 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 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) 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) tags = fields.NestedObjectField(AnalysisTag) project = fields.RelatedObjectField(ExperimentalProject) experiments = fields.RelatedObjectField(Experiment) #events = fields.RelatedObjectField(Event) files = fields.RelatedObjectField(FileModel, multiple=True)
class SocialScience(RelatedEntity): model_name = 'designsafe.project.field_recon.social_science' title = fields.CharField('Title', max_length=1024) unit = fields.CharField('Unit of Analysis', max_length=1024) modes = fields.ListField('Modes of Collection') sample_approach = fields.ListField('Sampling Approaches') sample_size = fields.CharField('Sampling Size', max_length=1024) 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) restriction = fields.CharField('Restriction', max_length=1024) 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 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)
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 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 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)
class Mission(RelatedEntity): model_name = 'designsafe.project.field_recon.mission' title = fields.CharField('Title', max_length=1024) event = fields.CharField('Event', max_length=1024, default='') 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 Collection(RelatedEntity): model_name = 'designsafe.project.field_recon.collection' 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') guest_data_collectors = fields.ListField('Guest 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) elevation = fields.CharField('Location Elevation', max_length=1024) instruments = fields.ListField('Instrument', list_cls=Instrument) referenced_datas = 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)