Ashish's thoughts

Ashish Srivastava's Weblog


20050725 Monday July 25, 2005

 JES Search is pretty good

I am helping a team to integrate the JES search with one of the internal portals. I think I have a pretty decent feelings about the JES search, its pretty good. I wish I was given some task to write (or extend) the search APIs but seeing my limited time left, I don't think it would have made a lot of business sense though. But, I am kinda enjoying the integrator role. The way I think a search engine should work is what the JES has been implemented as. Even though I disagree with a few things like "keywords" not being a multi-valued attribute which I think it inherently is. I also would have liked some standard to be filed for the search engines to return data in some standard XML format like what we have for the EDIs (EDIFACT and USC). This will make any search engine, Ultraseek Verity, MSN or Google to return search results in some globally standard format. I also would have liked if JES search APIs would have provided a functionality to marshall the search results in form of an XML document (may be based on some XSchema). But it may be just me and how I think it should be, and may not be necessarily whats' best.

(2005-07-26 08:26:18.0/2005-07-25 22:27:52.0) Permalink Comments [2]
Trackback: http://blogs.sun.com/ashish/entry/jes_search_is_pretty_good

20050616 Thursday June 16, 2005

 Missing my Mecca again

So this year too it looks like I won't be able to make it to the JavaONE conference. Not enough money in my pockets and neither any sponsorships. I had to go to atleast three booths. Two which I have contributed to and one for a seminar. Alas, that feeling of a lesser being!

(2005-06-16 08:04:26.0/2005-06-16 08:01:28.0) Permalink Comments [0]
Trackback: http://blogs.sun.com/ashish/entry/missing_my_mecca_again

20050123 Sunday January 23, 2005

 Freedom, Liberty and Democracy

Here is my attempt to define these words -- Hash codes are important : # Aspiration.java
public class Aspiration   {
  private boolean done;
  private String description; 
  private Liberty liberty;
  public boolean execute (Liberty liberty) throws FavoritismException {
      this.liberty = liberty;
      if (isImmoral () && done) {
	 throw new FavoritismException ();
      }
      done = true;
      return done;
  }

  private boolean isImmoral () {
     return (!liberty.isLegal (this));
  }

  public String getDescription () {
    return description;
  }

  public void setDescription (String description) {
    this.description = description;
  }

  public String toString () {
     return description;
  }
}



# Democracy.java
import java.util.Set;
import java.util.HashSet;

public interface Democracy {
   public Set ruleBook = new HashSet ();
   public Freedom freedom = new Freedom ();
   public boolean execute (Aspiration aspiration) throws FavoritismException;
}



# FavoritismException.java
public class FavoritismException extends Exception {
  public FavoritismException () {
    super ();
  }

  public FavoritismException (Throwable throwable) {
     super (throwable);
  }
}



# Freedom.java
public class Freedom {
  public int hashCode () {
    return 27;
  }

  public boolean equals (Object obj) {
    if (obj instanceof Democracy) {
       return (((Democracy)obj).freedom.hashCode () == hashCode ());
    }
    return false;
  }
}



# Liberty.java
public class Liberty implements Democracy {
  public  Freedom freedom = new Freedom ();

  static {
     ruleBook.add ("You can dance");
     ruleBook.add ("You can sing");
     ruleBook.add ("You can play");
  }
     

  public int  hashCode () {
     return 15;
  }

  public boolean equals (Object obj) {
     return (freedom.equals (obj));
  }

  public boolean execute (Aspiration aspiration) 
		          throws FavoritismException {
     return (aspiration.execute (this));
  }

  public boolean isLegal (Aspiration aspiration) {
     if (ruleBook.contains (aspiration.getDescription ())) {
        return true;
     }
     return false;
  }
}


(2005-01-23 20:12:46.0/2005-01-23 20:01:16.0) Permalink Comments [0]
Trackback: http://blogs.sun.com/ashish/entry/freedom_liberty_and_democracy


« December 2009
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today


XML






Its me!
Technorati Profile

Today's Page Hits: 29