use of org.whole.lang.models.model.Model in project whole by wholeplatform.
the class MatcherTest method testForceMatch.
@Test
public void testForceMatch() throws Exception {
IBindingManager bm = BindingManagerFactory.instance.createBindingManager();
IEntity textModel = ModelsTemplateManager.instance().create("Text model");
IEntity modifiedTextModel = new ModifiedTextModel().create();
// test forced match
assertFalse(Matcher.match(textModel, modifiedTextModel));
assertTrue(Matcher.forceMatch(textModel, modifiedTextModel));
new GenericMatcher().withAsIsMatching().withBindings(bm).withMismatchStrategy((pattern, model, bindings) -> {
assertTrue(EntityUtils.isResolver(model));
}).match(textModel, modifiedTextModel);
}
use of org.whole.lang.models.model.Model in project whole by wholeplatform.
the class ModelTablePart method getModelSpecificChildren.
protected List<IEntity> getModelSpecificChildren() {
Model entity = getModelEntity();
List<IEntity> list = new ArrayList<IEntity>(6);
list.add(entity.getName());
list.add(entity.getNamespace());
list.add(entity.getVersion());
list.add(entity.getUri());
list.add(entity.getTypeRelations());
list.add(entity.getDeclarations());
return list;
}
Aggregations