Non-persisted resources for AdvancedAPI [message #1061630] |
Mon, 03 June 2013 11:16 |
Emre T Messages: 119 Registered: April 2013 |
Senior Member |
|
|
Hello there!
Normally, we use the serialized pattern models (e.f. GlobalEiqModel.xmi) within the AdvancedAPI of IncQuery to search for patterns, exploit them etc. And we call them through their URI's.
My question is, wouldn't it work to give a valid pattern model resource to the AdvancedAPI without persisting it? So the call won't be over an URI, since this pattern model resource is not persisted. But it will exist in the memory, and a special method can be implemented to call it. When I do such a thing, I get a long error, that in the end says to consult the developers.
Something like the following:
The following error occurred during the preparation of an EMF-IncQuery pattern matcher: Error during constructing Rete pattern matcher; please review Error Log and consult developers
1 [main] FATAL org.eclipse.incquery.runtime.1406134113 - EMF-IncQuery Base encountered an error while traversing the EMF model to gather new information.
org.eclipse.incquery.runtime.rete.construction.RetePatternBuildException: Error during constructing Rete pattern matcher; please review Error Log and consult developers
...
...
...
Caused by: java.lang.IllegalArgumentException: Classifier org.eclipse.emf.ecore.impl.EClassImpl@122a0071 (eProxyURI: file:/Users/user/Documents/plugin/x.y.z/model/model.ecore#//something/Something) is an unresolved proxy
...
...
...
org.eclipse.incquery.runtime.exception.IncQueryException: The following error occurred during the preparation of an EMF-IncQuery pattern matcher: Error during constructing Rete pattern matcher; please review Error Log and consult developers!ENTRY org.eclipse.incquery.patternlanguage.emf.ui 4 0 2013-06-03 13:03:37.079
!MESSAGE EMF-IncQuery Base encountered an error while traversing the EMF model to gather new information.
!STACK 0
org.eclipse.incquery.runtime.rete.construction.RetePatternBuildException: Error during constructing Rete pattern matcher; please review Error Log and consult developers
...
...
...
Caused by: java.lang.IllegalArgumentException: Classifier org.eclipse.emf.ecore.impl.EClassImpl@122a0071 (eProxyURI: file:/Users/user/Documents/plugin/x.y.z/model/model.ecore#//something/Something) is an unresolved proxy
Do you have any comments on that? I would be very glad for any kind of help.
Thank you!
P.S. If you would like to see the whole error log, I can post it, too.
[Updated on: Mon, 03 June 2013 11:18] Report message to a moderator
|
|
|
|
|
Re: Non-persisted resources for AdvancedAPI [message #1061648 is a reply to message #1061637] |
Mon, 03 June 2013 11:48 |
Emre T Messages: 119 Registered: April 2013 |
Senior Member |
|
|
Hello Istvan,
thanks for the quick reply. Yes, indeed, my pattern models have dynamic references, instead of namespaces, but as you sad, this has something to with how I realize my pattern models. I can eliminate this difference on the other side of my approach/application, when I persist my models. But my goal is to do the same without the persistence of the pattern models.
But it is a clear answer for me to know, that IncQuery does not differentiate in what kind of resources the pattern models reside in.
If I am not mistaking, you had sad, that the support for dynamic references are on the way. Do you mind if I ask, when this will be available to the developers?
Best regards,
Emre
|
|
|
|
Re: Non-persisted resources for AdvancedAPI [message #1061839 is a reply to message #1061654] |
Tue, 04 June 2013 10:26 |
Gabor Bergmann Messages: 36 Registered: July 2009 |
Member |
|
|
Istvan Rath wrote on Mon, 03 June 2013 14:06But it This will also mean that the Query Explorer will work with dynamic instance models too.
Not with unresolvable proxies in the pattern model, though.
Emre: if the pattern model is not a readable EMF model, i.e. EMF cannot resolve the proxies to external elements such as referenced types, then clearly there is nothing that EMF-IncQuery can do about it.
Why do you put in proxies in the first place? Why not actual references to EClasses etc.? How do you assemble your pattern model?
Quote: Normally, we use the serialized pattern models (e.f. GlobalEiqModel.xmi) within the AdvancedAPI of IncQuery to search for patterns, exploit them etc.
Do I understand correctly that you want to match patterns _on_ pattern models as instance models? Wow, this is an interesting use case I don't think we have any advertised way of doing that, but anyways BaseGeneratedQuerySpecification.getModelRoot(String bundleName) should parse the pattern model the same way that the generated matcher API does.
Quote:And we call them through their URI's.(...)So the call won't be over an URI, since this pattern model resource is not persisted.
What does this mean? Nowhere in the EMF-IncQuery API do we use URIs, I have no idea what you are talking about.
[Updated on: Tue, 04 June 2013 10:26] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.05184 seconds