Classes
Amalthea model=buildAmaltheaModel(<filePath>);
SearchElementsUtility searchElementsUtility=new SearchElementsUtility(model);
List<Label> elementsBasedOnName = searchElementsUtility.getElementsBasedOnName("d0",Label.class);
List<Label> elementsBasedOnRegex = searchElementsUtility.getElementsBasedOnRegex("d\\d", Label.class);
List<Label> elementsBasedOnType = searchElementsUtility.getElementsBasedOnType(Label.class);
/* Supplying AMALTHEA model directly to the API */
elementsBasedOnName=SearchElementsUtility.getElementsBasedOnName(model, "d0", Label.class);
Amalthea model=buildAmaltheaModel(<filePath>);
/* Deleting multiple model elements from AMALTHEA model */
DeleteElementsUtility.deleteAll(model.getSwModel().getLabels(), model);
org.eclipse.emf.ecore.resource.Resource resource=...
/* Deleting multiple model elements which are belonging to a specific resource */
DeleteElementsUtility.deleteAll(model.getSwModel().getLabels(), resource);
Amalthea model=buildAmaltheaModel(<filePath>);
ModelStaticCacheBuilder modelStaticCacheBuilder =new ModelStaticCacheBuilder(model);
List<Label> elementsBasedOnName = modelStaticCacheBuilder.getElementsBasedOnName("d0", Label.class);
Amalthea model=buildAmaltheaModel(<filePath>);
ModelDynamicCacheBuilder modelDynamicCacheBuilder=new ModelDynamicCacheBuilder(model);
List<Label> elementsBasedOnName = modelDynamicCacheBuilder.getElementsBasedOnName("d0", Label.class);
/* Deleting multiple model elements from AMALTHEA model */
DeleteElementsUtility.deleteAll(model.getSwModel().getLabels(), model);
// Adding new Label "L1" into AMALTHEA model
elementsBasedOnName = modelDynamicCacheBuilder.getElementsBasedOnName("L1", Label.class);
//In the above case, cache is automatically updated based on the model change
assertEquals("Cache is not updated ",1, elementsBasedOnName.size());