Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cme-dev] Any body working with CME component APIs?

Hi Santhosh,

Your request for a sample makes a lot of sense. I created a new project
called "samples" under the demo folder in the CVS repository. It currently
contains one sample, which sets up a concern space and the runs a query
against it. It is not a tiny example, but a more realistic one based on the
CME AOSD '04 demo, but still small enough to examine easily. It has lots of
comments. The class comment explains how to compile and run the sample.

The query part of the example is short, and is attached below.

Regards, Harold

      /**
       * Setup and run an example query. The query finds all calls to
"register" methods occurring in the
       * OperatorTypes concern set up before.
       */
      private void doExampleQuery() {
            // All queries are executed in a QueryContext. Create a new
one.
            QueryContext context = new QueryContextImpl();

            // Indicate that the colleciton to be searched is to be the
entire concern space (_space is a field in the object containing this
method)
            context.setInputCollection(_space);

            // Set up the query itself, in the Panther query language.
            Pattern query = new PantherPatternImpl("in(concern
OperatorTypes) && call(* register(..))");
            context.setQuery(query);

            // Execute the query.
            Searchable result = context.evaluateQuery(new
UninterruptibleMonitor());

            // Print the results. This printer knows how to print
collections (Searchables) that contain ConMan elements.
            ObjectPrinter op =
ConcernModelPrinter.getDelimitedSearchablePrinter();
            op.print("Query results: ", result, 0);
      }






                                                                           
             Santhosh Adiga                                                
             <kbsadiga@gmail.c                                             
             om>                                                        To 
             Sent by:                  cme-dev@xxxxxxxxxxx                 
             cme-dev-admin@ecl                                          cc 
             ipse.org                                                      
                                                                   Subject 
                                       Re: [cme-dev] Any body working with 
             02/28/2005 05:11          CME component APIs?                 
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
                  cme-dev                                                  
                                                                           
                                                                           




Hi,

   The tech reports and the user guides are of great help. It would be
great
if we could have a sample code frgment that independently runs a query on
a sample file and prints the result. I understand that there are
classes in test files
that show us how to do it,  but is it necessary that we go through
that before starting
on our own..as a begginner?

Thanks and regards
Santhosh

On Fri, 25 Feb 2005 14:26:26 -0500, Harold Ossher <ossher@xxxxxxxxxx>
wrote:
> Hi,
>
> If you haven't already done so, please take a look at these two tech.
> reports on the web site: "Concern Modeling in the Concern Manipulation
> Environment" (
>
http://dev.eclipse.org/viewcvs/indextech.cgi/%7Echeckout%7E/cme-home/doc/publications/rc23344.pdf

> ) and "Pervasive Query Support in the Concern Manipulation Environment" (
>
http://dev.eclipse.org/viewcvs/indextech.cgi/%7Echeckout%7E/cme-home/doc/publications/rc23343.pdf

> ). They give an overall sense of concern modeling and query.
>
> Two other items on the web site might help too - they're in the direction
> of user guides, though not complete:
>
http://dev.eclipse.org/viewcvs/indextech.cgi/%7Echeckout%7E/cme-home/doc/Puma%20Overview.htm

>
http://dev.eclipse.org/viewcvs/indextech.cgi/%7Echeckout%7E/cme-home/doc/Conman%20Overview.htm

>
> And the Javadoc is on the website too:
>
http://dev.eclipse.org/viewcvs/indextech.cgi/%7Echeckout%7E/cme-home/gen/index.html

>
> Hope this helps!
>
> Regards, Harold
>
>              Karthikeyan
>              Ponnalagu
>              <pkarthik@xxxxxx.
To
>              com>                      cme-dev@xxxxxxxxxxx
>              Sent by:
cc
>              cme-dev-admin@ecl
>              ipse.org
Subject
>                                        [cme-dev] Any body working with
CME
>                                        component APIs?
>              02/25/2005 01:10
>              AM
>
>              Please respond to
>                   cme-dev
>
>
> Hi,
>
> We are finding it difficult to use the Programmatic (Non-eclipse) version
> of CME for Concern modelling and Query Building. We want to understand
the
> usage scenario much more clearer.  We have used the eclipse version (GUI
> Based) and we are able to work on the PUMA querying approach.
>
> We have looked at the sample code, in Test.Panther Project test cases,
but
> , it will be good, if we have a programmer's guide and Component API
> documentation available.
> We are trying to understand the logic of Concern Modelling from the test
> cases code itself.   It will be of great help to us, if we can get help
> regarding this. We got the Src code of the CME from the eclipse plug-in
and
> (we assume, we need not have access to CVS, as we are just in the user
> space of CME).
>
> If, some body has worked on such similar approaches, kindly help us in
this
> regard.  Any other suggestions/references are also welcome.
>
> Thanks & Regds
> karthik
>
> _______________________________________________
> cme-dev mailing list
> cme-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/cme-dev
>


--
If there is but a thin line seperating a fool and a genius, then I
must be the fool who crossed it
_______________________________________________
cme-dev mailing list
cme-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cme-dev




Back to the top