description |
---|
Alternative Name: (Resource Relations Enhancer) |
Full Path:
Foundry-ES/consumers/src/main/java/org/neuinfo/foundry/consumers/jms/consumers/plugins/scicrunch/ResourceRelationsEnhancer.java
By querying theresource_relationships
table with the current record's SCR ID, the Enhancer retrieves the immediate parents and children, ancestors and descendants of the current resource.
The Enhancer recursively traverses upwards and downwards the relational tree of organizations and inserts the name and curie of these resources into the current record.
"organization" :
{"hierarchy": {
"parent": [{
"name": "Digestive Disease Centers",
"curie": "SCR_015212"
}],
"ancestors": [{
"name": "Digestive Disease Centers",
"curie": "SCR_015212"
}],
"children": [
{
"name": "CURE - Digestive Diseases Research Center Human Studies Core",
"curie": "SCR_015207"
},
{
"name": "CURE - Digestive Diseases Research Center Morphology and Imaging Core",
"curie": "SCR_015209"
},
{
"name": "CURE - Digestive Diseases Research Center Molecular Biology and Peptidomics Core",
"curie": "SCR_015213"
},
{
"name": "CURE - Digestive Diseases Research Center Animal Models Core",
"curie": "SCR_015217"
},
{
"name": "CURE - Digestive Diseases Research Center Administrative Core",
"curie": "SCR_015231"
}
],
"descendants": [
{
"name": "CURE - Digestive Diseases Research Center Human Studies Core",
"curie": "SCR_015207"
},
{
"name": "CURE - Digestive Diseases Research Center Morphology and Imaging Core",
"curie": "SCR_015209"
},
{
"name": "CURE - Digestive Diseases Research Center Molecular Biology and Peptidomics Core",
"curie": "SCR_015213"
},
{
"name": "CURE - Digestive Diseases Research Center Animal Models Core",
"curie": "SCR_015217"
},
{
"name": "CURE - Digestive Diseases Research Center Administrative Core",
"curie": "SCR_015231"
}
]
}}
Table Name | Description |
---|---|
scicrunch_registry_view | View containing the resources within SciCrunch |
resource_relationships | Contains the relationship between two sources |
Note: This enhancer expects the following parameters to be defined when initialized:
dbURL
: The JDBC URL to the nif_eelg databasedbUser
: User of the nif_eelg databasedbPassword
: Password to the nif_eelg database
Full Path:
Foundry-ES/consumers/src/test/java/org/neuinfo/foundry/consumers/ResourceRelationsEnhancerTests.java