help-gift
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-GIFT] how to get the search result file(MRML)


From: Ivan Eggel
Subject: Re: [help-GIFT] how to get the search result file(MRML)
Date: Wed, 1 Apr 2009 13:18:26 +0200

Hi scropoy

The main class to use is CharmerConnectionMRML. I can list here an example how you could an instance of this class in an own class.

public class Giftsearcher
{
   
   
    CharmerConnectionMRML cc;
    public void connect()
    {
       cc  = new CharmerConnectionMRML(getGiftUser(), getDefaultCollection(),
               getGiftIp()+":"+getGiftPort());
      
    }
    public void close()
    {
        if (cc!=null)cc.close();
    }
   
    public QueryObject[] getRandomImages(int number)
    {
        QueryObject[] qo = cc.getRandomImages(number, this.getDefaultAlgorithm(),
                getDefaultCollection(), null);
        return qo;

    }
   
    public QueryObject[] doSimilaritySearch(QueryObject[] qo, int maxReturnImages)
    {
        return cc.doSimilaritySearch(qo, maxReturnImages, getDefaultAlgorithm(),
                getDefaultCollection(), null);
       
    }
}


Please consider that you have to know the DefaultCollection, the DefaultAlgorithm, the Gift User, The Machine's IP Address (Where GIFT is hosted) and the port that GIFT uses.

Give it a try..

Ivan



On Wed, Apr 1, 2009 at 1:02 PM, scropoy <address@hidden> wrote:
HIi Ivan
I download the SnakeCharmer but i don't understand Swing.......
do you know how can use it to make MRML-Requests ,,can you give me a favor, thanks


 
2009/4/1 Ivan Eggel <address@hidden>

Hello scropoy

There is a Java MRML Client (very old, Swing Application) named SnakeCharmer. Look for it on google. You can use parts of it to make MRML-Requests and integrate it in your JSP-File.

Ivan

On Wed, Apr 1, 2009 at 10:17 AM, scropoy <address@hidden> wrote:
Hi guys!
 
 HOW to get the result file of a search ! Is there a JSP client for gift, i only want to get the mrml result file of a search action.
 
for example , how to send a command to search a specific image and get the MRML XML-formatted result,I really appriciate If there is a JSP method to do this thing.

_______________________________________________
help-GIFT mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-gift




reply via email to

[Prev in Thread] Current Thread [Next in Thread]