- Resource possibleType = graph.getPossibleType(represents, Layer0.getInstance(graph).Entity);
- if (graph.syncRequest(new IsInstanceOf(possibleType, StructuralResource2.getInstance(graph).ReplaceableDefinedComponentType), TransientCacheListener.instance()) ) {
+ StructuralResource2 STR = StructuralResource2.getInstance(graph);
+ Resource possibleType = graph.getPossibleType(represents, STR.Component);
+ if (possibleType == null) {
+ possibleType = graph.getPossibleType(represents, Layer0.getInstance(graph).Entity);
+ if (possibleType == null)
+ return null;
+ }
+ if (graph.syncRequest(new IsInstanceOf(possibleType, STR.ReplaceableDefinedComponentType), TransientCacheListener.instance()) ) {