use of org.finos.legend.pure.runtime.java.compiled.generation.processors.IdBuilder in project legend-pure by finos.
the class TestDistributedBinaryGraphSerialization method getExpectedObjsFromRuntime.
private ListIterable<Obj> getExpectedObjsFromRuntime(String metadataName) {
MutableSet<CoreInstance> ignoredClassifiers = PrimitiveUtilities.getPrimitiveTypes(repository).toSet();
ArrayAdapter.adapt(M3Paths.EnumStub, M3Paths.ImportStub, M3Paths.PropertyStub, M3Paths.RouteNodePropertyStub).collect(processorSupport::package_getByUserPath, ignoredClassifiers);
IdBuilder idBuilder = IdBuilder.newIdBuilder(DistributedMetadataHelper.getMetadataIdPrefix(metadataName), processorSupport);
GraphSerializer.ClassifierCaches classifierCaches = new GraphSerializer.ClassifierCaches(processorSupport);
return GraphNodeIterable.fromModelRepository(repository).reject(i -> ignoredClassifiers.contains(i.getClassifier())).collect(i -> GraphSerializer.buildObj(i, idBuilder, classifierCaches, processorSupport), Lists.mutable.empty());
}
use of org.finos.legend.pure.runtime.java.compiled.generation.processors.IdBuilder in project legend-pure by finos.
the class MetadataEager method invalidateCoreInstances.
@Deprecated
public void invalidateCoreInstances(RichIterable<? extends CoreInstance> instances, ProcessorSupport processorSupport) {
IdBuilder idBuilder = IdBuilder.newIdBuilder(processorSupport);
for (CoreInstance coreInstance : instances) {
String identifier = idBuilder.buildId(coreInstance);
String classifier = MetadataJavaPaths.buildMetadataKeyFromType(coreInstance.getClassifier()).intern();
CoreInstance pack = coreInstance.getValueForMetaPropertyToOne(M3Properties._package);
if (pack != null) {
String packIdentifier = idBuilder.buildId(pack);
String packClassifier = MetadataJavaPaths.buildMetadataKeyFromType(pack.getClassifier()).intern();
this.getMetamodel().remove(classifier, identifier, packClassifier, packIdentifier);
}
}
}
Aggregations