ruper2/src/java/core/org/krysalis/ruper2/resource ResourceType.java,1.1,1.2 Resource.java,1.3,1.4

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

Modified Files:
	ResourceType.java Resource.java 
Log Message:
1) Made ResourceAnalysis extract the group (from grandparent dir)
2) Added some unit tests for this.

Index: ResourceType.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper2/resource/ResourceType.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ResourceType.java	29 Sep 2003 18:09:19 -0000	1.1
--- ResourceType.java	8 Oct 2003 18:28:34 -0000	1.2
***************
*** 10,14 ****
   * @author arb_jack
   */
! public class ResourceType extends GenericNamespace  {
  
  	public final static ResourceType UNKNOWN =
--- 10,14 ----
   * @author arb_jack
   */
! public class ResourceType extends GenericNamespace {
  
  	public final static ResourceType UNKNOWN =
***************
*** 19,23 ****
  
  	public final static ResourceType SOURCE_CODE =
! 		new ResourceType("http://krysalis.org/resource/javasrc", "javasrc");
  
  	public final static ResourceType DOCUMENTATION =
--- 19,23 ----
  
  	public final static ResourceType SOURCE_CODE =
! 		new ResourceType("http://krysalis.org/resource/src", "src");
  
  	public final static ResourceType DOCUMENTATION =
***************
*** 45,48 ****
--- 45,53 ----
  
  		return type;
+ 	}
+ 
+ 	// :TODO: Bit of a hack to allow RT -> String -> RT
+ 	public String toString() {
+ 		return getPrefix();
  	}
  }

Index: Resource.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper2/resource/Resource.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Resource.java	7 Oct 2003 00:03:26 -0000	1.3
--- Resource.java	8 Oct 2003 18:28:34 -0000	1.4
***************
*** 74,77 ****
--- 74,101 ----
  	// Construct a Resource
  	//
+ 	public Resource(
+ 	ResourceGroup group,
+ 		String name,
+ 		Version version,
+ 		ResourceType type,
+ 		String extension,
+ 		String filename,
+ 		VirtualResourceLocator location) {
+ 
+ 		m_identifier = new ResourceIdentifier(name);
+ 		m_group = group;
+ 		m_type = type;
+ 
+ 		m_extension = extension;
+ 
+ 		m_filename = filename;
+ 		m_location = location;
+ 
+ 		m_version = version;
+ 	}
+ 
+ 	//
+ 	// Construct a Resource
+ 	//
  	public Resource(Resource other) {
  




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
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.