incubator-depot-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: rev 21613 - in incubator/depot/trunk/update/src: java/org/apache/depot/update java/org/apache/depot/update/ant/cache java/org/apache/depot/update/ant/tool java/org/apache/depot/update/artifact java/org/apache/depot/update/artifact/compare java/org/apache/depot/update/artifact/select java/org/apache/depot/update/files java/org/apache/depot/update/impl java/org/apache/depot/update/messaging java/org/apache/depot/update/monitor java/org/apache/depot/update/query java/org/apache/depot/update/repository java/org/apache/depot/update/sample java/org/apache/depot/update/tool java/org/apache/depot/update/updater test/org/apache/depot/update/artifact test/org/apache/depot/update/files test/org/apache/depot/update/query test/org/apache/depot/update/repository test/org/apache/depot/update/usecases
Date Wed, 23 Jun 2004 23:25:27 GMT
Author: ajack
Date: Wed Jun 23 16:25:25 2004
New Revision: 21613

Added:
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ArtifactInstance.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ArtifactUpdaterFactory.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/RepositoryManifest.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/monitor/ArtifactEvent.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ArtifactResult.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ArtifactResultHelper.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/updater/
   incubator/depot/trunk/update/src/java/org/apache/depot/update/updater/ConfiguredArtifactUpdater.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/updater/DefaultArtifactUpdater.java
Removed:
   incubator/depot/trunk/update/src/java/org/apache/depot/update/DefaultArtifactUpdater.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/StandardArtifactUpdater.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/ArtifactIdentifier.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/ArtifactSpecifier.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/RepositoryObject.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/RepositoryResourceObject.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/monitor/ResourceEvent.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceResult.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceResultHelper.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositoryIdentifier.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositoryManifest.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositorySetIdentifier.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositorySetSortContextIdentifier.java
Modified:
   incubator/depot/trunk/update/src/java/org/apache/depot/update/Artifact.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ArtifactUpdater.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/Repository.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/ArtifactElement.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedArtifactSet.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedArtifactSetExportTask.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/tool/RepositoryToolTask.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/ArtifactGroup.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/ArtifactLocator.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/AbstractArtifactComparator.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/FilenameComparator.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/NameComparator.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/TypeComparator.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/VersionComparator.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/AbstractArtifactSelector.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/FilenameSelector.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/NameSelector.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/ReleaseLevelSelector.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/StandardSelections.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/TypeSelector.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/VersionConstraintsSelector.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/VersionSelector.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/files/DefaultResourceFilenameAnalyzer.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/files/IResourceFilenameAnalyzer.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ArtifactUpdaterEngine.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/RepositorySetWrapper.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/RepositoryWrapper.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/messaging/ResourceResponse.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/monitor/StatisticsMonitor.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ArtifactQueryHelper.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/query/DefaultQueryEngine.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/AbstractHierarchicalRepository.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/AbstractRepository.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/ApacheRepository.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/DefaultRepository.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/MockRepository.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositoryManager.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/sample/FileAssistant.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/sample/FileUpdater.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/ArtifactTool.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/RepositoryTool.java
   incubator/depot/trunk/update/src/test/org/apache/depot/update/artifact/ArtifactTests.java
   incubator/depot/trunk/update/src/test/org/apache/depot/update/files/DefaultResourceAnalyzerTests.java
   incubator/depot/trunk/update/src/test/org/apache/depot/update/files/ResourceAnalyzerTests.java
   incubator/depot/trunk/update/src/test/org/apache/depot/update/query/QueryTests.java
   incubator/depot/trunk/update/src/test/org/apache/depot/update/repository/RepositoryTests.java
   incubator/depot/trunk/update/src/test/org/apache/depot/update/usecases/FindTests.java
Log:
EOD checking (for satefy)
Not complete, a few compile errors to fix.
Basically Artifact and ArtifactSpecifier have been switched,
we now have
ArtifactInstance (one in a repo w/ location) and
Artifact (the concept of one)


Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/Artifact.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/Artifact.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/Artifact.java	Wed Jun 23 16:25:25 2004
@@ -17,178 +17,102 @@
 package org.apache.depot.update;
 
 import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.List;
 
 import org.apache.depot.common.util.debug.DebugUtils;
 import org.apache.depot.common.util.debug.Dumpable;
-import org.apache.depot.update.artifact.ArtifactAttributeMap;
 import org.apache.depot.update.artifact.ArtifactGroup;
-import org.apache.depot.update.artifact.ArtifactIdentifier;
-import org.apache.depot.update.artifact.ArtifactSpecifier;
 import org.apache.depot.update.artifact.ArtifactType;
-import org.apache.depot.update.util.flag.Flag;
 import org.apache.depot.update.util.identity.GenericIdentifier;
-import org.apache.depot.update.util.net.VirtualResourceLocator;
-import org.apache.depot.update.util.reference.IReferenceable;
-import org.apache.depot.update.util.select.ISelectable;
 import org.apache.depot.version.Version;
-import org.apache.depot.version.impl.ApacheVersion;
 
 /**
  * @author arb_jack
- * 
- * This defines a 'real world' file, e.g. junit-3.8.1.jar and
- * has all the information about it, and where it is.
- * 
  */
-public class Artifact implements ISelectable, IReferenceable, Dumpable {
+public class Artifact implements Dumpable {
 
-	// What group is this in ?
-	private ArtifactGroup m_group = null;
+	public static class Identifier extends GenericIdentifier {
 
-	// What is the id and type for this thing?
-	private ArtifactIdentifier m_identifier = null;
-	private ArtifactType m_type = null;
+		public final static String ARTIFACT_URI = "http://apache.org/artifact";
+		public final static String ARTIFACT_PREFIX = "artifact";
+
+		public Identifier(String id) {
+			super(ARTIFACT_URI, ARTIFACT_PREFIX, id);
+		}
+	}
 
-	//
-	//	Where is this thing?
-	//	
-	private String m_filename = null;
-	private VirtualResourceLocator m_location = null;
-
-	//
-	// Optional Information, that might be found on some of
-	// these, and we might have extracted it
-	//
+	private ArtifactGroup m_group = null;
+	private Artifact.Identifier m_identifier = null;
+	private ArtifactType m_type = null;
 	private Version m_version = null;
 
-	//:TODO: We want this?
-	private String m_extension = null;
+	public Artifact(String name) {
+		m_group = new ArtifactGroup(name);
+		m_identifier = new Artifact.Identifier(name);
+		m_type = ArtifactType.JAVA_BINARY;
+		m_version = null;
+	}
 
-	// Annotated attributes
-	private ArtifactAttributeMap m_attributes = null;
+	public Artifact(String group, String identifier, String type,
+			Version version) {
+		this(new ArtifactGroup(group), new Artifact.Identifier(identifier),
+				ArtifactType.getFromString(type), version);
+	}
 
-	//
-	// Construct a Resource
-	//
-	public Artifact(
-		String name,
-		Version version,
-		ArtifactType type,
-		String extension,
-		String filename,
-		VirtualResourceLocator location) {
+	public Artifact(String group, String identifier, ArtifactType type,
+			Version version) {
+		this(new ArtifactGroup(group), new Artifact.Identifier(identifier),
+				type, version);
+	}
 
-		m_identifier = new ArtifactIdentifier(name);
-		m_group = new ArtifactGroup(m_identifier.getId());
+	public Artifact(ArtifactGroup group, Artifact.Identifier identifier,
+			ArtifactType type, Version version) {
+		m_group = group;
+		m_identifier = identifier;
 		m_type = type;
-
-		m_extension = extension;
-
-		m_filename = filename;
-		m_location = location;
-
 		m_version = version;
 	}
-
-	//
-	// Construct a Resource
-	//
-	public Artifact(
-		ArtifactGroup group,
-		String name,
-		Version version,
-		ArtifactType type,
-		String extension,
-		String filename,
-		VirtualResourceLocator location) {
-
-		m_identifier = new ArtifactIdentifier(name);
+	
+	public Artifact(ArtifactGroup group, String identifier,
+			ArtifactType type, Version version) {
 		m_group = group;
+		m_identifier = new Artifact.Identifier(identifier);
 		m_type = type;
-
-		m_extension = extension;
-
-		m_filename = filename;
-		m_location = location;
-
 		m_version = version;
 	}
 
-	//
-	// Construct a Resource
-	//
-	public Artifact(Artifact other) {
-
-		m_identifier = other.m_identifier;
-		m_group = other.m_group;
-		m_type = other.m_type;
-
-		m_extension = other.m_extension;
-
-		m_filename = other.m_filename;
-		m_location = other.m_location;
-
-		m_version = other.m_version;
-	}
-
-	//
-	// Construct a Resource
-	//
-	public Artifact(
-		ArtifactIdentifier identifier,
-		String filename,
-		VirtualResourceLocator location) {
-		m_identifier = identifier;
-		m_group = new ArtifactGroup(identifier.getId());
-
-		// :TODO: Type and Extension?
-
-		m_filename = filename;
-		m_location = location;
-	}
-
 	/**
 	 * @return
 	 */
-	public GenericIdentifier getIdentifier() {
+	public Artifact.Identifier getIdentifier() {
 		return m_identifier;
 	}
 
 	/**
 	 * @return
 	 */
-	public Version getVersion() {
-		return m_version;
-	}
-
-	public Object getSelectionObject() {
-		return m_identifier;
-	}
-
-	public ArtifactSpecifier getSpecifier() {
-		return new ArtifactSpecifier(m_group, m_identifier, m_type, m_version);
+	public ArtifactType getType() {
+		return m_type;
 	}
 
 	/**
-	 * @return
+	 * @param identifier
 	 */
-	public VirtualResourceLocator getLocation() {
-		return m_location;
+	public void setIdentifier(Artifact.Identifier identifier) {
+		m_identifier = identifier;
 	}
+
 	/**
-	 * @return
+	 * @param type
 	 */
-	public String getExtension() {
-		return m_extension;
+	public void setType(ArtifactType type) {
+		m_type = type;
 	}
 
 	/**
 	 * @return
 	 */
-	public String getFilename() {
-		return m_filename;
+	public Version getVersion() {
+		return m_version;
 	}
 
 	/**
@@ -198,154 +122,27 @@
 		return m_group;
 	}
 
-	/* (non-Javadoc)
-	 * @see java.lang.Object#equals(java.lang.Object)
-	 */
-	public boolean equals(Object other) {
-		boolean equal = true;
-
-		if (other instanceof Artifact) {
-			Artifact otherResource = (Artifact) other;
-
-			equal = otherResource.m_identifier.equals(m_identifier);
-			equal &= otherResource.m_group.equals(m_group);
-			equal &= otherResource.m_type.equals(m_type);
-
-			if (null == m_extension)
-				equal &= (null == otherResource.m_extension);
-			else
-				equal &= otherResource.m_extension.equals(m_extension);
-
-			if (null == m_version)
-				equal &= (null == otherResource.m_version);
-			else
-				equal &= otherResource.m_version.equals(m_version);
-		}
-		else
-			throw new IllegalArgumentException(
-				"Not a Resource: " + other.getClass().getName());
-
-		return equal;
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.Object#hashCode()
-	 */
-	public int hashCode() {
-		int hash = 0;
-
-		hash += m_group.hashCode();
-		hash += m_identifier.hashCode();
-		hash += m_type.hashCode();
-		if (null != m_extension)
-			hash += m_extension.hashCode();
-
-		if (null != m_version)
-			hash += m_version.hashCode();
-
-		return hash;
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.Object#toString()
-	 */
 	public String toString() {
 		StringBuffer buffer = new StringBuffer();
 
-		if ((null != m_group)
-			&& (!m_group.getGroup().equals(m_identifier.getId()))) {
-			buffer.append(m_group);
-			buffer.append("~");
+		if (!m_group.getGroup().equals(m_identifier.getId())) {
+			buffer.append("{");
+			buffer.append(m_group.toString());
+			buffer.append("}: ");
 		}
 
-		buffer.append(m_identifier.toString());
+		buffer.append(m_identifier.getId());
+		buffer.append(" (");
+		buffer.append(m_type.getPrefix());
+		buffer.append(") ");
 
-		if (null != m_location) {
-			buffer.append(':');
-			buffer.append(m_location.toString());
+		if (null != m_version) {
+			buffer.append(m_version.toString());
 		}
 
 		return buffer.toString();
 	}
 
-	/**
-	 * @return
-	 */
-	public ArtifactType getType() {
-		return m_type;
-	}
-
-	/**
-	 * @param locator
-	 */
-	public void setLocation(VirtualResourceLocator locator) {
-		m_location = locator;
-	}
-	/**
-	 * @param string
-	 */
-	public void setExtension(String string) {
-		m_extension = string;
-	}
-
-	/**
-	 * @param string
-	 */
-	public void setFilename(String string) {
-		m_filename = string;
-	}
-
-	/**
-	 * @param group
-	 */
-	public void setGroup(ArtifactGroup group) {
-		m_group = group;
-	}
-
-	/**
-	 * @param identifier
-	 */
-	public void setIdentifier(ArtifactIdentifier identifier) {
-		m_identifier = identifier;
-	}
-
-	/**
-	 * @param type
-	 */
-	public void setType(ArtifactType type) {
-		m_type = type;
-	}
-
-	/**
-	 * @param version
-	 */
-	public void setVersion(Version version) {
-		m_version = version;
-	}
-
-	// Attribute Interface
-
-	public void setAttribute(Flag attributeName, Object attributeValue) {
-		if (null == m_attributes)
-			m_attributes = new ArtifactAttributeMap();
-
-		m_attributes.put(attributeName, attributeValue);
-	}
-
-	public boolean hasAttribute(Flag attributeName) {
-		return (null == m_attributes)
-			? false
-			: m_attributes.containsKey(attributeName);
-	}
-
-	public Object getAttribute(Flag attributeName) {
-		Object value = null;
-
-		if (null == m_attributes)
-			value = m_attributes.get(attributeName);
-		return value;
-	}
-
 	public void dump(PrintWriter out, int depth, boolean verbose) {
 		String indent = DebugUtils.getIndent(depth);
 
@@ -358,84 +155,9 @@
 		out.print(indent);
 		out.println("Resource Group: " + m_group);
 
-		out.print(indent);
-		out.println("Resource Filename: " + m_filename);
-
-		out.print(indent);
-		out.println("Resource Extension: " + m_extension);
-
-		out.print(indent);
-		out.println("Resource Location: " + m_location);
-
 		if (null != m_version) {
 			out.print(indent);
-			if (verbose)
-				DebugUtils.dump(out, depth + 1, verbose, m_version);
-			else
-				out.println("Resource Version: " + m_version);
+			out.println("Resource Version: " + m_version);
 		}
-
-		if (verbose && (null != m_attributes))
-			DebugUtils.dump(out, depth, verbose, m_attributes);
 	}
-
-	//
-	//	-----------------------------------------------------------------
-	//
-	public static List getTestResourceList(String group, int count) {
-		List resourceList = new ArrayList();
-
-		// Populate with some test resources...
-		for (int i = 0; i < count; ++i) {
-			String name = group + Integer.toString(1 + i);
-			resourceList.add(
-				Artifact.getTestResource(
-					name,
-					ApacheVersion.getTestVersion(1, i),
-					ArtifactType.JAVA_BINARY));
-			resourceList.add(
-				Artifact.getTestResource(
-					name,
-					ApacheVersion.getTestVersion(1, i),
-					ArtifactType.SOURCE_CODE));
-
-			// :TODO: Add some randomness
-		}
-
-		return resourceList;
-	}
-
-	public static Artifact getTestResource() {
-		return getTestResource("test");
-	}
-
-	public static Artifact getTestResource(String name) {
-		return getTestResource(name, ArtifactType.JAVA_BINARY);
-	}
-
-	public static Artifact getTestResource(String name, ArtifactType type) {
-		return getTestResource(name, ApacheVersion.getTestVersion(1, 1), type);
-	}
-
-	public static Artifact getTestResource(
-		String name,
-		Version version,
-		ArtifactType type) {
-		return getTestResource(name, version, type, ".test");
-	}
-
-	public static Artifact getTestResource(
-		String name,
-		Version version,
-		ArtifactType type,
-		String extension) {
-		return new Artifact(
-			name,
-			version,
-			type,
-			extension,
-			name,
-			new VirtualResourceLocator("http://somewhere/" + name));
-	}
-
-}
+}
\ No newline at end of file

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/ArtifactInstance.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ArtifactInstance.java	Wed Jun 23 16:25:25 2004
@@ -0,0 +1,213 @@
+/*
+ * Copyright  2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.depot.update;
+
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.depot.common.util.debug.DebugUtils;
+import org.apache.depot.common.util.debug.Dumpable;
+import org.apache.depot.update.artifact.ArtifactAttributeMap;
+import org.apache.depot.update.artifact.ArtifactLocator;
+import org.apache.depot.update.artifact.ArtifactType;
+import org.apache.depot.update.util.flag.Flag;
+import org.apache.depot.update.util.identity.GenericIdentifier;
+import org.apache.depot.update.util.net.VirtualResourceLocator;
+import org.apache.depot.update.util.reference.IReferenceable;
+import org.apache.depot.update.util.select.ISelectable;
+import org.apache.depot.version.Version;
+import org.apache.depot.version.impl.ApacheVersion;
+
+/**
+ * @author arb_jack
+ * 
+ * This defines a 'real world' file, e.g. junit-3.8.1.jar and has all the
+ * information about it, and where it is.
+ *  
+ */
+public class ArtifactInstance implements ISelectable, IReferenceable, Dumpable {
+
+	// What and Where
+	private Artifact m_artifact = null;
+	private ArtifactLocator m_locator = null;
+
+	// Annotated attributes
+	private ArtifactAttributeMap m_attributes = null;
+
+	//
+	// Construct a Resource
+	//
+	public ArtifactInstance(Artifact artifact, ArtifactLocator locator) {
+
+		m_artifact = artifact;
+		m_locator = locator;
+	}
+
+	// Clone
+	public ArtifactInstance(ArtifactInstance other) {
+
+		m_artifact = other.m_artifact;
+		m_locator = other.m_locator;
+	}
+
+	/**
+	 * @return
+	 */
+	public GenericIdentifier getIdentifier() {
+		return m_artifact.getIdentifier();
+	}
+
+	public Object getSelectionObject() {
+		return m_artifact.getIdentifier();
+	}
+
+	public Artifact getArtifact() {
+		return m_artifact;
+	}
+
+	/**
+	 * @return
+	 */
+	public ArtifactLocator getLocator() {
+		return m_locator;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object other) {
+		boolean equal = true;
+
+		if (other instanceof ArtifactInstance) {
+			ArtifactInstance otherResource = (ArtifactInstance) other;
+
+			equal = otherResource.m_artifact.equals(m_artifact);
+			equal &= otherResource.m_locator.equals(m_locator);
+		} else
+			throw new IllegalArgumentException("Not a Resource: "
+					+ other.getClass().getName());
+
+		return equal;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		int hash = 0;
+
+		hash += m_artifact.hashCode();
+		hash += m_locator.hashCode();
+		return hash;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+
+		buffer.append(m_artifact);
+		buffer.append("~");
+
+		buffer.append(m_locator.toString());
+
+		return buffer.toString();
+	}
+
+	public boolean hasAttribute(Flag attributeName) {
+		return (null == m_attributes)
+				? false
+				: m_attributes.containsKey(attributeName);
+	}
+
+	public Object getAttribute(Flag attributeName) {
+		Object value = null;
+
+		if (null == m_attributes)
+			value = m_attributes.get(attributeName);
+		return value;
+	}
+
+	public void dump(PrintWriter out, int depth, boolean verbose) {
+		String indent = DebugUtils.getIndent(depth);
+
+		out.print(indent);
+		out.println("Resource Artifact: " + m_artifact);
+
+		out.print(indent);
+		out.println("Resource Locator: " + m_locator);
+
+		if (verbose && (null != m_attributes))
+			DebugUtils.dump(out, depth, verbose, m_attributes);
+	}
+
+	//
+	//	-----------------------------------------------------------------
+	//
+	public static List getTestArtifactList(String group, int count) {
+		List resourceList = new ArrayList();
+
+		// Populate with some test resources...
+		for (int i = 0; i < count; ++i) {
+			String name = group + Integer.toString(1 + i);
+			resourceList.add(ArtifactInstance.getTestArtifact(name,
+					ApacheVersion.getTestVersion(1, i),
+					ArtifactType.JAVA_BINARY));
+			resourceList.add(ArtifactInstance.getTestArtifact(name,
+					ApacheVersion.getTestVersion(1, i),
+					ArtifactType.SOURCE_CODE));
+
+			// :TODO: Add some randomness
+		}
+
+		return resourceList;
+	}
+
+	public static ArtifactInstance getTestArtifact() {
+		return getTestArtifact("test");
+	}
+
+	public static ArtifactInstance getTestArtifact(String name) {
+		return getTestArtifact(name, ArtifactType.JAVA_BINARY);
+	}
+
+	public static ArtifactInstance getTestArtifact(String name,
+			ArtifactType type) {
+		return getTestArtifact(name, ApacheVersion.getTestVersion(1, 1), type);
+	}
+
+	public static ArtifactInstance getTestArtifact(String name,
+			Version version, ArtifactType type) {
+		return getTestArtifact(name,version,type,".test");
+	}
+	public static ArtifactInstance getTestArtifact(String name,
+			Version version, ArtifactType type, String extn) {
+		return new ArtifactInstance(
+				new Artifact("test", name, type, version), 
+				new ArtifactLocator(name,extn,
+						new VirtualResourceLocator("http://somewhere/" + name)));
+	}
+
+}
\ No newline at end of file

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ArtifactUpdater.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/ArtifactUpdater.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ArtifactUpdater.java	Wed Jun 23 16:25:25 2004
@@ -28,14 +28,14 @@
 import org.apache.depot.update.config.UpdateConfig;
 import org.apache.depot.update.impl.ArtifactUpdaterContext;
 import org.apache.depot.update.impl.ArtifactUpdaterEngine;
-import org.apache.depot.update.impl.DefaultArtifactUpdater;
 import org.apache.depot.update.impl.ReferenceManager;
 import org.apache.depot.update.query.ArtifactQuery;
 import org.apache.depot.update.query.ArtifactQueryHelper;
-import org.apache.depot.update.query.ResourceResult;
-import org.apache.depot.update.query.ResourceResultHelper;
+import org.apache.depot.update.query.ArtifactResult;
+import org.apache.depot.update.query.ArtifactResultHelper;
 import org.apache.depot.update.repository.RepositorySet;
 import org.apache.depot.update.repository.RepositorySetSortContext;
+import org.apache.depot.update.updater.DefaultArtifactUpdater;
 import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.identity.GenericIdentifier;
 import org.apache.depot.update.util.reference.IReferenceable;
@@ -229,27 +229,27 @@
 	public void updateResources(List resources, Repository targetRepository)
 		throws UpdateException {
 		for (Iterator iterator = resources.iterator(); iterator.hasNext();) {
-			Artifact resource = (Artifact) iterator.next();
+			ArtifactInstance resource = (ArtifactInstance) iterator.next();
 			updateResource(resource, targetRepository);
 		}
 	}
 
 	/* (non-Javadoc)
 	 */
-	public void updateResource(Artifact resource) throws UpdateException {
+	public void updateResource(ArtifactInstance resource) throws UpdateException {
 		updateResource(resource, null);
 	}
 
 	/* (non-Javadoc)
 	 */
-	public void updateResource(Artifact resource, Repository targetRepository)
+	public void updateResource(ArtifactInstance resource, Repository targetRepository)
 		throws UpdateException {
 
 		if (resource != null) {
 
 			// get the resource specifier query
 			ArtifactQuery resourceQuery =
-				ArtifactQueryHelper.getResourceQuery(resource);
+				ArtifactQueryHelper.getArtifactQuery(resource);
 			updateResource(resourceQuery, targetRepository);
 		}
 		else {
@@ -277,7 +277,7 @@
 		if (group != null) {
 			// get the resource specifier query
 			ArtifactQuery resourceQuery =
-				ArtifactQueryHelper.getResourceGroupQuery(group);
+				ArtifactQueryHelper.getArtifactGroupQuery(group);
 			updateResource(resourceQuery, targetRepository);
 		}
 		else {
@@ -316,11 +316,11 @@
 		}
 
 		// Query the repositories to get the result	
-		ResourceResult resourceResult = m_updateEngine.query(resourceQuery);
+		ArtifactResult resourceResult = m_updateEngine.query(resourceQuery);
 
 		// Query the target repository to get the result
 		resourceQuery.setRepositorySet(new RepositorySet(targetRepository));
-		ResourceResult targetResult = m_updateEngine.query(resourceQuery);
+		ArtifactResult targetResult = m_updateEngine.query(resourceQuery);
 
 		// Sort the two result sets
 		List resources =
@@ -342,15 +342,15 @@
 	 */
 	private List determineUpdates(
 		ArtifactQuery resourceQuery,
-		ResourceResult resourceResult,
-		ResourceResult targetResult) {
+		ArtifactResult resourceResult,
+		ArtifactResult targetResult) {
 
 		List resources = null;
 		
 		// Assuming we found something in the main search repositories...
-		if (!ResourceResultHelper.noResult(resourceResult)) {
+		if (!ArtifactResultHelper.noResult(resourceResult)) {
 			// Compare Results Set using the OrderBy Comparator	
-			if (ResourceResultHelper
+			if (ArtifactResultHelper
 				.compareTo(
 					resourceResult,
 					targetResult,
@@ -358,7 +358,7 @@
 				> 0) {
 
 				resources =
-					ResourceResultHelper.getResourceList(resourceResult);
+					ArtifactResultHelper.getResourceList(resourceResult);
 
 				// Got something
 				Logger.getLogger().verbose(
@@ -386,7 +386,7 @@
 	/* (non-Javadoc)
 	 * @see org.apache.depot.update.api.ResourceAPIInterface#findResource(org.apache.depot.update.resource.Resource)
 	 */
-	public List findResource(Artifact resource) throws UpdateException {
+	public List findResource(ArtifactInstance resource) throws UpdateException {
 		return findResource(resource, null);
 	}
 
@@ -406,7 +406,7 @@
 		List foundResources = null;
 
 		for (Iterator iterator = resources.iterator(); iterator.hasNext();) {
-			Artifact resource = (Artifact) iterator.next();
+			ArtifactInstance resource = (ArtifactInstance) iterator.next();
 			foundResources = findResource(resource, target);
 			if (foundResources != null) {
 				resourceMap.put(resource, foundResources);
@@ -418,17 +418,17 @@
 	/* (non-Javadoc)
 	 * @see org.apache.depot.update.api.ResourceAPIInterface#findResource(org.apache.depot.update.resource.Resource, org.apache.depot.update.repository.Repository)
 	 */
-	public List findResource(Artifact resource, Repository target)
+	public List findResource(ArtifactInstance resource, Repository target)
 		throws UpdateException {
 		// get the resource specifier query
 		ArtifactQuery resourceQuery =
-			ArtifactQueryHelper.getResourceSpecifierQuery(resource);
+			ArtifactQueryHelper.getArtifactQuery(resource);
 		//set the target repository
 		if (target != null)
 			resourceQuery.setRepositorySet(new RepositorySet(target));
 		// Query the repositories to get the result	
-		ResourceResult resourceResult = m_updateEngine.query(resourceQuery);
-		List resources = ResourceResultHelper.getResourceList(resourceResult);
+		ArtifactResult resourceResult = m_updateEngine.query(resourceQuery);
+		List resources = ArtifactResultHelper.getResourceList(resourceResult);
 
 		return resources;
 
@@ -440,9 +440,9 @@
 	public List findResource(ArtifactQuery resourceQuery)
 		throws UpdateException {
 		// Query the repositories to get the result	
-		ResourceResult resourceResult = m_updateEngine.query(resourceQuery);
+		ArtifactResult resourceResult = m_updateEngine.query(resourceQuery);
 		List foundResources =
-			ResourceResultHelper.getResourceList(resourceResult);
+			ArtifactResultHelper.getResourceList(resourceResult);
 
 		return foundResources;
 	}
@@ -457,7 +457,7 @@
 	/* (non-Javadoc)
 	 * @see org.apache.depot.update.api.ResourceAPIInterface#copyResource(org.apache.depot.update.resource.Resource)
 	 */
-	public void downloadArtifact(Artifact resource) throws UpdateException {
+	public void downloadArtifact(ArtifactInstance resource) throws UpdateException {
 		downloadArtifact(resource, null);
 	}
 
@@ -465,7 +465,7 @@
 	 * @see org.apache.depot.update.api.ResourceAPIInterface#copyResource(org.apache.depot.update.resource.Resource)
 	 */
 	public void downloadArtifact(
-		Artifact resource,
+		ArtifactInstance resource,
 		Repository targetRepository)
 		throws UpdateException {
 		if (resource != null) {
@@ -510,7 +510,7 @@
 		if (group != null) {
 			// get the resource specifier query
 			ArtifactQuery resourceQuery =
-				ArtifactQueryHelper.getResourceGroupQuery(group);
+				ArtifactQueryHelper.getArtifactGroupQuery(group);
 			downloadArtifact(resourceQuery, targetRepository);
 		}
 		else {
@@ -546,15 +546,15 @@
 		// Query & sort by version
 		//		get the resource specifier query
 		ArtifactQuery resourceQuery =
-			ArtifactQueryHelper.getResourceGroupQuery(group);
+			ArtifactQueryHelper.getArtifactGroupQuery(group);
 
 		// Where to look
 		resourceQuery.setRepositorySet(new RepositorySet(repository));
 
 		// Query the repositories to get the result	
-		ResourceResult resourceResult = m_updateEngine.query(resourceQuery);
+		ArtifactResult resourceResult = m_updateEngine.query(resourceQuery);
 		List olderResources =
-			ResourceResultHelper.getRemainderResources(resourceResult);
+			ArtifactResultHelper.getRemainderResources(resourceResult);
 
 		//DebugUtils.dump("Older Resources", olderResources);
 

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/ArtifactUpdaterFactory.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ArtifactUpdaterFactory.java	Wed Jun 23 16:25:25 2004
@@ -0,0 +1,41 @@
+/*
+ * Copyright  2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.depot.update;
+
+import org.apache.depot.update.updater.ConfiguredArtifactUpdater;
+import org.apache.depot.update.updater.DefaultArtifactUpdater;
+import org.apache.depot.update.util.UpdateConstants;
+
+/**
+ * An ArtifactUpdater is the main (low level) API into Depot.
+ * 
+ * @see DefaultArtifactUpdater, StandardResourceUpdater
+ * 
+ * @author anou_mana
+ */
+public class ArtifactUpdaterFactory {
+
+	public static ArtifactUpdater getDefaultUpdater() throws UpdateException
+	{
+		return new DefaultArtifactUpdater(UpdateConstants.DEFAULT);
+	}
+	
+	public static ArtifactUpdater getConfiguredUpdater(String filename) throws UpdateException
+	{
+		return new ConfiguredArtifactUpdater(filename, filename);
+	}
+}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/Repository.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/Repository.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/Repository.java	Wed Jun 23 16:25:25 2004
@@ -23,7 +23,6 @@
 import org.apache.depot.update.impl.ArtifactUpdaterContext;
 import org.apache.depot.update.repository.RepositoryCapability;
 import org.apache.depot.update.repository.RepositoryCapabilitySet;
-import org.apache.depot.update.repository.RepositoryManifest;
 import org.apache.depot.update.util.identity.GenericIdentifier;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
 import org.apache.depot.update.util.reference.IReferenceable;
@@ -126,7 +125,7 @@
 	 * @param selector
 	 * @return
 	*/
-	void deleteArtifact(ArtifactUpdaterContext context, Artifact resource)
+	void deleteArtifact(ArtifactUpdaterContext context, ArtifactInstance resource)
 		throws Exception;
 
 	/**
@@ -135,7 +134,7 @@
 	 * @param selector
 	 * @return
 	*/
-	Artifact publishArtifact(ArtifactUpdaterContext context, Artifact resource)
+	ArtifactInstance publishArtifact(ArtifactUpdaterContext context, ArtifactInstance resource)
 		throws Exception;
 
 }

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/RepositoryManifest.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/RepositoryManifest.java	Wed Jun 23 16:25:25 2004
@@ -0,0 +1,170 @@
+/*
+ * Copyright  2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.depot.update;
+
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.depot.common.util.debug.DebugUtils;
+import org.apache.depot.common.util.debug.Dumpable;
+import org.apache.depot.update.artifact.ArtifactType;
+import org.apache.depot.update.util.identity.GenericIdentifier;
+import org.apache.depot.version.Version;
+
+/**
+ * @author arb_jack
+ */
+public class RepositoryManifest implements Dumpable {
+	private List m_types = null;
+	private List m_ids = null;
+	private List m_versions = null;
+	private List m_instances = null;
+
+	/**
+	 * an empty manifest
+	 *
+	 */
+	public RepositoryManifest() {
+		classInit();
+	}
+
+	/**
+	 * 
+	 * Extract manifest from a list of resources
+	 * 
+	 * @param resources
+	 */
+	public RepositoryManifest(List instances) {
+		classInit();
+
+		importInformation(instances);
+	}
+
+	/**
+	 * Handrolled...
+	 *
+	 */
+	public RepositoryManifest(List types, List ids, List versions, List instances) {
+		classInit();
+
+		m_types = types;
+		m_ids = ids;
+		m_versions = versions;
+		m_instances = instances;
+	}
+
+	/**
+	 * A clone...
+	 *
+	 */
+	public RepositoryManifest(RepositoryManifest other) {
+		classInit();
+
+		m_types = other.m_types;
+		m_ids = other.m_ids;
+		m_instances = other.m_instances;
+	}
+
+	/**
+	 * 
+	 *
+	 */
+	private void classInit() {
+		m_types = new ArrayList();
+		m_ids = new ArrayList();
+		m_versions = new ArrayList();
+		m_instances = new ArrayList();
+	}
+
+	public void importInformation(List instances) {
+
+		for (Iterator i = instances.iterator(); i.hasNext();) {
+			ArtifactInstance instance = (ArtifactInstance) i.next();
+
+			// Extract all the types, and store
+			ArtifactType type = instance.getArtifact().getType();
+			if (!m_types.contains(type))
+				m_types.add(type);
+
+			// Extract all the ids, and store
+			GenericIdentifier id = instance.getIdentifier();
+			if (!m_ids.contains(id))
+				m_ids.add(id);
+
+			// Extract all the ids, and store
+			Version version = instance.getArtifact().getVersion();
+			if (!m_versions.contains(version))
+				m_versions.add(version);
+
+			// Might as well keep it...
+			m_instances.add(instance);
+		}
+	}
+
+	/**
+	 * @return
+	 */
+	public List getIds() {
+		return m_ids;
+	}
+
+	/**
+	 * @return
+	 */
+	public List getInstances() {
+		return m_instances;
+	}
+
+	/**
+	 * @return
+	 */
+	public List getTypes() {
+		return m_types;
+	}
+
+	/**
+	 * @param list
+	 */
+	public void setIds(List list) {
+		m_ids = list;
+	}
+
+	/**
+	 * @param list
+	 */
+	public void setInstances(List list) {
+		m_instances = list;
+	}
+
+	/**
+	 * @param list
+	 */
+	public void setTypes(List list) {
+		m_types = list;
+	}
+
+	public void dump(PrintWriter out, int depth, boolean verbose) {
+		DebugUtils.dump(out, depth + 1, "Types", verbose, m_types);
+		DebugUtils.dump(out, depth + 1, "IDs", verbose, m_ids);
+		DebugUtils.dump(out, depth + 1, "Versions", verbose, m_versions);
+		if (verbose)
+			DebugUtils.dump(out, depth + 1, "Instances", verbose, m_instances);
+	}
+
+}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/ArtifactElement.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/ArtifactElement.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/ArtifactElement.java	Wed Jun 23 16:25:25 2004
@@ -19,20 +19,22 @@
 import java.io.File;
 
 import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.Repository;
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.artifact.ArtifactGroup;
+import org.apache.depot.update.artifact.ArtifactLocator;
 import org.apache.depot.update.artifact.ArtifactType;
 import org.apache.depot.update.artifact.compare.VersionComparator;
 import org.apache.depot.update.artifact.select.NameSelector;
 import org.apache.depot.update.artifact.select.TypeSelector;
 import org.apache.depot.update.artifact.select.VersionSelector;
-import org.apache.depot.update.impl.RepositorySetWrapper;
 import org.apache.depot.update.impl.ArtifactUpdaterContext;
+import org.apache.depot.update.impl.RepositorySetWrapper;
 import org.apache.depot.update.protocols.DefaultProtocolOperationsManager;
 import org.apache.depot.update.query.ArtifactQuery;
+import org.apache.depot.update.query.ArtifactResult;
 import org.apache.depot.update.query.DefaultQueryEngine;
-import org.apache.depot.update.query.ResourceResult;
 import org.apache.depot.update.repository.DefaultRepository;
 import org.apache.depot.update.repository.RepositorySet;
 import org.apache.depot.update.util.io.ResolvedFile;
@@ -54,14 +56,16 @@
 	private String version;
 	private String repository;
 	private String ext;
-	private Artifact bestRemoteResource;
+	private ArtifactInstance bestRemoteArtifact;
 	private final Project project;
+
 	/**
 	 * @return Returns the name.
 	 */
 	public String getName() {
 		return name;
 	}
+
 	/**
 	 * @param name
 	 *            The name to set.
@@ -69,12 +73,14 @@
 	public void setName(String name) {
 		this.name = name;
 	}
+
 	/**
 	 * @return Returns the repository.
 	 */
 	public String getRepository() {
 		return repository;
 	}
+
 	/**
 	 * @param repository
 	 *            The repository to set.
@@ -82,12 +88,14 @@
 	public void setRepository(String repository) {
 		this.repository = repository;
 	}
+
 	/**
 	 * @return Returns the version.
 	 */
 	public String getVersion() {
 		return version;
 	}
+
 	/**
 	 * @param version
 	 *            The version to set.
@@ -95,29 +103,37 @@
 	public void setVersion(String version) {
 		this.version = version;
 	}
+
 	/**
 	 * @return Returns the ext.
 	 */
 	public String getExt() {
 		return ext;
 	}
+
 	/**
 	 * * The ext to set.
 	 */
 	public void setExt(String ext) {
 		this.ext = ext;
 	}
+
 	public String toString() {
 		return name + "-" + version + "." + ext + "@" + repository;
 	}
+
 	/**
 	 * @return
 	 */
-	Artifact initResource() {
-		Artifact r = new Artifact(getResourceGroup(), name, getVersionObject(),
-				getResourceType(), ext, getFileName(), getLocation());
+	ArtifactInstance initArtifact() {
+		ArtifactInstance r = new ArtifactInstance(
+					new Artifact(getArtifactGroup(), name, getArtifactType(), getVersionObject()
+						), 
+						new ArtifactLocator(getFileName(),
+						ext, getLocation()));
 		return r;
 	}
+
 	/**
 	 * @return
 	 */
@@ -127,6 +143,7 @@
 		// TODO Auto-generated method stub
 		return vrl;
 	}
+
 	/**
 	 * @return
 	 */
@@ -134,12 +151,14 @@
 		// TODO Auto-generated method stub
 		return getName() + "-" + getVersion() + "." + getExt();
 	}
+
 	/**
 	 * @return
 	 */
-	ArtifactType getResourceType() {
-		return ArtifactType.JAVA_BINARY;// TODO fix
+	ArtifactType getArtifactType() {
+		return ArtifactType.JAVA_BINARY;// :TODO: fix
 	}
+
 	/**
 	 * @return
 	 */
@@ -147,19 +166,22 @@
 		// TODO Auto-generated method stub
 		return null;
 	}
+
 	/**
 	 * @return
 	 */
-	ArtifactGroup getResourceGroup() {
+	ArtifactGroup getArtifactGroup() {
 		ArtifactGroup rg = new ArtifactGroup(group == null ? name : group);
 		return rg;
 	}
+
 	/**
 	 * @return Returns the group.
 	 */
 	public String getGroup() {
 		return group;
 	}
+
 	/**
 	 * @param group
 	 *            The group to set.
@@ -167,22 +189,24 @@
 	public void setGroup(String group) {
 		this.group = group;
 	}
+
 	/**
 	 * @return
 	 */
-	public TypeSelector getResourceTypeSelector() {
+	public TypeSelector getArtifactTypeSelector() {
 		// TODO Auto-generated method stub
-		return new TypeSelector(getResourceType());
+		return new TypeSelector(getArtifactType());
 	}
+
 	/**
 	 * @return
 	 */
 	public Repository getIRepository() {
-		RepositoryElement repositoryElement = (RepositoryElement) project
-				.getReference(getRepository());
+		RepositoryElement repositoryElement = (RepositoryElement) project.getReference(getRepository());
 		return new DefaultRepository(repositoryElement.getId(),
 				new VirtualResourceLocator(repositoryElement.getUrl()));
 	}
+
 	/**
 	 *  
 	 */
@@ -190,79 +214,84 @@
 		super();
 		this.project = project;
 	}
-	public ISelector getResourceSelector() throws VersionException {
+
+	public ISelector getArtifactSelector() throws VersionException {
 		AndSelector set = new AndSelector();
 		set.addSelector(new NameSelector(name));
-		set.addSelector(new TypeSelector(getResourceType()));
+		set.addSelector(new TypeSelector(getArtifactType()));
 		if (null != version) {
-			set.addSelector(new VersionSelector(VersionImporter
-					.importVersion(version)));
+			set.addSelector(new VersionSelector(
+					VersionImporter.importVersion(version)));
 		}
 		return (ISelector) set;
 	}
+
 	/**
 	 * @return
 	 */
 	public String getDownloadedFrom() {
-		if (bestRemoteResource == null) {
-			bestRemoteResource = findBestRemoteResource();
+		if (bestRemoteArtifact == null) {
+			bestRemoteArtifact = findBestRemoteArtifact();
 		}
-		if (bestRemoteResource != null) {
-			return bestRemoteResource.getLocation().toExternalForm();
+		if (bestRemoteArtifact != null) {
+			return bestRemoteArtifact.getLocator().getLocation().toExternalForm();
 		} else {
 			return null;
 		}
 	}
+
 	/**
 	 * @return
 	 */
 	public Version getDownloadedVersion() {
-		if (bestRemoteResource == null) {
-			bestRemoteResource = findBestRemoteResource();
+		if (bestRemoteArtifact == null) {
+			bestRemoteArtifact = findBestRemoteArtifact();
 		}
-		if (bestRemoteResource != null) {
-			return bestRemoteResource.getVersion();
+		if (bestRemoteArtifact != null) {
+			return bestRemoteArtifact.getArtifact().getVersion();
 		} else {
 			return null;
 		}
 	}
+
 	/**
 	 * @param this
 	 * @return
 	 */
-	Artifact findBestRemoteResource() {
-		ResourceResult res = query(getIRepository());
-		Artifact resource = null;
+	ArtifactInstance findBestRemoteArtifact() {
+		ArtifactResult res = query(getIRepository());
+		ArtifactInstance resource = null;
 		if (res.size() == 0) {
 			resource = null;
 		} else if (res.size() == 1) {
-			resource = ResourceResult.getFirstResource(res);
+			resource = ArtifactResult.getFirstArtifact(res);
 		} else {
 			getProject().log(
 					"Found " + res.size() + " matches for " + this
 							+ " returning first", Project.MSG_VERBOSE);
-			resource = ResourceResult.getFirstResource(res);
+			resource = ArtifactResult.getFirstArtifact(res);
 		}
-		bestRemoteResource = resource;
+		bestRemoteArtifact = resource;
 		return resource;
 	}
-	ResourceResult query(Repository repo) { //TODO
+
+	ArtifactResult query(Repository repo) { //TODO
 		// experiment
 		getProject().log("Looking for " + this, Project.MSG_DEBUG);
 		try {
 			DefaultQueryEngine dqe = new DefaultQueryEngine();
-			ArtifactQuery query = new ArtifactQuery(getResourceGroup(),
-					getResourceSelector(), null, VersionComparator.REVERSE);
+			ArtifactQuery query = new ArtifactQuery(getArtifactGroup(),
+					getArtifactSelector(), null, VersionComparator.REVERSE);
 			//TODO need to be a better way to sort by.
 			ArtifactUpdaterContext context = new ArtifactUpdaterContext();
 			context.setProtocolManager(new DefaultProtocolOperationsManager(
 					context));
-			RepositorySet repositorySet = RepositorySet.getRepositorySet(repo
-					.getIdentifier().getId(), true);
+			RepositorySet repositorySet = RepositorySet.getRepositorySet(
+					repo.getIdentifier().getId(), true);
 			repositorySet.addRepository(repo);
 			RepositorySetWrapper rw = new RepositorySetWrapper(repositorySet,
 					context);
-			ResourceResult result = dqe.queryRepositories(rw, query);
+			ArtifactResult result = dqe.queryRepositories(rw, query);
 			return result;
 		} catch (VersionException e) {
 			throw new BuildException("Unable to process " + this, e);

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedArtifactSet.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedArtifactSet.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedArtifactSet.java	Wed Jun 23 16:25:25 2004
@@ -24,12 +24,12 @@
 
 import org.apache.depot.common.ant.util.AntLogListener;
 import org.apache.depot.common.log.Logger;
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.ArtifactUpdater;
 import org.apache.depot.update.Repository;
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.ant.AntUtils;
-import org.apache.depot.update.query.ResourceResult;
+import org.apache.depot.update.query.ArtifactResult;
 import org.apache.depot.update.repository.DefaultRepository;
 import org.apache.depot.update.util.io.ResolvedFile;
 import org.apache.tools.ant.BuildException;
@@ -37,6 +37,7 @@
 import org.apache.tools.ant.FileScanner;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.types.DataType;
+
 /**
  * A locally cached repository backed set of resources.
  * 
@@ -63,9 +64,9 @@
 	}
 	/**
 	 * @param resource
-	 * @return Resource
+	 * @return Artifact
 	 */
-	public ArtifactElement createResource() {
+	public ArtifactElement createArtifact() {
 		ArtifactElement resource = new ArtifactElement(project);
 		resourceList.add(resource);
 		return resource;
@@ -95,7 +96,7 @@
 
 		try {			
 			scanner.setBasedir(getRepoDir());
-			addResources(scanner);
+			addArtifacts(scanner);
 		}
 		finally {
 			Logger.popContext(logger);
@@ -106,7 +107,7 @@
 	/**
 	 * @param scanner
 	 */
-	private void addResources(DirectoryScanner scanner) throws UpdateException {
+	private void addArtifacts(DirectoryScanner scanner) throws UpdateException {
 		for (Iterator i = resourceList.iterator(); i.hasNext();) {
 			ArtifactElement r = (ArtifactElement) i.next();
 			add(scanner, r);
@@ -161,7 +162,7 @@
 	 */
 	private void cacheFile(ArtifactElement r) {
 		try {
-			Artifact resource = findBestRemoteResource(r);
+			ArtifactInstance resource = findBestRemoteArtifact(r);
 			if (resource != null) {
 				
 				downLoadRemoteResult(resource);
@@ -175,15 +176,15 @@
 	 * @param r
 	 * @return
 	 */
-	Artifact findBestRemoteResource(ArtifactElement r) {
-		return r.findBestRemoteResource();
+	ArtifactInstance findBestRemoteArtifact(ArtifactElement r) {
+		return r.findBestRemoteArtifact();
 	}
 	/**
 	 * @param r
 	 */
 	private File getCachedFile(ArtifactElement r) throws UpdateException {
 		try {
-			ResourceResult res = query(r, getLocalRepository());
+			ArtifactResult res = query(r, getLocalRepository());
 			if (res.size() == 0) {
 				return null;
 			} else if (res.size() == 1) {
@@ -235,11 +236,11 @@
 	 * @param res
 	 * @return
 	 */
-	private File getFirstFile(ResourceResult res) throws Exception {
-		Artifact resource = ResourceResult.getFirstResource(res);
-		return resource.getLocation().getFile();
+	private File getFirstFile(ArtifactResult res) throws Exception {
+		ArtifactInstance instance = ArtifactResult.getFirstArtifact(res);
+		return instance.getLocator().getLocation().getFile();
 	}
-	private ResourceResult query(ArtifactElement r, Repository repo) {
+	private ArtifactResult query(ArtifactElement r, Repository repo) {
 		return r.query(repo);
 	}
 	/**
@@ -254,14 +255,14 @@
 	 * @param resource
 	 * @throws UpdateException
 	 */
-	private void downLoadRemoteResult(Artifact resource) throws UpdateException {
+	private void downLoadRemoteResult(ArtifactInstance resource) throws UpdateException {
 		ArtifactUpdater ru = new ArtifactUpdater();
 		ru.downloadArtifact(resource, getLocalRepository());
 	}
 	/**
 	 * @return Returns the unmodifiableList of resources.
 	 */
-	List getResourceList() {
+	List getArtifactList() {
 		return Collections.unmodifiableList(resourceList);
 	}
 }

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedArtifactSetExportTask.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedArtifactSetExportTask.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedArtifactSetExportTask.java	Wed Jun 23 16:25:25 2004
@@ -80,13 +80,13 @@
 	 */
 	public void execute() throws BuildException {
 		try {
-			CachedArtifactSet cachedResourceSet = (CachedArtifactSet) getProject()
+			CachedArtifactSet cachedArtifactSet = (CachedArtifactSet) getProject()
 					.getReference(getRefid());
 			// TODO use real XML stuff
 			// njc Feeling lazy tonight
 			Writer writer = new FileWriter(getToFile());
 			PrintWriter out = new PrintWriter(writer);
-			List resourceList = cachedResourceSet.getResourceList();
+			List resourceList = cachedArtifactSet.getArtifactList();
 			out.println("<?xml " + nameValue("version", "1.0") + "?>");
 			out
 					.println("<!DOCTYPE cachedresourceset PUBLIC \"-//APACHE//DTD CachedResource V0.1//EN\" \"http://incubator.apache.org/depot/dtd/cachedresource-v01.dtd\">");

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/tool/RepositoryToolTask.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/tool/RepositoryToolTask.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/tool/RepositoryToolTask.java	Wed Jun 23 16:25:25 2004
@@ -22,13 +22,13 @@
 import org.apache.depot.common.ant.util.AntLogListener;
 import org.apache.depot.common.log.LogConstants;
 import org.apache.depot.common.log.Logger;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.Repository;
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.artifact.ArtifactGroup;
-import org.apache.depot.update.artifact.ArtifactSpecifier;
 import org.apache.depot.update.config.UpdateConfig;
-import org.apache.depot.update.impl.RepositoryWrapper;
 import org.apache.depot.update.impl.ArtifactUpdaterContext;
+import org.apache.depot.update.impl.RepositoryWrapper;
 import org.apache.depot.update.monitor.Monitor;
 import org.apache.depot.update.monitor.StatisticsMonitor;
 import org.apache.depot.update.repository.RepositorySet;
@@ -114,7 +114,7 @@
 										+ specifiers.size() + ")");
 
 								for (Iterator si = specifiers.iterator(); si.hasNext();) {
-									ArtifactSpecifier specifier = (ArtifactSpecifier) si.next();
+									Artifact specifier = (Artifact) si.next();
 
 									log("  - " + specifier, Project.MSG_VERBOSE);
 								}
@@ -137,7 +137,7 @@
 								AllSelector.getInstance());
 
 						for (Iterator gi = specifiers.iterator(); gi.hasNext();) {
-							ArtifactSpecifier specifier = (ArtifactSpecifier) gi.next();
+							Artifact specifier = (Artifact) gi.next();
 
 							log(" -  " + specifier, Project.MSG_VERBOSE);
 						}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/ArtifactGroup.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/ArtifactGroup.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/ArtifactGroup.java	Wed Jun 23 16:25:25 2004
@@ -26,10 +26,10 @@
 	}	
 	
 	/*
-		  * (non-Javadoc)
-		  * 
-		  * @see java.lang.Object#equals(java.lang.Object)
-		  */
+	* (non-Javadoc)
+	* 
+	* @see java.lang.Object#equals(java.lang.Object)
+	*/
 	public boolean equals(Object otherGroup) {
 		return m_group.equals(((ArtifactGroup) otherGroup).m_group);
 	}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/ArtifactLocator.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/ArtifactLocator.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/ArtifactLocator.java	Wed Jun 23 16:25:25 2004
@@ -25,12 +25,6 @@
  * @author arb_jack
  * 
  * 
- * 	:TODO: This is incomplete, and not wired to anything yet. 
- * I am start to wonder if we need 'the repositoriy it is in' referenced
- * for any resoruce
- * 
- * 
- * 
  */
 public class ArtifactLocator  {
 
@@ -38,21 +32,29 @@
 	//	Where is this thing?
 	//	
 	private String m_filename = null;
+	private String m_extension = null;
+	
+	
+	// :TODO: Do we want to add reference to repository?
+	// :TODO: Are above to obsolete w/ below?
+	
 	private VirtualResourceLocator m_location = null;
 
 	//
-	// Construct a ResourceLocator
+	// Construct an ArtifactLocator
 	//
 	public ArtifactLocator(
 		String filename,
+		String extension,
 		VirtualResourceLocator location) {
 
 		m_filename = filename;
+		m_extension = extension;
 		m_location = location;
-
 	}
 
-
+//:TODO: fix these
+	
 	/* (non-Javadoc)
 	 * @see java.lang.Object#equals(java.lang.Object)
 	 */
@@ -63,6 +65,11 @@
 			ArtifactLocator otherResourceLocator = (ArtifactLocator) other;
 
 			equal = otherResourceLocator.m_location.equals(m_location);
+
+			if (null == m_filename)
+				equal &= (null == otherResourceLocator.m_filename);
+			else
+				equal &= otherResourceLocator.m_filename.equals(m_filename);
 			
 			if (null == m_filename)
 				equal &= (null == otherResourceLocator.m_filename);
@@ -110,6 +117,9 @@
 
 		out.print(indent);
 		out.println("ResourceLocator Filename: " + m_filename);
+		
+		out.print(indent);
+		out.println("ResourceLocator Extn: " + m_extension);
 
 		out.print(indent);
 		out.println("ResourceLocator Location: " + m_location);
@@ -117,4 +127,22 @@
 	}
 
 
+	/**
+	 * @return Returns the filename.
+	 */
+	public String getFilename() {
+		return m_filename;
+	}
+	/**
+	 * @return Returns the extension.
+	 */
+	public String getExtension() {
+		return m_extension;
+	}
+	/**
+	 * @return Returns the location.
+	 */
+	public VirtualResourceLocator getLocation() {
+		return m_location;
+	}
 }

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/AbstractArtifactComparator.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/AbstractArtifactComparator.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/AbstractArtifactComparator.java	Wed Jun 23 16:25:25 2004
@@ -18,7 +18,7 @@
 
 import java.util.Comparator;
 
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
 
@@ -35,8 +35,8 @@
 	public int compare(final Object object1, final Object object2) {
 		int comparison = 0;
 
-		if (object1 instanceof Artifact) {
-			if (object2 instanceof Artifact) {
+		if (object1 instanceof ArtifactInstance) {
+			if (object2 instanceof ArtifactInstance) {
 
 				//				System.out.println(
 				//					SystemUtils.getShortName(getClass())
@@ -46,7 +46,7 @@
 				//						+ object2);
 
 				comparison =
-					compareResources((Artifact) object1, (Artifact) object2);
+					compareResources((ArtifactInstance) object1, (ArtifactInstance) object2);
 			}
 			else {
 				throw new IllegalArgumentException(
@@ -54,7 +54,7 @@
 						MessageConstants.WRONG_TYPE,
 						new Object[] {
 							object2.getClass().getName(),
-							Artifact.class.getName()}));
+							ArtifactInstance.class.getName()}));
 			}
 		}
 		else {
@@ -63,7 +63,7 @@
 					MessageConstants.WRONG_TYPE,
 					new Object[] {
 						object1.getClass().getName(),
-						Artifact.class.getName()}));
+						ArtifactInstance.class.getName()}));
 		}
 
 		return comparison;
@@ -74,6 +74,6 @@
 	}
 
 	public abstract int compareResources(
-		final Artifact artifact1,
-		final Artifact artifact2);
+		final ArtifactInstance artifact1,
+		final ArtifactInstance artifact2);
 }

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/FilenameComparator.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/FilenameComparator.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/FilenameComparator.java	Wed Jun 23 16:25:25 2004
@@ -18,7 +18,7 @@
 
 import java.util.Comparator;
 
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
 
@@ -40,10 +40,10 @@
 		return INSTANCE;
 	}
 
-	public int compareResources(final Artifact resource1, final Artifact resource2) {
+	public int compareResources(final ArtifactInstance artifact1, final ArtifactInstance artifact2) {
 		int comparison =
-			resource1.getFilename().compareToIgnoreCase(
-				resource2.getFilename());
+			artifact1.getLocator().getFilename().compareToIgnoreCase(
+				artifact2.getLocator().getFilename());
 		return comparison;
 	}
 }

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/NameComparator.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/NameComparator.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/NameComparator.java	Wed Jun 23 16:25:25 2004
@@ -18,7 +18,7 @@
 
 import java.util.Comparator;
 
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
 
@@ -43,11 +43,11 @@
 	}
 
 	public int compareResources(
-		final Artifact resource1,
-		final Artifact resource2) {
+		final ArtifactInstance artifact1,
+		final ArtifactInstance artifact2) {
 		int comparison =
-			resource1.getIdentifier().getId().compareToIgnoreCase(
-				resource2.getIdentifier().getId());
+			artifact1.getIdentifier().getId().compareToIgnoreCase(
+				artifact2.getIdentifier().getId());
 		return comparison;
 	}
 }

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/TypeComparator.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/TypeComparator.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/TypeComparator.java	Wed Jun 23 16:25:25 2004
@@ -18,7 +18,7 @@
 
 import java.util.Comparator;
 
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
 
@@ -43,11 +43,11 @@
 	}
 
 	public int compareResources(
-		final Artifact resource1,
-		final Artifact resource2) {
+		final ArtifactInstance artifact1,
+		final ArtifactInstance artifact2) {
 		int comparison =
-			resource1.getType().compareTo(
-				resource2.getType());
+			artifact1.getArtifact().getType().compareTo(
+				artifact2.getArtifact().getType());
 		return comparison;
 	}
 }

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/VersionComparator.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/VersionComparator.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/compare/VersionComparator.java	Wed Jun 23 16:25:25 2004
@@ -16,7 +16,7 @@
 package org.apache.depot.update.artifact.compare;
 import java.util.Comparator;
 
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
 import org.apache.depot.version.Version;
@@ -42,10 +42,10 @@
 	public static Comparator getInstance() {
 		return INSTANCE;
 	}
-	public int compareResources(final Artifact resource1,
-			final Artifact resource2) {
-		final Version version1 = resource1.getVersion();
-		final Version version2 = resource2.getVersion();
+	public int compareResources(final ArtifactInstance artifact1,
+			final ArtifactInstance artifact2) {
+		final Version version1 = artifact1.getArtifact().getVersion();
+		final Version version2 = artifact2.getArtifact().getVersion();
 		int comparison = 0;
 		if (null != version1) {
 			if (null != version2) {

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/AbstractArtifactSelector.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/AbstractArtifactSelector.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/AbstractArtifactSelector.java	Wed Jun 23 16:25:25 2004
@@ -17,7 +17,7 @@
 package org.apache.depot.update.artifact.select;
 
 import org.apache.depot.common.util.SystemUtils;
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.util.select.ISelector;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
@@ -35,15 +35,15 @@
 	public boolean select(final Object object) {
 		boolean selected = false;
 
-		if (object instanceof Artifact) {
-			selected = selectArtifact((Artifact) object);
+		if (object instanceof ArtifactInstance) {
+			selected = selectArtifact((ArtifactInstance) object);
 		}
 		else {
 			throw new IllegalArgumentException(
 				Messages.getString(
 					MessageConstants.WRONG_TYPE,
 					object.getClass().getName(),
-					Artifact.class.getName()));
+					ArtifactInstance.class.getName()));
 		}
 
 		return selected;
@@ -53,5 +53,5 @@
 		return SystemUtils.getShortName(getClass());
 	}
 
-	public abstract boolean selectArtifact(final Artifact artifact);
+	public abstract boolean selectArtifact(final ArtifactInstance artifact);
 }

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/FilenameSelector.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/FilenameSelector.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/FilenameSelector.java	Wed Jun 23 16:25:25 2004
@@ -16,7 +16,7 @@
 
 package org.apache.depot.update.artifact.select;
 
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.util.regexp.RegularExpression;
 import org.apache.depot.update.util.regexp.RegularExpressionSelector;
 import org.apache.depot.update.util.text.MessageConstants;
@@ -45,8 +45,8 @@
 		m_regexp = new RegularExpressionSelector(expression);
 	}
 
-	public boolean selectArtifact(Artifact artifact) {
-		return m_regexp.select(artifact.getFilename());
+	public boolean selectArtifact(ArtifactInstance artifact) {
+		return m_regexp.select(artifact.getLocator().getFilename());
 	}
 
 	public String toString() {

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/NameSelector.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/NameSelector.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/NameSelector.java	Wed Jun 23 16:25:25 2004
@@ -16,7 +16,7 @@
 
 package org.apache.depot.update.artifact.select;
 
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.util.regexp.RegularExpression;
 import org.apache.depot.update.util.regexp.RegularExpressionSelector;
 import org.apache.depot.update.util.text.MessageConstants;
@@ -46,7 +46,7 @@
 		m_regexp = new RegularExpressionSelector(expression);
 	}
 
-	public boolean selectArtifact(Artifact artifact) {
+	public boolean selectArtifact(ArtifactInstance artifact) {
 		return m_regexp.select(artifact.getIdentifier().getId());
 	}
 

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/ReleaseLevelSelector.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/ReleaseLevelSelector.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/ReleaseLevelSelector.java	Wed Jun 23 16:25:25 2004
@@ -17,7 +17,7 @@
 package org.apache.depot.update.artifact.select;
 
 import org.apache.depot.common.log.Logger;
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
 import org.apache.depot.version.Version;
@@ -38,12 +38,12 @@
 		m_comparisonLevel = comparisonLevel;
 	}
 
-	public boolean selectArtifact(Artifact artifact) {
+	public boolean selectArtifact(ArtifactInstance artifact) {
 		boolean selected = false;
 
 		Logger log = Logger.g_loggingOn ? Logger.getLogger() : null;
 
-		Version version = artifact.getVersion();
+		Version version = artifact.getArtifact().getVersion();
 
 		if (null != version) {
 			//:TODO: More features...

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/StandardSelections.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/StandardSelections.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/StandardSelections.java	Wed Jun 23 16:25:25 2004
@@ -16,7 +16,7 @@
 
 package org.apache.depot.update.artifact.select;
 
-import org.apache.depot.update.artifact.ArtifactSpecifier;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.util.select.ISelector;
 import org.apache.depot.update.util.select.logic.AndSelector;
 
@@ -29,7 +29,7 @@
 	 * @param resource - -a specifier
 	 * @return
 	 */
-	public static ISelector getNamedTypedVersion(ArtifactSpecifier artifact) {
+	public static ISelector getNamedTypedVersion(Artifact artifact) {
 		AndSelector set = new AndSelector();
 
 		set.addSelector(new NameSelector(artifact.getIdentifier().getId()));

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/TypeSelector.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/TypeSelector.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/TypeSelector.java	Wed Jun 23 16:25:25 2004
@@ -16,7 +16,7 @@
 
 package org.apache.depot.update.artifact.select;
 
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.artifact.ArtifactType;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
@@ -35,10 +35,10 @@
 		m_comparisonType = comparisonType;
 	}
 
-	public boolean selectArtifact(Artifact artifact) {
+	public boolean selectArtifact(ArtifactInstance artifact) {
 		boolean selected = false;
 
-		ArtifactType type = artifact.getType();
+		ArtifactType type = artifact.getArtifact().getType();
 
 		if (null != type) {
 			//:TODO: More features...

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/VersionConstraintsSelector.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/VersionConstraintsSelector.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/VersionConstraintsSelector.java	Wed Jun 23 16:25:25 2004
@@ -17,7 +17,7 @@
 package org.apache.depot.update.artifact.select;
 
 import org.apache.depot.common.log.Logger;
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
 import org.apache.depot.version.Version;
@@ -40,12 +40,12 @@
 		m_constraints = constraints;
 	}
 
-	public boolean selectArtifact(Artifact artifact) {
+	public boolean selectArtifact(ArtifactInstance artifact) {
 		boolean selected = false;
 
 		Logger log = Logger.g_loggingOn ? Logger.getLogger() : null;
 
-		Version version = artifact.getVersion();
+		Version version = artifact.getArtifact().getVersion();
 
 		if (null != version) {
 			//:TODO: More features...

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/VersionSelector.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/VersionSelector.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/artifact/select/VersionSelector.java	Wed Jun 23 16:25:25 2004
@@ -16,7 +16,7 @@
 
 package org.apache.depot.update.artifact.select;
 
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
 import org.apache.depot.version.Version;
@@ -35,10 +35,10 @@
 		m_comparisonVersion = comparisonVersion;
 	}
 
-	public boolean selectArtifact(Artifact artifact) {
+	public boolean selectArtifact(ArtifactInstance artifact) {
 		boolean selected = false;
 
-		Version version = artifact.getVersion();
+		Version version = artifact.getArtifact().getVersion();
 
 		if (null != version) {
 			//:TODO: More features...

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/files/DefaultResourceFilenameAnalyzer.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/files/DefaultResourceFilenameAnalyzer.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/files/DefaultResourceFilenameAnalyzer.java	Wed Jun 23 16:25:25 2004
@@ -27,10 +27,12 @@
 
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.UpdateRuntimeException;
 import org.apache.depot.update.artifact.ArtifactAttribute;
 import org.apache.depot.update.artifact.ArtifactGroup;
+import org.apache.depot.update.artifact.ArtifactLocator;
 import org.apache.depot.update.artifact.ArtifactType;
 import org.apache.depot.update.monitor.FileEvent;
 import org.apache.depot.update.monitor.Monitor;
@@ -77,24 +79,24 @@
 		private Map m_md5map = new HashMap();
 		private Map m_ascmap = new HashMap();
 
-		boolean contains(Artifact resource) {
-			return m_map.containsKey(resource);
+		boolean contains(ArtifactInstance artifact) {
+			return m_map.containsKey(artifact);
 		}
 
-		void addResource(Artifact resource) {
-			String id = resource.getIdentifier().getId();
+		void addResource(ArtifactInstance artifact) {
+			String id = artifact.getIdentifier().getId();
 
 			//
 			// Keep .MD5s|.ASCs separate
 			// :TODO: .pgp
 			// 
-			String extension = resource.getExtension();
+			String extension = artifact.getLocator().getExtension();
 
 			if ((null != extension)
 				&& (extension.endsWith(UpdateConstants.MD5_EXTN))
 				&& (extension.length() > UpdateConstants.MD5_EXTN.length())) {
 
-				Artifact orig = new Artifact(resource);
+				ArtifactInstance orig = new ArtifactInstance(artifact);
 
 				String newExtn =
 					extension.substring(
@@ -102,14 +104,14 @@
 						extension.length() - UpdateConstants.MD5_EXTN.length());
 				orig.setExtension(newExtn);
 
-				m_md5map.put(orig, resource.getLocation());
+				m_md5map.put(orig, artifact.getLocation());
 			}
 			else if (
 				(null != extension)
 					&& (extension.endsWith(UpdateConstants.ASC_EXTN))
 					&& (extension.length() > UpdateConstants.ASC_EXTN.length())) {
 
-				Artifact orig = new Artifact(resource);
+				ArtifactInstance orig = new ArtifactInstance(artifact);
 
 				String newExtn =
 					extension.substring(
@@ -117,47 +119,47 @@
 						extension.length() - UpdateConstants.ASC_EXTN.length());
 				orig.setExtension(newExtn);
 
-				m_ascmap.put(orig, resource.getLocation());
+				m_ascmap.put(orig, artifact.getLocation());
 			}
 			else {
 				// Meant to look first...
-				if (m_map.containsKey(resource))
+				if (m_map.containsKey(artifact))
 					throw new UpdateRuntimeException(
 						"Duplicate Resource in working store: " + id);
 
 				// Store it...
-				m_map.put(resource, resource);
-				m_list.add(resource);
+				m_map.put(artifact, artifact);
+				m_list.add(artifact);
 			}
 		}
 
-		Artifact getResource(Artifact resource) {
-			return (Artifact) m_map.get(resource);
+		ArtifactInstance getResource(ArtifactInstance artifact) {
+			return (ArtifactInstance) m_map.get(artifact);
 		}
 
 		List getCompletedList() {
 			for (Iterator i = m_list.iterator(); i.hasNext();) {
-				Artifact resource = (Artifact) i.next();
+				ArtifactInstance artifact = (ArtifactInstance) i.next();
 
-				if (m_md5map.containsKey(resource)) {
-					// Store the MD5 location for this resource
+				if (m_md5map.containsKey(artifact)) {
+					// Store the MD5 location for this artifact
 					VirtualResourceLocator md5location =
-						(VirtualResourceLocator) m_md5map.get(resource);
+						(VirtualResourceLocator) m_md5map.get(artifact);
 
-					// Set this as an attribute on the resource,
+					// Set this as an attribute on the artifact,
 					// future code could process this (to check)
-					resource.setAttribute(
+					artifact.setAttribute(
 						ArtifactAttribute.MD5_LOCATION,
 						md5location);
 				}
-				else if (m_ascmap.containsKey(resource)) {
-					// Store the ASC location for this resource
+				else if (m_ascmap.containsKey(artifact)) {
+					// Store the ASC location for this artifact
 					VirtualResourceLocator asclocation =
-						(VirtualResourceLocator) m_ascmap.get(resource);
+						(VirtualResourceLocator) m_ascmap.get(artifact);
 
-					// Set this as an attribute on the resource,
+					// Set this as an attribute on the artifact,
 					// future code could process this (to check)
-					resource.setAttribute(
+					artifact.setAttribute(
 						ArtifactAttribute.ASC_LOCATION,
 						asclocation);
 				}
@@ -206,7 +208,7 @@
 		return store.getCompletedList();
 	}
 
-	public Artifact determineResource(Object entity) throws UpdateException {
+	public ArtifactInstance determineResource(Object entity) throws UpdateException {
 		ResourceWorkingStore store =
 			new DefaultResourceFilenameAnalyzer.ResourceWorkingStore();
 
@@ -243,17 +245,17 @@
 				re);
 		}
 
-		return (Artifact) store.getCompletedList().get(0);
+		return (ArtifactInstance) store.getCompletedList().get(0);
 	}
 
 	void processVRL(
-		VirtualResourceLocator resourceVRL,
+		VirtualResourceLocator artifactVRL,
 		ResourceWorkingStore store)
 		throws UpdateException {
 
 		//			:TODO: Hacky
 		String group = null;
-		VirtualResourceLocator parentVRL = resourceVRL.getParent();
+		VirtualResourceLocator parentVRL = artifactVRL.getParent();
 		if (null != parentVRL) {
 			VirtualResourceLocator grandparentVRL = parentVRL.getParent();
 			if (null != grandparentVRL) {
@@ -261,20 +263,20 @@
 			}
 		}
 
-		processString(resourceVRL.getBasename(), group, resourceVRL, store);
+		processString(artifactVRL.getBasename(), group, artifactVRL, store);
 	}
 
-	void processFile(ResolvedFile resource, ResourceWorkingStore store)
+	void processFile(ResolvedFile artifact, ResourceWorkingStore store)
 		throws UpdateException {
 
 		// Get file basename
-		String name = resource.getName().toString();
+		String name = artifact.getName().toString();
 		int sepPosn = name.lastIndexOf(File.pathSeparator);
 		String baseName = (-1 == sepPosn) ? name : name.substring(sepPosn + 1);
 
 		// :TODO: Hacky
 		String group = null;
-		File parent = resource.getParentFile();
+		File parent = artifact.getParentFile();
 		if (null != parent) {
 			File grandparent = parent.getParentFile();
 			if (null != grandparent) {
@@ -291,7 +293,7 @@
 		processString(
 			baseName,
 			group,
-			new VirtualResourceLocator(resource),
+			new VirtualResourceLocator(artifact),
 			store);
 	}
 
@@ -299,11 +301,11 @@
 	//
 	//
 	void processString(
-		String resourceName,
+		String artifactName,
 		VirtualResourceLocator location,
 		ResourceWorkingStore store)
 		throws UpdateException {
-		processString(resourceName, null, location, store);
+		processString(artifactName, null, location, store);
 	}
 
 	//
@@ -311,7 +313,7 @@
 	//		whole configurable parsing sub-system
 	//
 	void processString(
-		String resourceName,
+		String artifactName,
 		String groupStr,
 		VirtualResourceLocator location,
 		ResourceWorkingStore store)
@@ -320,7 +322,7 @@
 		Logger.getLogger().debug(
 			Messages.getString(
 				MessageConstants.PROCESS,
-				new Object[] { resourceName, location }));
+				new Object[] { artifactName, location }));
 
 		// Parts...
 		String extension = null;
@@ -329,13 +331,13 @@
 		String name = null;
 
 		// Determine the extension
-		extension = extractExtension(resourceName);
+		extension = extractExtension(artifactName);
 
 		// Remainder is name-version-type
 		String remainder =
-			resourceName.substring(
+			artifactName.substring(
 				0,
-				(resourceName.length() - (extension.length() + 1)));
+				(artifactName.length() - (extension.length() + 1)));
 
 		//
 		// Type is anything after the last - or _ so long as
@@ -408,21 +410,25 @@
 				ArtifactGroup group =
 					new ArtifactGroup((null == groupStr) ? name : groupStr);
 
-				Artifact temp =
-					new Artifact(
-						group,
+				ArtifactType artifactType = ArtifactType.getFromString(type);
+				
+				ArtifactInstance temp =
+					new ArtifactInstance(
+						new Artifact(group,
 						name,
-						(null == version ? null : new ApacheVersion(version)),
-						ArtifactType.getFromString(type),
+						artifactType,
+						(null == version ? null : new ApacheVersion(version))),
+						new ArtifactLocator(
+						artifactName,
 						extension,
-						resourceName,
-						location);
+						location));
+						
 
 				//:TODO: Could be written better
 				if (!store.contains(temp)) {
 
 					Monitor.getMonitor().notify(
-						new FileEvent(FileEvent.PARSED, resourceName));
+						new FileEvent(FileEvent.PARSED, artifactName));
 
 					store.addResource(temp);
 				}
@@ -431,7 +437,7 @@
 					Logger.getLogger().debug(
 						Messages.getString(
 							MessageConstants.MERGE,
-							new Object[] { resourceName, location, temp }));
+							new Object[] { artifactName, location, temp }));
 				}
 			}
 			catch (VersionException ve) {
@@ -440,17 +446,17 @@
 					Messages.getString(
 						MessageConstants.GENERAL_EXCEPTION3,
 						new Object[] {
-							resourceName,
+							artifactName,
 							location,
 							ve.getLocalizedMessage()}),
 					ve);
 
 				Monitor.getMonitor().notify(
-					new FileEvent(FileEvent.FAILED, resourceName));
+					new FileEvent(FileEvent.FAILED, artifactName));
 			}
 		else
 			Monitor.getMonitor().notify(
-				new FileEvent(FileEvent.IGNORED, resourceName));
+				new FileEvent(FileEvent.IGNORED, artifactName));
 
 	}
 
@@ -506,9 +512,9 @@
 		return separatorPosn;
 	}
 
-	String extractExtension(String resourceName) throws UpdateException {
+	String extractExtension(String artifactName) throws UpdateException {
 		//	Extract extensions
-		List probableExtns = extractProbableExtensions(resourceName);
+		List probableExtns = extractProbableExtensions(artifactName);
 
 		// Attempt to match extensions, if not accept it is unknown 
 		// and take "biggest"
@@ -526,7 +532,7 @@
 		if (null == extension)
 			if (0 == probableExtns.size())
 				throw new UpdateException(
-					"Unable to extract extension from [" + resourceName + "]");
+					"Unable to extract extension from [" + artifactName + "]");
 
 		//
 		// Drop case

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/files/IResourceFilenameAnalyzer.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/files/IResourceFilenameAnalyzer.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/files/IResourceFilenameAnalyzer.java	Wed Jun 23 16:25:25 2004
@@ -18,13 +18,14 @@
 
 import java.util.List;
 
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.UpdateException;
 
+
 /**
  * @author arb_jack
  */
 public interface IResourceFilenameAnalyzer {
 	List determineResources(List entityList) throws UpdateException;
-	Artifact determineResource(Object entity) throws UpdateException;
+	ArtifactInstance determineResource(Object entity) throws UpdateException;
 }

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ArtifactUpdaterEngine.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ArtifactUpdaterEngine.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ArtifactUpdaterEngine.java	Wed Jun 23 16:25:25 2004
@@ -21,14 +21,14 @@
 
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.Repository;
 import org.apache.depot.update.UpdateException;
-import org.apache.depot.update.artifact.ArtifactIdentifier;
 import org.apache.depot.update.messaging.ResourceRequest;
 import org.apache.depot.update.protocols.DefaultProtocolOperationsManager;
 import org.apache.depot.update.query.ArtifactQuery;
+import org.apache.depot.update.query.ArtifactResult;
 import org.apache.depot.update.query.DefaultQueryEngine;
-import org.apache.depot.update.query.ResourceResult;
 import org.apache.depot.update.repository.RepositoryException;
 import org.apache.depot.update.repository.RepositoryManager;
 import org.apache.depot.update.repository.RepositorySet;
@@ -75,8 +75,8 @@
 	//
 	// Queries/Helper Methods
 	// 
-	public final ArtifactIdentifier resolveResource(final String id) {
-		return new ArtifactIdentifier(id);
+	public final Artifact.Identifier resolveResource(final String id) {
+		return new Artifact.Identifier(id);
 	}
 
 	/**
@@ -94,12 +94,12 @@
 	}
 
 	public void perform(ResourceRequest request) throws UpdateException {
-		ResourceResult result = performRequest(request);
+		ArtifactResult result = performRequest(request);
 
 		// Now what? Perform actions??
 	}
 
-	public ResourceResult performRequest(ResourceRequest request)
+	public ArtifactResult performRequest(ResourceRequest request)
 		throws UpdateException {
 
 		Logger.getLogger().debug(Messages.getString("ResourceRequest", request));
@@ -109,7 +109,7 @@
 		return query(query);
 	}
 
-	public ResourceResult query(ArtifactQuery query) throws UpdateException {
+	public ArtifactResult query(ArtifactQuery query) throws UpdateException {
 
 		// delegate the work to the repository manager to sort the repositories 
 		// based on the query
@@ -136,7 +136,7 @@
 		//
 
 		for (Iterator i = resources.iterator(); i.hasNext();) {
-			Artifact resource = (Artifact) i.next();
+			ArtifactInstance resource = (ArtifactInstance) i.next();
 			try {
 				target.publishResource(resource);
 			}
@@ -160,7 +160,7 @@
 			new RepositoryWrapper(repository, m_context);
 
 		for (Iterator i = resources.iterator(); i.hasNext();) {
-			Artifact resource = (Artifact) i.next();
+			ArtifactInstance resource = (ArtifactInstance) i.next();
 			try {
 				repo.deleteResource(resource);
 			}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/RepositorySetWrapper.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/RepositorySetWrapper.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/RepositorySetWrapper.java	Wed Jun 23 16:25:25 2004
@@ -48,7 +48,7 @@
 	}
 
 	public RepositorySetWrapper(
-		DefaultRepository repository,
+		Repository repository,
 		ArtifactUpdaterContext context) {
 		m_context = context;
 		m_repositorySet = new RepositorySet(repository);

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/RepositoryWrapper.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/RepositoryWrapper.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/RepositoryWrapper.java	Wed Jun 23 16:25:25 2004
@@ -23,15 +23,15 @@
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.common.util.debug.DebugUtils;
 import org.apache.depot.common.util.debug.Dumpable;
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.Repository;
+import org.apache.depot.update.RepositoryManifest;
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.artifact.ArtifactGroup;
+import org.apache.depot.update.monitor.ArtifactEvent;
 import org.apache.depot.update.monitor.Monitor;
-import org.apache.depot.update.monitor.ResourceEvent;
 import org.apache.depot.update.repository.RepositoryCapability;
 import org.apache.depot.update.repository.RepositoryException;
-import org.apache.depot.update.repository.RepositoryManifest;
 import org.apache.depot.update.util.select.ISelector;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
@@ -201,9 +201,9 @@
 			//
 			for (Iterator i = resources.iterator(); i.hasNext();) {
 				Monitor.getMonitor().notify(
-					new ResourceEvent(
-						ResourceEvent.LISTED,
-						(Artifact) i.next()));
+					new ArtifactEvent(
+						ArtifactEvent.LISTED,
+						(ArtifactInstance) i.next()));
 			}
 		}
 		catch (Exception e) {
@@ -223,7 +223,7 @@
 	 * @param selector
 	 * @return
 	*/
-	public void deleteResource(Artifact resource) throws UpdateException {
+	public void deleteResource(ArtifactInstance resource) throws UpdateException {
 
 		Logger.getLogger().debug(
 			Messages.getString(
@@ -254,7 +254,7 @@
 	 * @param selector
 	 * @return
 	*/
-	public Artifact publishResource(Artifact resource) throws UpdateException {
+	public ArtifactInstance publishResource(ArtifactInstance resource) throws UpdateException {
 
 		Logger.getLogger().debug(
 			Messages.getString(
@@ -266,7 +266,7 @@
 		if (!m_initialized)
 			initialize(m_context);
 
-		Artifact publishedArtifact = null;
+		ArtifactInstance publishedArtifact = null;
 		try {
 			publishedArtifact =
 				m_repository.publishArtifact(m_context, resource);

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/messaging/ResourceResponse.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/messaging/ResourceResponse.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/messaging/ResourceResponse.java	Wed Jun 23 16:25:25 2004
@@ -17,7 +17,7 @@
 package org.apache.depot.update.messaging;
 
 import org.apache.depot.common.util.note.AnnotationScratchpad;
-import org.apache.depot.update.query.ResourceResult;
+import org.apache.depot.update.query.ArtifactResult;
 
 
 /**
@@ -25,7 +25,7 @@
  *
  */
 public class ResourceResponse {
-	private ResourceResult m_result;
+	private ArtifactResult m_result;
 	private AnnotationScratchpad m_actions;
 	
 	
@@ -39,7 +39,7 @@
 	/**
 	 * @return
 	 */
-	public ResourceResult getResult() {
+	public ArtifactResult getResult() {
 		return m_result;
 	}
 
@@ -53,7 +53,7 @@
 	/**
 	 * @param result
 	 */
-	public void setResult(ResourceResult result) {
+	public void setResult(ArtifactResult result) {
 		m_result = result;
 	}
 

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/monitor/ArtifactEvent.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/monitor/ArtifactEvent.java	Wed Jun 23 16:25:25 2004
@@ -0,0 +1,68 @@
+/*
+ * Copyright  2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.depot.update.monitor;
+
+import org.apache.depot.update.ArtifactInstance;
+
+/**
+ * @author arb_jack
+ */
+public class ArtifactEvent extends MonitorEvent {
+
+	public static final int UNSET = 0;
+	public static final int LISTED = 1;
+	public static final int RESULT = 2;
+
+	private int m_type = UNSET;
+	private ArtifactInstance m_artifact = null;
+
+	public ArtifactEvent(int type, ArtifactInstance artifact) {
+		m_type = type;
+		m_artifact = artifact;
+	}
+
+	/**
+	 * @return
+	 */
+	public ArtifactInstance getArtifactInstance() {
+		return m_artifact;
+	}
+
+	/**
+	 * @param artifact
+	 */
+	public void setArtifactInstance(ArtifactInstance artifact) {
+		m_artifact = artifact;
+	}
+
+	/**
+	 * @return
+	 */
+	public int getType() {
+		return m_type;
+	}
+
+	/**
+	 * @param i
+	 */
+	public void setType(int i) {
+		m_type = i;
+	}
+
+	public boolean isListed() { return LISTED == m_type; }
+	public boolean isResult() { return RESULT == m_type; }
+}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/monitor/StatisticsMonitor.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/monitor/StatisticsMonitor.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/monitor/StatisticsMonitor.java	Wed Jun 23 16:25:25 2004
@@ -23,7 +23,7 @@
 
 import org.apache.depot.common.util.debug.DebugUtils;
 import org.apache.depot.common.util.debug.Dumpable;
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 
 /**
  * @author anou_mana
@@ -38,7 +38,7 @@
 	private List m_ignoredObjects = null;
 	private List m_parsedObjects = null;
 
-	private List m_resources = null;
+	private List m_artifacts = null;
 	private List m_misgrouped = null;
 	private List m_namegrouped = null;
 
@@ -51,7 +51,7 @@
 		m_ignoredObjects = new ArrayList();
 		m_parsedObjects = new ArrayList();
 
-		m_resources = new ArrayList();
+		m_artifacts = new ArrayList();
 		m_misgrouped = new ArrayList();
 		m_namegrouped = new ArrayList();
 	}
@@ -80,26 +80,26 @@
 						break;
 					}
 			}
-		} else if (event instanceof ResourceEvent) {
-			ResourceEvent resourceEvent = (ResourceEvent) event;
+		} else if (event instanceof ArtifactEvent) {
+			ArtifactEvent artifactEvent = (ArtifactEvent) event;
 
 			//
 			//			switch (resourceEvent.getType()) {
 			//				case ResourceEvent.LISTED :
 			//					{
-			Artifact resource = resourceEvent.getResource();
+			ArtifactInstance artifact = artifactEvent.getArtifactInstance();
 
-			m_resources.add(resource);
+			m_artifacts.add(artifact);
 
-			String groupName = resource.getGroup().getGroup();
-			String resourceName = resource.getIdentifier().getId();
+			String groupName = artifact.getArtifact().getGroup().getGroup();
+			String artifactName = artifact.getIdentifier().getId();
 
-			if (!groupName.equals(resourceName)) {
+			if (!groupName.equals(artifactName)) {
 
 				boolean contains = false;
 				String guess = null;
 				for (StringTokenizer tokens =
-					new StringTokenizer(resourceName, "-");
+					new StringTokenizer(artifactName, "-");
 					tokens.hasMoreTokens();
 					) {
 					String token = tokens.nextToken();
@@ -109,14 +109,14 @@
 					else
 						guess += '-' + token;
 
-					if (guess.equals(resourceName))
+					if (guess.equals(artifactName))
 						contains = true;
 				}
 
 				if (!contains) {
 					guess = null;
 					for (StringTokenizer tokens =
-						new StringTokenizer(resourceName, "_");
+						new StringTokenizer(artifactName, "_");
 						tokens.hasMoreTokens();
 						) {
 						String token = tokens.nextToken();
@@ -126,15 +126,15 @@
 						else
 							guess += '_' + token;
 
-						if (guess.equals(resourceName))
+						if (guess.equals(artifactName))
 							contains = true;
 					}
 				}
 
 				if (!contains)
-					m_misgrouped.add(resource);
+					m_misgrouped.add(artifact);
 				else
-					m_namegrouped.add(resource);
+					m_namegrouped.add(artifact);
 			}
 			//						break;
 			//					}
@@ -184,8 +184,8 @@
 		out.println(m_parsed);
 
 		out.print(indent);
-		out.print("Resources  : ");
-		out.println(m_resources.size());
+		out.print("Artifacts  : ");
+		out.println(m_artifacts.size());
 
 		out.print(indent);
 		out.print("MisGrouped  : ");
@@ -197,7 +197,7 @@
 
 		if (verbose) {
 			DebugUtils.printSeparator(out, depth);
-			DebugUtils.dump(out, depth, "Resources", verbose, m_resources);
+			DebugUtils.dump(out, depth, "Resources", verbose, m_artifacts);
 
 			DebugUtils.printSeparator(out, depth);
 			DebugUtils.dump(out, depth, "Parsed", verbose, m_parsedObjects);

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ArtifactQueryHelper.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ArtifactQueryHelper.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ArtifactQueryHelper.java	Wed Jun 23 16:25:25 2004
@@ -20,9 +20,9 @@
 
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.artifact.ArtifactGroup;
-import org.apache.depot.update.artifact.ArtifactSpecifier;
 import org.apache.depot.update.artifact.compare.StandardArtifactComparisons;
 import org.apache.depot.update.artifact.select.StandardSelections;
 import org.apache.depot.update.repository.RepositorySet;
@@ -37,39 +37,34 @@
  */
 public class ArtifactQueryHelper {
 
-	public static ArtifactQuery getResourceQuery(Artifact resource)
+	public static ArtifactQuery getArtifactQuery(ArtifactInstance instance)
 		throws UpdateException {
-		return getResourceSpecifierQuery(resource.getSpecifier());
+		return getArtifactQuery(instance.getArtifact());
 	}
 
-	public static ArtifactQuery getResourceSpecifierQuery(Artifact resource)
-		throws UpdateException {
-		return getResourceSpecifierQuery(resource.getSpecifier());
-	}
-
-	public static ArtifactQuery getResourceSpecifierQuery(
-		Artifact resource,
+	public static ArtifactQuery getArtifactQuery(
+		ArtifactInstance instance,
 		RepositorySet repos)
 		throws UpdateException {
-		return getResourceSpecifierQuery(resource.getSpecifier(), repos);
+		return getArtifactQuery(instance.getArtifact(), repos);
 	}
 
-	public static ArtifactQuery getResourceSpecifierQuery(ArtifactSpecifier specifier)
+	public static ArtifactQuery getArtifactQuery(Artifact artifact)
 		throws UpdateException {
-		return getResourceSpecifierQuery(
-			specifier,
+		return getArtifactQuery(
+			artifact,
 			RepositorySet.getRepositorySet(UpdateConstants.DEFAULT, true));
 	}
 
-	public static ArtifactQuery getResourceSpecifierQuery(
-		ArtifactSpecifier specifier,
+	public static ArtifactQuery getArtifactQuery(
+		Artifact artifact,
 		RepositorySet repos)
 		throws UpdateException {
 
-		ArtifactQuery resourceQuery = null;
-		if (specifier != null) {
+		ArtifactQuery artifactQuery = null;
+		if (artifact != null) {
 
-			ISelector where = StandardSelections.getNamedTypedVersion(specifier);
+			ISelector where = StandardSelections.getNamedTypedVersion(artifact);
 			Comparator orderBy =
 				StandardArtifactComparisons
 					.getNameTypeVersionComparatorSequence();
@@ -77,9 +72,9 @@
 			Comparator groupBy =
 				StandardArtifactComparisons.getNameVersionComparatorSequence();
 
-			resourceQuery =
+			artifactQuery =
 				new ArtifactQuery(
-					specifier.getGroup(),
+					artifact.getGroup(),
 					repos,
 					where,
 					groupBy,
@@ -91,22 +86,22 @@
 
 			throw new UpdateException(message);
 		}
-		return resourceQuery;
+		return artifactQuery;
 	}
 
-	public static ArtifactQuery getResourceGroupQuery(ArtifactGroup group)
+	public static ArtifactQuery getArtifactGroupQuery(ArtifactGroup group)
 		throws UpdateException {
-		return getResourceGroupQuery(
+		return getArtifactGroupQuery(
 			group,
 			RepositorySet.getRepositorySet(UpdateConstants.DEFAULT, true));
 	}
 
-	public static ArtifactQuery getResourceGroupQuery(
+	public static ArtifactQuery getArtifactGroupQuery(
 		ArtifactGroup group,
 		RepositorySet repos)
 		throws UpdateException {
 
-		ArtifactQuery resourceQuery = null;
+		ArtifactQuery artifactQuery = null;
 		if (group != null) {
 
 			//
@@ -119,7 +114,7 @@
 			Comparator groupBy =
 				StandardArtifactComparisons.getNameVersionComparatorSequence();
 
-			resourceQuery =
+			artifactQuery =
 				new ArtifactQuery(group, repos, where, groupBy, orderBy);
 
 		}
@@ -129,7 +124,7 @@
 
 			throw new UpdateException(message);
 		}
-		return resourceQuery;
+		return artifactQuery;
 	}
 
 }

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ArtifactResult.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ArtifactResult.java	Wed Jun 23 16:25:25 2004
@@ -0,0 +1,122 @@
+/*
+ * Copyright  2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.depot.update.query;
+
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.depot.common.util.debug.DebugUtils;
+import org.apache.depot.common.util.debug.Dumpable;
+import org.apache.depot.common.util.note.AnnotationScratchpad;
+import org.apache.depot.update.ArtifactInstance;
+
+/**
+ * @author arb_jack
+ *
+ * A ResourceResult is a list of lists of resources.
+ *  
+ */
+public class ArtifactResult extends ArrayList implements Dumpable {
+
+	public boolean m_successful = true;
+	public AnnotationScratchpad m_notes = null;
+
+	/**
+	 * 
+	 */
+	public ArtifactResult() {
+		super();
+		classInit();
+	}
+
+	/**
+	 * @param arg0
+	 */
+	public ArtifactResult(int arg0) {
+		super(arg0);
+		classInit();
+	}
+
+	/**
+	 * @param arg0
+	 */
+	public ArtifactResult(Collection arg0) {
+		super(arg0);
+		classInit();
+	}
+
+	private void classInit() {
+		m_notes = new AnnotationScratchpad();
+	}
+
+	/**
+	 * @return
+	 */
+	public AnnotationScratchpad getNotes() {
+		return m_notes;
+	}
+
+	/**
+	 * @return
+	 */
+	public boolean isSuccessful() {
+		return m_successful;
+	}
+
+	/**
+	 * @param scratchpad
+	 */
+	public void setNotes(AnnotationScratchpad scratchpad) {
+		m_notes = scratchpad;
+	}
+
+	/**
+	 * @param b
+	 */
+	public void setSuccessful(boolean b) {
+		m_successful = b;
+	}
+	public void dump(PrintWriter out, int depth, boolean verbose) {
+		//String indent = DebugUtils.getIndent(depth);
+
+		out.println("Successful:" + m_successful);
+		
+		DebugUtils.printSeparator(out,depth+1);
+		DebugUtils.dumpList(out, depth + 1, "Resources: ", verbose, this);
+		
+		if ( (null != m_notes) && m_notes.hasAnnotations())
+		{
+			DebugUtils.printSeparator(out,depth+1);
+			m_notes.dump(out,depth+1,verbose);
+			
+		}
+
+	}
+
+	/**
+	 * @param this
+	 * @return
+	 */
+	public static ArtifactInstance getFirstArtifact(ArtifactResult res) {
+		List l = (List) res.get(0);
+		ArtifactInstance resource = (ArtifactInstance) l.get(0);
+		return resource;
+	}
+
+}

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ArtifactResultHelper.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ArtifactResultHelper.java	Wed Jun 23 16:25:25 2004
@@ -0,0 +1,174 @@
+/*
+ * Copyright  2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.depot.update.query;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.depot.update.ArtifactInstance;
+
+/**
+ * @author arb_jack
+ *
+ * A ResourceResultHelper.
+ *  
+ */
+public class ArtifactResultHelper {
+
+	public static boolean noResult(ArtifactResult result) {
+		return (
+			(null == result)
+				|| result.isEmpty()
+				|| (null == getResourceList(result))
+				|| getResourceList(result).isEmpty());
+	}
+
+	public static int groupCount(ArtifactResult result) {
+		return (null == result) ? 0 : result.size();
+	}
+
+	public static int resourceCount(ArtifactResult result) {
+		int resources = 0;
+
+		for (Iterator i = result.iterator(); i.hasNext();) {
+			resources += ((List) i.next()).size();
+		}
+
+		return resources;
+	}
+
+	public static List getResourceList(ArtifactResult result) {
+		List list = null;
+
+		int size = result.size();
+
+		if (0 != size) {
+			// Return the 'last' list, since the normal 
+			// order sort will put 'best' last.
+			list = (List) result.get(size - 1);
+		}
+
+		return list;
+	}
+
+	/**
+	 * Get contents of all lists
+	 *  
+	 * @param result
+	 * @return
+	*/
+	public static List getAllResources(ArtifactResult result) {
+		List list = new ArrayList();
+
+		for (Iterator j = result.iterator(); j.hasNext();) {
+			List resources = (List) j.next();
+
+			for (Iterator i = resources.iterator(); i.hasNext();) {
+				list.add(i.next());
+			}
+		}
+
+		return list;
+	}
+
+	
+	/**
+	 * Get contents of all lists but last one (the 'best')
+	 *  
+	 * @param result
+	 * @return
+	*/
+	public static List getRemainderResources(ArtifactResult result) {
+		List list = new ArrayList();
+
+		// Return contents of all, but last..
+		List lists = getRemainderResourceLists(result);
+
+		for (Iterator j = lists.iterator(); j.hasNext();) {
+			List resources = (List) j.next();
+
+			for (Iterator i = resources.iterator(); i.hasNext();) {
+				list.add(i.next());
+			}
+		}
+
+		return list;
+	}
+
+	/**
+	 * Get all lists but last one (the 'best')
+	 *  
+	 * @param result
+	 * @return
+	 */
+	public static List getRemainderResourceLists(ArtifactResult result) {
+		List list = new ArrayList();
+
+		int size = result.size();
+
+		if (0 != size) {
+			// Return contents of all, but last..
+			for (int j = 0; j < (size - 1); ++j) {
+				list.add(result.get(j));
+			}
+		}
+
+		return list;
+	}
+
+	// Two results sets compare based off the comparison of their last
+	// entry (ascending sort)(of their first list)
+	public static int compareTo(
+		ArtifactResult result1,
+		ArtifactResult result2,
+		Comparator comp) {
+		int comparison = 0;
+
+		List list1 = ArtifactResultHelper.getResourceList(result1);
+		List list2 = ArtifactResultHelper.getResourceList(result2);
+
+		if (null != list1) {
+			if (null != list2) {
+				if (!list1.isEmpty()) {
+					if (!list2.isEmpty()) {
+
+						//:TODO: Hmm ... sort w/ comp?
+
+						ArtifactInstance resource1 =
+							(ArtifactInstance) list1.get(list1.size() - 1);
+						ArtifactInstance resource2 =
+							(ArtifactInstance) list2.get(list2.size() - 1);
+
+						comparison = comp.compare(resource1, resource2);
+					}
+					else
+						comparison = 1;
+				}
+				else if (!list2.isEmpty())
+					comparison = -1;
+			}
+			else
+				comparison = 1;
+		}
+		else if (null != list2)
+			comparison = -1;
+
+		return comparison;
+	}
+}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/query/DefaultQueryEngine.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/query/DefaultQueryEngine.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/query/DefaultQueryEngine.java	Wed Jun 23 16:25:25 2004
@@ -24,14 +24,14 @@
 
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.common.util.debug.DebugUtils;
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.artifact.ArtifactGroup;
 import org.apache.depot.update.artifact.compare.StandardArtifactComparisons;
 import org.apache.depot.update.impl.RepositorySetWrapper;
 import org.apache.depot.update.impl.RepositoryWrapper;
+import org.apache.depot.update.monitor.ArtifactEvent;
 import org.apache.depot.update.monitor.Monitor;
-import org.apache.depot.update.monitor.ResourceEvent;
 import org.apache.depot.update.util.select.AllSelector;
 import org.apache.depot.update.util.select.ISelector;
 import org.apache.depot.update.util.text.MessageConstants;
@@ -50,7 +50,7 @@
 	 * @return
 	 * @throws UpdateException
 	 */
-	public ResourceResult queryRepositories(
+	public ArtifactResult queryRepositories(
 		RepositorySetWrapper wrappers,
 		ArtifactQuery query)
 		throws UpdateException {
@@ -73,7 +73,7 @@
 	 * @param query
 	 * @return
 	 */
-	public ResourceResult queryResources(List resources, ArtifactQuery query) {
+	public ArtifactResult queryResources(List resources, ArtifactQuery query) {
 		//		if (Logger.getLog().isDebug()) {
 		//			DebugUtils.printSeparator();
 		//			DebugUtils.dump(query);
@@ -82,7 +82,7 @@
 		//
 		// A result object, and the results (unpackaged) list
 		//
-		ResourceResult result = new ResourceResult();
+		ArtifactResult result = new ArtifactResult();
 
 		//
 		// Package the results..
@@ -123,13 +123,13 @@
 				DebugUtils.dump("Final (Grouped/Ordered) Results", result);
 
 				for (Iterator i =
-					ResourceResultHelper.getResourceList(result).iterator();
+					ArtifactResultHelper.getResourceList(result).iterator();
 					i.hasNext();
 					) {
 					Monitor.getMonitor().notify(
-						new ResourceEvent(
-							ResourceEvent.RESULT,
-							(Artifact) i.next()));
+						new ArtifactEvent(
+							ArtifactEvent.RESULT,
+							(ArtifactInstance) i.next()));
 				}
 			}
 
@@ -216,7 +216,7 @@
 	//
 	//
 	private void groupBy(
-		ResourceResult result,
+		ArtifactResult result,
 		List allResults,
 		Comparator groupBy) {
 
@@ -228,10 +228,10 @@
 			// no?
 			Collections.sort(allResults, groupBy);
 
-			Artifact currentResource = null;
+			ArtifactInstance currentResource = null;
 			List currentList = null;
 			for (Iterator i = allResults.iterator(); i.hasNext();) {
-				Artifact resource = (Artifact) i.next();
+				ArtifactInstance resource = (ArtifactInstance) i.next();
 
 				// Do we have a new group?
 				if ((null == currentList)
@@ -259,7 +259,7 @@
 	//
 	// Sort each sub-list by the order comparator
 	//
-	private void orderBy(ResourceResult result, Comparator orderBy) {
+	private void orderBy(ArtifactResult result, Comparator orderBy) {
 		if (null != orderBy)
 			for (Iterator i = result.iterator(); i.hasNext();) {
 				List currentList = (List) i.next();

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/AbstractHierarchicalRepository.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/AbstractHierarchicalRepository.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/AbstractHierarchicalRepository.java	Wed Jun 23 16:25:25 2004
@@ -21,7 +21,8 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
+import org.apache.depot.update.RepositoryManifest;
 import org.apache.depot.update.artifact.ArtifactGroup;
 import org.apache.depot.update.artifact.compare.StandardArtifactComparisons;
 import org.apache.depot.update.impl.ArtifactUpdaterContext;
@@ -144,7 +145,7 @@
 				results = new ArrayList(unique.size());
 
 				for (Iterator i = unique.iterator(); i.hasNext();) {
-					results.add(((Artifact) i.next()).getSpecifier());
+					results.add(((ArtifactInstance) i.next()).getArtifact());
 				}
 			}
 			else

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/AbstractRepository.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/AbstractRepository.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/AbstractRepository.java	Wed Jun 23 16:25:25 2004
@@ -23,15 +23,15 @@
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.common.util.debug.DebugUtils;
 import org.apache.depot.common.util.debug.Dumpable;
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.Repository;
 import org.apache.depot.update.artifact.ArtifactGroup;
 import org.apache.depot.update.files.DefaultResourceFilenameAnalyzer;
 import org.apache.depot.update.files.DefaultResourceGroupFilenameAnalyzer;
 import org.apache.depot.update.files.IResourceFilenameAnalyzer;
 import org.apache.depot.update.files.IResourceGroupFilenameAnalyzer;
-import org.apache.depot.update.impl.ReferenceManager;
 import org.apache.depot.update.impl.ArtifactUpdaterContext;
+import org.apache.depot.update.impl.ReferenceManager;
 import org.apache.depot.update.util.identity.GenericIdentifier;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
 import org.apache.depot.update.util.net.select.MatchingVrlSelector;
@@ -166,16 +166,16 @@
 
 	public void deleteArtifact(
 		ArtifactUpdaterContext context,
-		Artifact artifact)
+		ArtifactInstance artifact)
 		throws Exception {
 		throw new RepositoryException(
 			this,
 			"Unsupported Capability: " + RepositoryCapability.DELETABLE);
 	}
 
-	public Artifact publishArtifact(
+	public ArtifactInstance publishArtifact(
 		ArtifactUpdaterContext context,
-		Artifact artifact)
+		ArtifactInstance artifact)
 		throws Exception {
 		if (true)
 			throw new RepositoryException(

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/ApacheRepository.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/ApacheRepository.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/ApacheRepository.java	Wed Jun 23 16:25:25 2004
@@ -16,6 +16,7 @@
 package org.apache.depot.update.repository;
 import java.util.List;
 
+import org.apache.depot.update.RepositoryManifest;
 import org.apache.depot.update.artifact.ArtifactGroup;
 import org.apache.depot.update.impl.ArtifactUpdaterContext;
 import org.apache.depot.update.util.net.VirtualResourceLocator;

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/DefaultRepository.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/DefaultRepository.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/DefaultRepository.java	Wed Jun 23 16:25:25 2004
@@ -20,11 +20,11 @@
 
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.common.util.SystemUtils;
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.Repository;
 import org.apache.depot.update.artifact.ArtifactGroup;
-import org.apache.depot.update.impl.ReferenceManager;
 import org.apache.depot.update.impl.ArtifactUpdaterContext;
+import org.apache.depot.update.impl.ReferenceManager;
 import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.io.ResolvedFile;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
@@ -125,26 +125,27 @@
 		return results;
 	}
 
-	public Artifact publishArtifact(ArtifactUpdaterContext context,
-			Artifact resource) throws Exception {
+	public ArtifactInstance publishArtifact(ArtifactUpdaterContext context,
+			ArtifactInstance instance) throws Exception {
 
-		// Create the 'remote' resource
-		Artifact publishedResource = new Artifact(resource);
-		publishedResource.setLocation(new VirtualResourceLocator(
-				folderForGroup(resource.getGroup()), resource.getFilename()));
+		// Create the 'remote' instance
+		ArtifactInstance publishedInstance = new ArtifactInstance(instance);
+		
+		publishedInstance.getLocator().setLocation(new VirtualResourceLocator(
+				folderForGroup(instance.getGroup()), instance.getFilename()));
 
 		// Perform copy
-		context.getProtocolManager().performCopy(resource.getLocation(),
-				publishedResource.getLocation(), AllSelector.getInstance());
+		context.getProtocolManager().performCopy(instance.getLocator().getLocation(),
+				publishedInstance.getLocation(), AllSelector.getInstance());
 
-		return publishedResource;
+		return publishedInstance;
 	}
 
-	public void deleteArtifact(ArtifactUpdaterContext context, Artifact resource)
+	public void deleteArtifact(ArtifactUpdaterContext context, ArtifactInstance instance)
 			throws Exception {
 
 		// Perform copy
-		context.getProtocolManager().performDelete(resource.getLocation(),
+		context.getProtocolManager().performDelete(instance.getLocation(),
 				AllSelector.getInstance());
 	}
 
@@ -154,7 +155,7 @@
 				new VirtualResourceLocator(
 						new VirtualResourceLocator(
 								ResolvedFile.resolve(SystemUtils.getCWD().getAbsolutePath())),
-						"src/resources/test/repo"));
+						"src/artifacts/test/repo"));
 	}
 
 	public static Repository getRepository(String identifier) {

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/MockRepository.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/MockRepository.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/MockRepository.java	Wed Jun 23 16:25:25 2004
@@ -19,9 +19,10 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.Repository;
 import org.apache.depot.update.artifact.ArtifactGroup;
+import org.apache.depot.update.artifact.ArtifactLocator;
 import org.apache.depot.update.impl.ArtifactUpdaterContext;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
 import org.apache.depot.update.util.select.ISelector;
@@ -59,22 +60,25 @@
 
 		folderForGroup(group);
 
-		List resourceList = Artifact.getTestResourceList(group.getGroup(), 10);
+		List resourceList = ArtifactInstance.getTestArtifactList(group.getGroup(), 10);
 
 		results = SelectionHelper.select(resourceList, selector);
 
 		return results;
 	}
 
-	public Artifact publishArtifact(ArtifactUpdaterContext context,
-			Artifact resource) throws Exception {
+	public ArtifactInstance publishArtifact(ArtifactUpdaterContext context,
+			ArtifactInstance instance) throws Exception {
 
-		Artifact publishedResource = new Artifact(resource);
+		ArtifactInstance publishedArtifact = new ArtifactInstance(
+				instance.getArtifact(),
+				new ArtifactLocator(instance.getLocator().getFilename(),
+						instance.getLocator().getExtension(),
+						new VirtualResourceLocator(
+								folderForGroup(instance.getArtifact().getGroup()),
+								instance.getLocator().getFilename())));
 
-		publishedResource.setLocation(new VirtualResourceLocator(
-				folderForGroup(resource.getGroup()), resource.getFilename()));
-
-		return publishedResource;
+		return publishedArtifact;
 	}
 	
 	public void initialize(ArtifactUpdaterContext context) throws Exception {

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositoryManager.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositoryManager.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositoryManager.java	Wed Jun 23 16:25:25 2004
@@ -21,8 +21,8 @@
 
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.update.UpdateException;
-import org.apache.depot.update.impl.ReferenceManager;
 import org.apache.depot.update.impl.ArtifactUpdaterEngine;
+import org.apache.depot.update.impl.ReferenceManager;
 import org.apache.depot.update.query.ArtifactQuery;
 import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.chainprocess.HandlerChain;

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/sample/FileAssistant.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/sample/FileAssistant.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/sample/FileAssistant.java	Wed Jun 23 16:25:25 2004
@@ -21,11 +21,10 @@
 import java.util.List;
 
 import org.apache.depot.common.util.SystemUtils;
-import org.apache.depot.update.Artifact;
-import org.apache.depot.update.UpdateException;
-import org.apache.depot.update.artifact.ArtifactSpecifier;
-import org.apache.depot.update.files.DefaultResourceFilenameAnalyzer;
-import org.apache.depot.update.files.IResourceFilenameAnalyzer;
+import org.apache.depot.update.Artifactt org.apache.depot.update.UpdateExUpdateException
+import org.apache.depot.update.ffiles.DefaultResourceFilenameAnalyzerourceFilenameAnalyzer;
+import org.apachIResourceFilenameAnalyzerilenameAnalyzer;
+import org.apachimploArtifactInstancetance;
 import org.apache.depot.update.util.io.ResolvedFile;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
 
@@ -99,9 +98,9 @@
      *
      * @throws UpdateException TODO
      */
-    public ArtifactSpecifier getResourceSpecifierForFile(File file)
+    public Artifact getResourceSpecifierForFile(File file)
                                                   throws UpdateException {
-        Artifact resource = analyzer.determineResource(file);
+        ArtifactInstance resource = analyzer.determineResource(file);
 
         return resource.getSpecifier();
     }

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/sample/FileUpdater.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/sample/FileUpdater.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/sample/FileUpdater.java	Wed Jun 23 16:25:25 2004
@@ -27,8 +27,8 @@
 import org.apache.depot.update.messaging.ResourceRequest;
 import org.apache.depot.update.query.ArtifactQuery;
 import org.apache.depot.update.query.ArtifactQueryHelper;
-import org.apache.depot.update.query.ResourceResult;
-import org.apache.depot.update.query.ResourceResultHelper;
+import org.apache.depot.update.query.ArtifactResult;
+import org.apache.depot.update.query.ArtifactResultHelper;
 import org.apache.depot.update.repository.DefaultRepository;
 import org.apache.depot.update.repository.RepositoryAttribute;
 import org.apache.depot.update.repository.RepositoryConstants;
@@ -149,7 +149,7 @@
 		//
 		// Perform the query on the remote repository
 		//
-		ResourceResult resourceResult =
+		ArtifactResult resourceResult =
 			null; // :TODO: queryRepository(RepositoryConstants.REMOTE, resourceQuery);
 
 		//
@@ -161,15 +161,15 @@
 		localRepositorySet.addRepository(target);
 		resourceQuery.setRepositorySet(localRepositorySet);
 
-		ResourceResult targetResult =
+		ArtifactResult targetResult =
 			null; // :TODO: queryRepository(RepositoryConstants.LOCAL, resourceQuery);
 
 		//
 		// Assuming we found something in the main search repositories...
 		//
-		if (!ResourceResultHelper.noResult(resourceResult)) {
+		if (!ArtifactResultHelper.noResult(resourceResult)) {
 			// Compare Results Set using the OrderBy Comparator	
-			if (ResourceResultHelper
+			if (ArtifactResultHelper
 				.compareTo(
 					resourceResult,
 					targetResult,
@@ -177,7 +177,7 @@
 				> 0) {
 
 				List resources =
-					ResourceResultHelper.getResourceList(resourceResult);
+					ArtifactResultHelper.getResourceList(resourceResult);
 
 				Logger.getLogger().verbose(
 					Messages.getString(
@@ -238,14 +238,14 @@
 	}
 	*/
 	
-	public ResourceResult determineFilesUpdates(String fileName)
+	public ArtifactResult determineFilesUpdates(String fileName)
 		throws UpdateException {
 		return determineFilesUpdates(new File(fileName));
 	}
 
-	public ResourceResult determineFilesUpdates(File file)
+	public ArtifactResult determineFilesUpdates(File file)
 		throws UpdateException {
-		ResourceResult result = null;
+		ArtifactResult result = null;
 
 		ResolvedFile resolved = m_filer.resolveFile(file);
 
@@ -267,12 +267,12 @@
 		return result;
 	}
 
-	public ResourceResult determineFileUpdates(String fileName)
+	public ArtifactResult determineFileUpdates(String fileName)
 		throws UpdateException {
 		return determineFileUpdates(new File(fileName));
 	}
 
-	public ResourceResult determineFileUpdates(File file)
+	public ArtifactResult determineFileUpdates(File file)
 		throws UpdateException {
 
 		ResolvedFile resolved = m_filer.resolveFile(file);

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/ArtifactTool.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/ArtifactTool.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/ArtifactTool.java	Wed Jun 23 16:25:25 2004
@@ -19,11 +19,11 @@
 import org.apache.depot.common.util.cli.CommandLine;
 import org.apache.depot.common.util.cli.Option;
 import org.apache.depot.common.util.debug.DebugUtils;
-import org.apache.depot.update.artifact.ArtifactSpecifier;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.impl.ArtifactUpdaterEngine;
 import org.apache.depot.update.messaging.ResourceRequest;
 import org.apache.depot.update.query.ArtifactQueryHelper;
-import org.apache.depot.update.query.ResourceResult;
+import org.apache.depot.update.query.ArtifactResult;
 
 /**
  */
@@ -50,17 +50,17 @@
 
 		ArtifactUpdaterEngine ru = new ArtifactUpdaterEngine();
 
-		ArtifactSpecifier specifier = new ArtifactSpecifier(resource);
+		Artifact artifact = new Artifact(resource);
 
 		//
 		// Generare a request from a query
 		//
 		ResourceRequest request =
 			new ResourceRequest(
-				ArtifactQueryHelper.getResourceSpecifierQuery(specifier));
+				ArtifactQueryHelper.getArtifactQuery(artifact));
 
 		// :TODO: Hmm, ought request reply w/ Response (Query->Result)
-		ResourceResult result = ru.performRequest(request);
+		ArtifactResult result = ru.performRequest(request);
 
 		DebugUtils.dump(result);
 	}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/RepositoryTool.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/RepositoryTool.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/RepositoryTool.java	Wed Jun 23 16:25:25 2004
@@ -24,15 +24,16 @@
 import org.apache.depot.common.util.cli.CommandLine;
 import org.apache.depot.common.util.cli.Option;
 import org.apache.depot.common.util.debug.DebugUtils;
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 import org.apache.depot.update.ArtifactUpdater;
 import org.apache.depot.update.Repository;
 import org.apache.depot.update.artifact.ArtifactGroup;
-import org.apache.depot.update.impl.RepositoryWrapper;
 import org.apache.depot.update.impl.ArtifactUpdaterContext;
+import org.apache.depot.update.impl.RepositoryWrapper;
 import org.apache.depot.update.repository.DefaultRepository;
 import org.apache.depot.update.util.select.AllSelector;
 
+
 /**
  */
 public class RepositoryTool extends Tool {
@@ -126,7 +127,7 @@
 						repo.listResources(group, AllSelector.getInstance());
 
 					for (Iterator ii = resources.iterator(); ii.hasNext();) {
-						Artifact resource = (Artifact) ii.next();
+						ArtifactInstance resource = (ArtifactInstance) ii.next();
 
 						out.println("Resource : " + resource);
 					}

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/updater/ConfiguredArtifactUpdater.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/updater/ConfiguredArtifactUpdater.java	Wed Jun 23 16:25:25 2004
@@ -0,0 +1,68 @@
+/*
+ * Copyright  2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.depot.update.updater;
+
+import org.apache.depot.update.ArtifactUpdater;
+import org.apache.depot.update.UpdateException;
+import org.apache.depot.update.config.UpdateConfig;
+
+/**
+ * A StandardResourceUpdater is a {@link org.apache.depot.update.updater.DefaultArtifactUpdater }
+ * that configures itself from an XML configuration file.
+ * 
+ * @author arb_jack
+ */
+public class ConfiguredArtifactUpdater extends DefaultArtifactUpdater {
+	
+	private String m_filename = "updater.xml";
+	
+	/**
+	 * @param id
+	 * @throws UpdateException
+	 */
+	public ConfiguredArtifactUpdater(String id, String filename) throws UpdateException {
+		super(id);
+		
+		m_filename = filename;
+		
+		initClass();
+	}
+
+	/**
+	 * @param id
+	 * @throws UpdateException
+	 */
+	public ConfiguredArtifactUpdater(ArtifactUpdater.Identifier id, String filename)
+		throws UpdateException {
+		super(id);
+		m_filename = filename;
+		initClass();
+	}
+
+	/**
+	 * @throws UpdateException
+	 */
+	public ConfiguredArtifactUpdater() throws UpdateException {
+		super();
+		initClass();
+	}
+	
+	private void initClass() {
+		// Configure from the XML file...
+		UpdateConfig.configure(m_filename);
+	}
+}

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/updater/DefaultArtifactUpdater.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/updater/DefaultArtifactUpdater.java	Wed Jun 23 16:25:25 2004
@@ -0,0 +1,63 @@
+/*
+ * Copyright  2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.depot.update.updater;
+
+import org.apache.depot.update.ArtifactUpdater;
+import org.apache.depot.update.UpdateException;
+import org.apache.depot.update.sample.FileUpdater;
+
+
+
+/**
+ * A DefaultResourceUpdater is a {@link org.apache.depot.update.ArtifactUpdater} with the
+ * default settings selected.
+ * 
+ * @see FileUpdater, DefaultResourceUpdater, StandardResourceUpdater
+ * 
+ * @author arb_jack
+ */
+public class DefaultArtifactUpdater extends ArtifactUpdater {
+
+
+	/**
+	 * @param id
+	 * @throws UpdateException
+	 */
+	public DefaultArtifactUpdater(String id) throws UpdateException {
+		super(id);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @param id
+	 * @throws UpdateException
+	 */
+	public DefaultArtifactUpdater(ArtifactUpdater.Identifier id)
+		throws UpdateException {
+		super(id);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * @throws UpdateException
+	 */
+	public DefaultArtifactUpdater() throws UpdateException {
+		super();
+		// TODO Auto-generated constructor stub
+	}
+
+}

Modified: incubator/depot/trunk/update/src/test/org/apache/depot/update/artifact/ArtifactTests.java
==============================================================================
--- incubator/depot/trunk/update/src/test/org/apache/depot/update/artifact/ArtifactTests.java	(original)
+++ incubator/depot/trunk/update/src/test/org/apache/depot/update/artifact/ArtifactTests.java	Wed Jun 23 16:25:25 2004
@@ -19,7 +19,7 @@
 import junit.framework.TestCase;
 
 import org.apache.depot.common.log.Logger;
-import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactInstance;
 
 /**
  * @author arb_jack
@@ -39,8 +39,8 @@
 	}
 
 	public void testArtifactEquality1() throws Exception {
-		Artifact r1 = Artifact.getTestResource();
-		Artifact r2 = Artifact.getTestResource();
+		ArtifactInstance r1 = ArtifactInstance.getTestResource();
+		ArtifactInstance r2 = ArtifactInstance.getTestResource();
 
 		assertEquals("Same are equal", r1, r2);
 		assertTrue("Same are equal", r1.equals(r2));
@@ -48,8 +48,8 @@
 	}
 
 	public void testArtifactEquality2() throws Exception {
-		Artifact r1 = Artifact.getTestResource();
-		Artifact r2 = Artifact.getTestResource("bogus");
+		ArtifactInstance r1 = ArtifactInstance.getTestResource();
+		ArtifactInstance r2 = ArtifactInstance.getTestResource("bogus");
 
 		assertFalse("Different are NOT equal", r1.equals(r2));
 		assertFalse(
@@ -58,8 +58,8 @@
 	}
 
 	public void testArtifactEquality3() throws Exception {
-		Artifact r1 = Artifact.getTestResource();
-		Artifact r2 = new Artifact(r1);
+		ArtifactInstance r1 = ArtifactInstance.getTestResource();
+		ArtifactInstance r2 = new ArtifactInstance(r1);
 
 		assertEquals("Clones are equal", r1, r2);
 		assertTrue("Clones are equal", r1.equals(r2));
@@ -67,8 +67,8 @@
 	}
 
 	public void testArtifactEquality4() throws Exception {
-		Artifact r1 = Artifact.getTestResource();
-		Artifact r2 = new Artifact(r1); r2.setExtension("bogus");
+		ArtifactInstance r1 = ArtifactInstance.getTestResource();
+		ArtifactInstance r2 = new ArtifactInstance(r1); r2.setExtension("bogus");
 
 		assertFalse("Different are NOT equal", r1.equals(r2));
 		assertFalse(

Modified: incubator/depot/trunk/update/src/test/org/apache/depot/update/files/DefaultResourceAnalyzerTests.java
==============================================================================
--- incubator/depot/trunk/update/src/test/org/apache/depot/update/files/DefaultResourceAnalyzerTests.java	(original)
+++ incubator/depot/trunk/update/src/test/org/apache/depot/update/files/DefaultResourceAnalyzerTests.java	Wed Jun 23 16:25:25 2004
@@ -21,9 +21,9 @@
 import junit.framework.TestCase;
 
 import org.apache.depot.common.util.debug.DebugUtils;
-import org.apache.depot.update.Artifact;
-import org.apache.depot.update.UpdateException;
-import org.apache.depot.update.artifact.ArtifactType;
+import org.apache.depot.update.UpdateException
+import org.apache.depot.update.aartifact.ArtifactTypetType;
+import org.apache.depot.upimpllArtifactInstancetance;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
 import org.apache.depot.version.Version;
 import org.apache.depot.version.impl.VersionImporter;
@@ -95,7 +95,7 @@
 				"1.2", "src", "fred.z"));
 	}
 
-	private Artifact createResource(String filename, String name, String v,
+	private ArtifactInstance createResource(String filename, String name, String v,
 			String t, String e) throws UpdateException {
 		Version version = null;
 		if (null != v) {
@@ -112,18 +112,18 @@
 			resourceType = ArtifactType.UNKNOWN;
 		
 
-		return new Artifact(name, version, resourceType, e, filename,
+		return new ArtifactInstance(name, version, resourceType, e, filename,
 				new VirtualResourceLocator(new VirtualResourceLocator(
 						"http://www.apache.org/depot"), filename));
 	}
 
-	private void checkResource(String pattern, Artifact expected)
+	private void checkResource(String pattern, ArtifactInstance expected)
 			throws UpdateException {
 
 		DebugUtils.printSeparator();
 		DebugUtils.dump(expected);
 
-		Artifact resource = m_analyzer.determineResource(pattern);
+		ArtifactInstance resource = m_analyzer.determineResource(pattern);
 
 		assertNotNull("Determined something", resource);
 

Modified: incubator/depot/trunk/update/src/test/org/apache/depot/update/files/ResourceAnalyzerTests.java
==============================================================================
--- incubator/depot/trunk/update/src/test/org/apache/depot/update/files/ResourceAnalyzerTests.java	(original)
+++ incubator/depot/trunk/update/src/test/org/apache/depot/update/files/ResourceAnalyzerTests.java	Wed Jun 23 16:25:25 2004
@@ -22,9 +22,9 @@
 
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.common.util.debug.DebugUtils;
-import org.apache.depot.update.Artifact;
-import org.apache.depot.update.UpdateException;
-import org.apache.depot.update.artifact.ArtifactType;
+import org.apache.depot.update.UpdateException
+import org.apache.depot.update.aartifact.ArtifactTypetType;
+import org.apache.depot.upimpllArtifactInstancetance;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
 import org.apache.depot.version.impl.ApacheVersion;
 
@@ -55,7 +55,7 @@
 		// Ought be jsut one thing in the list...
 		List expectedResults = new ArrayList();
 		expectedResults.add(
-			new Artifact(
+			new ArtifactInstance(
 				"mystuff",
 				new ApacheVersion("1.2"),
 				ArtifactType.JAVA_BINARY,
@@ -74,7 +74,7 @@
 		// Ought be jsut one thing in the list...
 		List expectedResults = new ArrayList();
 		expectedResults.add(
-			new Artifact(
+			new ArtifactInstance(
 				"mystuff",
 				null,
 				ArtifactType.JAVA_BINARY,
@@ -96,7 +96,7 @@
 		// Ought be jsut one thing in the list...
 		List expectedResults = new ArrayList();
 		expectedResults.add(
-			new Artifact(
+			new ArtifactInstance(
 				"mystuff",
 				new ApacheVersion("1.2"),
 				ArtifactType.JAVA_BINARY,
@@ -116,7 +116,7 @@
 		// Ought be jsut one thing in the list...
 		List expectedResults = new ArrayList();
 		expectedResults.add(
-			new Artifact(
+			new ArtifactInstance(
 				"mystuff",
 				new ApacheVersion("1.2"),
 				ArtifactType.JAVA_BINARY,
@@ -136,7 +136,7 @@
 			// Ought be just one thing in the list...
 			List expectedResults = new ArrayList();
 			expectedResults.add(
-				new Artifact(
+				new ArtifactInstance(
 					"my-stuff",
 					null,
 					ArtifactType.JAVA_BINARY,

Modified: incubator/depot/trunk/update/src/test/org/apache/depot/update/query/QueryTests.java
==============================================================================
--- incubator/depot/trunk/update/src/test/org/apache/depot/update/query/QueryTests.java	(original)
+++ incubator/depot/trunk/update/src/test/org/apache/depot/update/query/QueryTests.java	Wed Jun 23 16:25:25 2004
@@ -27,8 +27,8 @@
 import org.apache.depot.update.artifact.select.TypeSelector;
 import org.apache.depot.update.artifact.select.VersionSelector;
 import org.apache.depot.update.config.UpdateConfig;
-import org.apache.depot.update.impl.RepositorySetWrapper;
 import org.apache.depot.update.impl.ArtifactUpdaterContext;
+import org.apache.depot.update.impl.RepositorySetWrapper;
 import org.apache.depot.update.repository.RepositorySet;
 import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.select.logic.AndSelector;
@@ -136,40 +136,40 @@
 		performAndCount(query, 10, 20);
 	}
 
-	private ResourceResult performAndCountGroups(ArtifactQuery query, int size)
+	private ArtifactResult performAndCountGroups(ArtifactQuery query, int size)
 		throws UpdateException {
-		ResourceResult result = perform(query);
+		ArtifactResult result = perform(query);
 
 		assertEquals(
 			"Size Expected",
 			size,
-			ResourceResultHelper.groupCount(result));
+			ArtifactResultHelper.groupCount(result));
 
 		return result;
 	}
 
-	private ResourceResult performAndCount(
+	private ArtifactResult performAndCount(
 		ArtifactQuery query,
 		int groups,
 		int resources)
 		throws UpdateException {
-		ResourceResult result = perform(query);
+		ArtifactResult result = perform(query);
 
 		assertEquals(
 			"Groups Expected",
 			groups,
-			ResourceResultHelper.groupCount(result));
+			ArtifactResultHelper.groupCount(result));
 
 		assertEquals(
 			"Resources Expected",
 			resources,
-			ResourceResultHelper.resourceCount(result));
+			ArtifactResultHelper.resourceCount(result));
 
 		return result;
 	}
 
-	private ResourceResult perform(ArtifactQuery query) throws UpdateException {
-		ResourceResult result = m_engine.queryRepositories(m_repoSet, query);
+	private ArtifactResult perform(ArtifactQuery query) throws UpdateException {
+		ArtifactResult result = m_engine.queryRepositories(m_repoSet, query);
 
 		DebugUtils.dump(query);
 		DebugUtils.dump(result);

Modified: incubator/depot/trunk/update/src/test/org/apache/depot/update/repository/RepositoryTests.java
==============================================================================
--- incubator/depot/trunk/update/src/test/org/apache/depot/update/repository/RepositoryTests.java	(original)
+++ incubator/depot/trunk/update/src/test/org/apache/depot/update/repository/RepositoryTests.java	Wed Jun 23 16:25:25 2004
@@ -22,8 +22,8 @@
 
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.update.artifact.ArtifactGroup;
-import org.apache.depot.update.impl.RepositoryWrapper;
 import org.apache.depot.update.impl.ArtifactUpdaterContext;
+import org.apache.depot.update.impl.RepositoryWrapper;
 import org.apache.depot.update.util.select.AllSelector;
 
 /**

Modified: incubator/depot/trunk/update/src/test/org/apache/depot/update/usecases/FindTests.java
==============================================================================
--- incubator/depot/trunk/update/src/test/org/apache/depot/update/usecases/FindTests.java	(original)
+++ incubator/depot/trunk/update/src/test/org/apache/depot/update/usecases/FindTests.java	Wed Jun 23 16:25:25 2004
@@ -23,10 +23,8 @@
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
-import org.apache.depot.update.Artifact;
-import org.apache.depot.update.ArtifactUpdater;
-import org.apache.depot.update.Repository;
-import org.apache.depot.update.artifact.ArtifactSpecifier;
+import org.apache.depot.update.Artifactt org.apache.depot.update.ArtifactArtifactUpdater
+import org.apache.depot.update.RRepositoryort org.apache.depot.update.impl.Aimpl.ArtifactInstancetance;
 import org.apache.depot.update.query.ArtifactQuery;
 import org.apache.depot.update.query.ArtifactQueryHelper;
 import org.apache.depot.update.repository.DefaultRepository;
@@ -69,7 +67,7 @@
 		repos.addRepository(fileRepo);
 
 		//  2. User supplies resource query and asks Depot process it
-		ArtifactSpecifier specifier = new ArtifactSpecifier("gorilla");
+		Artifact specifier = new Artifact("gorilla");
 		ArtifactQuery query =
 				ArtifactQueryHelper.getResourceSpecifierQuery(
 					specifier,
@@ -82,7 +80,7 @@
 
 		assertNotNull("Should get a result", results);
 		assertEquals("Result had wrong size", 1, results.size());
-		Artifact resource = (Artifact) results.get(0);
+		ArtifactInstance resource = (ArtifactInstance) results.get(0);
 
 		VirtualResourceLocator expected =
 			new VirtualResourceLocator(ResolvedFile.resolve(resourceFile));

Mime
View raw message