@Override
public synchronized void init() {
if (!isInitialized()) {
_unstructured = new InMemoryLKVMarketDataProvider();
final UnstructuredMarketDataSnapshot globalValues = _snapshot.getGlobalValues();
if (globalValues != null) {
for (final ExternalIdBundle target : globalValues.getTargets()) {
final ComputationTargetReference targetRef = new ComputationTargetRequirement(ComputationTargetType.PRIMITIVE, target);
for (final Map.Entry<String, ValueSnapshot> valuePair : globalValues.getTargetValues(target).entrySet()) {
ValueRequirement valueRequirement = new ValueRequirement(valuePair.getKey(), targetRef);
_unstructured.addValue(valueRequirement, query(valuePair.getValue()));
}
}
}