Package de.dfki.owlsmx.gui.data

Examples of de.dfki.owlsmx.gui.data.Query


       
        // Get a SortedSet with the loaded queries
        SortedSet queries = new TreeSet();
        queries = TestCollection.getInstance().getQueries();
       
        Query query;
        Map result = new HashMap();
        SortedSet set = new TreeSet();
       
        // Run through the set of queries and match them one by one
        current = 1;
        for(Iterator iter = queries.iterator(); iter.hasNext();current++) {
            query = (Query) iter.next();
            System.out.println("MatchmakerInterface: Matching query: " + query.getURI().toString() + ", " + current + "/" + queries.size());
            set = MatchmakerInterface.getInstance().matchRequest(query.getURI(),GUIState.getInstance().getMinDegree(), GUIState.getInstance().getTreshold());      
            result.put(query,set);
        }
       
        /*
         * Show the results of the matchmaking
         *
         * 0 - Exact match
         * 1 - Plug-in match
         * 2 - Subsumes match
         * 3 - Subsumed-by match
         * 4 - Nearest Neighbour match
         */
       
        System.out.println("***************************");
        System.out.println("Results:\n");
//        System.out.println(result.toString());
       
        // Extra output
//        System.out.println("Some extra output:\n**********************");
        double max_SynSim, min_SynSim;
        max_SynSim = 0;
        min_SynSim = 10;
        String uri, s_uri, result_count;
        String write;
        int counter = 1;
        int rqueries = 1;
        Iterator answerSet;
        HybridServiceItem item;
        Set ioset;
        for(Iterator iter = result.keySet().iterator();iter.hasNext();){
            query = (Query) iter.next();
            uri = query.getURI().toString();
            if (uri.contains("/"))
                uri = uri.substring(uri.lastIndexOf("/")+1);
            write = "Query " + rqueries + " " + uri;            
            //write = write.replaceAll("[\\r\\f]","");
            System.out.println(write);
            System.out.println("Inputs:");
            ioset = query.getInputs();
            for(Object input : ioset){
                System.out.println("  " + input.toString());
            }
            System.out.println("Outputs:");
            ioset = query.getOutputs();
            for(Object input : ioset){
                System.out.println("  " + input.toString());
            }
           
            for (answerSet = ((SortedSet) result.get(query)).iterator();answerSet.hasNext();) {
View Full Code Here


       
        // Get a SortedSet with the loaded queries
        SortedSet queries = new TreeSet();
        queries = TestCollection.getInstance().getQueries();
       
        Query query=null;
        Map result = new HashMap();
        set = new TreeSet();
       
        // Run through the set of queries and match them one by one
        current = 1;
        for(Iterator iter = queries.iterator(); iter.hasNext();current++) {
            query = (Query) iter.next();
            System.out.println("MatchmakerInterface: Matching query: " + query.getURI().toString() + ", " + current + "/" + queries.size());
            set = MatchmakerInterface.getInstance().matchRequest(query.getURI(),GUIState.getInstance().getMinDegree(), GUIState.getInstance().getTreshold());      
            result.put(query,set);
        }
        Iterator iter = queries.iterator();
        if(iter.hasNext()){
            query = (Query) iter.next();
            if (query == null){
                System.err.println("OWLSMX.java.190: query is null :(");
                return;
            }
        }else{
            System.err.println("OWLSMX.java.194: No query :(");
        }
        set = MatchmakerInterface.getInstance().matchRequest(query.getURI(), min_degree, threshold);
      
    }
View Full Code Here

TOP

Related Classes of de.dfki.owlsmx.gui.data.Query

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.