From b8fc1f87d4728dc1e1303754308efb8772d29424 Mon Sep 17 00:00:00 2001
From: German Saracca
Date: Wed, 20 Mar 2024 17:08:36 -0300
Subject: [PATCH 01/20] feat(DynamicFormFieldsRender): Initial setup with
mocked data
---
.../domain/models/MetadataBlockInfo.ts | 60 +
.../MetadataBlockInfoRepository.ts | 3 +-
.../getMetadataBlockInfoByCollectionId.ts | 14 +
.../MetadataBlockInfoJSDataverseRepository.ts | 11 +-
.../create-dataset/CreateDatasetFactory.tsx | 9 +-
.../create-dataset/CreateDatasetForm.tsx | 11 +-
...etadataBlocksInfoByCollectionIdResponse.ts | 3860 +++++++++++++++++
.../useDefineDatasetMetadataFormFields.tsx | 56 +
8 files changed, 4020 insertions(+), 4 deletions(-)
create mode 100644 src/metadata-block-info/domain/useCases/getMetadataBlockInfoByCollectionId.ts
create mode 100644 src/sections/create-dataset/mocks/metadataBlocksInfoByCollectionIdResponse.ts
create mode 100644 src/sections/create-dataset/useDefineDatasetMetadataFormFields.tsx
diff --git a/src/metadata-block-info/domain/models/MetadataBlockInfo.ts b/src/metadata-block-info/domain/models/MetadataBlockInfo.ts
index 7fa9e53a3..80229a9aa 100644
--- a/src/metadata-block-info/domain/models/MetadataBlockInfo.ts
+++ b/src/metadata-block-info/domain/models/MetadataBlockInfo.ts
@@ -11,3 +11,63 @@ export interface MetadataFieldInfo {
export const METADATA_FIELD_DISPLAY_FORMAT_PLACEHOLDER = '#VALUE'
export const METADATA_FIELD_DISPLAY_FORMAT_NAME_PLACEHOLDER = '#NAME'
+
+// 👇👇 New types for #336
+
+export interface MetadataBlockInfo2 {
+ id: number
+ name: string
+ displayName: string
+ metadataFields: Record
+ displayOnCreate?: boolean // If true, the block will be displayed on the create dataset form
+}
+
+export interface MetadataField2 {
+ name: string
+ displayName: string
+ title: string
+ type: TypeMetadataField
+ typeClass: TypeClassMetadataField
+ watermark: WatermarkMetadataField
+ description: string
+ multiple: boolean
+ isControlledVocabulary: boolean
+ displayFormat: string
+ isRequired: boolean
+ displayOrder: number
+ controlledVocabularyValues?: string[]
+ childMetadataFields?: Record
+ displayOnCreate?: boolean // If true, the field will be displayed on the create metadata block
+}
+
+export enum TypeMetadataField {
+ Date = 'DATE',
+ Email = 'EMAIL',
+ Float = 'FLOAT',
+ Int = 'INT',
+ None = 'NONE',
+ Text = 'TEXT',
+ Textbox = 'TEXTBOX',
+ URL = 'URL'
+}
+
+export enum TypeClassMetadataField {
+ Compound = 'compound',
+ ControlledVocabulary = 'controlledVocabulary',
+ Primitive = 'primitive'
+}
+
+export enum WatermarkMetadataField {
+ Empty = '',
+ EnterAFloatingPointNumber = 'Enter a floating-point number.',
+ EnterAnInteger = 'Enter an integer.',
+ FamilyNameGivenNameOrOrganization = 'FamilyName, GivenName or Organization',
+ HTTPS = 'https://',
+ NameEmailXyz = 'name@email.xyz',
+ OrganizationXYZ = 'Organization XYZ',
+ The1FamilyNameGivenNameOr2Organization = '1) FamilyName, GivenName or 2) Organization',
+ The1FamilyNameGivenNameOr2OrganizationXYZ = '1) Family Name, Given Name or 2) Organization XYZ',
+ WatermarkEnterAnInteger = 'Enter an integer...',
+ YYYYOrYYYYMMOrYYYYMMDD = 'YYYY or YYYY-MM or YYYY-MM-DD',
+ YyyyMmDD = 'YYYY-MM-DD'
+}
diff --git a/src/metadata-block-info/domain/repositories/MetadataBlockInfoRepository.ts b/src/metadata-block-info/domain/repositories/MetadataBlockInfoRepository.ts
index 51cb5579f..f90b0dfea 100644
--- a/src/metadata-block-info/domain/repositories/MetadataBlockInfoRepository.ts
+++ b/src/metadata-block-info/domain/repositories/MetadataBlockInfoRepository.ts
@@ -1,5 +1,6 @@
-import { MetadataBlockInfo } from '../models/MetadataBlockInfo'
+import { MetadataBlockInfo, MetadataBlockInfo2 } from '../models/MetadataBlockInfo'
export interface MetadataBlockInfoRepository {
getByName: (name: string) => Promise
+ getByColecctionId: (collectionId: string, create: boolean) => Promise
}
diff --git a/src/metadata-block-info/domain/useCases/getMetadataBlockInfoByCollectionId.ts b/src/metadata-block-info/domain/useCases/getMetadataBlockInfoByCollectionId.ts
new file mode 100644
index 000000000..0a9c049d4
--- /dev/null
+++ b/src/metadata-block-info/domain/useCases/getMetadataBlockInfoByCollectionId.ts
@@ -0,0 +1,14 @@
+import { MetadataBlockInfo2 } from '../models/MetadataBlockInfo'
+import { MetadataBlockInfoRepository } from '../repositories/MetadataBlockInfoRepository'
+
+export async function getMetadataBlockInfoByCollectionId(
+ metadataBlockInfoRepository: MetadataBlockInfoRepository,
+ collectionId: string,
+ create: boolean
+): Promise {
+ return metadataBlockInfoRepository
+ .getByColecctionId(collectionId, create)
+ .catch((error: Error) => {
+ throw new Error(error.message)
+ })
+}
diff --git a/src/metadata-block-info/infrastructure/repositories/MetadataBlockInfoJSDataverseRepository.ts b/src/metadata-block-info/infrastructure/repositories/MetadataBlockInfoJSDataverseRepository.ts
index 2071898c9..9b8327af1 100644
--- a/src/metadata-block-info/infrastructure/repositories/MetadataBlockInfoJSDataverseRepository.ts
+++ b/src/metadata-block-info/infrastructure/repositories/MetadataBlockInfoJSDataverseRepository.ts
@@ -1,11 +1,12 @@
import { MetadataBlockInfoRepository } from '../../domain/repositories/MetadataBlockInfoRepository'
-import { MetadataBlockInfo } from '../../domain/models/MetadataBlockInfo'
+import { MetadataBlockInfo, MetadataBlockInfo2 } from '../../domain/models/MetadataBlockInfo'
import {
getMetadataBlockByName,
MetadataBlock as JSMetadataBlockInfo,
ReadError
} from '@iqss/dataverse-client-javascript'
import { JSMetadataBlockInfoMapper } from '../mappers/JSMetadataBlockInfoMapper'
+import { metadataBlocksInfoByCollectionIdResponse } from '../../../sections/create-dataset/mocks/metadataBlocksInfoByCollectionIdResponse'
export class MetadataBlockInfoJSDataverseRepository implements MetadataBlockInfoRepository {
getByName(name: string): Promise {
@@ -18,4 +19,12 @@ export class MetadataBlockInfoJSDataverseRepository implements MetadataBlockInfo
throw new Error(error.message)
})
}
+
+ getByColecctionId(_collectionId: string, _create: boolean): Promise {
+ return new Promise((resolve) => {
+ setTimeout(() => {
+ resolve(metadataBlocksInfoByCollectionIdResponse)
+ }, 1_000)
+ })
+ }
}
diff --git a/src/sections/create-dataset/CreateDatasetFactory.tsx b/src/sections/create-dataset/CreateDatasetFactory.tsx
index f3c81186e..52b1e8e07 100644
--- a/src/sections/create-dataset/CreateDatasetFactory.tsx
+++ b/src/sections/create-dataset/CreateDatasetFactory.tsx
@@ -1,11 +1,18 @@
import { CreateDatasetForm } from './CreateDatasetForm'
import { ReactElement } from 'react'
import { DatasetJSDataverseRepository } from '../../dataset/infrastructure/repositories/DatasetJSDataverseRepository'
+import { MetadataBlockInfoJSDataverseRepository } from '../../metadata-block-info/infrastructure/repositories/MetadataBlockInfoJSDataverseRepository'
const repository = new DatasetJSDataverseRepository()
+const metadataBlockInfoRepository = new MetadataBlockInfoJSDataverseRepository()
export class CreateDatasetFactory {
static create(): ReactElement {
- return
+ return (
+
+ )
}
}
diff --git a/src/sections/create-dataset/CreateDatasetForm.tsx b/src/sections/create-dataset/CreateDatasetForm.tsx
index 3a9800754..5ed8b4c34 100644
--- a/src/sections/create-dataset/CreateDatasetForm.tsx
+++ b/src/sections/create-dataset/CreateDatasetForm.tsx
@@ -7,23 +7,32 @@ import { useCreateDatasetForm, SubmissionStatus } from './useCreateDatasetForm'
import styles from '/src/sections/dataset/Dataset.module.scss'
import { useLoading } from '../loading/LoadingContext'
import { DatasetRepository } from '../../dataset/domain/repositories/DatasetRepository'
+import { MetadataBlockInfoRepository } from '../../metadata-block-info/domain/repositories/MetadataBlockInfoRepository'
import { useDatasetFormData } from './useDatasetFormData'
import { Route } from '../Route.enum'
import { useNavigate } from 'react-router-dom'
import { useDatasetValidator } from './useDatasetValidator'
import { DatasetMetadataSubField } from '../../dataset/domain/models/Dataset'
+import { useDefineDatasetMetadataFormFields } from './useDefineDatasetMetadataFormFields'
interface CreateDatasetFormProps {
repository: DatasetRepository
+ metadataBlockInfoRepository: MetadataBlockInfoRepository
}
-export function CreateDatasetForm({ repository }: CreateDatasetFormProps) {
+export function CreateDatasetForm({
+ repository,
+ metadataBlockInfoRepository
+}: CreateDatasetFormProps) {
const navigate = useNavigate()
const { t } = useTranslation('createDataset')
const { isLoading, setIsLoading } = useLoading()
const { validationErrors, datasetIsValid } = useDatasetValidator()
const { formData, updateFormData } = useDatasetFormData(datasetIsValid)
const { submissionStatus, submitForm } = useCreateDatasetForm(repository, datasetIsValid)
+ const { fieldsToRender, isLoading: isLoadingFieldsToRender } = useDefineDatasetMetadataFormFields(
+ metadataBlockInfoRepository
+ )
const handleFieldChange = (event: ChangeEvent) => {
const { name, checked } = event.target
diff --git a/src/sections/create-dataset/mocks/metadataBlocksInfoByCollectionIdResponse.ts b/src/sections/create-dataset/mocks/metadataBlocksInfoByCollectionIdResponse.ts
new file mode 100644
index 000000000..00134fbd9
--- /dev/null
+++ b/src/sections/create-dataset/mocks/metadataBlocksInfoByCollectionIdResponse.ts
@@ -0,0 +1,3860 @@
+import { MetadataBlockInfo2 } from '../../../metadata-block-info/domain/models/MetadataBlockInfo'
+
+export const metadataBlocksInfoByCollectionIdResponse = [
+ {
+ id: 1,
+ name: 'citation',
+ displayName: 'Citation Metadata',
+ displayOnCreate: true,
+ metadataFields: {
+ title: {
+ name: 'title',
+ displayName: 'Title',
+ title: 'Title',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'The main title of the Dataset',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: true,
+ displayOnCreate: true,
+ displayOrder: 0
+ },
+ subtitle: {
+ name: 'subtitle',
+ displayName: 'Subtitle',
+ title: 'Subtitle',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'A secondary title that amplifies or states certain limitations on the main title',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ displayOnCreate: true,
+ isRequired: false,
+ displayOrder: 1
+ },
+ alternativeTitle: {
+ name: 'alternativeTitle',
+ displayName: 'Alternative Title',
+ title: 'Alternative Title',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Either 1) a title commonly used to refer to the Dataset or 2) an abbreviation of the main title',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOnCreate: true,
+ displayOrder: 2
+ },
+ alternativeURL: {
+ name: 'alternativeURL',
+ displayName: 'Alternative URL',
+ title: 'Alternative URL',
+ type: 'URL',
+ typeClass: 'primitive',
+ watermark: 'https://',
+ description:
+ 'Another URL where one can view or access the data in the Dataset, e.g. a project or personal webpage',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOnCreate: true,
+ displayOrder: 3
+ },
+ otherId: {
+ name: 'otherId',
+ displayName: 'Other Identifier',
+ title: 'Other Identifier',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description:
+ "Another unique identifier for the Dataset (e.g. producer's or another repository's identifier)",
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: ':',
+ isRequired: false,
+ displayOrder: 4,
+ displayOnCreate: true,
+ childMetadataFields: {
+ otherIdAgency: {
+ name: 'otherIdAgency',
+ displayName: 'Other Identifier Agency',
+ title: 'Agency',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'The name of the agency that generated the other identifier',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 5
+ },
+ otherIdValue: {
+ name: 'otherIdValue',
+ displayName: 'Other Identifier Identifier',
+ title: 'Identifier',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'Another identifier uniquely identifies the Dataset',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 6
+ }
+ }
+ },
+ author: {
+ name: 'author',
+ displayName: 'Author',
+ title: 'Author',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description: 'The entity, e.g. a person or organization, that created the Dataset',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: true,
+ displayOrder: 7,
+ displayOnCreate: true,
+ childMetadataFields: {
+ authorName: {
+ name: 'authorName',
+ displayName: 'Author Name',
+ title: 'Name',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '1) Family Name, Given Name or 2) Organization XYZ',
+ description:
+ "The name of the author, such as the person's name or the name of an organization",
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: true,
+ displayOrder: 8
+ },
+ authorAffiliation: {
+ name: 'authorAffiliation',
+ displayName: 'Author Affiliation',
+ title: 'Affiliation',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: 'Organization XYZ',
+ description:
+ "The name of the entity affiliated with the author, e.g. an organization's name",
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '(#VALUE)',
+ isRequired: false,
+ displayOrder: 9
+ },
+ authorIdentifierScheme: {
+ name: 'authorIdentifierScheme',
+ displayName: 'Author Identifier Type',
+ title: 'Identifier Type',
+ type: 'TEXT',
+ typeClass: 'controlledVocabulary',
+ watermark: '',
+ description:
+ 'The type of identifier that uniquely identifies the author (e.g. ORCID, ISNI)',
+ multiple: false,
+ isControlledVocabulary: true,
+ displayFormat: '- #VALUE:',
+ isRequired: false,
+ displayOrder: 10,
+ controlledVocabularyValues: [
+ 'ORCID',
+ 'ISNI',
+ 'LCNA',
+ 'VIAF',
+ 'GND',
+ 'DAI',
+ 'ResearcherID',
+ 'ScopusID'
+ ]
+ },
+ authorIdentifier: {
+ name: 'authorIdentifier',
+ displayName: 'Author Identifier',
+ title: 'Identifier',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'Uniquely identifies the author when paired with an identifier type',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 11
+ }
+ }
+ },
+ datasetContact: {
+ name: 'datasetContact',
+ displayName: 'Point of Contact',
+ title: 'Point of Contact',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description:
+ 'The entity, e.g. a person or organization, that users of the Dataset can contact with questions',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: true,
+ displayOrder: 12,
+ displayOnCreate: true,
+ childMetadataFields: {
+ datasetContactName: {
+ name: 'datasetContactName',
+ displayName: 'Point of Contact Name',
+ title: 'Name',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '1) FamilyName, GivenName or 2) Organization',
+ description:
+ "The name of the point of contact, e.g. the person's name or the name of an organization",
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 13
+ },
+ datasetContactAffiliation: {
+ name: 'datasetContactAffiliation',
+ displayName: 'Point of Contact Affiliation',
+ title: 'Affiliation',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: 'Organization XYZ',
+ description:
+ "The name of the entity affiliated with the point of contact, e.g. an organization's name",
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '(#VALUE)',
+ isRequired: false,
+ displayOrder: 14
+ },
+ datasetContactEmail: {
+ name: 'datasetContactEmail',
+ displayName: 'Point of Contact E-mail',
+ title: 'E-mail',
+ type: 'EMAIL',
+ typeClass: 'primitive',
+ watermark: 'name@email.xyz',
+ description: "The point of contact's email address",
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#EMAIL',
+ isRequired: true,
+ displayOrder: 15
+ }
+ }
+ },
+ dsDescription: {
+ name: 'dsDescription',
+ displayName: 'Description',
+ title: 'Description',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description: 'A summary describing the purpose, nature, and scope of the Dataset',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: true,
+ displayOrder: 16,
+ displayOnCreate: true,
+ childMetadataFields: {
+ dsDescriptionValue: {
+ name: 'dsDescriptionValue',
+ displayName: 'Description Text',
+ title: 'Text',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'A summary describing the purpose, nature, and scope of the Dataset',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: true,
+ displayOrder: 17
+ },
+ dsDescriptionDate: {
+ name: 'dsDescriptionDate',
+ displayName: 'Description Date',
+ title: 'Date',
+ type: 'DATE',
+ typeClass: 'primitive',
+ watermark: 'YYYY-MM-DD',
+ description:
+ 'The date when the description was added to the Dataset. If the Dataset contains more than one description, e.g. the data producer supplied one description and the data repository supplied another, this date is used to distinguish between the descriptions',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '(#VALUE)',
+ isRequired: false,
+ displayOrder: 18
+ }
+ }
+ },
+ subject: {
+ name: 'subject',
+ displayName: 'Subject',
+ title: 'Subject',
+ type: 'TEXT',
+ typeClass: 'controlledVocabulary',
+ watermark: '',
+ description: 'The area of study relevant to the Dataset',
+ multiple: true,
+ isControlledVocabulary: true,
+ displayFormat: '',
+ isRequired: true,
+ displayOrder: 19,
+ displayOnCreate: true,
+ controlledVocabularyValues: [
+ 'Agricultural Sciences',
+ 'Arts and Humanities',
+ 'Astronomy and Astrophysics',
+ 'Business and Management',
+ 'Chemistry',
+ 'Computer and Information Science',
+ 'Earth and Environmental Sciences',
+ 'Engineering',
+ 'Law',
+ 'Mathematical Sciences',
+ 'Medicine, Health and Life Sciences',
+ 'Physics',
+ 'Social Sciences',
+ 'Other'
+ ]
+ },
+ keyword: {
+ name: 'keyword',
+ displayName: 'Keyword',
+ title: 'Keyword',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description:
+ 'A key term that describes an important aspect of the Dataset and information about any controlled vocabulary used',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 20,
+ displayOnCreate: true,
+ childMetadataFields: {
+ keywordValue: {
+ name: 'keywordValue',
+ displayName: 'Keyword Term',
+ title: 'Term',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'A key term that describes important aspects of the Dataset',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 21
+ },
+ keywordVocabulary: {
+ name: 'keywordVocabulary',
+ displayName: 'Keyword Controlled Vocabulary Name',
+ title: 'Controlled Vocabulary Name',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'The controlled vocabulary used for the keyword term (e.g. LCSH, MeSH)',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '(#VALUE)',
+ isRequired: false,
+ displayOrder: 22
+ },
+ keywordVocabularyURI: {
+ name: 'keywordVocabularyURI',
+ displayName: 'Keyword Controlled Vocabulary URL',
+ title: 'Controlled Vocabulary URL',
+ type: 'URL',
+ typeClass: 'primitive',
+ watermark: 'https://',
+ description:
+ "The URL where one can access information about the term's controlled vocabulary",
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 23
+ }
+ }
+ },
+ topicClassification: {
+ name: 'topicClassification',
+ displayName: 'Topic Classification',
+ title: 'Topic Classification',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description:
+ 'Indicates a broad, important topic or subject that the Dataset covers and information about any controlled vocabulary used',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 24,
+ displayOnCreate: true,
+ childMetadataFields: {
+ topicClassValue: {
+ name: 'topicClassValue',
+ displayName: 'Topic Classification Term',
+ title: 'Term',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'A topic or subject term',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 25
+ },
+ topicClassVocab: {
+ name: 'topicClassVocab',
+ displayName: 'Topic Classification Controlled Vocabulary Name',
+ title: 'Controlled Vocabulary Name',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'The controlled vocabulary used for the keyword term (e.g. LCSH, MeSH)',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '(#VALUE)',
+ isRequired: false,
+ displayOrder: 26
+ },
+ topicClassVocabURI: {
+ name: 'topicClassVocabURI',
+ displayName: 'Topic Classification Controlled Vocabulary URL',
+ title: 'Controlled Vocabulary URL',
+ type: 'URL',
+ typeClass: 'primitive',
+ watermark: 'https://',
+ description:
+ "The URL where one can access information about the term's controlled vocabulary",
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 27
+ }
+ }
+ },
+ publication: {
+ name: 'publication',
+ displayName: 'Related Publication',
+ title: 'Related Publication',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description:
+ 'The article or report that uses the data in the Dataset. The full list of related publications will be displayed on the metadata tab',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 28,
+ displayOnCreate: true,
+ childMetadataFields: {
+ publicationCitation: {
+ name: 'publicationCitation',
+ displayName: 'Related Publication Citation',
+ title: 'Citation',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'The full bibliographic citation for the related publication',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 29
+ },
+ publicationIDType: {
+ name: 'publicationIDType',
+ displayName: 'Related Publication Identifier Type',
+ title: 'Identifier Type',
+ type: 'TEXT',
+ typeClass: 'controlledVocabulary',
+ watermark: '',
+ description: 'The type of identifier that uniquely identifies a related publication',
+ multiple: false,
+ isControlledVocabulary: true,
+ displayFormat: '#VALUE: ',
+ isRequired: false,
+ displayOrder: 30,
+ controlledVocabularyValues: [
+ 'ark',
+ 'arXiv',
+ 'bibcode',
+ 'cstr',
+ 'doi',
+ 'ean13',
+ 'eissn',
+ 'handle',
+ 'isbn',
+ 'issn',
+ 'istc',
+ 'lissn',
+ 'lsid',
+ 'pmid',
+ 'purl',
+ 'upc',
+ 'url',
+ 'urn',
+ 'DASH-NRS'
+ ]
+ },
+ publicationIDNumber: {
+ name: 'publicationIDNumber',
+ displayName: 'Related Publication Identifier',
+ title: 'Identifier',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'The identifier for a related publication',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 31
+ },
+ publicationURL: {
+ name: 'publicationURL',
+ displayName: 'Related Publication URL',
+ title: 'URL',
+ type: 'URL',
+ typeClass: 'primitive',
+ watermark: 'https://',
+ description:
+ 'The URL form of the identifier entered in the Identifier field, e.g. the DOI URL if a DOI was entered in the Identifier field. Used to display what was entered in the ID Type and ID Number fields as a link. If what was entered in the Identifier field has no URL form, the URL of the publication webpage is used, e.g. a journal article webpage',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 32
+ }
+ }
+ },
+ notesText: {
+ name: 'notesText',
+ displayName: 'Notes',
+ title: 'Notes',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'Additional information about the Dataset',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 33,
+ displayOnCreate: true
+ },
+ language: {
+ name: 'language',
+ displayName: 'Language',
+ title: 'Language',
+ type: 'TEXT',
+ typeClass: 'controlledVocabulary',
+ watermark: '',
+ description: "A language that the Dataset's files is written in",
+ multiple: true,
+ isControlledVocabulary: true,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 34,
+ displayOnCreate: true,
+ controlledVocabularyValues: [
+ 'Abkhaz',
+ 'Afar',
+ 'Afrikaans',
+ 'Akan',
+ 'Albanian',
+ 'Amharic',
+ 'Arabic',
+ 'Aragonese',
+ 'Armenian',
+ 'Assamese',
+ 'Avaric',
+ 'Avestan',
+ 'Aymara',
+ 'Azerbaijani',
+ 'Bambara',
+ 'Bashkir',
+ 'Basque',
+ 'Belarusian',
+ 'Bengali, Bangla',
+ 'Bihari',
+ 'Bislama',
+ 'Bosnian',
+ 'Breton',
+ 'Bulgarian',
+ 'Burmese',
+ 'Catalan,Valencian',
+ 'Chamorro',
+ 'Chechen',
+ 'Chichewa, Chewa, Nyanja',
+ 'Chinese',
+ 'Chuvash',
+ 'Cornish',
+ 'Corsican',
+ 'Cree',
+ 'Croatian',
+ 'Czech',
+ 'Danish',
+ 'Divehi, Dhivehi, Maldivian',
+ 'Dutch',
+ 'Dzongkha',
+ 'English',
+ 'Esperanto',
+ 'Estonian',
+ 'Ewe',
+ 'Faroese',
+ 'Fijian',
+ 'Finnish',
+ 'French',
+ 'Fula, Fulah, Pulaar, Pular',
+ 'Galician',
+ 'Georgian',
+ 'German',
+ 'Greek (modern)',
+ 'Guaraní',
+ 'Gujarati',
+ 'Haitian, Haitian Creole',
+ 'Hausa',
+ 'Hebrew (modern)',
+ 'Herero',
+ 'Hindi',
+ 'Hiri Motu',
+ 'Hungarian',
+ 'Interlingua',
+ 'Indonesian',
+ 'Interlingue',
+ 'Irish',
+ 'Igbo',
+ 'Inupiaq',
+ 'Ido',
+ 'Icelandic',
+ 'Italian',
+ 'Inuktitut',
+ 'Japanese',
+ 'Javanese',
+ 'Kalaallisut, Greenlandic',
+ 'Kannada',
+ 'Kanuri',
+ 'Kashmiri',
+ 'Kazakh',
+ 'Khmer',
+ 'Kikuyu, Gikuyu',
+ 'Kinyarwanda',
+ 'Kyrgyz',
+ 'Komi',
+ 'Kongo',
+ 'Korean',
+ 'Kurdish',
+ 'Kwanyama, Kuanyama',
+ 'Latin',
+ 'Luxembourgish, Letzeburgesch',
+ 'Ganda',
+ 'Limburgish, Limburgan, Limburger',
+ 'Lingala',
+ 'Lao',
+ 'Lithuanian',
+ 'Luba-Katanga',
+ 'Latvian',
+ 'Manx',
+ 'Macedonian',
+ 'Malagasy',
+ 'Malay',
+ 'Malayalam',
+ 'Maltese',
+ 'Māori',
+ 'Marathi (Marāṭhī)',
+ 'Marshallese',
+ 'Mixtepec Mixtec',
+ 'Mongolian',
+ 'Nauru',
+ 'Navajo, Navaho',
+ 'Northern Ndebele',
+ 'Nepali',
+ 'Ndonga',
+ 'Norwegian Bokmål',
+ 'Norwegian Nynorsk',
+ 'Norwegian',
+ 'Nuosu',
+ 'Southern Ndebele',
+ 'Occitan',
+ 'Ojibwe, Ojibwa',
+ 'Old Church Slavonic,Church Slavonic,Old Bulgarian',
+ 'Oromo',
+ 'Oriya',
+ 'Ossetian, Ossetic',
+ 'Panjabi, Punjabi',
+ 'Pāli',
+ 'Persian (Farsi)',
+ 'Polish',
+ 'Pashto, Pushto',
+ 'Portuguese',
+ 'Quechua',
+ 'Romansh',
+ 'Kirundi',
+ 'Romanian',
+ 'Russian',
+ 'Sanskrit (Saṁskṛta)',
+ 'Sardinian',
+ 'Sindhi',
+ 'Northern Sami',
+ 'Samoan',
+ 'Sango',
+ 'Serbian',
+ 'Scottish Gaelic, Gaelic',
+ 'Shona',
+ 'Sinhala, Sinhalese',
+ 'Slovak',
+ 'Slovene',
+ 'Somali',
+ 'Southern Sotho',
+ 'Spanish, Castilian',
+ 'Sundanese',
+ 'Swahili',
+ 'Swati',
+ 'Swedish',
+ 'Tamil',
+ 'Telugu',
+ 'Tajik',
+ 'Thai',
+ 'Tigrinya',
+ 'Tibetan Standard, Tibetan, Central',
+ 'Turkmen',
+ 'Tagalog',
+ 'Tswana',
+ 'Tonga (Tonga Islands)',
+ 'Turkish',
+ 'Tsonga',
+ 'Tatar',
+ 'Twi',
+ 'Tahitian',
+ 'Uyghur, Uighur',
+ 'Ukrainian',
+ 'Urdu',
+ 'Uzbek',
+ 'Venda',
+ 'Vietnamese',
+ 'Volapük',
+ 'Walloon',
+ 'Welsh',
+ 'Wolof',
+ 'Western Frisian',
+ 'Xhosa',
+ 'Yiddish',
+ 'Yoruba',
+ 'Zhuang, Chuang',
+ 'Zulu',
+ 'Not applicable'
+ ]
+ },
+ producer: {
+ name: 'producer',
+ displayName: 'Producer',
+ title: 'Producer',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description:
+ 'The entity, such a person or organization, managing the finances or other administrative processes involved in the creation of the Dataset',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 35,
+ displayOnCreate: true,
+ childMetadataFields: {
+ producerName: {
+ name: 'producerName',
+ displayName: 'Producer Name',
+ title: 'Name',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '1) FamilyName, GivenName or 2) Organization',
+ description:
+ "The name of the entity, e.g. the person's name or the name of an organization",
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: true,
+ displayOrder: 36
+ },
+ producerAffiliation: {
+ name: 'producerAffiliation',
+ displayName: 'Producer Affiliation',
+ title: 'Affiliation',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: 'Organization XYZ',
+ description:
+ "The name of the entity affiliated with the producer, e.g. an organization's name",
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '(#VALUE)',
+ isRequired: false,
+ displayOrder: 37
+ },
+ producerAbbreviation: {
+ name: 'producerAbbreviation',
+ displayName: 'Producer Abbreviated Name',
+ title: 'Abbreviated Name',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: "The producer's abbreviated name (e.g. IQSS, ICPSR)",
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '(#VALUE)',
+ isRequired: false,
+ displayOrder: 38
+ },
+ producerURL: {
+ name: 'producerURL',
+ displayName: 'Producer URL',
+ title: 'URL',
+ type: 'URL',
+ typeClass: 'primitive',
+ watermark: 'https://',
+ description: "The URL of the producer's website",
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 39
+ },
+ producerLogoURL: {
+ name: 'producerLogoURL',
+ displayName: 'Producer Logo URL',
+ title: 'Logo URL',
+ type: 'URL',
+ typeClass: 'primitive',
+ watermark: 'https://',
+ description: "The URL of the producer's logo",
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '
',
+ isRequired: false,
+ displayOrder: 40
+ }
+ }
+ },
+ productionDate: {
+ name: 'productionDate',
+ displayName: 'Production Date',
+ title: 'Production Date',
+ type: 'DATE',
+ typeClass: 'primitive',
+ watermark: 'YYYY-MM-DD',
+ description:
+ 'The date when the data were produced (not distributed, published, or archived)',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOnCreate: true,
+ displayOrder: 41
+ },
+ productionPlace: {
+ name: 'productionPlace',
+ displayName: 'Production Location',
+ title: 'Production Location',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'The location where the data and any related materials were produced or collected',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOnCreate: true,
+ displayOrder: 42
+ },
+ contributor: {
+ name: 'contributor',
+ displayName: 'Contributor',
+ title: 'Contributor',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description:
+ 'The entity, such as a person or organization, responsible for collecting, managing, or otherwise contributing to the development of the Dataset',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: ':',
+ isRequired: false,
+ displayOrder: 43,
+ childMetadataFields: {
+ contributorType: {
+ name: 'contributorType',
+ displayName: 'Contributor Type',
+ title: 'Type',
+ type: 'TEXT',
+ typeClass: 'controlledVocabulary',
+ watermark: '',
+ description: 'Indicates the type of contribution made to the dataset',
+ multiple: false,
+ isControlledVocabulary: true,
+ displayFormat: '#VALUE ',
+ isRequired: false,
+ displayOrder: 44,
+ controlledVocabularyValues: [
+ 'Data Collector',
+ 'Data Curator',
+ 'Data Manager',
+ 'Editor',
+ 'Funder',
+ 'Hosting Institution',
+ 'Project Leader',
+ 'Project Manager',
+ 'Project Member',
+ 'Related Person',
+ 'Researcher',
+ 'Research Group',
+ 'Rights Holder',
+ 'Sponsor',
+ 'Supervisor',
+ 'Work Package Leader',
+ 'Other'
+ ]
+ },
+ contributorName: {
+ name: 'contributorName',
+ displayName: 'Contributor Name',
+ title: 'Name',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '1) FamilyName, GivenName or 2) Organization',
+ description:
+ "The name of the contributor, e.g. the person's name or the name of an organization",
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 45
+ }
+ }
+ },
+ grantNumber: {
+ name: 'grantNumber',
+ displayName: 'Funding Information',
+ title: 'Funding Information',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description: "Information about the Dataset's financial support",
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: ':',
+ isRequired: false,
+ displayOrder: 46,
+ childMetadataFields: {
+ grantNumberAgency: {
+ name: 'grantNumberAgency',
+ displayName: 'Funding Information Agency',
+ title: 'Agency',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: 'Organization XYZ',
+ description: 'The agency that provided financial support for the Dataset',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 47
+ },
+ grantNumberValue: {
+ name: 'grantNumberValue',
+ displayName: 'Funding Information Identifier',
+ title: 'Identifier',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'The grant identifier or contract identifier of the agency that provided financial support for the Dataset',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 48
+ }
+ }
+ },
+ distributor: {
+ name: 'distributor',
+ displayName: 'Distributor',
+ title: 'Distributor',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description:
+ 'The entity, such as a person or organization, designated to generate copies of the Dataset, including any editions or revisions',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 49,
+ childMetadataFields: {
+ distributorName: {
+ name: 'distributorName',
+ displayName: 'Distributor Name',
+ title: 'Name',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '1) FamilyName, GivenName or 2) Organization',
+ description:
+ "The name of the entity, e.g. the person's name or the name of an organization",
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 50
+ },
+ distributorAffiliation: {
+ name: 'distributorAffiliation',
+ displayName: 'Distributor Affiliation',
+ title: 'Affiliation',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: 'Organization XYZ',
+ description:
+ "The name of the entity affiliated with the distributor, e.g. an organization's name",
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '(#VALUE)',
+ isRequired: false,
+ displayOrder: 51
+ },
+ distributorAbbreviation: {
+ name: 'distributorAbbreviation',
+ displayName: 'Distributor Abbreviated Name',
+ title: 'Abbreviated Name',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: "The distributor's abbreviated name (e.g. IQSS, ICPSR)",
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '(#VALUE)',
+ isRequired: false,
+ displayOrder: 52
+ },
+ distributorURL: {
+ name: 'distributorURL',
+ displayName: 'Distributor URL',
+ title: 'URL',
+ type: 'URL',
+ typeClass: 'primitive',
+ watermark: 'https://',
+ description: "The URL of the distributor's webpage",
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 53
+ },
+ distributorLogoURL: {
+ name: 'distributorLogoURL',
+ displayName: 'Distributor Logo URL',
+ title: 'Logo URL',
+ type: 'URL',
+ typeClass: 'primitive',
+ watermark: 'https://',
+ description:
+ "The URL of the distributor's logo image, used to show the image on the Dataset's page",
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '
',
+ isRequired: false,
+ displayOrder: 54
+ }
+ }
+ },
+ distributionDate: {
+ name: 'distributionDate',
+ displayName: 'Distribution Date',
+ title: 'Distribution Date',
+ type: 'DATE',
+ typeClass: 'primitive',
+ watermark: 'YYYY-MM-DD',
+ description: 'The date when the Dataset was made available for distribution/presentation',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 55
+ },
+ depositor: {
+ name: 'depositor',
+ displayName: 'Depositor',
+ title: 'Depositor',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '1) FamilyName, GivenName or 2) Organization',
+ description:
+ 'The entity, such as a person or organization, that deposited the Dataset in the repository',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 56
+ },
+ dateOfDeposit: {
+ name: 'dateOfDeposit',
+ displayName: 'Deposit Date',
+ title: 'Deposit Date',
+ type: 'DATE',
+ typeClass: 'primitive',
+ watermark: 'YYYY-MM-DD',
+ description: 'The date when the Dataset was deposited into the repository',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 57
+ },
+ timePeriodCovered: {
+ name: 'timePeriodCovered',
+ displayName: 'Time Period',
+ title: 'Time Period',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description:
+ 'The time period that the data refer to. Also known as span. This is the time period covered by the data, not the dates of coding, collecting data, or making documents machine-readable',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: ';',
+ isRequired: false,
+ displayOrder: 58,
+ childMetadataFields: {
+ timePeriodCoveredStart: {
+ name: 'timePeriodCoveredStart',
+ displayName: 'Time Period Start Date',
+ title: 'Start Date',
+ type: 'DATE',
+ typeClass: 'primitive',
+ watermark: 'YYYY-MM-DD',
+ description: 'The start date of the time period that the data refer to',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#NAME: #VALUE ',
+ isRequired: false,
+ displayOrder: 59
+ },
+ timePeriodCoveredEnd: {
+ name: 'timePeriodCoveredEnd',
+ displayName: 'Time Period End Date',
+ title: 'End Date',
+ type: 'DATE',
+ typeClass: 'primitive',
+ watermark: 'YYYY-MM-DD',
+ description: 'The end date of the time period that the data refer to',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#NAME: #VALUE ',
+ isRequired: false,
+ displayOrder: 60
+ }
+ }
+ },
+ dateOfCollection: {
+ name: 'dateOfCollection',
+ displayName: 'Date of Collection',
+ title: 'Date of Collection',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description: 'The dates when the data were collected or generated',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: ';',
+ isRequired: false,
+ displayOrder: 61,
+ childMetadataFields: {
+ dateOfCollectionStart: {
+ name: 'dateOfCollectionStart',
+ displayName: 'Date of Collection Start Date',
+ title: 'Start Date',
+ type: 'DATE',
+ typeClass: 'primitive',
+ watermark: 'YYYY-MM-DD',
+ description: 'The date when the data collection started',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#NAME: #VALUE ',
+ isRequired: false,
+ displayOrder: 62
+ },
+ dateOfCollectionEnd: {
+ name: 'dateOfCollectionEnd',
+ displayName: 'Date of Collection End Date',
+ title: 'End Date',
+ type: 'DATE',
+ typeClass: 'primitive',
+ watermark: 'YYYY-MM-DD',
+ description: 'The date when the data collection ended',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#NAME: #VALUE ',
+ isRequired: false,
+ displayOrder: 63
+ }
+ }
+ },
+ kindOfData: {
+ name: 'kindOfData',
+ displayName: 'Data Type',
+ title: 'Data Type',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'The type of data included in the files (e.g. survey data, clinical data, or machine-readable text)',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 64
+ },
+ series: {
+ name: 'series',
+ displayName: 'Series',
+ title: 'Series',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description: 'Information about the dataset series to which the Dataset belong',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: ':',
+ isRequired: false,
+ displayOrder: 65,
+ childMetadataFields: {
+ seriesName: {
+ name: 'seriesName',
+ displayName: 'Series Name',
+ title: 'Name',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'The name of the dataset series',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 66
+ },
+ seriesInformation: {
+ name: 'seriesInformation',
+ displayName: 'Series Information',
+ title: 'Information',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Can include 1) a history of the series and 2) a summary of features that apply to the series',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 67
+ }
+ }
+ },
+ software: {
+ name: 'software',
+ displayName: 'Software',
+ title: 'Software',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description: 'Information about the software used to generate the Dataset',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: ',',
+ isRequired: false,
+ displayOrder: 68,
+ childMetadataFields: {
+ softwareName: {
+ name: 'softwareName',
+ displayName: 'Software Name',
+ title: 'Name',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'The name of software used to generate the Dataset',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE',
+ isRequired: false,
+ displayOrder: 69
+ },
+ softwareVersion: {
+ name: 'softwareVersion',
+ displayName: 'Software Version',
+ title: 'Version',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'The version of the software used to generate the Dataset, e.g. 4.11',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#NAME: #VALUE',
+ isRequired: false,
+ displayOrder: 70
+ }
+ }
+ },
+ relatedMaterial: {
+ name: 'relatedMaterial',
+ displayName: 'Related Material',
+ title: 'Related Material',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Information, such as a persistent ID or citation, about the material related to the Dataset, such as appendices or sampling information available outside of the Dataset',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 71
+ },
+ relatedDatasets: {
+ name: 'relatedDatasets',
+ displayName: 'Related Dataset',
+ title: 'Related Dataset',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ "Information, such as a persistent ID or citation, about a related dataset, such as previous research on the Dataset's subject",
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 72
+ },
+ otherReferences: {
+ name: 'otherReferences',
+ displayName: 'Other Reference',
+ title: 'Other Reference',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Information, such as a persistent ID or citation, about another type of resource that provides background or supporting material to the Dataset',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 73
+ },
+ dataSources: {
+ name: 'dataSources',
+ displayName: 'Data Source',
+ title: 'Data Source',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Information, such as a persistent ID or citation, about sources of the Dataset (e.g. a book, article, serial, or machine-readable data file)',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 74
+ },
+ originOfSources: {
+ name: 'originOfSources',
+ displayName: 'Origin of Historical Sources',
+ title: 'Origin of Historical Sources',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'For historical sources, the origin and any rules followed in establishing them as sources',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 75
+ },
+ characteristicOfSources: {
+ name: 'characteristicOfSources',
+ displayName: 'Characteristic of Sources',
+ title: 'Characteristic of Sources',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'Characteristics not already noted elsewhere',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 76
+ },
+ accessToSources: {
+ name: 'accessToSources',
+ displayName: 'Documentation and Access to Sources',
+ title: 'Documentation and Access to Sources',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ '1) Methods or procedures for accessing data sources and 2) any special permissions needed for access',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 77
+ }
+ }
+ },
+ {
+ id: 2,
+ name: 'geospatial',
+ displayName: 'Geospatial Metadata',
+ displayOnCreate: false,
+ metadataFields: {
+ geographicCoverage: {
+ name: 'geographicCoverage',
+ displayName: 'Geographic Coverage',
+ title: 'Geographic Coverage',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description:
+ 'Information on the geographic coverage of the data. Includes the total geographic scope of the data.',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 0,
+ childMetadataFields: {
+ country: {
+ name: 'country',
+ displayName: 'Geographic Coverage Country / Nation',
+ title: 'Country / Nation',
+ type: 'TEXT',
+ typeClass: 'controlledVocabulary',
+ watermark: '',
+ description: 'The country or nation that the Dataset is about.',
+ multiple: false,
+ isControlledVocabulary: true,
+ displayFormat: '#VALUE, ',
+ isRequired: false,
+ displayOrder: 1,
+ controlledVocabularyValues: [
+ 'Afghanistan',
+ 'Albania',
+ 'Algeria',
+ 'American Samoa',
+ 'Andorra',
+ 'Angola',
+ 'Anguilla',
+ 'Antarctica',
+ 'Antigua and Barbuda',
+ 'Argentina',
+ 'Armenia',
+ 'Aruba',
+ 'Australia',
+ 'Austria',
+ 'Azerbaijan',
+ 'Bahamas',
+ 'Bahrain',
+ 'Bangladesh',
+ 'Barbados',
+ 'Belarus',
+ 'Belgium',
+ 'Belize',
+ 'Benin',
+ 'Bermuda',
+ 'Bhutan',
+ 'Bolivia, Plurinational State of',
+ 'Bonaire, Sint Eustatius and Saba',
+ 'Bosnia and Herzegovina',
+ 'Botswana',
+ 'Bouvet Island',
+ 'Brazil',
+ 'British Indian Ocean Territory',
+ 'Brunei Darussalam',
+ 'Bulgaria',
+ 'Burkina Faso',
+ 'Burundi',
+ 'Cambodia',
+ 'Cameroon',
+ 'Canada',
+ 'Cape Verde',
+ 'Cayman Islands',
+ 'Central African Republic',
+ 'Chad',
+ 'Chile',
+ 'China',
+ 'Christmas Island',
+ 'Cocos (Keeling) Islands',
+ 'Colombia',
+ 'Comoros',
+ 'Congo',
+ 'Congo, the Democratic Republic of the',
+ 'Cook Islands',
+ 'Costa Rica',
+ 'Croatia',
+ 'Cuba',
+ 'Curaçao',
+ 'Cyprus',
+ 'Czech Republic',
+ "Côte d'Ivoire",
+ 'Denmark',
+ 'Djibouti',
+ 'Dominica',
+ 'Dominican Republic',
+ 'Ecuador',
+ 'Egypt',
+ 'El Salvador',
+ 'Equatorial Guinea',
+ 'Eritrea',
+ 'Estonia',
+ 'Ethiopia',
+ 'Falkland Islands (Malvinas)',
+ 'Faroe Islands',
+ 'Fiji',
+ 'Finland',
+ 'France',
+ 'French Guiana',
+ 'French Polynesia',
+ 'French Southern Territories',
+ 'Gabon',
+ 'Gambia',
+ 'Georgia',
+ 'Germany',
+ 'Ghana',
+ 'Gibraltar',
+ 'Greece',
+ 'Greenland',
+ 'Grenada',
+ 'Guadeloupe',
+ 'Guam',
+ 'Guatemala',
+ 'Guernsey',
+ 'Guinea',
+ 'Guinea-Bissau',
+ 'Guyana',
+ 'Haiti',
+ 'Heard Island and Mcdonald Islands',
+ 'Holy See (Vatican City State)',
+ 'Honduras',
+ 'Hong Kong',
+ 'Hungary',
+ 'Iceland',
+ 'India',
+ 'Indonesia',
+ 'Iran, Islamic Republic of',
+ 'Iraq',
+ 'Ireland',
+ 'Isle of Man',
+ 'Israel',
+ 'Italy',
+ 'Jamaica',
+ 'Japan',
+ 'Jersey',
+ 'Jordan',
+ 'Kazakhstan',
+ 'Kenya',
+ 'Kiribati',
+ "Korea, Democratic People's Republic of",
+ 'Korea, Republic of',
+ 'Kuwait',
+ 'Kyrgyzstan',
+ "Lao People's Democratic Republic",
+ 'Latvia',
+ 'Lebanon',
+ 'Lesotho',
+ 'Liberia',
+ 'Libya',
+ 'Liechtenstein',
+ 'Lithuania',
+ 'Luxembourg',
+ 'Macao',
+ 'Macedonia, the Former Yugoslav Republic of',
+ 'Madagascar',
+ 'Malawi',
+ 'Malaysia',
+ 'Maldives',
+ 'Mali',
+ 'Malta',
+ 'Marshall Islands',
+ 'Martinique',
+ 'Mauritania',
+ 'Mauritius',
+ 'Mayotte',
+ 'Mexico',
+ 'Micronesia, Federated States of',
+ 'Moldova, Republic of',
+ 'Monaco',
+ 'Mongolia',
+ 'Montenegro',
+ 'Montserrat',
+ 'Morocco',
+ 'Mozambique',
+ 'Myanmar',
+ 'Namibia',
+ 'Nauru',
+ 'Nepal',
+ 'Netherlands',
+ 'New Caledonia',
+ 'New Zealand',
+ 'Nicaragua',
+ 'Niger',
+ 'Nigeria',
+ 'Niue',
+ 'Norfolk Island',
+ 'Northern Mariana Islands',
+ 'Norway',
+ 'Oman',
+ 'Pakistan',
+ 'Palau',
+ 'Palestine, State of',
+ 'Panama',
+ 'Papua New Guinea',
+ 'Paraguay',
+ 'Peru',
+ 'Philippines',
+ 'Pitcairn',
+ 'Poland',
+ 'Portugal',
+ 'Puerto Rico',
+ 'Qatar',
+ 'Romania',
+ 'Russian Federation',
+ 'Rwanda',
+ 'Réunion',
+ 'Saint Barthélemy',
+ 'Saint Helena, Ascension and Tristan da Cunha',
+ 'Saint Kitts and Nevis',
+ 'Saint Lucia',
+ 'Saint Martin (French part)',
+ 'Saint Pierre and Miquelon',
+ 'Saint Vincent and the Grenadines',
+ 'Samoa',
+ 'San Marino',
+ 'Sao Tome and Principe',
+ 'Saudi Arabia',
+ 'Senegal',
+ 'Serbia',
+ 'Seychelles',
+ 'Sierra Leone',
+ 'Singapore',
+ 'Sint Maarten (Dutch part)',
+ 'Slovakia',
+ 'Slovenia',
+ 'Solomon Islands',
+ 'Somalia',
+ 'South Africa',
+ 'South Georgia and the South Sandwich Islands',
+ 'South Sudan',
+ 'Spain',
+ 'Sri Lanka',
+ 'Sudan',
+ 'Suriname',
+ 'Svalbard and Jan Mayen',
+ 'Swaziland',
+ 'Sweden',
+ 'Switzerland',
+ 'Syrian Arab Republic',
+ 'Taiwan, Province of China',
+ 'Tajikistan',
+ 'Tanzania, United Republic of',
+ 'Thailand',
+ 'Timor-Leste',
+ 'Togo',
+ 'Tokelau',
+ 'Tonga',
+ 'Trinidad and Tobago',
+ 'Tunisia',
+ 'Turkey',
+ 'Turkmenistan',
+ 'Turks and Caicos Islands',
+ 'Tuvalu',
+ 'Uganda',
+ 'Ukraine',
+ 'United Arab Emirates',
+ 'United Kingdom',
+ 'United States',
+ 'United States Minor Outlying Islands',
+ 'Uruguay',
+ 'Uzbekistan',
+ 'Vanuatu',
+ 'Venezuela, Bolivarian Republic of',
+ 'Viet Nam',
+ 'Virgin Islands, British',
+ 'Virgin Islands, U.S.',
+ 'Wallis and Futuna',
+ 'Western Sahara',
+ 'Yemen',
+ 'Zambia',
+ 'Zimbabwe',
+ 'Åland Islands'
+ ]
+ },
+ state: {
+ name: 'state',
+ displayName: 'Geographic Coverage State / Province',
+ title: 'State / Province',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'The state or province that the Dataset is about. Use GeoNames for correct spelling and avoid abbreviations.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE, ',
+ isRequired: false,
+ displayOrder: 2
+ },
+ city: {
+ name: 'city',
+ displayName: 'Geographic Coverage City',
+ title: 'City',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'The name of the city that the Dataset is about. Use GeoNames for correct spelling and avoid abbreviations.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE, ',
+ isRequired: false,
+ displayOrder: 3
+ },
+ otherGeographicCoverage: {
+ name: 'otherGeographicCoverage',
+ displayName: 'Geographic Coverage Other',
+ title: 'Other',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'Other information on the geographic coverage of the data.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE, ',
+ isRequired: false,
+ displayOrder: 4
+ }
+ }
+ },
+ country: {
+ name: 'country',
+ displayName: 'Geographic Coverage Country / Nation',
+ title: 'Country / Nation',
+ type: 'TEXT',
+ typeClass: 'controlledVocabulary',
+ watermark: '',
+ description: 'The country or nation that the Dataset is about.',
+ multiple: false,
+ isControlledVocabulary: true,
+ displayFormat: '#VALUE, ',
+ isRequired: false,
+ displayOrder: 1,
+ controlledVocabularyValues: [
+ 'Afghanistan',
+ 'Albania',
+ 'Algeria',
+ 'American Samoa',
+ 'Andorra',
+ 'Angola',
+ 'Anguilla',
+ 'Antarctica',
+ 'Antigua and Barbuda',
+ 'Argentina',
+ 'Armenia',
+ 'Aruba',
+ 'Australia',
+ 'Austria',
+ 'Azerbaijan',
+ 'Bahamas',
+ 'Bahrain',
+ 'Bangladesh',
+ 'Barbados',
+ 'Belarus',
+ 'Belgium',
+ 'Belize',
+ 'Benin',
+ 'Bermuda',
+ 'Bhutan',
+ 'Bolivia, Plurinational State of',
+ 'Bonaire, Sint Eustatius and Saba',
+ 'Bosnia and Herzegovina',
+ 'Botswana',
+ 'Bouvet Island',
+ 'Brazil',
+ 'British Indian Ocean Territory',
+ 'Brunei Darussalam',
+ 'Bulgaria',
+ 'Burkina Faso',
+ 'Burundi',
+ 'Cambodia',
+ 'Cameroon',
+ 'Canada',
+ 'Cape Verde',
+ 'Cayman Islands',
+ 'Central African Republic',
+ 'Chad',
+ 'Chile',
+ 'China',
+ 'Christmas Island',
+ 'Cocos (Keeling) Islands',
+ 'Colombia',
+ 'Comoros',
+ 'Congo',
+ 'Congo, the Democratic Republic of the',
+ 'Cook Islands',
+ 'Costa Rica',
+ 'Croatia',
+ 'Cuba',
+ 'Curaçao',
+ 'Cyprus',
+ 'Czech Republic',
+ "Côte d'Ivoire",
+ 'Denmark',
+ 'Djibouti',
+ 'Dominica',
+ 'Dominican Republic',
+ 'Ecuador',
+ 'Egypt',
+ 'El Salvador',
+ 'Equatorial Guinea',
+ 'Eritrea',
+ 'Estonia',
+ 'Ethiopia',
+ 'Falkland Islands (Malvinas)',
+ 'Faroe Islands',
+ 'Fiji',
+ 'Finland',
+ 'France',
+ 'French Guiana',
+ 'French Polynesia',
+ 'French Southern Territories',
+ 'Gabon',
+ 'Gambia',
+ 'Georgia',
+ 'Germany',
+ 'Ghana',
+ 'Gibraltar',
+ 'Greece',
+ 'Greenland',
+ 'Grenada',
+ 'Guadeloupe',
+ 'Guam',
+ 'Guatemala',
+ 'Guernsey',
+ 'Guinea',
+ 'Guinea-Bissau',
+ 'Guyana',
+ 'Haiti',
+ 'Heard Island and Mcdonald Islands',
+ 'Holy See (Vatican City State)',
+ 'Honduras',
+ 'Hong Kong',
+ 'Hungary',
+ 'Iceland',
+ 'India',
+ 'Indonesia',
+ 'Iran, Islamic Republic of',
+ 'Iraq',
+ 'Ireland',
+ 'Isle of Man',
+ 'Israel',
+ 'Italy',
+ 'Jamaica',
+ 'Japan',
+ 'Jersey',
+ 'Jordan',
+ 'Kazakhstan',
+ 'Kenya',
+ 'Kiribati',
+ "Korea, Democratic People's Republic of",
+ 'Korea, Republic of',
+ 'Kuwait',
+ 'Kyrgyzstan',
+ "Lao People's Democratic Republic",
+ 'Latvia',
+ 'Lebanon',
+ 'Lesotho',
+ 'Liberia',
+ 'Libya',
+ 'Liechtenstein',
+ 'Lithuania',
+ 'Luxembourg',
+ 'Macao',
+ 'Macedonia, the Former Yugoslav Republic of',
+ 'Madagascar',
+ 'Malawi',
+ 'Malaysia',
+ 'Maldives',
+ 'Mali',
+ 'Malta',
+ 'Marshall Islands',
+ 'Martinique',
+ 'Mauritania',
+ 'Mauritius',
+ 'Mayotte',
+ 'Mexico',
+ 'Micronesia, Federated States of',
+ 'Moldova, Republic of',
+ 'Monaco',
+ 'Mongolia',
+ 'Montenegro',
+ 'Montserrat',
+ 'Morocco',
+ 'Mozambique',
+ 'Myanmar',
+ 'Namibia',
+ 'Nauru',
+ 'Nepal',
+ 'Netherlands',
+ 'New Caledonia',
+ 'New Zealand',
+ 'Nicaragua',
+ 'Niger',
+ 'Nigeria',
+ 'Niue',
+ 'Norfolk Island',
+ 'Northern Mariana Islands',
+ 'Norway',
+ 'Oman',
+ 'Pakistan',
+ 'Palau',
+ 'Palestine, State of',
+ 'Panama',
+ 'Papua New Guinea',
+ 'Paraguay',
+ 'Peru',
+ 'Philippines',
+ 'Pitcairn',
+ 'Poland',
+ 'Portugal',
+ 'Puerto Rico',
+ 'Qatar',
+ 'Romania',
+ 'Russian Federation',
+ 'Rwanda',
+ 'Réunion',
+ 'Saint Barthélemy',
+ 'Saint Helena, Ascension and Tristan da Cunha',
+ 'Saint Kitts and Nevis',
+ 'Saint Lucia',
+ 'Saint Martin (French part)',
+ 'Saint Pierre and Miquelon',
+ 'Saint Vincent and the Grenadines',
+ 'Samoa',
+ 'San Marino',
+ 'Sao Tome and Principe',
+ 'Saudi Arabia',
+ 'Senegal',
+ 'Serbia',
+ 'Seychelles',
+ 'Sierra Leone',
+ 'Singapore',
+ 'Sint Maarten (Dutch part)',
+ 'Slovakia',
+ 'Slovenia',
+ 'Solomon Islands',
+ 'Somalia',
+ 'South Africa',
+ 'South Georgia and the South Sandwich Islands',
+ 'South Sudan',
+ 'Spain',
+ 'Sri Lanka',
+ 'Sudan',
+ 'Suriname',
+ 'Svalbard and Jan Mayen',
+ 'Swaziland',
+ 'Sweden',
+ 'Switzerland',
+ 'Syrian Arab Republic',
+ 'Taiwan, Province of China',
+ 'Tajikistan',
+ 'Tanzania, United Republic of',
+ 'Thailand',
+ 'Timor-Leste',
+ 'Togo',
+ 'Tokelau',
+ 'Tonga',
+ 'Trinidad and Tobago',
+ 'Tunisia',
+ 'Turkey',
+ 'Turkmenistan',
+ 'Turks and Caicos Islands',
+ 'Tuvalu',
+ 'Uganda',
+ 'Ukraine',
+ 'United Arab Emirates',
+ 'United Kingdom',
+ 'United States',
+ 'United States Minor Outlying Islands',
+ 'Uruguay',
+ 'Uzbekistan',
+ 'Vanuatu',
+ 'Venezuela, Bolivarian Republic of',
+ 'Viet Nam',
+ 'Virgin Islands, British',
+ 'Virgin Islands, U.S.',
+ 'Wallis and Futuna',
+ 'Western Sahara',
+ 'Yemen',
+ 'Zambia',
+ 'Zimbabwe',
+ 'Åland Islands'
+ ]
+ },
+ state: {
+ name: 'state',
+ displayName: 'Geographic Coverage State / Province',
+ title: 'State / Province',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'The state or province that the Dataset is about. Use GeoNames for correct spelling and avoid abbreviations.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE, ',
+ isRequired: false,
+ displayOrder: 2
+ },
+ city: {
+ name: 'city',
+ displayName: 'Geographic Coverage City',
+ title: 'City',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'The name of the city that the Dataset is about. Use GeoNames for correct spelling and avoid abbreviations.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE, ',
+ isRequired: false,
+ displayOrder: 3
+ },
+ otherGeographicCoverage: {
+ name: 'otherGeographicCoverage',
+ displayName: 'Geographic Coverage Other',
+ title: 'Other',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'Other information on the geographic coverage of the data.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '#VALUE, ',
+ isRequired: false,
+ displayOrder: 4
+ },
+ geographicUnit: {
+ name: 'geographicUnit',
+ displayName: 'Geographic Unit',
+ title: 'Geographic Unit',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Lowest level of geographic aggregation covered by the Dataset, e.g., village, county, region.',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 5
+ },
+ geographicBoundingBox: {
+ name: 'geographicBoundingBox',
+ displayName: 'Geographic Bounding Box',
+ title: 'Geographic Bounding Box',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description:
+ "The fundamental geometric description for any Dataset that models geography is the geographic bounding box. It describes the minimum box, defined by west and east longitudes and north and south latitudes, which includes the largest geographic extent of the Dataset's geographic coverage. This element is used in the first pass of a coordinate-based search. Inclusion of this element in the codebook is recommended, but is required if the bound polygon box is included. ",
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 6,
+ childMetadataFields: {
+ westLongitude: {
+ name: 'westLongitude',
+ displayName: 'Geographic Bounding Box Westernmost (Left) Longitude',
+ title: 'Westernmost (Left) Longitude',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Westernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -180,0 <= West Bounding Longitude Value <= 180,0.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 7
+ },
+ eastLongitude: {
+ name: 'eastLongitude',
+ displayName: 'Geographic Bounding Box Easternmost (Right) Longitude',
+ title: 'Easternmost (Right) Longitude',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Easternmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -180,0 <= East Bounding Longitude Value <= 180,0.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 8
+ },
+ northLatitude: {
+ name: 'northLatitude',
+ displayName: 'Geographic Bounding Box Northernmost (Top) Latitude',
+ title: 'Northernmost (Top) Latitude',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Northernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -90,0 <= North Bounding Latitude Value <= 90,0.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 9
+ },
+ southLatitude: {
+ name: 'southLatitude',
+ displayName: 'Geographic Bounding Box Southernmost (Bottom) Latitude',
+ title: 'Southernmost (Bottom) Latitude',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Southernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -90,0 <= South Bounding Latitude Value <= 90,0.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 10
+ }
+ }
+ },
+ westLongitude: {
+ name: 'westLongitude',
+ displayName: 'Geographic Bounding Box Westernmost (Left) Longitude',
+ title: 'Westernmost (Left) Longitude',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Westernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -180,0 <= West Bounding Longitude Value <= 180,0.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 7
+ },
+ eastLongitude: {
+ name: 'eastLongitude',
+ displayName: 'Geographic Bounding Box Easternmost (Right) Longitude',
+ title: 'Easternmost (Right) Longitude',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Easternmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -180,0 <= East Bounding Longitude Value <= 180,0.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 8
+ },
+ northLatitude: {
+ name: 'northLatitude',
+ displayName: 'Geographic Bounding Box Northernmost (Top) Latitude',
+ title: 'Northernmost (Top) Latitude',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Northernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -90,0 <= North Bounding Latitude Value <= 90,0.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 9
+ },
+ southLatitude: {
+ name: 'southLatitude',
+ displayName: 'Geographic Bounding Box Southernmost (Bottom) Latitude',
+ title: 'Southernmost (Bottom) Latitude',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Southernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -90,0 <= South Bounding Latitude Value <= 90,0.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 10
+ }
+ }
+ },
+ {
+ id: 4,
+ name: 'astrophysics',
+ displayName: 'Astronomy and Astrophysics Metadata',
+ displayOnCreate: false,
+ metadataFields: {
+ astroType: {
+ name: 'astroType',
+ displayName: 'Type',
+ title: 'Type',
+ type: 'TEXT',
+ typeClass: 'controlledVocabulary',
+ watermark: '',
+ description: 'The nature or genre of the content of the files in the dataset.',
+ multiple: true,
+ isControlledVocabulary: true,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 0,
+ controlledVocabularyValues: [
+ 'Image',
+ 'Mosaic',
+ 'EventList',
+ 'Spectrum',
+ 'Cube',
+ 'Table',
+ 'Catalog',
+ 'LightCurve',
+ 'Simulation',
+ 'Figure',
+ 'Artwork',
+ 'Animation',
+ 'PrettyPicture',
+ 'Documentation',
+ 'Other',
+ 'Library',
+ 'Press Release',
+ 'Facsimile',
+ 'Historical',
+ 'Observation',
+ 'Object',
+ 'Value',
+ 'ValuePair',
+ 'Survey'
+ ]
+ },
+ astroFacility: {
+ name: 'astroFacility',
+ displayName: 'Facility',
+ title: 'Facility',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'The observatory or facility where the data was obtained. ',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 1
+ },
+ astroInstrument: {
+ name: 'astroInstrument',
+ displayName: 'Instrument',
+ title: 'Instrument',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'The instrument used to collect the data.',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 2
+ },
+ astroObject: {
+ name: 'astroObject',
+ displayName: 'Object',
+ title: 'Object',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Astronomical Objects represented in the data (Given as SIMBAD recognizable names preferred).',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 3
+ },
+ 'resolution.Spatial': {
+ name: 'resolution.Spatial',
+ displayName: 'Spatial Resolution',
+ title: 'Spatial Resolution',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'The spatial (angular) resolution that is typical of the observations, in decimal degrees.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 4
+ },
+ 'resolution.Spectral': {
+ name: 'resolution.Spectral',
+ displayName: 'Spectral Resolution',
+ title: 'Spectral Resolution',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'The spectral resolution that is typical of the observations, given as the ratio \\u03bb/\\u0394\\u03bb.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 5
+ },
+ 'resolution.Temporal': {
+ name: 'resolution.Temporal',
+ displayName: 'Time Resolution',
+ title: 'Time Resolution',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'The temporal resolution that is typical of the observations, given in seconds.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 6
+ },
+ 'coverage.Spectral.Bandpass': {
+ name: 'coverage.Spectral.Bandpass',
+ displayName: 'Bandpass',
+ title: 'Bandpass',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'Conventional bandpass name',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 7
+ },
+ 'coverage.Spectral.CentralWavelength': {
+ name: 'coverage.Spectral.CentralWavelength',
+ displayName: 'Central Wavelength (m)',
+ title: 'Central Wavelength (m)',
+ type: 'FLOAT',
+ typeClass: 'primitive',
+ watermark: 'Enter a floating-point number.',
+ description: 'The central wavelength of the spectral bandpass, in meters.',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 8
+ },
+ 'coverage.Spectral.Wavelength': {
+ name: 'coverage.Spectral.Wavelength',
+ displayName: 'Wavelength Range',
+ title: 'Wavelength Range',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: 'Enter a floating-point number.',
+ description: 'The minimum and maximum wavelength of the spectral bandpass.',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 9,
+ childMetadataFields: {
+ 'coverage.Spectral.MinimumWavelength': {
+ name: 'coverage.Spectral.MinimumWavelength',
+ displayName: 'Wavelength Range Minimum (m)',
+ title: 'Minimum (m)',
+ type: 'FLOAT',
+ typeClass: 'primitive',
+ watermark: 'Enter a floating-point number.',
+ description: 'The minimum wavelength of the spectral bandpass, in meters.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 10
+ },
+ 'coverage.Spectral.MaximumWavelength': {
+ name: 'coverage.Spectral.MaximumWavelength',
+ displayName: 'Wavelength Range Maximum (m)',
+ title: 'Maximum (m)',
+ type: 'FLOAT',
+ typeClass: 'primitive',
+ watermark: 'Enter a floating-point number.',
+ description: 'The maximum wavelength of the spectral bandpass, in meters.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 11
+ }
+ }
+ },
+ 'coverage.Spectral.MinimumWavelength': {
+ name: 'coverage.Spectral.MinimumWavelength',
+ displayName: 'Wavelength Range Minimum (m)',
+ title: 'Minimum (m)',
+ type: 'FLOAT',
+ typeClass: 'primitive',
+ watermark: 'Enter a floating-point number.',
+ description: 'The minimum wavelength of the spectral bandpass, in meters.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 10
+ },
+ 'coverage.Spectral.MaximumWavelength': {
+ name: 'coverage.Spectral.MaximumWavelength',
+ displayName: 'Wavelength Range Maximum (m)',
+ title: 'Maximum (m)',
+ type: 'FLOAT',
+ typeClass: 'primitive',
+ watermark: 'Enter a floating-point number.',
+ description: 'The maximum wavelength of the spectral bandpass, in meters.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 11
+ },
+ 'coverage.Temporal': {
+ name: 'coverage.Temporal',
+ displayName: 'Dataset Date Range',
+ title: 'Dataset Date Range',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description: ' Time period covered by the data.',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 12,
+ childMetadataFields: {
+ 'coverage.Temporal.StartTime': {
+ name: 'coverage.Temporal.StartTime',
+ displayName: 'Dataset Date Range Start',
+ title: 'Start',
+ type: 'DATE',
+ typeClass: 'primitive',
+ watermark: 'YYYY-MM-DD',
+ description: 'Dataset Start Date',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 13
+ },
+ 'coverage.Temporal.StopTime': {
+ name: 'coverage.Temporal.StopTime',
+ displayName: 'Dataset Date Range End',
+ title: 'End',
+ type: 'DATE',
+ typeClass: 'primitive',
+ watermark: 'YYYY-MM-DD',
+ description: 'Dataset End Date',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 14
+ }
+ }
+ },
+ 'coverage.Temporal.StartTime': {
+ name: 'coverage.Temporal.StartTime',
+ displayName: 'Dataset Date Range Start',
+ title: 'Start',
+ type: 'DATE',
+ typeClass: 'primitive',
+ watermark: 'YYYY-MM-DD',
+ description: 'Dataset Start Date',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 13
+ },
+ 'coverage.Temporal.StopTime': {
+ name: 'coverage.Temporal.StopTime',
+ displayName: 'Dataset Date Range End',
+ title: 'End',
+ type: 'DATE',
+ typeClass: 'primitive',
+ watermark: 'YYYY-MM-DD',
+ description: 'Dataset End Date',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 14
+ },
+ 'coverage.Spatial': {
+ name: 'coverage.Spatial',
+ displayName: 'Sky Coverage',
+ title: 'Sky Coverage',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'The sky coverage of the data object.',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 15
+ },
+ 'coverage.Depth': {
+ name: 'coverage.Depth',
+ displayName: 'Depth Coverage',
+ title: 'Depth Coverage',
+ type: 'FLOAT',
+ typeClass: 'primitive',
+ watermark: 'Enter a floating-point number.',
+ description: 'The (typical) depth coverage, or sensitivity, of the data object in Jy.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 16
+ },
+ 'coverage.ObjectDensity': {
+ name: 'coverage.ObjectDensity',
+ displayName: 'Object Density',
+ title: 'Object Density',
+ type: 'FLOAT',
+ typeClass: 'primitive',
+ watermark: 'Enter a floating-point number.',
+ description:
+ 'The (typical) density of objects, catalog entries, telescope pointings, etc., on the sky, in number per square degree.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 17
+ },
+ 'coverage.ObjectCount': {
+ name: 'coverage.ObjectCount',
+ displayName: 'Object Count',
+ title: 'Object Count',
+ type: 'INT',
+ typeClass: 'primitive',
+ watermark: 'Enter an integer.',
+ description: 'The total number of objects, catalog entries, etc., in the data object.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 18
+ },
+ 'coverage.SkyFraction': {
+ name: 'coverage.SkyFraction',
+ displayName: 'Fraction of Sky',
+ title: 'Fraction of Sky',
+ type: 'FLOAT',
+ typeClass: 'primitive',
+ watermark: 'Enter a floating-point number.',
+ description:
+ 'The fraction of the sky represented in the observations, ranging from 0 to 1.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 19
+ },
+ 'coverage.Polarization': {
+ name: 'coverage.Polarization',
+ displayName: 'Polarization',
+ title: 'Polarization',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'The polarization coverage',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 20
+ },
+ redshiftType: {
+ name: 'redshiftType',
+ displayName: 'RedshiftType',
+ title: 'RedshiftType',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'RedshiftType string C "Redshift"; or "Optical" or "Radio" definitions of Doppler velocity used in the data object.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 21
+ },
+ 'resolution.Redshift': {
+ name: 'resolution.Redshift',
+ displayName: 'Redshift Resolution',
+ title: 'Redshift Resolution',
+ type: 'FLOAT',
+ typeClass: 'primitive',
+ watermark: 'Enter a floating-point number.',
+ description:
+ 'The resolution in redshift (unitless) or Doppler velocity (km/s) in the data object.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 22
+ },
+ 'coverage.RedshiftValue': {
+ name: 'coverage.RedshiftValue',
+ displayName: 'Redshift Value',
+ title: 'Redshift Value',
+ type: 'FLOAT',
+ typeClass: 'compound',
+ watermark: 'Enter a floating-point number.',
+ description:
+ 'The value of the redshift (unitless) or Doppler velocity (km/s in the data object.',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 23,
+ childMetadataFields: {
+ 'coverage.Redshift.MinimumValue': {
+ name: 'coverage.Redshift.MinimumValue',
+ displayName: 'Redshift Value Minimum',
+ title: 'Minimum',
+ type: 'FLOAT',
+ typeClass: 'primitive',
+ watermark: 'Enter a floating-point number.',
+ description:
+ 'The minimum value of the redshift (unitless) or Doppler velocity (km/s in the data object.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 24
+ },
+ 'coverage.Redshift.MaximumValue': {
+ name: 'coverage.Redshift.MaximumValue',
+ displayName: 'Redshift Value Maximum',
+ title: 'Maximum',
+ type: 'FLOAT',
+ typeClass: 'primitive',
+ watermark: 'Enter a floating-point number.',
+ description:
+ 'The maximum value of the redshift (unitless) or Doppler velocity (km/s in the data object.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 25
+ }
+ }
+ },
+ 'coverage.Redshift.MinimumValue': {
+ name: 'coverage.Redshift.MinimumValue',
+ displayName: 'Redshift Value Minimum',
+ title: 'Minimum',
+ type: 'FLOAT',
+ typeClass: 'primitive',
+ watermark: 'Enter a floating-point number.',
+ description:
+ 'The minimum value of the redshift (unitless) or Doppler velocity (km/s in the data object.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 24
+ },
+ 'coverage.Redshift.MaximumValue': {
+ name: 'coverage.Redshift.MaximumValue',
+ displayName: 'Redshift Value Maximum',
+ title: 'Maximum',
+ type: 'FLOAT',
+ typeClass: 'primitive',
+ watermark: 'Enter a floating-point number.',
+ description:
+ 'The maximum value of the redshift (unitless) or Doppler velocity (km/s in the data object.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 25
+ }
+ }
+ },
+ {
+ id: 5,
+ name: 'biomedical',
+ displayName: 'Life Sciences Metadata',
+ displayOnCreate: false,
+ metadataFields: {
+ studyDesignType: {
+ name: 'studyDesignType',
+ displayName: 'Design Type',
+ title: 'Design Type',
+ type: 'TEXT',
+ typeClass: 'controlledVocabulary',
+ watermark: '',
+ description: 'Design types that are based on the overall experimental design.',
+ multiple: true,
+ isControlledVocabulary: true,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 0,
+ controlledVocabularyValues: [
+ 'Case Control',
+ 'Cross Sectional',
+ 'Cohort Study',
+ 'Nested Case Control Design',
+ 'Not Specified',
+ 'Parallel Group Design',
+ 'Perturbation Design',
+ 'Randomized Controlled Trial',
+ 'Technological Design',
+ 'Other'
+ ]
+ },
+ studyOtherDesignType: {
+ name: 'studyOtherDesignType',
+ displayName: 'Other Design Type',
+ title: 'Other Design Type',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'If Other was selected in Design Type, list any other design types that were used in this Dataset.',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 1
+ },
+ studyFactorType: {
+ name: 'studyFactorType',
+ displayName: 'Factor Type',
+ title: 'Factor Type',
+ type: 'TEXT',
+ typeClass: 'controlledVocabulary',
+ watermark: '',
+ description: 'Factors used in the Dataset.',
+ multiple: true,
+ isControlledVocabulary: true,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 2,
+ controlledVocabularyValues: [
+ 'Age',
+ 'Biomarkers',
+ 'Cell Surface Markers',
+ 'Cell Type/Cell Line',
+ 'Developmental Stage',
+ 'Disease State',
+ 'Drug Susceptibility',
+ 'Extract Molecule',
+ 'Genetic Characteristics',
+ 'Immunoprecipitation Antibody',
+ 'Organism',
+ 'Passages',
+ 'Platform',
+ 'Sex',
+ 'Strain',
+ 'Time Point',
+ 'Tissue Type',
+ 'Treatment Compound',
+ 'Treatment Type',
+ 'Other'
+ ]
+ },
+ studyOtherFactorType: {
+ name: 'studyOtherFactorType',
+ displayName: 'Other Factor Type',
+ title: 'Other Factor Type',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'If Other was selected in Factor Type, list any other factor types that were used in this Dataset.',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 3
+ },
+ studyAssayOrganism: {
+ name: 'studyAssayOrganism',
+ displayName: 'Organism',
+ title: 'Organism',
+ type: 'TEXT',
+ typeClass: 'controlledVocabulary',
+ watermark: '',
+ description:
+ 'The taxonomic name of the organism used in the Dataset or from which the starting biological material derives.',
+ multiple: true,
+ isControlledVocabulary: true,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 4,
+ controlledVocabularyValues: [
+ 'Arabidopsis thaliana',
+ 'Bos taurus',
+ 'Caenorhabditis elegans',
+ 'Chlamydomonas reinhardtii',
+ 'Danio rerio (zebrafish)',
+ 'Dictyostelium discoideum',
+ 'Drosophila melanogaster',
+ 'Escherichia coli',
+ 'Hepatitis C virus',
+ 'Homo sapiens',
+ 'Mus musculus',
+ 'Mycobacterium africanum',
+ 'Mycobacterium canetti',
+ 'Mycobacterium tuberculosis',
+ 'Mycoplasma pneumoniae',
+ 'Oryza sativa',
+ 'Plasmodium falciparum',
+ 'Pneumocystis carinii',
+ 'Rattus norvegicus',
+ "Saccharomyces cerevisiae (brewer's yeast)",
+ 'Schizosaccharomyces pombe',
+ 'Takifugu rubripes',
+ 'Xenopus laevis',
+ 'Zea mays',
+ 'Other'
+ ]
+ },
+ studyAssayOtherOrganism: {
+ name: 'studyAssayOtherOrganism',
+ displayName: 'Other Organism',
+ title: 'Other Organism',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'If Other was selected in Organism, list any other organisms that were used in this Dataset. Terms from the NCBI Taxonomy are recommended.',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 5
+ },
+ studyAssayMeasurementType: {
+ name: 'studyAssayMeasurementType',
+ displayName: 'Measurement Type',
+ title: 'Measurement Type',
+ type: 'TEXT',
+ typeClass: 'controlledVocabulary',
+ watermark: '',
+ description:
+ 'A term to qualify the endpoint, or what is being measured (e.g. gene expression profiling; protein identification).',
+ multiple: true,
+ isControlledVocabulary: true,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 6,
+ controlledVocabularyValues: [
+ 'cell sorting',
+ 'clinical chemistry analysis',
+ 'copy number variation profiling',
+ 'DNA methylation profiling',
+ 'DNA methylation profiling (Bisulfite-Seq)',
+ 'DNA methylation profiling (MeDIP-Seq)',
+ 'drug susceptibility',
+ 'environmental gene survey',
+ 'genome sequencing',
+ 'hematology',
+ 'histology',
+ 'Histone Modification (ChIP-Seq)',
+ 'loss of heterozygosity profiling',
+ 'metabolite profiling',
+ 'metagenome sequencing',
+ 'protein expression profiling',
+ 'protein identification',
+ 'protein-DNA binding site identification',
+ 'protein-protein interaction detection',
+ 'protein-RNA binding (RIP-Seq)',
+ 'SNP analysis',
+ 'targeted sequencing',
+ 'transcription factor binding (ChIP-Seq)',
+ 'transcription factor binding site identification',
+ 'transcription profiling',
+ 'transcription profiling (Microarray)',
+ 'transcription profiling (RNA-Seq)',
+ 'TRAP translational profiling',
+ 'Other'
+ ]
+ },
+ studyAssayOtherMeasurmentType: {
+ name: 'studyAssayOtherMeasurmentType',
+ displayName: 'Other Measurement Type',
+ title: 'Other Measurement Type',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'If Other was selected in Measurement Type, list any other measurement types that were used. Terms from NCBO Bioportal are recommended.',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 7
+ },
+ studyAssayTechnologyType: {
+ name: 'studyAssayTechnologyType',
+ displayName: 'Technology Type',
+ title: 'Technology Type',
+ type: 'TEXT',
+ typeClass: 'controlledVocabulary',
+ watermark: '',
+ description:
+ 'A term to identify the technology used to perform the measurement (e.g. DNA microarray; mass spectrometry).',
+ multiple: true,
+ isControlledVocabulary: true,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 8,
+ controlledVocabularyValues: [
+ 'culture based drug susceptibility testing, single concentration',
+ 'culture based drug susceptibility testing, two concentrations',
+ 'culture based drug susceptibility testing, three or more concentrations (minimium inhibitory concentration measurement)',
+ 'DNA microarray',
+ 'flow cytometry',
+ 'gel electrophoresis',
+ 'mass spectrometry',
+ 'NMR spectroscopy',
+ 'nucleotide sequencing',
+ 'protein microarray',
+ 'real time PCR',
+ 'no technology required',
+ 'Other'
+ ]
+ },
+ studyAssayOtherTechnologyType: {
+ name: 'studyAssayOtherTechnologyType',
+ displayName: 'Other Technology Type',
+ title: 'Other Technology Type',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'If Other was selected in Technology Type, list any other technology types that were used in this Dataset.',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 9
+ },
+ studyAssayPlatform: {
+ name: 'studyAssayPlatform',
+ displayName: 'Technology Platform',
+ title: 'Technology Platform',
+ type: 'TEXT',
+ typeClass: 'controlledVocabulary',
+ watermark: '',
+ description:
+ 'The manufacturer and name of the technology platform used in the assay (e.g. Bruker AVANCE).',
+ multiple: true,
+ isControlledVocabulary: true,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 10,
+ controlledVocabularyValues: [
+ '210-MS GC Ion Trap (Varian)',
+ '220-MS GC Ion Trap (Varian)',
+ '225-MS GC Ion Trap (Varian)',
+ '240-MS GC Ion Trap (Varian)',
+ '300-MS quadrupole GC/MS (Varian)',
+ '320-MS LC/MS (Varian)',
+ '325-MS LC/MS (Varian)',
+ '320-MS GC/MS (Varian)',
+ '500-MS LC/MS (Varian)',
+ '800D (Jeol)',
+ '910-MS TQ-FT (Varian)',
+ '920-MS TQ-FT (Varian)',
+ '3100 Mass Detector (Waters)',
+ '6110 Quadrupole LC/MS (Agilent)',
+ '6120 Quadrupole LC/MS (Agilent)',
+ '6130 Quadrupole LC/MS (Agilent)',
+ '6140 Quadrupole LC/MS (Agilent)',
+ '6310 Ion Trap LC/MS (Agilent)',
+ '6320 Ion Trap LC/MS (Agilent)',
+ '6330 Ion Trap LC/MS (Agilent)',
+ '6340 Ion Trap LC/MS (Agilent)',
+ '6410 Triple Quadrupole LC/MS (Agilent)',
+ '6430 Triple Quadrupole LC/MS (Agilent)',
+ '6460 Triple Quadrupole LC/MS (Agilent)',
+ '6490 Triple Quadrupole LC/MS (Agilent)',
+ '6530 Q-TOF LC/MS (Agilent)',
+ '6540 Q-TOF LC/MS (Agilent)',
+ '6210 TOF LC/MS (Agilent)',
+ '6220 TOF LC/MS (Agilent)',
+ '6230 TOF LC/MS (Agilent)',
+ '7000B Triple Quadrupole GC/MS (Agilent)',
+ 'AccuTO DART (Jeol)',
+ 'AccuTOF GC (Jeol)',
+ 'AccuTOF LC (Jeol)',
+ 'ACQUITY SQD (Waters)',
+ 'ACQUITY TQD (Waters)',
+ 'Agilent',
+ 'Agilent 5975E GC/MSD (Agilent)',
+ 'Agilent 5975T LTM GC/MSD (Agilent)',
+ '5975C Series GC/MSD (Agilent)',
+ 'Affymetrix',
+ 'amaZon ETD ESI Ion Trap (Bruker)',
+ 'amaZon X ESI Ion Trap (Bruker)',
+ 'apex-ultra hybrid Qq-FTMS (Bruker)',
+ 'API 2000 (AB Sciex)',
+ 'API 3200 (AB Sciex)',
+ 'API 3200 QTRAP (AB Sciex)',
+ 'API 4000 (AB Sciex)',
+ 'API 4000 QTRAP (AB Sciex)',
+ 'API 5000 (AB Sciex)',
+ 'API 5500 (AB Sciex)',
+ 'API 5500 QTRAP (AB Sciex)',
+ 'Applied Biosystems Group (ABI)',
+ 'AQI Biosciences',
+ 'Atmospheric Pressure GC (Waters)',
+ 'autoflex III MALDI-TOF MS (Bruker)',
+ 'autoflex speed(Bruker)',
+ 'AutoSpec Premier (Waters)',
+ 'AXIMA Mega TOF (Shimadzu)',
+ 'AXIMA Performance MALDI TOF/TOF (Shimadzu)',
+ 'A-10 Analyzer (Apogee)',
+ 'A-40-MiniFCM (Apogee)',
+ 'Bactiflow (Chemunex SA)',
+ 'Base4innovation',
+ 'BD BACTEC MGIT 320',
+ 'BD BACTEC MGIT 960',
+ 'BD Radiometric BACTEC 460TB',
+ 'BioNanomatrix',
+ 'Cell Lab Quanta SC (Becman Coulter)',
+ 'Clarus 560 D GC/MS (PerkinElmer)',
+ 'Clarus 560 S GC/MS (PerkinElmer)',
+ 'Clarus 600 GC/MS (PerkinElmer)',
+ 'Complete Genomics',
+ 'Cyan (Dako Cytomation)',
+ 'CyFlow ML (Partec)',
+ 'Cyow SL (Partec)',
+ 'CyFlow SL3 (Partec)',
+ 'CytoBuoy (Cyto Buoy Inc)',
+ 'CytoSence (Cyto Buoy Inc)',
+ 'CytoSub (Cyto Buoy Inc)',
+ 'Danaher',
+ 'DFS (Thermo Scientific)',
+ 'Exactive(Thermo Scientific)',
+ 'FACS Canto (Becton Dickinson)',
+ 'FACS Canto2 (Becton Dickinson)',
+ 'FACS Scan (Becton Dickinson)',
+ 'FC 500 (Becman Coulter)',
+ 'GCmate II GC/MS (Jeol)',
+ 'GCMS-QP2010 Plus (Shimadzu)',
+ 'GCMS-QP2010S Plus (Shimadzu)',
+ 'GCT Premier (Waters)',
+ 'GENEQ',
+ 'Genome Corp.',
+ 'GenoVoxx',
+ 'GnuBio',
+ 'Guava EasyCyte Mini (Millipore)',
+ 'Guava EasyCyte Plus (Millipore)',
+ 'Guava Personal Cell Analysis (Millipore)',
+ 'Guava Personal Cell Analysis-96 (Millipore)',
+ 'Helicos BioSciences',
+ 'Illumina',
+ 'Indirect proportion method on LJ medium',
+ 'Indirect proportion method on Middlebrook Agar 7H9',
+ 'Indirect proportion method on Middlebrook Agar 7H10',
+ 'Indirect proportion method on Middlebrook Agar 7H11',
+ 'inFlux Analyzer (Cytopeia)',
+ 'Intelligent Bio-Systems',
+ 'ITQ 700 (Thermo Scientific)',
+ 'ITQ 900 (Thermo Scientific)',
+ 'ITQ 1100 (Thermo Scientific)',
+ 'JMS-53000 SpiralTOF (Jeol)',
+ 'LaserGen',
+ 'LCMS-2020 (Shimadzu)',
+ 'LCMS-2010EV (Shimadzu)',
+ 'LCMS-IT-TOF (Shimadzu)',
+ 'Li-Cor',
+ 'Life Tech',
+ 'LightSpeed Genomics',
+ 'LCT Premier XE (Waters)',
+ 'LCQ Deca XP MAX (Thermo Scientific)',
+ 'LCQ Fleet (Thermo Scientific)',
+ 'LXQ (Thermo Scientific)',
+ 'LTQ Classic (Thermo Scientific)',
+ 'LTQ XL (Thermo Scientific)',
+ 'LTQ Velos (Thermo Scientific)',
+ 'LTQ Orbitrap Classic (Thermo Scientific)',
+ 'LTQ Orbitrap XL (Thermo Scientific)',
+ 'LTQ Orbitrap Discovery (Thermo Scientific)',
+ 'LTQ Orbitrap Velos (Thermo Scientific)',
+ 'Luminex 100 (Luminex)',
+ 'Luminex 200 (Luminex)',
+ 'MACS Quant (Miltenyi)',
+ 'MALDI SYNAPT G2 HDMS (Waters)',
+ 'MALDI SYNAPT G2 MS (Waters)',
+ 'MALDI SYNAPT HDMS (Waters)',
+ 'MALDI SYNAPT MS (Waters)',
+ 'MALDI micro MX (Waters)',
+ 'maXis (Bruker)',
+ 'maXis G4 (Bruker)',
+ 'microflex LT MALDI-TOF MS (Bruker)',
+ 'microflex LRF MALDI-TOF MS (Bruker)',
+ 'microflex III MALDI-TOF MS (Bruker)',
+ 'micrOTOF II ESI TOF (Bruker)',
+ 'micrOTOF-Q II ESI-Qq-TOF (Bruker)',
+ 'microplate Alamar Blue (resazurin) colorimetric method',
+ 'Mstation (Jeol)',
+ 'MSQ Plus (Thermo Scientific)',
+ 'NABsys',
+ 'Nanophotonics Biosciences',
+ 'Network Biosystems',
+ 'Nimblegen',
+ 'Oxford Nanopore Technologies',
+ 'Pacific Biosciences',
+ 'Population Genetics Technologies',
+ 'Q1000GC UltraQuad (Jeol)',
+ 'Quattro micro API (Waters)',
+ 'Quattro micro GC (Waters)',
+ 'Quattro Premier XE (Waters)',
+ 'QSTAR (AB Sciex)',
+ 'Reveo',
+ 'Roche',
+ 'Seirad',
+ 'solariX hybrid Qq-FTMS (Bruker)',
+ 'Somacount (Bently Instruments)',
+ 'SomaScope (Bently Instruments)',
+ 'SYNAPT G2 HDMS (Waters)',
+ 'SYNAPT G2 MS (Waters)',
+ 'SYNAPT HDMS (Waters)',
+ 'SYNAPT MS (Waters)',
+ 'TripleTOF 5600 (AB Sciex)',
+ 'TSQ Quantum Ultra (Thermo Scientific)',
+ 'TSQ Quantum Access (Thermo Scientific)',
+ 'TSQ Quantum Access MAX (Thermo Scientific)',
+ 'TSQ Quantum Discovery MAX (Thermo Scientific)',
+ 'TSQ Quantum GC (Thermo Scientific)',
+ 'TSQ Quantum XLS (Thermo Scientific)',
+ 'TSQ Vantage (Thermo Scientific)',
+ 'ultrafleXtreme MALDI-TOF MS (Bruker)',
+ 'VisiGen Biotechnologies',
+ 'Xevo G2 QTOF (Waters)',
+ 'Xevo QTof MS (Waters)',
+ 'Xevo TQ MS (Waters)',
+ 'Xevo TQ-S (Waters)',
+ 'Other'
+ ]
+ },
+ studyAssayOtherPlatform: {
+ name: 'studyAssayOtherPlatform',
+ displayName: 'Other Technology Platform',
+ title: 'Other Technology Platform',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'If Other was selected in Technology Platform, list any other technology platforms that were used in this Dataset.',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 11
+ },
+ studyAssayCellType: {
+ name: 'studyAssayCellType',
+ displayName: 'Cell Type',
+ title: 'Cell Type',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'The name of the cell line from which the source or sample derives.',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 12
+ }
+ }
+ },
+ {
+ id: 6,
+ name: 'journal',
+ displayName: 'Journal Metadata',
+ displayOnCreate: false,
+ metadataFields: {
+ journalVolumeIssue: {
+ name: 'journalVolumeIssue',
+ displayName: 'Journal',
+ title: 'Journal',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description:
+ 'Indicates the volume, issue and date of a journal, which this Dataset is associated with.',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 0,
+ childMetadataFields: {
+ journalVolume: {
+ name: 'journalVolume',
+ displayName: 'Journal Volume',
+ title: 'Volume',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'The journal volume which this Dataset is associated with (e.g., Volume 4).',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 1
+ },
+ journalIssue: {
+ name: 'journalIssue',
+ displayName: 'Journal Issue',
+ title: 'Issue',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'The journal issue number which this Dataset is associated with (e.g., Number 2, Autumn).',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 2
+ },
+ journalPubDate: {
+ name: 'journalPubDate',
+ displayName: 'Journal Publication Date',
+ title: 'Publication Date',
+ type: 'DATE',
+ typeClass: 'primitive',
+ watermark: 'YYYY or YYYY-MM or YYYY-MM-DD',
+ description:
+ 'The publication date for this journal volume/issue, which this Dataset is associated with (e.g., 1999).',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 3
+ }
+ }
+ },
+ journalVolume: {
+ name: 'journalVolume',
+ displayName: 'Journal Volume',
+ title: 'Volume',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'The journal volume which this Dataset is associated with (e.g., Volume 4).',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 1
+ },
+ journalIssue: {
+ name: 'journalIssue',
+ displayName: 'Journal Issue',
+ title: 'Issue',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'The journal issue number which this Dataset is associated with (e.g., Number 2, Autumn).',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 2
+ },
+ journalPubDate: {
+ name: 'journalPubDate',
+ displayName: 'Journal Publication Date',
+ title: 'Publication Date',
+ type: 'DATE',
+ typeClass: 'primitive',
+ watermark: 'YYYY or YYYY-MM or YYYY-MM-DD',
+ description:
+ 'The publication date for this journal volume/issue, which this Dataset is associated with (e.g., 1999).',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 3
+ },
+ journalArticleType: {
+ name: 'journalArticleType',
+ displayName: 'Type of Article',
+ title: 'Type of Article',
+ type: 'TEXT',
+ typeClass: 'controlledVocabulary',
+ watermark: '',
+ description:
+ 'Indicates what kind of article this is, for example, a research article, a commentary, a book or product review, a case report, a calendar, etc (based on JATS). ',
+ multiple: false,
+ isControlledVocabulary: true,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 4,
+ controlledVocabularyValues: [
+ 'abstract',
+ 'addendum',
+ 'announcement',
+ 'article-commentary',
+ 'book review',
+ 'books received',
+ 'brief report',
+ 'calendar',
+ 'case report',
+ 'collection',
+ 'correction',
+ 'data paper',
+ 'discussion',
+ 'dissertation',
+ 'editorial',
+ 'in brief',
+ 'introduction',
+ 'letter',
+ 'meeting report',
+ 'news',
+ 'obituary',
+ 'oration',
+ 'partial retraction',
+ 'product review',
+ 'rapid communication',
+ 'reply',
+ 'reprint',
+ 'research article',
+ 'retraction',
+ 'review article',
+ 'translation',
+ 'other'
+ ]
+ }
+ }
+ },
+ {
+ id: 3,
+ name: 'socialscience',
+ displayName: 'Social Science and Humanities Metadata',
+ displayOnCreate: false,
+ metadataFields: {
+ unitOfAnalysis: {
+ name: 'unitOfAnalysis',
+ displayName: 'Unit of Analysis',
+ title: 'Unit of Analysis',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ "Basic unit of analysis or observation that this Dataset describes, such as individuals, families/households, groups, institutions/organizations, administrative units, and more. For information about the DDI's controlled vocabulary for this element, please refer to the DDI web page at http://www.ddialliance.org/controlled-vocabularies.",
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 0
+ },
+ universe: {
+ name: 'universe',
+ displayName: 'Universe',
+ title: 'Universe',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Description of the population covered by the data in the file; the group of people or other elements that are the object of the study and to which the study results refer. Age, nationality, and residence commonly help to delineate a given universe, but any number of other factors may be used, such as age limits, sex, marital status, race, ethnic group, nationality, income, veteran status, criminal convictions, and more. The universe may consist of elements other than persons, such as housing units, court cases, deaths, countries, and so on. In general, it should be possible to tell from the description of the universe whether a given individual or element is a member of the population under study. Also known as the universe of interest, population of interest, and target population.',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 1
+ },
+ timeMethod: {
+ name: 'timeMethod',
+ displayName: 'Time Method',
+ title: 'Time Method',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'The time method or time dimension of the data collection, such as panel, cross-sectional, trend, time- series, or other.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 2
+ },
+ dataCollector: {
+ name: 'dataCollector',
+ displayName: 'Data Collector',
+ title: 'Data Collector',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: 'FamilyName, GivenName or Organization',
+ description:
+ 'Individual, agency or organization responsible for administering the questionnaire or interview or compiling the data.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 3
+ },
+ collectorTraining: {
+ name: 'collectorTraining',
+ displayName: 'Collector Training',
+ title: 'Collector Training',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'Type of training provided to the data collector',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 4
+ },
+ frequencyOfDataCollection: {
+ name: 'frequencyOfDataCollection',
+ displayName: 'Frequency',
+ title: 'Frequency',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'If the data collected includes more than one point in time, indicate the frequency with which the data was collected; that is, monthly, quarterly, or other.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 5
+ },
+ samplingProcedure: {
+ name: 'samplingProcedure',
+ displayName: 'Sampling Procedure',
+ title: 'Sampling Procedure',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Type of sample and sample design used to select the survey respondents to represent the population. May include reference to the target sample size and the sampling fraction.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 6
+ },
+ targetSampleSize: {
+ name: 'targetSampleSize',
+ displayName: 'Target Sample Size',
+ title: 'Target Sample Size',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description:
+ 'Specific information regarding the target sample size, actual sample size, and the formula used to determine this.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 7,
+ childMetadataFields: {
+ targetSampleActualSize: {
+ name: 'targetSampleActualSize',
+ displayName: 'Target Sample Size Actual',
+ title: 'Actual',
+ type: 'INT',
+ typeClass: 'primitive',
+ watermark: 'Enter an integer...',
+ description: 'Actual sample size.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 8
+ },
+ targetSampleSizeFormula: {
+ name: 'targetSampleSizeFormula',
+ displayName: 'Target Sample Size Formula',
+ title: 'Formula',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'Formula used to determine target sample size.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 9
+ }
+ }
+ },
+ targetSampleActualSize: {
+ name: 'targetSampleActualSize',
+ displayName: 'Target Sample Size Actual',
+ title: 'Actual',
+ type: 'INT',
+ typeClass: 'primitive',
+ watermark: 'Enter an integer...',
+ description: 'Actual sample size.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 8
+ },
+ targetSampleSizeFormula: {
+ name: 'targetSampleSizeFormula',
+ displayName: 'Target Sample Size Formula',
+ title: 'Formula',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'Formula used to determine target sample size.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 9
+ },
+ deviationsFromSampleDesign: {
+ name: 'deviationsFromSampleDesign',
+ displayName: 'Major Deviations for Sample Design',
+ title: 'Major Deviations for Sample Design',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Show correspondence as well as discrepancies between the sampled units (obtained) and available statistics for the population (age, sex-ratio, marital status, etc.) as a whole.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 10
+ },
+ collectionMode: {
+ name: 'collectionMode',
+ displayName: 'Collection Mode',
+ title: 'Collection Mode',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Method used to collect the data; instrumentation characteristics (e.g., telephone interview, mail questionnaire, or other).',
+ multiple: true,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 11
+ },
+ researchInstrument: {
+ name: 'researchInstrument',
+ displayName: 'Type of Research Instrument',
+ title: 'Type of Research Instrument',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Type of data collection instrument used. Structured indicates an instrument in which all respondents are asked the same questions/tests, possibly with precoded answers. If a small portion of such a questionnaire includes open-ended questions, provide appropriate comments. Semi-structured indicates that the research instrument contains mainly open-ended questions. Unstructured indicates that in-depth interviews were conducted.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 12
+ },
+ dataCollectionSituation: {
+ name: 'dataCollectionSituation',
+ displayName: 'Characteristics of Data Collection Situation',
+ title: 'Characteristics of Data Collection Situation',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Description of noteworthy aspects of the data collection situation. Includes information on factors such as cooperativeness of respondents, duration of interviews, number of call backs, or similar.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 13
+ },
+ actionsToMinimizeLoss: {
+ name: 'actionsToMinimizeLoss',
+ displayName: 'Actions to Minimize Losses',
+ title: 'Actions to Minimize Losses',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Summary of actions taken to minimize data loss. Include information on actions such as follow-up visits, supervisory checks, historical matching, estimation, and so on.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 14
+ },
+ controlOperations: {
+ name: 'controlOperations',
+ displayName: 'Control Operations',
+ title: 'Control Operations',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Control OperationsMethods to facilitate data control performed by the primary investigator or by the data archive.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 15
+ },
+ weighting: {
+ name: 'weighting',
+ displayName: 'Weighting',
+ title: 'Weighting',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'The use of sampling procedures might make it necessary to apply weights to produce accurate statistical results. Describes the criteria for using weights in analysis of a collection. If a weighting formula or coefficient was developed, the formula is provided, its elements are defined, and it is indicated how the formula was applied to the data.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 16
+ },
+ cleaningOperations: {
+ name: 'cleaningOperations',
+ displayName: 'Cleaning Operations',
+ title: 'Cleaning Operations',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Methods used to clean the data collection, such as consistency checking, wildcode checking, or other.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 17
+ },
+ datasetLevelErrorNotes: {
+ name: 'datasetLevelErrorNotes',
+ displayName: 'Study Level Error Notes',
+ title: 'Study Level Error Notes',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Note element used for any information annotating or clarifying the methodology and processing of the study. ',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 18
+ },
+ responseRate: {
+ name: 'responseRate',
+ displayName: 'Response Rate',
+ title: 'Response Rate',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'Percentage of sample members who provided information.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 19
+ },
+ samplingErrorEstimates: {
+ name: 'samplingErrorEstimates',
+ displayName: 'Estimates of Sampling Error',
+ title: 'Estimates of Sampling Error',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Measure of how precisely one can estimate a population value from a given sample.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 20
+ },
+ otherDataAppraisal: {
+ name: 'otherDataAppraisal',
+ displayName: 'Other Forms of Data Appraisal',
+ title: 'Other Forms of Data Appraisal',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description:
+ 'Other issues pertaining to the data appraisal. Describe issues such as response variance, nonresponse rate and testing for bias, interviewer and response bias, confidence levels, question bias, or similar.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 21
+ },
+ socialScienceNotes: {
+ name: 'socialScienceNotes',
+ displayName: 'Notes',
+ title: 'Notes',
+ type: 'NONE',
+ typeClass: 'compound',
+ watermark: '',
+ description: 'General notes about this Dataset.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 22,
+ childMetadataFields: {
+ socialScienceNotesType: {
+ name: 'socialScienceNotesType',
+ displayName: 'Notes Type',
+ title: 'Type',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'Type of note.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 23
+ },
+ socialScienceNotesSubject: {
+ name: 'socialScienceNotesSubject',
+ displayName: 'Notes Subject',
+ title: 'Subject',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'Note subject.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 24
+ },
+ socialScienceNotesText: {
+ name: 'socialScienceNotesText',
+ displayName: 'Notes Text',
+ title: 'Text',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'Text for this note.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 25
+ }
+ }
+ },
+ socialScienceNotesType: {
+ name: 'socialScienceNotesType',
+ displayName: 'Notes Type',
+ title: 'Type',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'Type of note.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 23
+ },
+ socialScienceNotesSubject: {
+ name: 'socialScienceNotesSubject',
+ displayName: 'Notes Subject',
+ title: 'Subject',
+ type: 'TEXT',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'Note subject.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 24
+ },
+ socialScienceNotesText: {
+ name: 'socialScienceNotesText',
+ displayName: 'Notes Text',
+ title: 'Text',
+ type: 'TEXTBOX',
+ typeClass: 'primitive',
+ watermark: '',
+ description: 'Text for this note.',
+ multiple: false,
+ isControlledVocabulary: false,
+ displayFormat: '',
+ isRequired: false,
+ displayOrder: 25
+ }
+ }
+ }
+] as MetadataBlockInfo2[]
diff --git a/src/sections/create-dataset/useDefineDatasetMetadataFormFields.tsx b/src/sections/create-dataset/useDefineDatasetMetadataFormFields.tsx
new file mode 100644
index 000000000..b27b786bf
--- /dev/null
+++ b/src/sections/create-dataset/useDefineDatasetMetadataFormFields.tsx
@@ -0,0 +1,56 @@
+import { useEffect, useRef, useState } from 'react'
+import { getMetadataBlockInfoByCollectionId } from '../../metadata-block-info/domain/useCases/getMetadataBlockInfoByCollectionId'
+import { MetadataBlockInfoRepository } from '../../metadata-block-info/domain/repositories/MetadataBlockInfoRepository'
+
+/*
+ ** Notes:
+ - We will check which blocks to display on the create dataset form. (citation, geospatial, etc...)
+ - We will use the getDatasetMetadataBlockFields use case to get the fields to render according to the Collection Id / Dataverse Id.
+*/
+
+export const useDefineDatasetMetadataFormFields = (
+ metadataBlockInfoRepository: MetadataBlockInfoRepository
+) => {
+ const ref = useRef(false)
+ const [fieldsToRender, setFieldsToRender] = useState([])
+ const [isLoading, setIsLoading] = useState(true)
+ const [error, setError] = useState(null)
+
+ useEffect(() => {
+ const handleGetDatasetMetadataBlockFields = async () => {
+ setIsLoading(true)
+ try {
+ const metadataBlocksInfo = await getMetadataBlockInfoByCollectionId(
+ metadataBlockInfoRepository,
+ 'someCitation',
+ true
+ )
+ console.log(metadataBlocksInfo)
+ // setFieldsToRender(fields)
+ // const { data } = await axios.get<{ status: string; data: MetadataBlockInfo2 }>(
+ // `http://localhost:8000/api/v1/metadatablocks/${MetadataBlockName.CITATION}`
+ // )
+ //const metadataBlockInfo = data.data
+ } catch (err) {
+ console.error(err)
+ const errorMessage =
+ err instanceof Error && err.message
+ ? err.message
+ : 'Something went wrong getting the datasets'
+ setError(errorMessage)
+ } finally {
+ setIsLoading(false)
+ }
+ }
+ // if (!ref.current) {
+ void handleGetDatasetMetadataBlockFields()
+ // ref.current = true
+ // }
+ }, [])
+
+ return {
+ fieldsToRender,
+ error,
+ isLoading
+ }
+}
From c8a788fcf4acae93961adc4892be94fb17c55aa5 Mon Sep 17 00:00:00 2001
From: German Saracca
Date: Thu, 21 Mar 2024 13:38:32 -0300
Subject: [PATCH 02/20] feat(DesignSystem): using Accordion own props and
extending AccordionItem html attributes
---
.../src/lib/components/accordion/Accordion.tsx | 14 +++-----------
.../src/lib/components/accordion/AccordionItem.tsx | 10 ++++++----
2 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/packages/design-system/src/lib/components/accordion/Accordion.tsx b/packages/design-system/src/lib/components/accordion/Accordion.tsx
index b42b65513..11dd38c38 100644
--- a/packages/design-system/src/lib/components/accordion/Accordion.tsx
+++ b/packages/design-system/src/lib/components/accordion/Accordion.tsx
@@ -1,18 +1,10 @@
-import { ReactNode } from 'react'
-import { Accordion as AccordionBS } from 'react-bootstrap'
+import { Accordion as AccordionBS, AccordionProps as AccordionPropsBS } from 'react-bootstrap'
import { AccordionItem } from './AccordionItem'
import { AccordionBody } from './AccordionBody'
import { AccordionHeader } from './AccordionHeader'
-
-interface AccordionProps {
- defaultActiveKey?: string[] | string
- alwaysOpen?: boolean
- children: ReactNode
-}
-
-function Accordion({ defaultActiveKey, children, alwaysOpen = false }: AccordionProps) {
+function Accordion({ alwaysOpen = false, children, ...rest }: AccordionPropsBS) {
return (
-
+
{children}
)
diff --git a/packages/design-system/src/lib/components/accordion/AccordionItem.tsx b/packages/design-system/src/lib/components/accordion/AccordionItem.tsx
index 54ce8c6eb..772e5ce4f 100644
--- a/packages/design-system/src/lib/components/accordion/AccordionItem.tsx
+++ b/packages/design-system/src/lib/components/accordion/AccordionItem.tsx
@@ -1,11 +1,13 @@
-import { ReactNode } from 'react'
+import { ElementType, ReactNode } from 'react'
import { Accordion as AccordionBS } from 'react-bootstrap'
-interface AccordionItemProps {
+export interface AccordionItemProps extends React.HTMLAttributes {
eventKey: string
children: ReactNode
+ bsPrefix?: string
+ as?: ElementType
}
-export function AccordionItem({ eventKey, children }: AccordionItemProps) {
- return {children}
+export function AccordionItem({ children, ...rest }: AccordionItemProps) {
+ return {children}
}
From 099563e21f69a5787e1e11b322621bc39c0f39b5 Mon Sep 17 00:00:00 2001
From: German Saracca
Date: Thu, 21 Mar 2024 18:45:10 -0300
Subject: [PATCH 03/20] feat(DynamicFormFieldsRender): filter blocks and fields
---
.../CreateDatasetForm.module.scss | 36 ++++++++
.../create-dataset/CreateDatasetForm.tsx | 35 ++++++--
.../MetadataBlockFields/index.tsx | 3 +
...etadataBlocksInfoByCollectionIdResponse.ts | 74 ++++++++++-------
.../useDefineDatasetMetadataFormFields.tsx | 56 -------------
.../useGetMetadataBlocksInfo.tsx | 82 +++++++++++++++++++
6 files changed, 193 insertions(+), 93 deletions(-)
create mode 100644 src/sections/create-dataset/CreateDatasetForm.module.scss
create mode 100644 src/sections/create-dataset/MetadataBlockFields/index.tsx
delete mode 100644 src/sections/create-dataset/useDefineDatasetMetadataFormFields.tsx
create mode 100644 src/sections/create-dataset/useGetMetadataBlocksInfo.tsx
diff --git a/src/sections/create-dataset/CreateDatasetForm.module.scss b/src/sections/create-dataset/CreateDatasetForm.module.scss
new file mode 100644
index 000000000..67a718c85
--- /dev/null
+++ b/src/sections/create-dataset/CreateDatasetForm.module.scss
@@ -0,0 +1,36 @@
+.header {
+ margin: 0.5em 0;
+}
+
+.container {
+ // margin: 0.5rem 0;
+}
+
+.metadataAccordionContainer {
+ // border: solid 2px blue;
+
+ .customAccordion {
+ display: flex;
+ flex-direction: column;
+ gap: 0.75rem;
+ }
+
+ .customAccordionItem {
+ border: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color);
+ border-radius: var(--bs-accordion-border-radius);
+
+ &:not(:first-of-type) {
+ border-top: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color);
+ }
+
+ button {
+ background-image: linear-gradient(to bottom, var(--bs-gray-100) 0, var(--bs-gray-300) 100%);
+ border-radius: calc(var(--bs-accordion-border-radius) - var(--bs-accordion-border-width));
+
+ &[aria-expanded='true'] {
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+ }
+ }
+ }
+}
diff --git a/src/sections/create-dataset/CreateDatasetForm.tsx b/src/sections/create-dataset/CreateDatasetForm.tsx
index 5ed8b4c34..2bb700173 100644
--- a/src/sections/create-dataset/CreateDatasetForm.tsx
+++ b/src/sections/create-dataset/CreateDatasetForm.tsx
@@ -1,10 +1,9 @@
import { ChangeEvent, FormEvent, MouseEvent, useEffect } from 'react'
-import { Alert, Button, Form } from '@iqss/dataverse-design-system'
+import { Accordion } from '@iqss/dataverse-design-system'
import { useTranslation } from 'react-i18next'
import { RequiredFieldText } from '../shared/form/RequiredFieldText/RequiredFieldText'
import { SeparationLine } from '../shared/layout/SeparationLine/SeparationLine'
import { useCreateDatasetForm, SubmissionStatus } from './useCreateDatasetForm'
-import styles from '/src/sections/dataset/Dataset.module.scss'
import { useLoading } from '../loading/LoadingContext'
import { DatasetRepository } from '../../dataset/domain/repositories/DatasetRepository'
import { MetadataBlockInfoRepository } from '../../metadata-block-info/domain/repositories/MetadataBlockInfoRepository'
@@ -12,8 +11,9 @@ import { useDatasetFormData } from './useDatasetFormData'
import { Route } from '../Route.enum'
import { useNavigate } from 'react-router-dom'
import { useDatasetValidator } from './useDatasetValidator'
-import { DatasetMetadataSubField } from '../../dataset/domain/models/Dataset'
-import { useDefineDatasetMetadataFormFields } from './useDefineDatasetMetadataFormFields'
+import { useGetMetadataBlocksInfo } from './useGetMetadataBlocksInfo'
+// import { DatasetMetadataSubField } from '../../dataset/domain/models/Dataset'
+import styles from './CreateDatasetForm.module.scss'
interface CreateDatasetFormProps {
repository: DatasetRepository
@@ -27,12 +27,16 @@ export function CreateDatasetForm({
const navigate = useNavigate()
const { t } = useTranslation('createDataset')
const { isLoading, setIsLoading } = useLoading()
+ const { metadataBlocks, isLoading: isLoadingMetadataBlocksToRender } = useGetMetadataBlocksInfo(
+ metadataBlockInfoRepository,
+ 'someCollectionId', // TODO:ME Get collection id from url?
+ 'create'
+ )
const { validationErrors, datasetIsValid } = useDatasetValidator()
const { formData, updateFormData } = useDatasetFormData(datasetIsValid)
const { submissionStatus, submitForm } = useCreateDatasetForm(repository, datasetIsValid)
- const { fieldsToRender, isLoading: isLoadingFieldsToRender } = useDefineDatasetMetadataFormFields(
- metadataBlockInfoRepository
- )
+
+ console.log({ metadataBlocks, isLoadingMetadataBlocksToRender })
const handleFieldChange = (event: ChangeEvent) => {
const { name, checked } = event.target
@@ -71,7 +75,20 @@ export function CreateDatasetForm({
{t('datasetForm.status.success')}
)}
{submissionStatus === SubmissionStatus.Errored && {t('datasetForm.status.failed')}
}
-
+ */}
)
diff --git a/src/sections/create-dataset/MetadataBlockFields/index.tsx b/src/sections/create-dataset/MetadataBlockFields/index.tsx
new file mode 100644
index 000000000..3042133bf
--- /dev/null
+++ b/src/sections/create-dataset/MetadataBlockFields/index.tsx
@@ -0,0 +1,3 @@
+export const MetadataBlockFields = () => {
+ return MetadataBlockFields
+}
diff --git a/src/sections/create-dataset/mocks/metadataBlocksInfoByCollectionIdResponse.ts b/src/sections/create-dataset/mocks/metadataBlocksInfoByCollectionIdResponse.ts
index 00134fbd9..57e1bdec7 100644
--- a/src/sections/create-dataset/mocks/metadataBlocksInfoByCollectionIdResponse.ts
+++ b/src/sections/create-dataset/mocks/metadataBlocksInfoByCollectionIdResponse.ts
@@ -34,7 +34,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
multiple: false,
isControlledVocabulary: false,
displayFormat: '',
- displayOnCreate: true,
+ displayOnCreate: false,
isRequired: false,
displayOrder: 1
},
@@ -51,7 +51,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
- displayOnCreate: true,
+ displayOnCreate: false,
displayOrder: 2
},
alternativeURL: {
@@ -67,7 +67,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
- displayOnCreate: true,
+ displayOnCreate: false,
displayOrder: 3
},
otherId: {
@@ -84,7 +84,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: ':',
isRequired: false,
displayOrder: 4,
- displayOnCreate: true,
+ displayOnCreate: false,
childMetadataFields: {
otherIdAgency: {
name: 'otherIdAgency',
@@ -129,7 +129,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: true,
displayOrder: 7,
- displayOnCreate: true,
+ displayOnCreate: false,
childMetadataFields: {
authorName: {
name: 'authorName',
@@ -216,7 +216,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: true,
displayOrder: 12,
- displayOnCreate: true,
+ displayOnCreate: false,
childMetadataFields: {
datasetContactName: {
name: 'datasetContactName',
@@ -277,7 +277,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: true,
displayOrder: 16,
- displayOnCreate: true,
+ displayOnCreate: false,
childMetadataFields: {
dsDescriptionValue: {
name: 'dsDescriptionValue',
@@ -323,7 +323,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: true,
displayOrder: 19,
- displayOnCreate: true,
+ displayOnCreate: false,
controlledVocabularyValues: [
'Agricultural Sciences',
'Arts and Humanities',
@@ -355,7 +355,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 20,
- displayOnCreate: true,
+ displayOnCreate: false,
childMetadataFields: {
keywordValue: {
name: 'keywordValue',
@@ -416,7 +416,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 24,
- displayOnCreate: true,
+ displayOnCreate: false,
childMetadataFields: {
topicClassValue: {
name: 'topicClassValue',
@@ -477,7 +477,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 28,
- displayOnCreate: true,
+ displayOnCreate: false,
childMetadataFields: {
publicationCitation: {
name: 'publicationCitation',
@@ -572,7 +572,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 33,
- displayOnCreate: true
+ displayOnCreate: false
},
language: {
name: 'language',
@@ -587,7 +587,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 34,
- displayOnCreate: true,
+ displayOnCreate: false,
controlledVocabularyValues: [
'Abkhaz',
'Afar',
@@ -791,7 +791,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 35,
- displayOnCreate: true,
+ displayOnCreate: false,
childMetadataFields: {
producerName: {
name: 'producerName',
@@ -880,7 +880,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
- displayOnCreate: true,
+ displayOnCreate: false,
displayOrder: 41
},
productionPlace: {
@@ -896,7 +896,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
- displayOnCreate: true,
+ displayOnCreate: false,
displayOrder: 42
},
contributor: {
@@ -913,6 +913,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: ':',
isRequired: false,
displayOrder: 43,
+ displayOnCreate: false,
childMetadataFields: {
contributorType: {
name: 'contributorType',
@@ -977,6 +978,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: ':',
isRequired: false,
displayOrder: 46,
+ displayOnCreate: false,
childMetadataFields: {
grantNumberAgency: {
name: 'grantNumberAgency',
@@ -1023,6 +1025,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 49,
+ displayOnCreate: false,
childMetadataFields: {
distributorName: {
name: 'distributorName',
@@ -1111,7 +1114,8 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
- displayOrder: 55
+ displayOrder: 55,
+ displayOnCreate: false
},
depositor: {
name: 'depositor',
@@ -1126,7 +1130,8 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
- displayOrder: 56
+ displayOrder: 56,
+ displayOnCreate: false
},
dateOfDeposit: {
name: 'dateOfDeposit',
@@ -1140,7 +1145,8 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
- displayOrder: 57
+ displayOrder: 57,
+ displayOnCreate: false
},
timePeriodCovered: {
name: 'timePeriodCovered',
@@ -1156,6 +1162,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: ';',
isRequired: false,
displayOrder: 58,
+ displayOnCreate: false,
childMetadataFields: {
timePeriodCoveredStart: {
name: 'timePeriodCoveredStart',
@@ -1200,6 +1207,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: ';',
isRequired: false,
displayOrder: 61,
+ displayOnCreate: false,
childMetadataFields: {
dateOfCollectionStart: {
name: 'dateOfCollectionStart',
@@ -1244,7 +1252,8 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
- displayOrder: 64
+ displayOrder: 64,
+ displayOnCreate: false
},
series: {
name: 'series',
@@ -1259,6 +1268,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: ':',
isRequired: false,
displayOrder: 65,
+ displayOnCreate: false,
childMetadataFields: {
seriesName: {
name: 'seriesName',
@@ -1304,6 +1314,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: ',',
isRequired: false,
displayOrder: 68,
+ displayOnCreate: false,
childMetadataFields: {
softwareName: {
name: 'softwareName',
@@ -1348,7 +1359,8 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
- displayOrder: 71
+ displayOrder: 71,
+ displayOnCreate: false
},
relatedDatasets: {
name: 'relatedDatasets',
@@ -1363,7 +1375,8 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
- displayOrder: 72
+ displayOrder: 72,
+ displayOnCreate: false
},
otherReferences: {
name: 'otherReferences',
@@ -1378,7 +1391,8 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
- displayOrder: 73
+ displayOrder: 73,
+ displayOnCreate: false
},
dataSources: {
name: 'dataSources',
@@ -1393,7 +1407,8 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
- displayOrder: 74
+ displayOrder: 74,
+ displayOnCreate: false
},
originOfSources: {
name: 'originOfSources',
@@ -1408,7 +1423,8 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
- displayOrder: 75
+ displayOrder: 75,
+ displayOnCreate: false
},
characteristicOfSources: {
name: 'characteristicOfSources',
@@ -1422,7 +1438,8 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
- displayOrder: 76
+ displayOrder: 76,
+ displayOnCreate: false
},
accessToSources: {
name: 'accessToSources',
@@ -1437,7 +1454,8 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
- displayOrder: 77
+ displayOrder: 77,
+ displayOnCreate: false
}
}
},
@@ -1445,7 +1463,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
id: 2,
name: 'geospatial',
displayName: 'Geospatial Metadata',
- displayOnCreate: false,
+ displayOnCreate: true,
metadataFields: {
geographicCoverage: {
name: 'geographicCoverage',
diff --git a/src/sections/create-dataset/useDefineDatasetMetadataFormFields.tsx b/src/sections/create-dataset/useDefineDatasetMetadataFormFields.tsx
deleted file mode 100644
index b27b786bf..000000000
--- a/src/sections/create-dataset/useDefineDatasetMetadataFormFields.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { useEffect, useRef, useState } from 'react'
-import { getMetadataBlockInfoByCollectionId } from '../../metadata-block-info/domain/useCases/getMetadataBlockInfoByCollectionId'
-import { MetadataBlockInfoRepository } from '../../metadata-block-info/domain/repositories/MetadataBlockInfoRepository'
-
-/*
- ** Notes:
- - We will check which blocks to display on the create dataset form. (citation, geospatial, etc...)
- - We will use the getDatasetMetadataBlockFields use case to get the fields to render according to the Collection Id / Dataverse Id.
-*/
-
-export const useDefineDatasetMetadataFormFields = (
- metadataBlockInfoRepository: MetadataBlockInfoRepository
-) => {
- const ref = useRef(false)
- const [fieldsToRender, setFieldsToRender] = useState([])
- const [isLoading, setIsLoading] = useState(true)
- const [error, setError] = useState(null)
-
- useEffect(() => {
- const handleGetDatasetMetadataBlockFields = async () => {
- setIsLoading(true)
- try {
- const metadataBlocksInfo = await getMetadataBlockInfoByCollectionId(
- metadataBlockInfoRepository,
- 'someCitation',
- true
- )
- console.log(metadataBlocksInfo)
- // setFieldsToRender(fields)
- // const { data } = await axios.get<{ status: string; data: MetadataBlockInfo2 }>(
- // `http://localhost:8000/api/v1/metadatablocks/${MetadataBlockName.CITATION}`
- // )
- //const metadataBlockInfo = data.data
- } catch (err) {
- console.error(err)
- const errorMessage =
- err instanceof Error && err.message
- ? err.message
- : 'Something went wrong getting the datasets'
- setError(errorMessage)
- } finally {
- setIsLoading(false)
- }
- }
- // if (!ref.current) {
- void handleGetDatasetMetadataBlockFields()
- // ref.current = true
- // }
- }, [])
-
- return {
- fieldsToRender,
- error,
- isLoading
- }
-}
diff --git a/src/sections/create-dataset/useGetMetadataBlocksInfo.tsx b/src/sections/create-dataset/useGetMetadataBlocksInfo.tsx
new file mode 100644
index 000000000..8f32c2a6a
--- /dev/null
+++ b/src/sections/create-dataset/useGetMetadataBlocksInfo.tsx
@@ -0,0 +1,82 @@
+import { useEffect, useState } from 'react'
+import { getMetadataBlockInfoByCollectionId } from '../../metadata-block-info/domain/useCases/getMetadataBlockInfoByCollectionId'
+import { MetadataBlockInfoRepository } from '../../metadata-block-info/domain/repositories/MetadataBlockInfoRepository'
+import { MetadataBlockInfo2 } from '../../metadata-block-info/domain/models/MetadataBlockInfo'
+
+/**
+ * Hook to get the metadata blocks to show and its info, based on the parent collection id of the dataset
+ *
+ * @param metadataBlockInfoRepository The repository to get the metadata block info
+ * @param collectionId The id of the collection that the dataset belongs to
+ * @param mode The mode of the form (create or edit), if edit mode, this hook will return only the metadata blocks that have displayOnCreate set to true
+ */
+
+export const useGetMetadataBlocksInfo = (
+ metadataBlockInfoRepository: MetadataBlockInfoRepository,
+ collectionId: string,
+ mode: 'create' | 'edit'
+) => {
+ const [metadataBlocks, setMetadataBlocks] = useState([])
+ const [isLoading, setIsLoading] = useState(true)
+ const [error, setError] = useState(null)
+
+ const onCreateMode = mode === 'create'
+
+ // Filter the metadata blocks to show only the ones that have displayOnCreate set to true and its metadata fields that also have displayOnCreate set to true
+ const filterMetadataBlocksOnCreateMode = (metadataBlocks: MetadataBlockInfo2[]) => {
+ return metadataBlocks
+ .filter((metadataBlockInfo) => metadataBlockInfo.displayOnCreate === true)
+ .map((metadataBlockInfo) => {
+ const filteredMetadataFields: MetadataBlockInfo2['metadataFields'] = {}
+
+ for (const field in metadataBlockInfo.metadataFields) {
+ if (
+ field in metadataBlockInfo.metadataFields &&
+ metadataBlockInfo.metadataFields[field].displayOnCreate === true
+ ) {
+ filteredMetadataFields[field] = metadataBlockInfo.metadataFields[field]
+ }
+ }
+
+ return {
+ ...metadataBlockInfo,
+ metadataFields: filteredMetadataFields
+ }
+ })
+ }
+
+ useEffect(() => {
+ const handleGetDatasetMetadataBlockFields = async () => {
+ setIsLoading(true)
+ try {
+ const metadataBlocksInfo = await getMetadataBlockInfoByCollectionId(
+ metadataBlockInfoRepository,
+ collectionId,
+ onCreateMode
+ )
+
+ setMetadataBlocks(
+ mode === 'create'
+ ? filterMetadataBlocksOnCreateMode(metadataBlocksInfo)
+ : metadataBlocksInfo
+ )
+ } catch (err) {
+ console.error(err)
+ const errorMessage =
+ err instanceof Error && err.message
+ ? err.message
+ : 'Something went wrong getting the datasets'
+ setError(errorMessage)
+ } finally {
+ setIsLoading(false)
+ }
+ }
+ void handleGetDatasetMetadataBlockFields()
+ }, [])
+
+ return {
+ metadataBlocks,
+ error,
+ isLoading
+ }
+}
From 21846c221f350d993035316c1234e2c0129cabff Mon Sep 17 00:00:00 2001
From: German Saracca
Date: Fri, 22 Mar 2024 09:29:33 -0300
Subject: [PATCH 04/20] feat(DynamicFormFieldsRender): remove custom styles
from accordion and extend accordion html attributs and props
---
.../components/accordion/AccordionBody.tsx | 10 +++++---
.../components/accordion/AccordionHeader.tsx | 11 +++++---
.../CreateDatasetForm.module.scss | 25 -------------------
.../create-dataset/CreateDatasetForm.tsx | 7 ++----
4 files changed, 15 insertions(+), 38 deletions(-)
diff --git a/packages/design-system/src/lib/components/accordion/AccordionBody.tsx b/packages/design-system/src/lib/components/accordion/AccordionBody.tsx
index 09cbe7ce5..5f437e51f 100644
--- a/packages/design-system/src/lib/components/accordion/AccordionBody.tsx
+++ b/packages/design-system/src/lib/components/accordion/AccordionBody.tsx
@@ -1,10 +1,12 @@
-import { ReactNode } from 'react'
+import { ElementType, ReactNode } from 'react'
import { Accordion as AccordionBS } from 'react-bootstrap'
-interface AccordionBodyProps {
+interface AccordionBodyProps extends React.HTMLAttributes {
children: ReactNode
+ bsPrefix?: string
+ as?: ElementType
}
-export function AccordionBody({ children }: AccordionBodyProps) {
- return {children}
+export function AccordionBody({ children, ...rest }: AccordionBodyProps) {
+ return {children}
}
diff --git a/packages/design-system/src/lib/components/accordion/AccordionHeader.tsx b/packages/design-system/src/lib/components/accordion/AccordionHeader.tsx
index 521ad0697..a06c10bae 100644
--- a/packages/design-system/src/lib/components/accordion/AccordionHeader.tsx
+++ b/packages/design-system/src/lib/components/accordion/AccordionHeader.tsx
@@ -1,10 +1,13 @@
-import { ReactNode } from 'react'
+import { ElementType, ReactNode } from 'react'
import { Accordion as AccordionBS } from 'react-bootstrap'
-interface AccordionHeaderProps {
+interface AccordionHeaderProps extends React.HTMLAttributes {
children: ReactNode
+ onClick?: () => void
+ bsPrefix?: string
+ as?: ElementType
}
-export function AccordionHeader({ children }: AccordionHeaderProps) {
- return {children}
+export function AccordionHeader({ children, ...rest }: AccordionHeaderProps) {
+ return {children}
}
diff --git a/src/sections/create-dataset/CreateDatasetForm.module.scss b/src/sections/create-dataset/CreateDatasetForm.module.scss
index 67a718c85..764526dd3 100644
--- a/src/sections/create-dataset/CreateDatasetForm.module.scss
+++ b/src/sections/create-dataset/CreateDatasetForm.module.scss
@@ -8,29 +8,4 @@
.metadataAccordionContainer {
// border: solid 2px blue;
-
- .customAccordion {
- display: flex;
- flex-direction: column;
- gap: 0.75rem;
- }
-
- .customAccordionItem {
- border: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color);
- border-radius: var(--bs-accordion-border-radius);
-
- &:not(:first-of-type) {
- border-top: var(--bs-accordion-border-width) solid var(--bs-accordion-border-color);
- }
-
- button {
- background-image: linear-gradient(to bottom, var(--bs-gray-100) 0, var(--bs-gray-300) 100%);
- border-radius: calc(var(--bs-accordion-border-radius) - var(--bs-accordion-border-width));
-
- &[aria-expanded='true'] {
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
- }
- }
- }
}
diff --git a/src/sections/create-dataset/CreateDatasetForm.tsx b/src/sections/create-dataset/CreateDatasetForm.tsx
index 2bb700173..3b108e72a 100644
--- a/src/sections/create-dataset/CreateDatasetForm.tsx
+++ b/src/sections/create-dataset/CreateDatasetForm.tsx
@@ -76,12 +76,9 @@ export function CreateDatasetForm({
)}
{submissionStatus === SubmissionStatus.Errored && {t('datasetForm.status.failed')}
}
-
+
{metadataBlocks.map((metadataBlock) => (
-
+
{metadataBlock.displayName}
{`Body content for ${metadataBlock.name}`}
From 68efb2a16f1d223d4eef6ce8fbbfdc7720953a44 Mon Sep 17 00:00:00 2001
From: German Saracca
Date: Fri, 22 Mar 2024 17:00:01 -0300
Subject: [PATCH 05/20] feat(DynamicFormFieldsRender): detecting different
fields
---
.../CreateDatasetForm.module.scss | 4 -
.../create-dataset/CreateDatasetForm.tsx | 38 +++---
.../MetadataBlockFields/index.tsx | 3 -
.../MetadataFormField/index.tsx | 117 ++++++++++++++++++
.../MetadataBlockFormFields/index.tsx | 18 +++
...etadataBlocksInfoByCollectionIdResponse.ts | 10 +-
.../useGetMetadataBlocksInfo.tsx | 16 ++-
7 files changed, 170 insertions(+), 36 deletions(-)
delete mode 100644 src/sections/create-dataset/MetadataBlockFields/index.tsx
create mode 100644 src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.tsx
create mode 100644 src/sections/create-dataset/MetadataBlockFormFields/index.tsx
diff --git a/src/sections/create-dataset/CreateDatasetForm.module.scss b/src/sections/create-dataset/CreateDatasetForm.module.scss
index 764526dd3..75bef91de 100644
--- a/src/sections/create-dataset/CreateDatasetForm.module.scss
+++ b/src/sections/create-dataset/CreateDatasetForm.module.scss
@@ -5,7 +5,3 @@
.container {
// margin: 0.5rem 0;
}
-
-.metadataAccordionContainer {
- // border: solid 2px blue;
-}
diff --git a/src/sections/create-dataset/CreateDatasetForm.tsx b/src/sections/create-dataset/CreateDatasetForm.tsx
index 3b108e72a..77b6bfd95 100644
--- a/src/sections/create-dataset/CreateDatasetForm.tsx
+++ b/src/sections/create-dataset/CreateDatasetForm.tsx
@@ -1,5 +1,5 @@
import { ChangeEvent, FormEvent, MouseEvent, useEffect } from 'react'
-import { Accordion } from '@iqss/dataverse-design-system'
+import { Form, Accordion } from '@iqss/dataverse-design-system'
import { useTranslation } from 'react-i18next'
import { RequiredFieldText } from '../shared/form/RequiredFieldText/RequiredFieldText'
import { SeparationLine } from '../shared/layout/SeparationLine/SeparationLine'
@@ -14,6 +14,7 @@ import { useDatasetValidator } from './useDatasetValidator'
import { useGetMetadataBlocksInfo } from './useGetMetadataBlocksInfo'
// import { DatasetMetadataSubField } from '../../dataset/domain/models/Dataset'
import styles from './CreateDatasetForm.module.scss'
+import { MetadataBlockFormFields } from './MetadataBlockFormFields'
interface CreateDatasetFormProps {
repository: DatasetRepository
@@ -27,17 +28,15 @@ export function CreateDatasetForm({
const navigate = useNavigate()
const { t } = useTranslation('createDataset')
const { isLoading, setIsLoading } = useLoading()
- const { metadataBlocks, isLoading: isLoadingMetadataBlocksToRender } = useGetMetadataBlocksInfo(
+ const { metadataBlocks, isLoading: isLoadingMetadataBlocksToRender } = useGetMetadataBlocksInfo({
metadataBlockInfoRepository,
- 'someCollectionId', // TODO:ME Get collection id from url?
- 'create'
- )
+ collectionId: 'someCollectionId', // TODO:ME Get collection id from url?
+ mode: 'create'
+ })
const { validationErrors, datasetIsValid } = useDatasetValidator()
const { formData, updateFormData } = useDatasetFormData(datasetIsValid)
const { submissionStatus, submitForm } = useCreateDatasetForm(repository, datasetIsValid)
- console.log({ metadataBlocks, isLoadingMetadataBlocksToRender })
-
const handleFieldChange = (event: ChangeEvent) => {
const { name, checked } = event.target
const value = event.target.type === 'checkbox' && !checked ? '' : event.target.value
@@ -75,20 +74,23 @@ export function CreateDatasetForm({
{t('datasetForm.status.success')}
)}
{submissionStatus === SubmissionStatus.Errored && {t('datasetForm.status.failed')}
}
-
-
- {metadataBlocks.map((metadataBlock) => (
-
+
- {/*
+ {/*
{t('datasetForm.fields.title.label')}
@@ -278,7 +280,7 @@ export function CreateDatasetForm({
- */}
+ */}
)
diff --git a/src/sections/create-dataset/MetadataBlockFields/index.tsx b/src/sections/create-dataset/MetadataBlockFields/index.tsx
deleted file mode 100644
index 3042133bf..000000000
--- a/src/sections/create-dataset/MetadataBlockFields/index.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export const MetadataBlockFields = () => {
- return MetadataBlockFields
-}
diff --git a/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.tsx b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.tsx
new file mode 100644
index 000000000..f80cd4799
--- /dev/null
+++ b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.tsx
@@ -0,0 +1,117 @@
+import { Form } from '@iqss/dataverse-design-system'
+import {
+ MetadataField2,
+ TypeClassMetadataField,
+ TypeMetadataField
+} from '../../../../metadata-block-info/domain/models/MetadataBlockInfo'
+
+export enum TypeMetadataFieldxx {
+ Date = 'DATE',
+ Email = 'EMAIL',
+ Float = 'FLOAT',
+ Int = 'INT',
+ None = 'NONE',
+ Text = 'TEXT',
+ Textbox = 'TEXTBOX',
+ URL = 'URL'
+}
+
+export enum TypeClassMetadataFieldxx {
+ Compound = 'compound',
+ ControlledVocabulary = 'controlledVocabulary',
+ Primitive = 'primitive'
+}
+
+interface Props {
+ metadataFieldInfo: MetadataField2
+}
+
+export const MetadataFormField = ({ metadataFieldInfo }: Props) => {
+ console.log(metadataFieldInfo)
+ const {
+ name,
+ type,
+ multiple,
+ typeClass,
+ isRequired,
+ displayName,
+ description,
+ childMetadataFields,
+ controlledVocabularyValues
+ } = metadataFieldInfo
+
+ const isSafeCompound =
+ typeClass === TypeClassMetadataField.Compound &&
+ childMetadataFields !== undefined &&
+ Object.keys(childMetadataFields).length > 0
+
+ const isSafeControlledVocabulary =
+ typeClass === TypeClassMetadataField.ControlledVocabulary &&
+ controlledVocabularyValues !== undefined &&
+ controlledVocabularyValues.length > 0
+
+ const isSafePrimitive = typeClass === TypeClassMetadataField.Primitive
+
+ if (isSafePrimitive) {
+ return (
+
+ {`name: ${name} `}
+ ---isSafePrimitive--- {`type: ${type} typeClass: ${typeClass}`}
+
+ )
+ }
+
+ if (isSafeCompound) {
+ return (
+
+ {`name: ${name} `}
+ ---isSafeCompound--- {`type: ${type} typeClass: ${typeClass}`}
+
+ {Object.entries(childMetadataFields).map(
+ ([childMetadataFieldKey, childMetadataFieldInfo]) => {
+ return (
+ -
+
+
+ )
+ }
+ )}
+
+
+ )
+ }
+
+ if (isSafeControlledVocabulary) {
+ return (
+
+ {`name: ${name} `}
+ ---isSafeControlledVocabulary--- {`type: ${type} typeClass: ${typeClass}`}
+
+ {controlledVocabularyValues.map((controlledVocabularyValue, index) => {
+ return - {controlledVocabularyValue}
+ })}
+
+
+ )
+ }
+
+ return Not implemented
+}
+
+// return (
+//
+//
+// {metadataFieldInfo.displayName}
+//
+//
+//
+// {/* {t('datasetForm.fields.title.feedback')} */}
+//
+//
+// )
diff --git a/src/sections/create-dataset/MetadataBlockFormFields/index.tsx b/src/sections/create-dataset/MetadataBlockFormFields/index.tsx
new file mode 100644
index 000000000..7e4d3b898
--- /dev/null
+++ b/src/sections/create-dataset/MetadataBlockFormFields/index.tsx
@@ -0,0 +1,18 @@
+import { MetadataBlockInfo2 } from '../../../metadata-block-info/domain/models/MetadataBlockInfo'
+import { MetadataFormField } from './MetadataFormField'
+
+interface Props {
+ metadataBlock: MetadataBlockInfo2
+}
+
+export const MetadataBlockFormFields = ({ metadataBlock }: Props) => {
+ const { metadataFields, name: _name } = metadataBlock
+
+ return (
+ <>
+ {Object.entries(metadataFields).map(([metadataFieldKey, metadataFieldInfo]) => {
+ return
+ })}
+ >
+ )
+}
diff --git a/src/sections/create-dataset/mocks/metadataBlocksInfoByCollectionIdResponse.ts b/src/sections/create-dataset/mocks/metadataBlocksInfoByCollectionIdResponse.ts
index 57e1bdec7..2c49412d4 100644
--- a/src/sections/create-dataset/mocks/metadataBlocksInfoByCollectionIdResponse.ts
+++ b/src/sections/create-dataset/mocks/metadataBlocksInfoByCollectionIdResponse.ts
@@ -34,7 +34,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
multiple: false,
isControlledVocabulary: false,
displayFormat: '',
- displayOnCreate: false,
+ displayOnCreate: true,
isRequired: false,
displayOrder: 1
},
@@ -67,7 +67,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
- displayOnCreate: false,
+ displayOnCreate: true,
displayOrder: 3
},
otherId: {
@@ -129,7 +129,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: true,
displayOrder: 7,
- displayOnCreate: false,
+ displayOnCreate: true,
childMetadataFields: {
authorName: {
name: 'authorName',
@@ -323,7 +323,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: true,
displayOrder: 19,
- displayOnCreate: false,
+ displayOnCreate: true,
controlledVocabularyValues: [
'Agricultural Sciences',
'Arts and Humanities',
@@ -1463,7 +1463,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
id: 2,
name: 'geospatial',
displayName: 'Geospatial Metadata',
- displayOnCreate: true,
+ displayOnCreate: false,
metadataFields: {
geographicCoverage: {
name: 'geographicCoverage',
diff --git a/src/sections/create-dataset/useGetMetadataBlocksInfo.tsx b/src/sections/create-dataset/useGetMetadataBlocksInfo.tsx
index 8f32c2a6a..d8584334b 100644
--- a/src/sections/create-dataset/useGetMetadataBlocksInfo.tsx
+++ b/src/sections/create-dataset/useGetMetadataBlocksInfo.tsx
@@ -3,6 +3,11 @@ import { getMetadataBlockInfoByCollectionId } from '../../metadata-block-info/do
import { MetadataBlockInfoRepository } from '../../metadata-block-info/domain/repositories/MetadataBlockInfoRepository'
import { MetadataBlockInfo2 } from '../../metadata-block-info/domain/models/MetadataBlockInfo'
+interface Props {
+ metadataBlockInfoRepository: MetadataBlockInfoRepository
+ collectionId: string
+ mode: 'create' | 'edit'
+}
/**
* Hook to get the metadata blocks to show and its info, based on the parent collection id of the dataset
*
@@ -10,12 +15,11 @@ import { MetadataBlockInfo2 } from '../../metadata-block-info/domain/models/Meta
* @param collectionId The id of the collection that the dataset belongs to
* @param mode The mode of the form (create or edit), if edit mode, this hook will return only the metadata blocks that have displayOnCreate set to true
*/
-
-export const useGetMetadataBlocksInfo = (
- metadataBlockInfoRepository: MetadataBlockInfoRepository,
- collectionId: string,
- mode: 'create' | 'edit'
-) => {
+export const useGetMetadataBlocksInfo = ({
+ metadataBlockInfoRepository,
+ collectionId,
+ mode
+}: Props) => {
const [metadataBlocks, setMetadataBlocks] = useState([])
const [isLoading, setIsLoading] = useState(true)
const [error, setError] = useState(null)
From 01f7815690d6aae536faf0fcf8189b6258d6333c Mon Sep 17 00:00:00 2001
From: German Saracca
Date: Mon, 25 Mar 2024 17:06:46 -0300
Subject: [PATCH 06/20] feat(DynamicFormFieldsRender): Different fields and
wrapper
---
.../MetadataFormField/Fields/DateField.tsx | 28 +++
.../MetadataFormField/Fields/EmailField.tsx | 28 +++
.../MetadataFormField/Fields/FloatField.tsx | 28 +++
.../MetadataFormField/Fields/IntField.tsx | 28 +++
.../MetadataFormField/Fields/TextBoxField.tsx | 27 +++
.../MetadataFormField/Fields/TextField.tsx | 28 +++
.../MetadataFormField/Fields/UrlField.tsx | 28 +++
.../MetadataFormField/Fields/Vocabulary.tsx | 37 +++
.../MetadataFormField/Fields/index.ts | 8 +
.../MetadataFormField/index.module.scss | 20 ++
.../MetadataFormField/index.tsx | 227 ++++++++++++------
11 files changed, 418 insertions(+), 69 deletions(-)
create mode 100644 src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/DateField.tsx
create mode 100644 src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/EmailField.tsx
create mode 100644 src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/FloatField.tsx
create mode 100644 src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/IntField.tsx
create mode 100644 src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/TextBoxField.tsx
create mode 100644 src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/TextField.tsx
create mode 100644 src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/UrlField.tsx
create mode 100644 src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/Vocabulary.tsx
create mode 100644 src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/index.ts
create mode 100644 src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.module.scss
diff --git a/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/DateField.tsx b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/DateField.tsx
new file mode 100644
index 000000000..1f758befd
--- /dev/null
+++ b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/DateField.tsx
@@ -0,0 +1,28 @@
+import { Form } from '@iqss/dataverse-design-system'
+
+interface Props {
+ name: string
+ onChange: (event: React.ChangeEvent) => void
+ isInvalid: boolean
+ disabled: boolean
+ isInFieldGroup?: boolean
+}
+//TODO:ME Date component?? Add validation for dates?
+export const DateField = ({
+ name,
+ onChange,
+ isInvalid,
+ disabled,
+ isInFieldGroup = false
+}: Props) => {
+ return (
+
+ )
+}
diff --git a/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/EmailField.tsx b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/EmailField.tsx
new file mode 100644
index 000000000..595ac8949
--- /dev/null
+++ b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/EmailField.tsx
@@ -0,0 +1,28 @@
+import { Form } from '@iqss/dataverse-design-system'
+
+interface Props {
+ name: string
+ onChange: (event: React.ChangeEvent) => void
+ isInvalid: boolean
+ disabled: boolean
+ isInFieldGroup?: boolean
+}
+// TODO:ME Add validation for emails
+export const EmailField = ({
+ name,
+ onChange,
+ isInvalid,
+ disabled,
+ isInFieldGroup = false
+}: Props) => {
+ return (
+
+ )
+}
diff --git a/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/FloatField.tsx b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/FloatField.tsx
new file mode 100644
index 000000000..ac368502b
--- /dev/null
+++ b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/FloatField.tsx
@@ -0,0 +1,28 @@
+import { Form } from '@iqss/dataverse-design-system'
+
+interface Props {
+ name: string
+ onChange: (event: React.ChangeEvent) => void
+ isInvalid: boolean
+ disabled: boolean
+ isInFieldGroup?: boolean
+}
+//TODO:ME Add validation for floating numbers?
+export const FloatField = ({
+ name,
+ onChange,
+ isInvalid,
+ disabled,
+ isInFieldGroup = false
+}: Props) => {
+ return (
+
+ )
+}
diff --git a/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/IntField.tsx b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/IntField.tsx
new file mode 100644
index 000000000..5a14a9f51
--- /dev/null
+++ b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/IntField.tsx
@@ -0,0 +1,28 @@
+import { Form } from '@iqss/dataverse-design-system'
+
+interface Props {
+ name: string
+ onChange: (event: React.ChangeEvent) => void
+ isInvalid: boolean
+ disabled: boolean
+ isInFieldGroup?: boolean
+}
+//TODO:ME Add validation for integers?
+export const IntField = ({
+ name,
+ onChange,
+ isInvalid,
+ disabled,
+ isInFieldGroup = false
+}: Props) => {
+ return (
+
+ )
+}
diff --git a/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/TextBoxField.tsx b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/TextBoxField.tsx
new file mode 100644
index 000000000..3dfd1ecec
--- /dev/null
+++ b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/TextBoxField.tsx
@@ -0,0 +1,27 @@
+import { Form } from '@iqss/dataverse-design-system'
+
+interface Props {
+ name: string
+ onChange: (event: React.ChangeEvent) => void
+ isInvalid: boolean
+ disabled: boolean
+ isInFieldGroup?: boolean
+}
+
+export const TextBoxField = ({
+ name,
+ onChange,
+ isInvalid,
+ disabled,
+ isInFieldGroup = false
+}: Props) => {
+ return (
+
+ )
+}
diff --git a/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/TextField.tsx b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/TextField.tsx
new file mode 100644
index 000000000..5f5c597d5
--- /dev/null
+++ b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/TextField.tsx
@@ -0,0 +1,28 @@
+import { Form } from '@iqss/dataverse-design-system'
+
+interface Props {
+ name: string
+ onChange: (event: React.ChangeEvent) => void
+ isInvalid: boolean
+ disabled: boolean
+ isInFieldGroup?: boolean
+}
+
+export const TextField = ({
+ name,
+ onChange,
+ isInvalid,
+ disabled,
+ isInFieldGroup = false
+}: Props) => {
+ return (
+
+ )
+}
diff --git a/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/UrlField.tsx b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/UrlField.tsx
new file mode 100644
index 000000000..1a4c7f76a
--- /dev/null
+++ b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/UrlField.tsx
@@ -0,0 +1,28 @@
+import { Form } from '@iqss/dataverse-design-system'
+
+interface Props {
+ name: string
+ onChange: (event: React.ChangeEvent) => void
+ isInvalid: boolean
+ disabled: boolean
+ isInFieldGroup?: boolean
+}
+//TODO:ME Add validation for urls?
+export const UrlField = ({
+ name,
+ onChange,
+ isInvalid,
+ disabled,
+ isInFieldGroup = false
+}: Props) => {
+ return (
+
+ )
+}
diff --git a/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/Vocabulary.tsx b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/Vocabulary.tsx
new file mode 100644
index 000000000..9b98e5c71
--- /dev/null
+++ b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/Vocabulary.tsx
@@ -0,0 +1,37 @@
+import { Form } from '@iqss/dataverse-design-system'
+
+interface Props {
+ name: string
+ options: string[]
+ onChange: (event: React.ChangeEvent) => void
+ isInvalid: boolean
+ disabled: boolean
+ isInFieldGroup?: boolean
+ // allowMultiple?: boolean
+}
+// TODO: Implement a multiple select with autocomplete like in JSF version
+export const Vocabulary = ({
+ name,
+ options,
+ onChange,
+ isInvalid,
+ disabled,
+ // allowMultiple,
+ isInFieldGroup = false
+}: Props) => {
+ return (
+
+
+ {options.map((option) => (
+
+ ))}
+
+ )
+}
diff --git a/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/index.ts b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/index.ts
new file mode 100644
index 000000000..a6cfeac86
--- /dev/null
+++ b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/Fields/index.ts
@@ -0,0 +1,8 @@
+export * from './DateField'
+export * from './EmailField'
+export * from './FloatField'
+export * from './IntField'
+export * from './TextBoxField'
+export * from './TextField'
+export * from './UrlField'
+export * from './Vocabulary'
diff --git a/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.module.scss b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.module.scss
new file mode 100644
index 000000000..b02ee165b
--- /dev/null
+++ b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.module.scss
@@ -0,0 +1,20 @@
+.multiple-fields-grid {
+ display: grid;
+ grid-template-columns: 1fr;
+
+ @media screen and (min-width: 768px) {
+ grid-template-columns: 1fr 1fr;
+ column-gap: 1rem;
+ }
+}
+
+.checkbox-list-grid {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 1rem;
+ border: solid 1px var(--bs-gray-400);
+ padding: 1rem;
+ max-height: 260px;
+ overflow-y: auto;
+ border-radius: var(--bs-border-radius-lg);
+}
diff --git a/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.tsx b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.tsx
index f80cd4799..3c2475e49 100644
--- a/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.tsx
+++ b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.tsx
@@ -1,36 +1,35 @@
-import { Form } from '@iqss/dataverse-design-system'
+import { Col, Form } from '@iqss/dataverse-design-system'
import {
MetadataField2,
- TypeClassMetadataField,
- TypeMetadataField
+ TypeClassMetadataFieldOptions,
+ TypeMetadataFieldOptions
} from '../../../../metadata-block-info/domain/models/MetadataBlockInfo'
-
-export enum TypeMetadataFieldxx {
- Date = 'DATE',
- Email = 'EMAIL',
- Float = 'FLOAT',
- Int = 'INT',
- None = 'NONE',
- Text = 'TEXT',
- Textbox = 'TEXTBOX',
- URL = 'URL'
-}
-
-export enum TypeClassMetadataFieldxx {
- Compound = 'compound',
- ControlledVocabulary = 'controlledVocabulary',
- Primitive = 'primitive'
-}
+import {
+ DateField,
+ EmailField,
+ FloatField,
+ IntField,
+ TextBoxField,
+ TextField,
+ UrlField,
+ Vocabulary
+} from './Fields'
+import styles from './index.module.scss'
interface Props {
metadataFieldInfo: MetadataField2
+ withinMultipleFieldsGroup?: boolean
}
-export const MetadataFormField = ({ metadataFieldInfo }: Props) => {
+export const MetadataFormField = ({
+ metadataFieldInfo,
+ withinMultipleFieldsGroup = false
+}: Props) => {
console.log(metadataFieldInfo)
const {
name,
type,
+ title,
multiple,
typeClass,
isRequired,
@@ -41,77 +40,167 @@ export const MetadataFormField = ({ metadataFieldInfo }: Props) => {
} = metadataFieldInfo
const isSafeCompound =
- typeClass === TypeClassMetadataField.Compound &&
+ typeClass === TypeClassMetadataFieldOptions.Compound &&
childMetadataFields !== undefined &&
Object.keys(childMetadataFields).length > 0
const isSafeControlledVocabulary =
- typeClass === TypeClassMetadataField.ControlledVocabulary &&
+ typeClass === TypeClassMetadataFieldOptions.ControlledVocabulary &&
controlledVocabularyValues !== undefined &&
controlledVocabularyValues.length > 0
- const isSafePrimitive = typeClass === TypeClassMetadataField.Primitive
-
- if (isSafePrimitive) {
- return (
-
- {`name: ${name} `}
- ---isSafePrimitive--- {`type: ${type} typeClass: ${typeClass}`}
-
- )
- }
+ const isSafePrimitive = typeClass === TypeClassMetadataFieldOptions.Primitive
if (isSafeCompound) {
return (
-
- {`name: ${name} `}
- ---isSafeCompound--- {`type: ${type} typeClass: ${typeClass}`}
-
+
{Object.entries(childMetadataFields).map(
([childMetadataFieldKey, childMetadataFieldInfo]) => {
return (
-
-
-
+
)
}
)}
-
-
+
+
+ )
+ }
+
+ if (isSafePrimitive) {
+ return (
+
+ {title}
+ <>
+ {type === TypeMetadataFieldOptions.Text && (
+ console.log(e)}
+ disabled={false}
+ isInvalid={false}
+ isInFieldGroup={withinMultipleFieldsGroup}
+ />
+ )}
+ {type === TypeMetadataFieldOptions.Textbox && (
+ console.log(e)}
+ disabled={false}
+ isInvalid={false}
+ isInFieldGroup={withinMultipleFieldsGroup}
+ />
+ )}
+ {type === TypeMetadataFieldOptions.URL && (
+ console.log(e)}
+ disabled={false}
+ isInvalid={false}
+ isInFieldGroup={withinMultipleFieldsGroup}
+ />
+ )}
+ {type === TypeMetadataFieldOptions.Email && (
+ console.log(e)}
+ disabled={false}
+ isInvalid={false}
+ isInFieldGroup={withinMultipleFieldsGroup}
+ />
+ )}
+ {type === TypeMetadataFieldOptions.Int && (
+ console.log(e)}
+ disabled={false}
+ isInvalid={false}
+ isInFieldGroup={withinMultipleFieldsGroup}
+ />
+ )}
+ {type === TypeMetadataFieldOptions.Float && (
+ console.log(e)}
+ disabled={false}
+ isInvalid={false}
+ isInFieldGroup={withinMultipleFieldsGroup}
+ />
+ )}
+ {type === TypeMetadataFieldOptions.Date && (
+ console.log(e)}
+ disabled={false}
+ isInvalid={false}
+ isInFieldGroup={withinMultipleFieldsGroup}
+ />
+ )}
+ >
+
+ Automatically get error from the validation library (Field is required, Field should have
+ bla blah, etc.)
+
+
)
}
if (isSafeControlledVocabulary) {
+ if (multiple) {
+ return (
+
+
+ {controlledVocabularyValues.map((value) => {
+ return (
+
console.log(e)}
+ key={value}
+ />
+ )
+ })}
+
+
+ )
+ }
return (
-
- {`name: ${name} `}
- ---isSafeControlledVocabulary--- {`type: ${type} typeClass: ${typeClass}`}
-
- {controlledVocabularyValues.map((controlledVocabularyValue, index) => {
- return - {controlledVocabularyValue}
- })}
-
-
+
+ {title}
+ console.log(e)}
+ disabled={false}
+ isInvalid={false}
+ isInFieldGroup={withinMultipleFieldsGroup}
+ options={controlledVocabularyValues}
+ />
+
+ Automatically get error from the validation library (Field is required, Field should have
+ bla blah, etc.)
+
+
)
}
return Not implemented
}
-
-// return (
-//
-//
-// {metadataFieldInfo.displayName}
-//
-//
-//
-// {/* {t('datasetForm.fields.title.feedback')} */}
-//
-//
-// )
From 8dee13c27aafe13165370f618d851955143309bc Mon Sep 17 00:00:00 2001
From: German Saracca
Date: Mon, 25 Mar 2024 17:07:09 -0300
Subject: [PATCH 07/20] feat(DynamicFormFieldsRender): Update models and mock
---
.../domain/models/MetadataBlockInfo.ts | 103 ++-
...etadataBlocksInfoByCollectionIdResponse.ts | 745 ++++--------------
2 files changed, 222 insertions(+), 626 deletions(-)
diff --git a/src/metadata-block-info/domain/models/MetadataBlockInfo.ts b/src/metadata-block-info/domain/models/MetadataBlockInfo.ts
index 80229a9aa..49c030f01 100644
--- a/src/metadata-block-info/domain/models/MetadataBlockInfo.ts
+++ b/src/metadata-block-info/domain/models/MetadataBlockInfo.ts
@@ -19,7 +19,7 @@ export interface MetadataBlockInfo2 {
name: string
displayName: string
metadataFields: Record
- displayOnCreate?: boolean // If true, the block will be displayed on the create dataset form
+ displayOnCreate: boolean // If true, the block will be displayed on the create dataset form
}
export interface MetadataField2 {
@@ -37,37 +37,78 @@ export interface MetadataField2 {
displayOrder: number
controlledVocabularyValues?: string[]
childMetadataFields?: Record
- displayOnCreate?: boolean // If true, the field will be displayed on the create metadata block
+ displayOnCreate: boolean // If true, the field will be displayed on the create metadata block
}
-export enum TypeMetadataField {
- Date = 'DATE',
- Email = 'EMAIL',
- Float = 'FLOAT',
- Int = 'INT',
- None = 'NONE',
- Text = 'TEXT',
- Textbox = 'TEXTBOX',
- URL = 'URL'
-}
+export const TypeMetadataFieldOptions = {
+ Date: 'DATE',
+ Email: 'EMAIL',
+ Float: 'FLOAT',
+ Int: 'INT',
+ None: 'NONE',
+ Text: 'TEXT',
+ Textbox: 'TEXTBOX',
+ URL: 'URL'
+} as const
-export enum TypeClassMetadataField {
- Compound = 'compound',
- ControlledVocabulary = 'controlledVocabulary',
- Primitive = 'primitive'
-}
+export type TypeMetadataField =
+ (typeof TypeMetadataFieldOptions)[keyof typeof TypeMetadataFieldOptions]
-export enum WatermarkMetadataField {
- Empty = '',
- EnterAFloatingPointNumber = 'Enter a floating-point number.',
- EnterAnInteger = 'Enter an integer.',
- FamilyNameGivenNameOrOrganization = 'FamilyName, GivenName or Organization',
- HTTPS = 'https://',
- NameEmailXyz = 'name@email.xyz',
- OrganizationXYZ = 'Organization XYZ',
- The1FamilyNameGivenNameOr2Organization = '1) FamilyName, GivenName or 2) Organization',
- The1FamilyNameGivenNameOr2OrganizationXYZ = '1) Family Name, Given Name or 2) Organization XYZ',
- WatermarkEnterAnInteger = 'Enter an integer...',
- YYYYOrYYYYMMOrYYYYMMDD = 'YYYY or YYYY-MM or YYYY-MM-DD',
- YyyyMmDD = 'YYYY-MM-DD'
-}
+// export enum TypeMetadataField {
+// Date = 'DATE',
+// Email = 'EMAIL',
+// Float = 'FLOAT',
+// Int = 'INT',
+// None = 'NONE',
+// Text = 'TEXT',
+// Textbox = 'TEXTBOX',
+// URL = 'URL'
+// }
+
+export const TypeClassMetadataFieldOptions = {
+ Compound: 'compound',
+ ControlledVocabulary: 'controlledVocabulary',
+ Primitive: 'primitive'
+} as const
+
+export type TypeClassMetadataField =
+ (typeof TypeClassMetadataFieldOptions)[keyof typeof TypeClassMetadataFieldOptions]
+
+// export enum TypeClassMetadataField {
+// Compound = 'compound',
+// ControlledVocabulary = 'controlledVocabulary',
+// Primitive = 'primitive'
+// }
+
+export const WatermarkMetadataFieldOptions = {
+ Empty: '',
+ EnterAFloatingPointNumber: 'Enter a floating-point number.',
+ EnterAnInteger: 'Enter an integer.',
+ FamilyNameGivenNameOrOrganization: 'FamilyName, GivenName or Organization',
+ HTTPS: 'https://',
+ NameEmailXyz: 'name@email.xyz',
+ OrganizationXYZ: 'Organization XYZ',
+ The1FamilyNameGivenNameOr2Organization: '1) FamilyName, GivenName or 2) Organization',
+ The1FamilyNameGivenNameOr2OrganizationXYZ: '1) Family Name, Given Name or 2) Organization XYZ',
+ WatermarkEnterAnInteger: 'Enter an integer...',
+ YYYYOrYYYYMMOrYYYYMMDD: 'YYYY or YYYY-MM or YYYY-MM-DD',
+ YyyyMmDD: 'YYYY-MM-DD'
+} as const
+
+export type WatermarkMetadataField =
+ (typeof WatermarkMetadataFieldOptions)[keyof typeof WatermarkMetadataFieldOptions]
+
+// export enum WatermarkMetadataField {
+// Empty = '',
+// EnterAFloatingPointNumber = 'Enter a floating-point number.',
+// EnterAnInteger = 'Enter an integer.',
+// FamilyNameGivenNameOrOrganization = 'FamilyName, GivenName or Organization',
+// HTTPS = 'https://',
+// NameEmailXyz = 'name@email.xyz',
+// OrganizationXYZ = 'Organization XYZ',
+// The1FamilyNameGivenNameOr2Organization = '1) FamilyName, GivenName or 2) Organization',
+// The1FamilyNameGivenNameOr2OrganizationXYZ = '1) Family Name, Given Name or 2) Organization XYZ',
+// WatermarkEnterAnInteger = 'Enter an integer...',
+// YYYYOrYYYYMMOrYYYYMMDD = 'YYYY or YYYY-MM or YYYY-MM-DD',
+// YyyyMmDD = 'YYYY-MM-DD'
+// }
diff --git a/src/sections/create-dataset/mocks/metadataBlocksInfoByCollectionIdResponse.ts b/src/sections/create-dataset/mocks/metadataBlocksInfoByCollectionIdResponse.ts
index 2c49412d4..8adfd762a 100644
--- a/src/sections/create-dataset/mocks/metadataBlocksInfoByCollectionIdResponse.ts
+++ b/src/sections/create-dataset/mocks/metadataBlocksInfoByCollectionIdResponse.ts
@@ -1,6 +1,6 @@
import { MetadataBlockInfo2 } from '../../../metadata-block-info/domain/models/MetadataBlockInfo'
-export const metadataBlocksInfoByCollectionIdResponse = [
+export const metadataBlocksInfoByCollectionIdResponse: MetadataBlockInfo2[] = [
{
id: 1,
name: 'citation',
@@ -51,7 +51,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
- displayOnCreate: false,
+ displayOnCreate: true,
displayOrder: 2
},
alternativeURL: {
@@ -84,7 +84,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: ':',
isRequired: false,
displayOrder: 4,
- displayOnCreate: false,
+ displayOnCreate: true,
childMetadataFields: {
otherIdAgency: {
name: 'otherIdAgency',
@@ -98,6 +98,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 5
},
otherIdValue: {
@@ -112,6 +113,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 6
}
}
@@ -144,6 +146,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: true,
+ displayOnCreate: true,
displayOrder: 8
},
authorAffiliation: {
@@ -159,6 +162,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '(#VALUE)',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 9
},
authorIdentifierScheme: {
@@ -174,6 +178,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: true,
displayFormat: '- #VALUE:',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 10,
controlledVocabularyValues: [
'ORCID',
@@ -198,6 +203,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 11
}
}
@@ -216,7 +222,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: true,
displayOrder: 12,
- displayOnCreate: false,
+ displayOnCreate: true,
childMetadataFields: {
datasetContactName: {
name: 'datasetContactName',
@@ -231,6 +237,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 13
},
datasetContactAffiliation: {
@@ -246,6 +253,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '(#VALUE)',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 14
},
datasetContactEmail: {
@@ -260,6 +268,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#EMAIL',
isRequired: true,
+ displayOnCreate: true,
displayOrder: 15
}
}
@@ -277,7 +286,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: true,
displayOrder: 16,
- displayOnCreate: false,
+ displayOnCreate: true,
childMetadataFields: {
dsDescriptionValue: {
name: 'dsDescriptionValue',
@@ -291,6 +300,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: true,
+ displayOnCreate: true,
displayOrder: 17
},
dsDescriptionDate: {
@@ -306,6 +316,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '(#VALUE)',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 18
}
}
@@ -355,7 +366,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 20,
- displayOnCreate: false,
+ displayOnCreate: true,
childMetadataFields: {
keywordValue: {
name: 'keywordValue',
@@ -369,6 +380,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 21
},
keywordVocabulary: {
@@ -383,6 +395,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '(#VALUE)',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 22
},
keywordVocabularyURI: {
@@ -398,6 +411,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 23
}
}
@@ -416,7 +430,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 24,
- displayOnCreate: false,
+ displayOnCreate: true,
childMetadataFields: {
topicClassValue: {
name: 'topicClassValue',
@@ -430,6 +444,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 25
},
topicClassVocab: {
@@ -444,6 +459,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '(#VALUE)',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 26
},
topicClassVocabURI: {
@@ -459,6 +475,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 27
}
}
@@ -477,7 +494,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 28,
- displayOnCreate: false,
+ displayOnCreate: true,
childMetadataFields: {
publicationCitation: {
name: 'publicationCitation',
@@ -491,6 +508,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 29
},
publicationIDType: {
@@ -506,6 +524,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '#VALUE: ',
isRequired: false,
displayOrder: 30,
+ displayOnCreate: true,
controlledVocabularyValues: [
'ark',
'arXiv',
@@ -540,6 +559,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 31
},
publicationURL: {
@@ -555,6 +575,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 32
}
}
@@ -572,7 +593,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 33,
- displayOnCreate: false
+ displayOnCreate: true
},
language: {
name: 'language',
@@ -587,7 +608,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 34,
- displayOnCreate: false,
+ displayOnCreate: true,
controlledVocabularyValues: [
'Abkhaz',
'Afar',
@@ -791,7 +812,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 35,
- displayOnCreate: false,
+ displayOnCreate: true,
childMetadataFields: {
producerName: {
name: 'producerName',
@@ -806,6 +827,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: true,
+ displayOnCreate: true,
displayOrder: 36
},
producerAffiliation: {
@@ -821,6 +843,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '(#VALUE)',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 37
},
producerAbbreviation: {
@@ -835,6 +858,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '(#VALUE)',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 38
},
producerURL: {
@@ -849,6 +873,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 39
},
producerLogoURL: {
@@ -863,6 +888,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '
',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 40
}
}
@@ -880,7 +906,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
- displayOnCreate: false,
+ displayOnCreate: true,
displayOrder: 41
},
productionPlace: {
@@ -896,7 +922,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
- displayOnCreate: false,
+ displayOnCreate: true,
displayOrder: 42
},
contributor: {
@@ -913,7 +939,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: ':',
isRequired: false,
displayOrder: 43,
- displayOnCreate: false,
+ displayOnCreate: true,
childMetadataFields: {
contributorType: {
name: 'contributorType',
@@ -928,6 +954,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '#VALUE ',
isRequired: false,
displayOrder: 44,
+ displayOnCreate: true,
controlledVocabularyValues: [
'Data Collector',
'Data Curator',
@@ -961,6 +988,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 45
}
}
@@ -978,7 +1006,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: ':',
isRequired: false,
displayOrder: 46,
- displayOnCreate: false,
+ displayOnCreate: true,
childMetadataFields: {
grantNumberAgency: {
name: 'grantNumberAgency',
@@ -992,6 +1020,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 47
},
grantNumberValue: {
@@ -1007,6 +1036,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 48
}
}
@@ -1025,7 +1055,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 49,
- displayOnCreate: false,
+ displayOnCreate: true,
childMetadataFields: {
distributorName: {
name: 'distributorName',
@@ -1040,6 +1070,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 50
},
distributorAffiliation: {
@@ -1055,6 +1086,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '(#VALUE)',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 51
},
distributorAbbreviation: {
@@ -1069,6 +1101,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '(#VALUE)',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 52
},
distributorURL: {
@@ -1083,6 +1116,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 53
},
distributorLogoURL: {
@@ -1098,6 +1132,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '
',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 54
}
}
@@ -1162,7 +1197,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: ';',
isRequired: false,
displayOrder: 58,
- displayOnCreate: false,
+ displayOnCreate: true,
childMetadataFields: {
timePeriodCoveredStart: {
name: 'timePeriodCoveredStart',
@@ -1176,6 +1211,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#NAME: #VALUE ',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 59
},
timePeriodCoveredEnd: {
@@ -1190,6 +1226,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#NAME: #VALUE ',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 60
}
}
@@ -1207,7 +1244,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: ';',
isRequired: false,
displayOrder: 61,
- displayOnCreate: false,
+ displayOnCreate: true,
childMetadataFields: {
dateOfCollectionStart: {
name: 'dateOfCollectionStart',
@@ -1221,6 +1258,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#NAME: #VALUE ',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 62
},
dateOfCollectionEnd: {
@@ -1235,6 +1273,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#NAME: #VALUE ',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 63
}
}
@@ -1268,7 +1307,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: ':',
isRequired: false,
displayOrder: 65,
- displayOnCreate: false,
+ displayOnCreate: true,
childMetadataFields: {
seriesName: {
name: 'seriesName',
@@ -1282,6 +1321,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 66
},
seriesInformation: {
@@ -1297,6 +1337,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 67
}
}
@@ -1314,7 +1355,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: ',',
isRequired: false,
displayOrder: 68,
- displayOnCreate: false,
+ displayOnCreate: true,
childMetadataFields: {
softwareName: {
name: 'softwareName',
@@ -1328,6 +1369,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 69
},
softwareVersion: {
@@ -1342,6 +1384,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#NAME: #VALUE',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 70
}
}
@@ -1463,7 +1506,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
id: 2,
name: 'geospatial',
displayName: 'Geospatial Metadata',
- displayOnCreate: false,
+ displayOnCreate: true,
metadataFields: {
geographicCoverage: {
name: 'geographicCoverage',
@@ -1479,6 +1522,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 0,
+ displayOnCreate: true,
childMetadataFields: {
country: {
name: 'country',
@@ -1493,6 +1537,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '#VALUE, ',
isRequired: false,
displayOrder: 1,
+ displayOnCreate: true,
controlledVocabularyValues: [
'Afghanistan',
'Albania',
@@ -1758,6 +1803,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE, ',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 2
},
city: {
@@ -1773,6 +1819,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE, ',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 3
},
otherGeographicCoverage: {
@@ -1787,319 +1834,11 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '#VALUE, ',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 4
}
}
},
- country: {
- name: 'country',
- displayName: 'Geographic Coverage Country / Nation',
- title: 'Country / Nation',
- type: 'TEXT',
- typeClass: 'controlledVocabulary',
- watermark: '',
- description: 'The country or nation that the Dataset is about.',
- multiple: false,
- isControlledVocabulary: true,
- displayFormat: '#VALUE, ',
- isRequired: false,
- displayOrder: 1,
- controlledVocabularyValues: [
- 'Afghanistan',
- 'Albania',
- 'Algeria',
- 'American Samoa',
- 'Andorra',
- 'Angola',
- 'Anguilla',
- 'Antarctica',
- 'Antigua and Barbuda',
- 'Argentina',
- 'Armenia',
- 'Aruba',
- 'Australia',
- 'Austria',
- 'Azerbaijan',
- 'Bahamas',
- 'Bahrain',
- 'Bangladesh',
- 'Barbados',
- 'Belarus',
- 'Belgium',
- 'Belize',
- 'Benin',
- 'Bermuda',
- 'Bhutan',
- 'Bolivia, Plurinational State of',
- 'Bonaire, Sint Eustatius and Saba',
- 'Bosnia and Herzegovina',
- 'Botswana',
- 'Bouvet Island',
- 'Brazil',
- 'British Indian Ocean Territory',
- 'Brunei Darussalam',
- 'Bulgaria',
- 'Burkina Faso',
- 'Burundi',
- 'Cambodia',
- 'Cameroon',
- 'Canada',
- 'Cape Verde',
- 'Cayman Islands',
- 'Central African Republic',
- 'Chad',
- 'Chile',
- 'China',
- 'Christmas Island',
- 'Cocos (Keeling) Islands',
- 'Colombia',
- 'Comoros',
- 'Congo',
- 'Congo, the Democratic Republic of the',
- 'Cook Islands',
- 'Costa Rica',
- 'Croatia',
- 'Cuba',
- 'Curaçao',
- 'Cyprus',
- 'Czech Republic',
- "Côte d'Ivoire",
- 'Denmark',
- 'Djibouti',
- 'Dominica',
- 'Dominican Republic',
- 'Ecuador',
- 'Egypt',
- 'El Salvador',
- 'Equatorial Guinea',
- 'Eritrea',
- 'Estonia',
- 'Ethiopia',
- 'Falkland Islands (Malvinas)',
- 'Faroe Islands',
- 'Fiji',
- 'Finland',
- 'France',
- 'French Guiana',
- 'French Polynesia',
- 'French Southern Territories',
- 'Gabon',
- 'Gambia',
- 'Georgia',
- 'Germany',
- 'Ghana',
- 'Gibraltar',
- 'Greece',
- 'Greenland',
- 'Grenada',
- 'Guadeloupe',
- 'Guam',
- 'Guatemala',
- 'Guernsey',
- 'Guinea',
- 'Guinea-Bissau',
- 'Guyana',
- 'Haiti',
- 'Heard Island and Mcdonald Islands',
- 'Holy See (Vatican City State)',
- 'Honduras',
- 'Hong Kong',
- 'Hungary',
- 'Iceland',
- 'India',
- 'Indonesia',
- 'Iran, Islamic Republic of',
- 'Iraq',
- 'Ireland',
- 'Isle of Man',
- 'Israel',
- 'Italy',
- 'Jamaica',
- 'Japan',
- 'Jersey',
- 'Jordan',
- 'Kazakhstan',
- 'Kenya',
- 'Kiribati',
- "Korea, Democratic People's Republic of",
- 'Korea, Republic of',
- 'Kuwait',
- 'Kyrgyzstan',
- "Lao People's Democratic Republic",
- 'Latvia',
- 'Lebanon',
- 'Lesotho',
- 'Liberia',
- 'Libya',
- 'Liechtenstein',
- 'Lithuania',
- 'Luxembourg',
- 'Macao',
- 'Macedonia, the Former Yugoslav Republic of',
- 'Madagascar',
- 'Malawi',
- 'Malaysia',
- 'Maldives',
- 'Mali',
- 'Malta',
- 'Marshall Islands',
- 'Martinique',
- 'Mauritania',
- 'Mauritius',
- 'Mayotte',
- 'Mexico',
- 'Micronesia, Federated States of',
- 'Moldova, Republic of',
- 'Monaco',
- 'Mongolia',
- 'Montenegro',
- 'Montserrat',
- 'Morocco',
- 'Mozambique',
- 'Myanmar',
- 'Namibia',
- 'Nauru',
- 'Nepal',
- 'Netherlands',
- 'New Caledonia',
- 'New Zealand',
- 'Nicaragua',
- 'Niger',
- 'Nigeria',
- 'Niue',
- 'Norfolk Island',
- 'Northern Mariana Islands',
- 'Norway',
- 'Oman',
- 'Pakistan',
- 'Palau',
- 'Palestine, State of',
- 'Panama',
- 'Papua New Guinea',
- 'Paraguay',
- 'Peru',
- 'Philippines',
- 'Pitcairn',
- 'Poland',
- 'Portugal',
- 'Puerto Rico',
- 'Qatar',
- 'Romania',
- 'Russian Federation',
- 'Rwanda',
- 'Réunion',
- 'Saint Barthélemy',
- 'Saint Helena, Ascension and Tristan da Cunha',
- 'Saint Kitts and Nevis',
- 'Saint Lucia',
- 'Saint Martin (French part)',
- 'Saint Pierre and Miquelon',
- 'Saint Vincent and the Grenadines',
- 'Samoa',
- 'San Marino',
- 'Sao Tome and Principe',
- 'Saudi Arabia',
- 'Senegal',
- 'Serbia',
- 'Seychelles',
- 'Sierra Leone',
- 'Singapore',
- 'Sint Maarten (Dutch part)',
- 'Slovakia',
- 'Slovenia',
- 'Solomon Islands',
- 'Somalia',
- 'South Africa',
- 'South Georgia and the South Sandwich Islands',
- 'South Sudan',
- 'Spain',
- 'Sri Lanka',
- 'Sudan',
- 'Suriname',
- 'Svalbard and Jan Mayen',
- 'Swaziland',
- 'Sweden',
- 'Switzerland',
- 'Syrian Arab Republic',
- 'Taiwan, Province of China',
- 'Tajikistan',
- 'Tanzania, United Republic of',
- 'Thailand',
- 'Timor-Leste',
- 'Togo',
- 'Tokelau',
- 'Tonga',
- 'Trinidad and Tobago',
- 'Tunisia',
- 'Turkey',
- 'Turkmenistan',
- 'Turks and Caicos Islands',
- 'Tuvalu',
- 'Uganda',
- 'Ukraine',
- 'United Arab Emirates',
- 'United Kingdom',
- 'United States',
- 'United States Minor Outlying Islands',
- 'Uruguay',
- 'Uzbekistan',
- 'Vanuatu',
- 'Venezuela, Bolivarian Republic of',
- 'Viet Nam',
- 'Virgin Islands, British',
- 'Virgin Islands, U.S.',
- 'Wallis and Futuna',
- 'Western Sahara',
- 'Yemen',
- 'Zambia',
- 'Zimbabwe',
- 'Åland Islands'
- ]
- },
- state: {
- name: 'state',
- displayName: 'Geographic Coverage State / Province',
- title: 'State / Province',
- type: 'TEXT',
- typeClass: 'primitive',
- watermark: '',
- description:
- 'The state or province that the Dataset is about. Use GeoNames for correct spelling and avoid abbreviations.',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '#VALUE, ',
- isRequired: false,
- displayOrder: 2
- },
- city: {
- name: 'city',
- displayName: 'Geographic Coverage City',
- title: 'City',
- type: 'TEXT',
- typeClass: 'primitive',
- watermark: '',
- description:
- 'The name of the city that the Dataset is about. Use GeoNames for correct spelling and avoid abbreviations.',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '#VALUE, ',
- isRequired: false,
- displayOrder: 3
- },
- otherGeographicCoverage: {
- name: 'otherGeographicCoverage',
- displayName: 'Geographic Coverage Other',
- title: 'Other',
- type: 'TEXT',
- typeClass: 'primitive',
- watermark: '',
- description: 'Other information on the geographic coverage of the data.',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '#VALUE, ',
- isRequired: false,
- displayOrder: 4
- },
geographicUnit: {
name: 'geographicUnit',
displayName: 'Geographic Unit',
@@ -2113,6 +1852,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 5
},
geographicBoundingBox: {
@@ -2128,6 +1868,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 6,
childMetadataFields: {
westLongitude: {
@@ -2143,6 +1884,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 7
},
eastLongitude: {
@@ -2158,6 +1900,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 8
},
northLatitude: {
@@ -2173,6 +1916,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 9
},
southLatitude: {
@@ -2188,69 +1932,10 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 10
}
}
- },
- westLongitude: {
- name: 'westLongitude',
- displayName: 'Geographic Bounding Box Westernmost (Left) Longitude',
- title: 'Westernmost (Left) Longitude',
- type: 'TEXT',
- typeClass: 'primitive',
- watermark: '',
- description:
- 'Westernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -180,0 <= West Bounding Longitude Value <= 180,0.',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '',
- isRequired: false,
- displayOrder: 7
- },
- eastLongitude: {
- name: 'eastLongitude',
- displayName: 'Geographic Bounding Box Easternmost (Right) Longitude',
- title: 'Easternmost (Right) Longitude',
- type: 'TEXT',
- typeClass: 'primitive',
- watermark: '',
- description:
- 'Easternmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -180,0 <= East Bounding Longitude Value <= 180,0.',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '',
- isRequired: false,
- displayOrder: 8
- },
- northLatitude: {
- name: 'northLatitude',
- displayName: 'Geographic Bounding Box Northernmost (Top) Latitude',
- title: 'Northernmost (Top) Latitude',
- type: 'TEXT',
- typeClass: 'primitive',
- watermark: '',
- description:
- 'Northernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -90,0 <= North Bounding Latitude Value <= 90,0.',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '',
- isRequired: false,
- displayOrder: 9
- },
- southLatitude: {
- name: 'southLatitude',
- displayName: 'Geographic Bounding Box Southernmost (Bottom) Latitude',
- title: 'Southernmost (Bottom) Latitude',
- type: 'TEXT',
- typeClass: 'primitive',
- watermark: '',
- description:
- 'Southernmost coordinate delimiting the geographic extent of the Dataset. A valid range of values, expressed in decimal degrees, is -90,0 <= South Bounding Latitude Value <= 90,0.',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '',
- isRequired: false,
- displayOrder: 10
}
}
},
@@ -2258,7 +1943,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
id: 4,
name: 'astrophysics',
displayName: 'Astronomy and Astrophysics Metadata',
- displayOnCreate: false,
+ displayOnCreate: true,
metadataFields: {
astroType: {
name: 'astroType',
@@ -2273,6 +1958,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 0,
+ displayOnCreate: true,
controlledVocabularyValues: [
'Image',
'Mosaic',
@@ -2312,6 +1998,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 1
},
astroInstrument: {
@@ -2326,6 +2013,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 2
},
astroObject: {
@@ -2341,6 +2029,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 3
},
'resolution.Spatial': {
@@ -2356,6 +2045,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 4
},
'resolution.Spectral': {
@@ -2371,6 +2061,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 5
},
'resolution.Temporal': {
@@ -2386,6 +2077,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 6
},
'coverage.Spectral.Bandpass': {
@@ -2400,6 +2092,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 7
},
'coverage.Spectral.CentralWavelength': {
@@ -2414,6 +2107,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 8
},
'coverage.Spectral.Wavelength': {
@@ -2428,6 +2122,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 9,
childMetadataFields: {
'coverage.Spectral.MinimumWavelength': {
@@ -2442,6 +2137,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 10
},
'coverage.Spectral.MaximumWavelength': {
@@ -2456,38 +2152,11 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 11
}
}
},
- 'coverage.Spectral.MinimumWavelength': {
- name: 'coverage.Spectral.MinimumWavelength',
- displayName: 'Wavelength Range Minimum (m)',
- title: 'Minimum (m)',
- type: 'FLOAT',
- typeClass: 'primitive',
- watermark: 'Enter a floating-point number.',
- description: 'The minimum wavelength of the spectral bandpass, in meters.',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '',
- isRequired: false,
- displayOrder: 10
- },
- 'coverage.Spectral.MaximumWavelength': {
- name: 'coverage.Spectral.MaximumWavelength',
- displayName: 'Wavelength Range Maximum (m)',
- title: 'Maximum (m)',
- type: 'FLOAT',
- typeClass: 'primitive',
- watermark: 'Enter a floating-point number.',
- description: 'The maximum wavelength of the spectral bandpass, in meters.',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '',
- isRequired: false,
- displayOrder: 11
- },
'coverage.Temporal': {
name: 'coverage.Temporal',
displayName: 'Dataset Date Range',
@@ -2500,6 +2169,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 12,
childMetadataFields: {
'coverage.Temporal.StartTime': {
@@ -2514,6 +2184,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 13
},
'coverage.Temporal.StopTime': {
@@ -2528,38 +2199,11 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 14
}
}
},
- 'coverage.Temporal.StartTime': {
- name: 'coverage.Temporal.StartTime',
- displayName: 'Dataset Date Range Start',
- title: 'Start',
- type: 'DATE',
- typeClass: 'primitive',
- watermark: 'YYYY-MM-DD',
- description: 'Dataset Start Date',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '',
- isRequired: false,
- displayOrder: 13
- },
- 'coverage.Temporal.StopTime': {
- name: 'coverage.Temporal.StopTime',
- displayName: 'Dataset Date Range End',
- title: 'End',
- type: 'DATE',
- typeClass: 'primitive',
- watermark: 'YYYY-MM-DD',
- description: 'Dataset End Date',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '',
- isRequired: false,
- displayOrder: 14
- },
'coverage.Spatial': {
name: 'coverage.Spatial',
displayName: 'Sky Coverage',
@@ -2572,6 +2216,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 15
},
'coverage.Depth': {
@@ -2586,6 +2231,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 16
},
'coverage.ObjectDensity': {
@@ -2601,6 +2247,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 17
},
'coverage.ObjectCount': {
@@ -2615,6 +2262,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 18
},
'coverage.SkyFraction': {
@@ -2630,6 +2278,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 19
},
'coverage.Polarization': {
@@ -2644,6 +2293,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 20
},
redshiftType: {
@@ -2659,6 +2309,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 21
},
'resolution.Redshift': {
@@ -2674,6 +2325,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 22
},
'coverage.RedshiftValue': {
@@ -2689,6 +2341,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 23,
childMetadataFields: {
'coverage.Redshift.MinimumValue': {
@@ -2704,6 +2357,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 24
},
'coverage.Redshift.MaximumValue': {
@@ -2719,39 +2373,10 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 25
}
}
- },
- 'coverage.Redshift.MinimumValue': {
- name: 'coverage.Redshift.MinimumValue',
- displayName: 'Redshift Value Minimum',
- title: 'Minimum',
- type: 'FLOAT',
- typeClass: 'primitive',
- watermark: 'Enter a floating-point number.',
- description:
- 'The minimum value of the redshift (unitless) or Doppler velocity (km/s in the data object.',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '',
- isRequired: false,
- displayOrder: 24
- },
- 'coverage.Redshift.MaximumValue': {
- name: 'coverage.Redshift.MaximumValue',
- displayName: 'Redshift Value Maximum',
- title: 'Maximum',
- type: 'FLOAT',
- typeClass: 'primitive',
- watermark: 'Enter a floating-point number.',
- description:
- 'The maximum value of the redshift (unitless) or Doppler velocity (km/s in the data object.',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '',
- isRequired: false,
- displayOrder: 25
}
}
},
@@ -2759,7 +2384,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
id: 5,
name: 'biomedical',
displayName: 'Life Sciences Metadata',
- displayOnCreate: false,
+ displayOnCreate: true,
metadataFields: {
studyDesignType: {
name: 'studyDesignType',
@@ -2774,6 +2399,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 0,
+ displayOnCreate: true,
controlledVocabularyValues: [
'Case Control',
'Cross Sectional',
@@ -2800,6 +2426,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 1
},
studyFactorType: {
@@ -2814,6 +2441,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: true,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 2,
controlledVocabularyValues: [
'Age',
@@ -2851,6 +2479,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 3
},
studyAssayOrganism: {
@@ -2867,6 +2496,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 4,
+ displayOnCreate: true,
controlledVocabularyValues: [
'Arabidopsis thaliana',
'Bos taurus',
@@ -2908,6 +2538,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 5
},
studyAssayMeasurementType: {
@@ -2924,6 +2555,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 6,
+ displayOnCreate: true,
controlledVocabularyValues: [
'cell sorting',
'clinical chemistry analysis',
@@ -2969,6 +2601,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 7
},
studyAssayTechnologyType: {
@@ -2985,6 +2618,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 8,
+ displayOnCreate: true,
controlledVocabularyValues: [
'culture based drug susceptibility testing, single concentration',
'culture based drug susceptibility testing, two concentrations',
@@ -3014,6 +2648,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 9
},
studyAssayPlatform: {
@@ -3029,6 +2664,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: true,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 10,
controlledVocabularyValues: [
'210-MS GC Ion Trap (Varian)',
@@ -3230,6 +2866,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 11
},
studyAssayCellType: {
@@ -3244,6 +2881,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 12
}
}
@@ -3252,7 +2890,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
id: 6,
name: 'journal',
displayName: 'Journal Metadata',
- displayOnCreate: false,
+ displayOnCreate: true,
metadataFields: {
journalVolumeIssue: {
name: 'journalVolumeIssue',
@@ -3268,6 +2906,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 0,
+ displayOnCreate: true,
childMetadataFields: {
journalVolume: {
name: 'journalVolume',
@@ -3282,6 +2921,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 1
},
journalIssue: {
@@ -3297,6 +2937,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 2
},
journalPubDate: {
@@ -3312,54 +2953,11 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 3
}
}
},
- journalVolume: {
- name: 'journalVolume',
- displayName: 'Journal Volume',
- title: 'Volume',
- type: 'TEXT',
- typeClass: 'primitive',
- watermark: '',
- description: 'The journal volume which this Dataset is associated with (e.g., Volume 4).',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '',
- isRequired: false,
- displayOrder: 1
- },
- journalIssue: {
- name: 'journalIssue',
- displayName: 'Journal Issue',
- title: 'Issue',
- type: 'TEXT',
- typeClass: 'primitive',
- watermark: '',
- description:
- 'The journal issue number which this Dataset is associated with (e.g., Number 2, Autumn).',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '',
- isRequired: false,
- displayOrder: 2
- },
- journalPubDate: {
- name: 'journalPubDate',
- displayName: 'Journal Publication Date',
- title: 'Publication Date',
- type: 'DATE',
- typeClass: 'primitive',
- watermark: 'YYYY or YYYY-MM or YYYY-MM-DD',
- description:
- 'The publication date for this journal volume/issue, which this Dataset is associated with (e.g., 1999).',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '',
- isRequired: false,
- displayOrder: 3
- },
journalArticleType: {
name: 'journalArticleType',
displayName: 'Type of Article',
@@ -3374,6 +2972,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
displayFormat: '',
isRequired: false,
displayOrder: 4,
+ displayOnCreate: true,
controlledVocabularyValues: [
'abstract',
'addendum',
@@ -3415,7 +3014,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
id: 3,
name: 'socialscience',
displayName: 'Social Science and Humanities Metadata',
- displayOnCreate: false,
+ displayOnCreate: true,
metadataFields: {
unitOfAnalysis: {
name: 'unitOfAnalysis',
@@ -3430,6 +3029,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 0
},
universe: {
@@ -3445,6 +3045,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 1
},
timeMethod: {
@@ -3460,6 +3061,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 2
},
dataCollector: {
@@ -3475,6 +3077,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 3
},
collectorTraining: {
@@ -3489,6 +3092,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 4
},
frequencyOfDataCollection: {
@@ -3504,6 +3108,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 5
},
samplingProcedure: {
@@ -3519,6 +3124,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 6
},
targetSampleSize: {
@@ -3534,6 +3140,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 7,
childMetadataFields: {
targetSampleActualSize: {
@@ -3548,6 +3155,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 8
},
targetSampleSizeFormula: {
@@ -3562,38 +3170,11 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 9
}
}
},
- targetSampleActualSize: {
- name: 'targetSampleActualSize',
- displayName: 'Target Sample Size Actual',
- title: 'Actual',
- type: 'INT',
- typeClass: 'primitive',
- watermark: 'Enter an integer...',
- description: 'Actual sample size.',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '',
- isRequired: false,
- displayOrder: 8
- },
- targetSampleSizeFormula: {
- name: 'targetSampleSizeFormula',
- displayName: 'Target Sample Size Formula',
- title: 'Formula',
- type: 'TEXT',
- typeClass: 'primitive',
- watermark: '',
- description: 'Formula used to determine target sample size.',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '',
- isRequired: false,
- displayOrder: 9
- },
deviationsFromSampleDesign: {
name: 'deviationsFromSampleDesign',
displayName: 'Major Deviations for Sample Design',
@@ -3607,6 +3188,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 10
},
collectionMode: {
@@ -3622,6 +3204,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 11
},
researchInstrument: {
@@ -3637,6 +3220,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 12
},
dataCollectionSituation: {
@@ -3652,6 +3236,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 13
},
actionsToMinimizeLoss: {
@@ -3667,6 +3252,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 14
},
controlOperations: {
@@ -3682,6 +3268,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 15
},
weighting: {
@@ -3697,6 +3284,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 16
},
cleaningOperations: {
@@ -3712,6 +3300,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 17
},
datasetLevelErrorNotes: {
@@ -3727,6 +3316,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 18
},
responseRate: {
@@ -3741,6 +3331,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 19
},
samplingErrorEstimates: {
@@ -3756,6 +3347,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 20
},
otherDataAppraisal: {
@@ -3771,6 +3363,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 21
},
socialScienceNotes: {
@@ -3785,6 +3378,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 22,
childMetadataFields: {
socialScienceNotesType: {
@@ -3799,6 +3393,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 23
},
socialScienceNotesSubject: {
@@ -3813,6 +3408,7 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 24
},
socialScienceNotesText: {
@@ -3827,52 +3423,11 @@ export const metadataBlocksInfoByCollectionIdResponse = [
isControlledVocabulary: false,
displayFormat: '',
isRequired: false,
+ displayOnCreate: true,
displayOrder: 25
}
}
- },
- socialScienceNotesType: {
- name: 'socialScienceNotesType',
- displayName: 'Notes Type',
- title: 'Type',
- type: 'TEXT',
- typeClass: 'primitive',
- watermark: '',
- description: 'Type of note.',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '',
- isRequired: false,
- displayOrder: 23
- },
- socialScienceNotesSubject: {
- name: 'socialScienceNotesSubject',
- displayName: 'Notes Subject',
- title: 'Subject',
- type: 'TEXT',
- typeClass: 'primitive',
- watermark: '',
- description: 'Note subject.',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '',
- isRequired: false,
- displayOrder: 24
- },
- socialScienceNotesText: {
- name: 'socialScienceNotesText',
- displayName: 'Notes Text',
- title: 'Text',
- type: 'TEXTBOX',
- typeClass: 'primitive',
- watermark: '',
- description: 'Text for this note.',
- multiple: false,
- isControlledVocabulary: false,
- displayFormat: '',
- isRequired: false,
- displayOrder: 25
}
}
}
-] as MetadataBlockInfo2[]
+]
From 89da8e2e9d1736797bb7ccf2871077634003d75d Mon Sep 17 00:00:00 2001
From: German Saracca
Date: Mon, 25 Mar 2024 17:08:20 -0300
Subject: [PATCH 08/20] feat(DynamicFormFieldsRender): Refactor to avoid for
now multiple actions buttons space
---
.../FormGroupWithMultipleFields.tsx | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/packages/design-system/src/lib/components/form/form-group-multiple-fields/FormGroupWithMultipleFields.tsx b/packages/design-system/src/lib/components/form/form-group-multiple-fields/FormGroupWithMultipleFields.tsx
index ddb0425fb..0a45261d4 100644
--- a/packages/design-system/src/lib/components/form/form-group-multiple-fields/FormGroupWithMultipleFields.tsx
+++ b/packages/design-system/src/lib/components/form/form-group-multiple-fields/FormGroupWithMultipleFields.tsx
@@ -36,20 +36,21 @@ export function FormGroupWithMultipleFields({
const isFirstField = index == 0
return (
-
+
{isFirstField && }
- {field}
-
- {withDynamicFields && (
+ {field}
+
+ {withDynamicFields && (
+
addField(field)}
onRemoveButtonClick={() => removeField(index)}
/>
- )}
-
+
+ )}
)
})}
From 9b46e19d973361c67af0cb94e7e2f51693da536d Mon Sep 17 00:00:00 2001
From: German Saracca
Date: Tue, 26 Mar 2024 08:58:22 -0300
Subject: [PATCH 09/20] feat: change styles for checbox group
---
.../form-checkbox-group/FormCheckboxGroup.module.scss | 8 ++++----
.../form/form-checkbox-group/FormCheckboxGroup.tsx | 2 +-
.../MetadataFormField/index.module.scss | 4 ++--
.../MetadataBlockFormFields/MetadataFormField/index.tsx | 2 --
4 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/packages/design-system/src/lib/components/form/form-checkbox-group/FormCheckboxGroup.module.scss b/packages/design-system/src/lib/components/form/form-checkbox-group/FormCheckboxGroup.module.scss
index d8700a3ab..4c8ba85d7 100644
--- a/packages/design-system/src/lib/components/form/form-checkbox-group/FormCheckboxGroup.module.scss
+++ b/packages/design-system/src/lib/components/form/form-checkbox-group/FormCheckboxGroup.module.scss
@@ -1,7 +1,7 @@
-@import "src/lib/assets/styles/design-tokens/typography.module";
+@import 'src/lib/assets/styles/design-tokens/typography.module';
.title {
- padding-top: calc(0.375rem + 1px);
- padding-bottom: calc(0.375rem + 1px);
+ display: inline-block;
+ margin-bottom: 0.5rem;
font-weight: $dv-font-weight-bold;
-}
\ No newline at end of file
+}
diff --git a/packages/design-system/src/lib/components/form/form-checkbox-group/FormCheckboxGroup.tsx b/packages/design-system/src/lib/components/form/form-checkbox-group/FormCheckboxGroup.tsx
index 063626c24..4b5d655c4 100644
--- a/packages/design-system/src/lib/components/form/form-checkbox-group/FormCheckboxGroup.tsx
+++ b/packages/design-system/src/lib/components/form/form-checkbox-group/FormCheckboxGroup.tsx
@@ -23,7 +23,7 @@ export function FormCheckboxGroup({
}: PropsWithChildren) {
const validationClass = isInvalid ? 'is-invalid' : isValid ? 'is-valid' : ''
return (
-
+
{title} {required && }{' '}
diff --git a/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.module.scss b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.module.scss
index b02ee165b..08ec09a88 100644
--- a/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.module.scss
+++ b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.module.scss
@@ -12,9 +12,9 @@
display: flex;
flex-wrap: wrap;
gap: 1rem;
- border: solid 1px var(--bs-gray-400);
- padding: 1rem;
max-height: 260px;
+ padding: 1rem;
overflow-y: auto;
+ border: solid 1px var(--bs-gray-400);
border-radius: var(--bs-border-radius-lg);
}
diff --git a/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.tsx b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.tsx
index 3c2475e49..3c3e81942 100644
--- a/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.tsx
+++ b/src/sections/create-dataset/MetadataBlockFormFields/MetadataFormField/index.tsx
@@ -25,7 +25,6 @@ export const MetadataFormField = ({
metadataFieldInfo,
withinMultipleFieldsGroup = false
}: Props) => {
- console.log(metadataFieldInfo)
const {
name,
type,
@@ -33,7 +32,6 @@ export const MetadataFormField = ({
multiple,
typeClass,
isRequired,
- displayName,
description,
childMetadataFields,
controlledVocabularyValues
From 74de357874a88888d32c05fe37d83faa0593b93b Mon Sep 17 00:00:00 2001
From: German Saracca
Date: Tue, 26 Mar 2024 11:19:04 -0300
Subject: [PATCH 10/20] feat: add names to form fields
---
.../create-dataset/CreateDatasetForm.tsx | 202 ++----------------
.../MetadataFormField/Fields/Vocabulary.tsx | 4 +-
.../MetadataFormField/index.tsx | 20 +-
...etadataBlocksInfoByCollectionIdResponse.ts | 10 +-
4 files changed, 30 insertions(+), 206 deletions(-)
diff --git a/src/sections/create-dataset/CreateDatasetForm.tsx b/src/sections/create-dataset/CreateDatasetForm.tsx
index 77b6bfd95..33338ff9f 100644
--- a/src/sections/create-dataset/CreateDatasetForm.tsx
+++ b/src/sections/create-dataset/CreateDatasetForm.tsx
@@ -1,5 +1,6 @@
import { ChangeEvent, FormEvent, MouseEvent, useEffect } from 'react'
-import { Form, Accordion } from '@iqss/dataverse-design-system'
+import { Form, Accordion, Alert, Button } from '@iqss/dataverse-design-system'
+import { useNavigate } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
import { RequiredFieldText } from '../shared/form/RequiredFieldText/RequiredFieldText'
import { SeparationLine } from '../shared/layout/SeparationLine/SeparationLine'
@@ -9,13 +10,11 @@ import { DatasetRepository } from '../../dataset/domain/repositories/DatasetRepo
import { MetadataBlockInfoRepository } from '../../metadata-block-info/domain/repositories/MetadataBlockInfoRepository'
import { useDatasetFormData } from './useDatasetFormData'
import { Route } from '../Route.enum'
-import { useNavigate } from 'react-router-dom'
import { useDatasetValidator } from './useDatasetValidator'
import { useGetMetadataBlocksInfo } from './useGetMetadataBlocksInfo'
// import { DatasetMetadataSubField } from '../../dataset/domain/models/Dataset'
-import styles from './CreateDatasetForm.module.scss'
import { MetadataBlockFormFields } from './MetadataBlockFormFields'
-
+import styles from './CreateDatasetForm.module.scss'
interface CreateDatasetFormProps {
repository: DatasetRepository
metadataBlockInfoRepository: MetadataBlockInfoRepository
@@ -41,13 +40,16 @@ export function CreateDatasetForm({
const { name, checked } = event.target
const value = event.target.type === 'checkbox' && !checked ? '' : event.target.value
- updateFormData(name, value)
+ // updateFormData(name, value)
}
const handleSubmit = (event: FormEvent) => {
event.preventDefault()
+ const values = new FormData(event.currentTarget)
+ const formData = Object.fromEntries(values)
+ console.log(formData)
- submitForm(formData)
+ // submitForm(formData)
}
const handleCancel = (event: MouseEvent) => {
@@ -89,198 +91,20 @@ export function CreateDatasetForm({
))}
-
- {/*
-
-
- {t('datasetForm.fields.title.label')}
-
-
-
- {t('datasetForm.fields.title.feedback')}
-
-
-
-
- {t('datasetForm.fields.authorName.label')}
-
-
-
- {t('datasetForm.fields.authorName.feedback')}
-
-
-
-
- {t('datasetForm.fields.datasetContactEmail.label')}
-
-
-
- {t('datasetForm.fields.datasetContactEmail.feedback')}
-
-
-
-
- {t('datasetForm.fields.dsDescriptionValue.label')}
-
-
-
- {t('datasetForm.fields.dsDescriptionValue.feedback')}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {t('datasetForm.fields.subject.feedback')}
-
-
{t('metadataTip.content')}
-