Package de.dfki.owlsmx.gui.data

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


        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();) {
                item = (HybridServiceItem) answerSet.next() ;
                s_uri = item.getURI().toString();
                if (s_uri.contains("/"))
                    s_uri = s_uri.substring(s_uri.lastIndexOf("/")+1);
                if (counter<10)
                    result_count = "0" + counter;
                else
                    result_count = "" + counter;
                write = result_count + "  (" + item.getDegreeOfMatch() + "," + item.getSyntacticSimilarity() + ") " + s_uri + "\n";
                //write = write.replaceAll("[\\r\\f]","");
                if ( max_SynSim < item.getSyntacticSimilarity()){
                    max_SynSim = item.getSyntacticSimilarity();
                }
                if ( min_SynSim > item.getSyntacticSimilarity()){
                    min_SynSim = item.getSyntacticSimilarity();
                }
                System.out.println(write);
                counter++;
                System.out.println("Inputs:");
                ioset = item.getInputs();
                for(Object input : ioset){
                    System.out.println("  " + input.toString());
                }
                System.out.println("Outputs:");
                ioset = item.getOutputs();
                for(Object input : ioset){
                    System.out.println("  " + input.toString());
                }
            }
            counter =1;
View Full Code Here


    /**
     * Convert the result from OWLS-MX matchmaker to String[][].
     */
    private void convertResult(){
        // Do something with SortedSet set
        HybridServiceItem item;
        String s_uri;
        result = new Vector();
        result_new = new String[set.size()][3];
        int index = 0;
        for (Iterator answerSet = set.iterator();answerSet.hasNext();index++) {
            item = (HybridServiceItem) answerSet.next() ;
            s_uri = item.getURI().toString();
            if (s_uri.contains("/"))
                s_uri = s_uri.substring(s_uri.lastIndexOf("/")+1);
            String[] service = new String[3];
//            service[0] = s_uri;
//            service[1] = "" + item.getDegreeOfMatch();
//            service[2] = "" + item.getSyntacticSimilarity();
            result_new[index][0] = s_uri;
            result_new[index][1] = "" + item.getDegreeOfMatch();
            result_new[index][2] = "" + item.getSyntacticSimilarity();
//            result.add(service);
        }

    }
View Full Code Here

TOP

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

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.