ruper2/src/java/core/org/krysalis/ruper/query ResourceSpecifierRequest.java,1.3,1.4 ResourceResultHelper.java,1.2,1.3 DefaultQueryEngine.java,1.5,1.6

[email protected]
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/query
In directory sc8-pr-cvs1:/tmp/cvs-serv17841/src/java/core/org/krysalis/ruper/query

Modified Files:
	ResourceSpecifierRequest.java ResourceResultHelper.java 
	DefaultQueryEngine.java 
Log Message:
Protocol mgr made as a handler mgr to manage the provider selection through 
the selectors.

And tested the full cycle for FileUpdater working

Index: ResourceSpecifierRequest.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/query/ResourceSpecifierRequest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ResourceSpecifierRequest.java	16 Sep 2003 20:40:32 -0000	1.3
--- ResourceSpecifierRequest.java	18 Sep 2003 20:15:40 -0000	1.4
***************
*** 40,45 ****
  	public ResourceQuery getQuery() {
  		Selector where = StandardSelections.getNamedTypedVersion(m_specifier);
! 		Comparator orderBy = StandardResourceComparisons.getNameTypeVersion();
! 		Comparator groupBy = StandardResourceComparisons.getNameVersion();
  
  		return new ResourceQuery(
--- 40,46 ----
  	public ResourceQuery getQuery() {
  		Selector where = StandardSelections.getNamedTypedVersion(m_specifier);
! 		Comparator orderBy = StandardResourceComparisons.getNameTypeVersionComparatorSet();
! 		//Comparator groupBy = StandardResourceComparisons.getNameVersion();
! 		Comparator groupBy = StandardResourceComparisons.getNameVersionComparatorSet();
  
  		return new ResourceQuery(

Index: ResourceResultHelper.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/query/ResourceResultHelper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ResourceResultHelper.java	12 Sep 2003 20:23:43 -0000	1.2
--- ResourceResultHelper.java	18 Sep 2003 20:15:40 -0000	1.3
***************
*** 34,39 ****
  	}
  
! 	// Two results sets compare based off the comparison of their first
! 	// entry (of their first list)
  	public static int compareTo(
  		ResourceResult result1,
--- 34,39 ----
  	}
  
! 	// Two results sets compare based off the comparison of their last
! 	// entry (ascending sort)(of their first list)
  	public static int compareTo(
  		ResourceResult result1,
***************
*** 52,57 ****
  						//:TODO: Hmm ... sort w/ comp?
  
! 						Resource resource1 = (Resource) list1.get(0);
! 						Resource resource2 = (Resource) list2.get(0);
  
  						comparison = comp.compare(resource1, resource2);
--- 52,57 ----
  						//:TODO: Hmm ... sort w/ comp?
  
! 						Resource resource1 = (Resource) list1.get(list1.size()-1);
! 						Resource resource2 = (Resource) list2.get(list2.size()-1);
  
  						comparison = comp.compare(resource1, resource2);

Index: DefaultQueryEngine.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/query/DefaultQueryEngine.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** DefaultQueryEngine.java	16 Sep 2003 20:40:32 -0000	1.5
--- DefaultQueryEngine.java	18 Sep 2003 20:15:40 -0000	1.6
***************
*** 113,117 ****
  			//
  			if (null == orderBy)
! 				orderBy = StandardResourceComparisons.getNameTypeVersion();
  
  			orderBy(result, orderBy);
--- 113,117 ----
  			//
  			if (null == orderBy)
! 				orderBy = StandardResourceComparisons.getNameTypeVersionComparatorSet();
  
  			orderBy(result, orderBy);
***************
*** 139,143 ****
  			Resource currentResource = null;
  			List currentList = null;
! 			for (Iterator i = set.iterator(); i.hasNext();) {
  				Resource resource = (Resource) i.next();
  
--- 139,143 ----
  			Resource currentResource = null;
  			List currentList = null;
! 			for (Iterator i = allResults.iterator(); i.hasNext();) {
  				Resource resource = (Resource) i.next();
  




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.