}]
    }],
    "word_vectors": [{
        "id": "Vector Model ID",
        "description": "Vector Model Description",
        "date": "2020-12-31",
        "vector": {}
    }],
    "series_groups": [  # Series included in groups
        {
            "name": "series_group name",
            "version": "series_group version",
            "uri": "http://example.org/series_groups/uri"
        }
    ]
}
additional = {}  # Any other custom metadata not covered by the schema

response = create_and_import.create_timeseries_dataset(
    dataset_id=dataset_id,
    repository_id=repository_id,
    access_policy=access_policy,
    published=published,
    overwrite=overwrite,
    metadata_creation=metadata_creation,
    series_description=series_description,
    additional=additional)

# upload temporary thumbnail
thumbnail_path = nada.text_to_thumbnail("Timeseries\nDataset")
nada.upload_thumbnail(dataset_id, thumbnail_path)
			"uri": "album uri"
		}
	],
	"tags": [
		{
			"tag": "tag"
		}
	],
	"files": [
		{
			"file_uri": "http://example.org/image_description/files/file.uri",  # File name or URL
			"format": "file format",  # The file format, physical medium, or dimensions of the resource.
			"note": "file note",
			"show": True  # Show the image file on the page
		}
	]
}

response = nada.create_image_dataset(
	dataset_id=dataset_id,
	repository_id=repository_id,
	published=published,
	overwrite=overwrite,
	metadata_information=metadata_information,
	image_description=image_description
)


# upload temporary thumbnail
thumbnail_path = nada.text_to_thumbnail("Image\nDataset")
nada.upload_thumbnail(dataset_id, thumbnail_path)
			"""),
    }],
    "relations": [{
        "name": "Related document name",
        "type":
        "isPartOf"  # "isPartOf""hasPart""isVersionOf""isFormatOf""hasFormat""references""isReferencedBy""isBasedOn""isBasisFor""requires""isRequiredBy"
    }]
}
files = [{
    "file_uri": "http://example.org/files/file.uri",  # File name or URL
    "format":
    "file format",  # The file format, physical medium, or dimensions of the resource.
    "location": "file location",
    "note": "file note"
}]
tags = [{"tag": "tag"}]
additional = {"additional": "additional info"}

response = nada.create_table_dataset(dataset_id=dataset_id,
                                     repository_id=repository_id,
                                     published=published,
                                     overwrite=overwrite,
                                     metadata_information=metadata_information,
                                     table_description=table_description,
                                     files=files,
                                     tags=tags,
                                     additional=additional)

# upload temporary thumbnail
thumbnail_path = nada.text_to_thumbnail("Table\nDataset")
nada.upload_thumbnail(dataset_id, thumbnail_path)
        }
    ],
    "copyright": "copyright",
    "disclaimer": inspect.cleandoc("""\
						
		Proin aliquam eleifend urna, ut rhoncus neque semper in. Integer a viverra tellus, quis tincidunt sem. 
		
	"""),
    "confidentiality": inspect.cleandoc("""\
						
		Praesent auctor neque vel neque tristique facilisis vel non purus.
		
	"""),
    "citation_requirement": inspect.cleandoc("""\
						
		Mauris semper nibh eu erat elementum congue nec quis ligula. In in imperdiet lorem, et consectetur erat. Nam elit odio, ultrices eu tempus at, fringilla at tortor. Integer id rutrum est, sed ornare metus. 
		Praesent sollicitudin vitae est vel tristique.
		
	"""),  # Citation requirement (can include a specific recommended citation)
}

response = nada.create_script_dataset(dataset_id=dataset_id,
                                      repository_id=repository_id,
                                      published=published,
                                      overwrite=overwrite,
                                      doc_desc=doc_desc,
                                      project_desc=project_desc)

# upload temporary thumbnail
thumbnail_path = nada.text_to_thumbnail("Script\nDataset")
nada.upload_thumbnail(dataset_id, thumbnail_path)
        }],
        "word_vectors": [{
            "id": "word_vectors id",
            "description": "word_vectors description",
            "date": "2020-12-31",
            "vector": {}
        }]
    }]
}
tags = [{"tag": "tag"}]
files = [{
    "file_uri": "http://example.org/files/file.uri",  # File name or URL
    "format":
    "application/excel",  # The file format, physical medium, or dimensions of the resource.
    "location": "100",  # Page number or sheet name for the table
    "note": "file note text"  # file note
}]

response = nada.create_document_dataset(
    dataset_id=dataset_id,
    repository_id=repository_id,
    published=published,
    overwrite=overwrite,
    metadata_information=metadata_information,
    document_description=document_description,
    tags=tags,
    files=files)

# upload temporary thumbnail
thumbnail_path = nada.text_to_thumbnail("Document\nDataset")
nada.upload_thumbnail(dataset_id, thumbnail_path)
Esempio n. 6
0
        "name": "Related document name",
        "type":
        "isPartOf"  # Valid values: "isPartOf" "hasPart" "isVersionOf" "isFormatOf" "hasFormat" "references" "isReferencedBy" "isBasedOn" "isBasisFor" "requires" "isRequiredBy"
    }],
    "tags": [{
        "tag": "tag"
    }]
}
files = [{
    "file_uri":
    "http://example.org/files/file.uri",  # Provide file name, path or URL
    "format":
    "file format",  # The file format, physical medium, or dimensions of the resource.
    "location": "file location",
    "note": "file note"
}]
additional = {"additional": "additional info"}

response = nada.create_visualization_dataset(
    dataset_id=dataset_id,
    repository_id=repository_id,
    published=published,
    overwrite=overwrite,
    metadata_information=metadata_information,
    visualization_description=visualization_description,
    files=files,
    additional=additional)

# upload temporary thumbnail
thumbnail_path = nada.text_to_thumbnail("Visualization\nDataset")
nada.upload_thumbnail(dataset_id, thumbnail_path)
Esempio n. 7
0
	"data_quality_info": {
		"Scope": "dataset",  # Scope code - dataset, series, collectionSession, etc.
		"lineage": "data_quality_info lineage statement"  # Data quality lineage statement
	},
	"spatial_representation_info": {  # Resource spatial representation - Spatial representation information for the dataset (resource). Best practice is to include metadata for spatial representation if the described resource is a georeferenced dataset.
		"topology_level": "geometryOnly",  # Topology Level Code: {geometryOnly, topology1D, planarGraph, fullPlanarGraph, surfaceGraph, fullSurfaceGraph, topology3D, fullTopology3D, abstract}
		"Geometric_object_code": "complex"  # Geometric Object Type Code codes ={complex, composite, curve, point, solid, surface}
	},
	"reference_system_info": {  # Resource’s spatial reference system - Description of the spatial and/or temporal reference systems used in the dataset.
		"code": "EPSG:5701",  # reference_system Identifier Code
		"code_space": "urn:ogc:def:crs"  # spatial reference system code_space
	}
}
additional = {
	"additional": "additional info"
}

response = nada.create_geospatial_dataset(
	dataset_id=dataset_id,
	repository_id=repository_id,
	published=published,
	overwrite=overwrite,
	metadata_maintenance=metadata_maintenance,
	dataset_description=dataset_description,
	additional=additional
)


# upload temporary thumbnail
thumbnail_path = nada.text_to_thumbnail("Geospatial\nDataset")
nada.upload_thumbnail(dataset_id, thumbnail_path)
Esempio n. 8
0
nada.set_api_url('http://training.ihsn.org/index.php/api/')
api_key = 'cf16a23a3cfc6a928f63dd3c8daf8796'
nada.set_api_key(api_key)

######################################
# create_survey_dataset_from_DDI example
######################################

file = "SURVEY_DATASET_SAMPLE_02.xml"
overwrite = "yes"
repository_id = "central"
access_policy = "open"
published = 1

response = nada.create_survey_dataset_from_DDI(
    file=file,
    overwrite=overwrite,
    repository_id=repository_id,
    access_policy=access_policy,
    # data_remote_url=data_remote_url,
    # rdf=rdf,
    # published=published
)

print(response)

# upload temporary thumbnail
dataset_id = response['survey']['idno']
thumbnail_path = nada.text_to_thumbnail("Survey\nDataset")
nada.upload_thumbnail(dataset_id, thumbnail_path)