Exemplo n.º 1
0
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)
Exemplo n.º 2
0
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)
Exemplo n.º 3
0
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)
Exemplo n.º 4
0
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)
Exemplo n.º 5
0
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)
Exemplo n.º 6
0
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)
Exemplo n.º 7
0
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)
Exemplo n.º 8
0
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)
Exemplo n.º 9
0
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)
Exemplo n.º 10
0
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)
Exemplo n.º 11
0
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)
Exemplo n.º 12
0
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)
Exemplo n.º 13
0
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)
Exemplo n.º 14
0
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)
Exemplo n.º 15
0
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)
Exemplo n.º 16
0
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)
Exemplo n.º 17
0
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)
Exemplo n.º 18
0
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
Exemplo n.º 19
0
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)
Exemplo n.º 20
0
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)
Exemplo n.º 21
0
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
Exemplo n.º 22
0
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)
Exemplo n.º 23
0
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)
Exemplo n.º 24
0
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)
Exemplo n.º 25
0
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)
Exemplo n.º 26
0
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')
Exemplo n.º 27
0
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
Exemplo n.º 28
0
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)
Exemplo n.º 29
0
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
Exemplo n.º 30
0
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)