@rcsb/rcsb-saguaro-app
Version:
RCSB 1D Saguaro Web App
28 lines • 889 B
JavaScript
export class GroupPropertiesProvider {
constructor(properties) {
this.entryProperties = properties.entryProperties;
}
get(key) {
if (key === "experimental_method" || key === "resolution") {
return this.getEntryProperties(key);
}
}
getEntryProperties(key) {
if (key === "experimental_method") {
return this.entryProperties.map(p => ({
objectId: p.rcsbId,
value: p.experimentalMethod
}));
}
else if (key === "resolution") {
return this.entryProperties.map(p => {
var _a;
return ({
objectId: p.rcsbId,
value: (_a = p.resolution) !== null && _a !== void 0 ? _a : "NA"
});
});
}
}
}
//# sourceMappingURL=GroupPropertiesProvider.js.map