Commit 62c8b1b4 authored by Maud Marty's avatar Maud Marty Committed by Célia Michotey
Browse files

Add Mcpd fields to model

parent c15a2a2d
......@@ -4,6 +4,7 @@ import { HttpClient } from '@angular/common/http';
import {
BrapiGermplasm,
BrapiGermplasmAttributes,
BrapiGermplasmMcpd,
BrapiGermplasmPedigree,
BrapiLocation,
BrapiObservationVariable,
......@@ -14,9 +15,6 @@ import {
} from './models/brapi.model';
import { GermplasmMcpd } from './models/gnpis.model';
export const BASE_URL = 'brapi/v1';
@Injectable({
......@@ -64,9 +62,9 @@ export class BrapiService {
return this.http
.get<BrapiResult<BrapiTrial>>(`${BASE_URL}/trials/${trialsId}`);
}
germplasmMcpd(germplasmDbId: string): Observable<BrapiResult<GermplasmMcpd>> {
germplasmMcpd(germplasmDbId: string): Observable<BrapiResult<BrapiGermplasmMcpd>> {
return this.http
.get<BrapiResult<GermplasmMcpd>>(`${BASE_URL}/germplasm/${germplasmDbId}/mcpd`);
.get<BrapiResult<BrapiGermplasmMcpd>>(`${BASE_URL}/germplasm/${germplasmDbId}/mcpd`);
}
......
......@@ -177,6 +177,64 @@ export interface BrapiGermplasm extends BrapiHasDocumentationURL, schema.Dataset
acquisitionDate: string;
}
export interface BrapiGermplasmMcpd extends BrapiHasDocumentationURL {
accessionNames: string[];
accessionNumber: string;
acquisitionDate: string;
acquisitionSourceCode: string;
alternateIDs: string[];
ancestralData: string;
biologicalStatusOfAccessionCode: string;
breedingInstitutes: {
instituteCode: string;
instituteName: string;
};
collectingInfo: {
collectingDate: string;
collectingInstitutes: {
instituteCode: string;
instituteName: string;
};
collectingMissionIdentifier: string;
collectingNumber: string;
collectingSite: {
coordinateUncertainty: string;
elevation: string;
georeferencingMethod: string;
latitudeDecimal: string;
latitudeDegrees: string;
locationDescription: string;
longitudeDecimal: string;
longitudeDegrees: string;
spatialReferenceSystem: string;
};
};
commonCropName: string;
countryOfOriginCode: string;
donorInfo: {
donorAccessionNumber: string;
donorInstitute: {
instituteCode: string;
instituteName: string;
};
};
genus: string;
germplasmDbId: string;
germplasmPUI: string;
instituteCode: string;
mlsStatus: string;
remarks: string;
safetyDuplicateInstitutes: {
instituteCode: string;
instituteName: string;
}[];
species: string;
speciesAuthority: string;
storageTypeCodes: string[];
subtaxon: string;
subtaxonAuthority: string;
}
export interface BrapiTaxonIds {
sourceName: string;
......
......@@ -61,9 +61,9 @@ export interface Germplasm extends BrapiGermplasm {
}
export interface GermplasmMcpd extends BrapiGermplasm {
/* export interface GermplasmMcpd extends BrapiGermplasm {
mlsStatus: string;
}
} */
export interface Site {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment