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 21607 - in incubator/depot/trunk/update/src: java/org/apache/depot/update java/org/apache/depot/update/ant/cache java/org/apache/depot/update/ant/sync java/org/apache/depot/update/ant/tool java/org/apache/depot/update/files java/org/apache/depot/update/impl java/org/apache/depot/update/monitor java/org/apache/depot/update/query java/org/apache/depot/update/repository java/org/apache/depot/update/resource java/org/apache/depot/update/resource/compare java/org/apache/depot/update/resource/select java/org/apache/depot/update/sample java/org/apache/depot/update/tool test/org/apache/depot/update/files test/org/apache/depot/update/query test/org/apache/depot/update/repository test/org/apache/depot/update/resource test/org/apache/depot/update/usecases
Date Wed, 23 Jun 2004 16:04:52 GMT
Author: ajack
Date: Wed Jun 23 09:04:50 2004
New Revision: 21607

Added:
   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/DefaultArtifactUpdater.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/StandardArtifactUpdater.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactAttribute.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactAttributeMap.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactConstants.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactGroup.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactIdentifier.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactLocator.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactSpecifier.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactType.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/AbstractArtifactComparator.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/AbstractArtifactGroupComparator.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/ArtifactGroupNameComparator.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/StandardArtifactComparisons.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/AbstractArtifactSelector.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/ArtifactTool.java
   incubator/depot/trunk/update/src/test/org/apache/depot/update/resource/ArtifactTests.java
Removed:
   incubator/depot/trunk/update/src/java/org/apache/depot/update/DefaultResourceUpdater.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/Resource.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ResourceUpdater.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/StandardResourceUpdater.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ResourceAttribute.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ResourceAttributeMap.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ResourceConstants.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ResourceGroup.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ResourceIdentifier.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ResourceLocator.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ResourceSpecifier.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ResourceType.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/AbstractResourceComparator.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/AbstractResourceGroupComparator.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/ResourceGroupNameComparator.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/StandardResourceComparisons.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/AbstractResourceSelector.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/ResourceTool.java
   incubator/depot/trunk/update/src/test/org/apache/depot/update/resource/ResourceTests.java
Modified:
   incubator/depot/trunk/update/src/java/org/apache/depot/update/Repository.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedResourceSet.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/ResourceElement.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/sync/SynchronizeTask.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/files/DefaultResourceFilenameAnalyzer.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/files/DefaultResourceGroupFilenameAnalyzer.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/files/ExtensionTable.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/files/IResourceFilenameAnalyzer.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/files/IResourceGroupFilenameAnalyzer.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/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/impl/ResourceUpdaterEngine.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/monitor/ResourceEvent.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/DefaultQueryEngine.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceQuery.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceQueryHelper.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/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/RepositoryManifest.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/FilenameComparator.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/NameComparator.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/TypeComparator.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/VersionComparator.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/FilenameSelector.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/NameSelector.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/ReleaseLevelSelector.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/StandardSelections.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/TypeSelector.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/VersionConstraintsSelector.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/VersionSelector.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/sample/ClasspathUpdater.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/DownloaderTool.java
   incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/RepositoryTool.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
   incubator/depot/trunk/update/src/test/org/apache/depot/update/usecases/SynchronizeTests.java
Log:
Starting to rename Resource -> Artifact.


Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/Artifact.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/Artifact.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,441 @@
+/*
+ * 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.resource.ArtifactAttributeMap;
+import org.apache.depot.update.resource.ArtifactGroup;
+import org.apache.depot.update.resource.ArtifactIdentifier;
+import org.apache.depot.update.resource.ArtifactSpecifier;
+import org.apache.depot.update.resource.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 {
+
+	// What group is this in ?
+	private ArtifactGroup m_group = null;
+
+	// What is the id and type for this thing?
+	private ArtifactIdentifier m_identifier = null;
+	private ArtifactType m_type = null;
+
+	//
+	//	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 Version m_version = null;
+
+	//:TODO: We want this?
+	private String m_extension = null;
+
+	// Annotated attributes
+	private ArtifactAttributeMap m_attributes = null;
+
+	//
+	// Construct a Resource
+	//
+	public Artifact(
+		String name,
+		Version version,
+		ArtifactType type,
+		String extension,
+		String filename,
+		VirtualResourceLocator location) {
+
+		m_identifier = new ArtifactIdentifier(name);
+		m_group = new ArtifactGroup(m_identifier.getId());
+		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);
+		m_group = group;
+		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() {
+		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);
+	}
+
+	/**
+	 * @return
+	 */
+	public VirtualResourceLocator getLocation() {
+		return m_location;
+	}
+	/**
+	 * @return
+	 */
+	public String getExtension() {
+		return m_extension;
+	}
+
+	/**
+	 * @return
+	 */
+	public String getFilename() {
+		return m_filename;
+	}
+
+	/**
+	 * @return
+	 */
+	public ArtifactGroup getGroup() {
+		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("~");
+		}
+
+		buffer.append(m_identifier.toString());
+
+		if (null != m_location) {
+			buffer.append(':');
+			buffer.append(m_location.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);
+
+		out.print(indent);
+		out.println("Resource Identifier: " + m_identifier);
+
+		out.print(indent);
+		out.println("Resource Type: " + m_type);
+
+		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);
+		}
+
+		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));
+	}
+
+}

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/ArtifactUpdater.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ArtifactUpdater.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,667 @@
+/*
+ * 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.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.depot.common.log.Logger;
+import org.apache.depot.update.config.UpdateConfig;
+import org.apache.depot.update.impl.ReferenceManager;
+import org.apache.depot.update.impl.RepositoryObject;
+import org.apache.depot.update.impl.RepositoryWrapper;
+import org.apache.depot.update.impl.ResourceUpdaterContext;
+import org.apache.depot.update.impl.ResourceUpdaterEngine;
+import org.apache.depot.update.impl.ResourceUpdaterIdentifier;
+import org.apache.depot.update.query.ResourceQuery;
+import org.apache.depot.update.query.ResourceQueryHelper;
+import org.apache.depot.update.query.ResourceResult;
+import org.apache.depot.update.query.ResourceResultHelper;
+import org.apache.depot.update.repository.DefaultRepository;
+import org.apache.depot.update.repository.RepositorySet;
+import org.apache.depot.update.repository.RepositorySetSortContext;
+import org.apache.depot.update.resource.ArtifactGroup;
+import org.apache.depot.update.util.UpdateConstants;
+import org.apache.depot.update.util.identity.GenericIdentifier;
+import org.apache.depot.update.util.reference.IReferenceable;
+import org.apache.depot.update.util.reference.NoSuchReferenceException;
+import org.apache.depot.update.util.text.MessageConstants;
+import org.apache.depot.update.util.text.Messages;
+
+/**
+ * A ResourceUpdater is the main (low level) API into Depot.
+ * 
+ * @see DefaultArtifactUpdater, StandardResourceUpdater
+ * 
+ * @author anou_mana
+ */
+public class ArtifactUpdater implements IReferenceable {
+
+	static {
+		// Configure from the shared XML file...
+		//:TODO: *Maybe* move later, or allow user to pass filename
+		// in order to override
+		UpdateConfig.configure();
+	}
+
+	// The identity...
+	private ResourceUpdaterIdentifier m_identifier = null;
+
+	// Options for configuring the Updater
+	private Map m_resourceConfigOptions = new HashMap();
+
+	// Target repository
+	private Repository m_targetRepository;
+
+	//Updater
+	private ResourceUpdaterEngine m_updateEngine;
+
+	/**
+	 * Get the default (locally configured) ResourceUpdater.
+	 * 
+	 * @return ResourceUpdater
+	 * @throws UpdateException if unable to comply.
+	 */
+	public static ArtifactUpdater getResourceUpdater() throws UpdateException {
+		return getResourceUpdater(UpdateConstants.DEFAULT, true);
+	}
+
+	/**
+	 * Get a named ResourceUpdater (optionally create on demand)
+	 * 
+	 * @param id The name of the resource updater
+	 * @param createIfRequired true for create on demand
+	 * @return ResourceUpdater
+	 * @throws UpdateException if unable to comply
+	 */
+	public static ArtifactUpdater getResourceUpdater(
+		String id,
+		final boolean createIfRequired)
+		throws UpdateException {
+
+		ArtifactUpdater updater = null;
+		GenericIdentifier identifier =
+			new GenericIdentifier(UpdateConstants.DEFAULT, id);
+
+		if (ReferenceManager.hasReference(identifier)) {
+			try {
+				updater =
+					(ArtifactUpdater) ReferenceManager.getReference(identifier);
+			}
+			catch (NoSuchReferenceException exp) {
+				Logger.getLogger().warn(
+					"No Depot Update reference in the RefMgr ",
+					exp);
+			}
+		}
+
+		// Create on demand...
+		if ((null == updater) && createIfRequired) {
+			updater = new ArtifactUpdater(id);
+			// Register this puppy...
+			ReferenceManager.createReference(updater);
+		}
+
+		return updater;
+	}
+
+	/**
+	 * Construct a named ResourceUpdater
+	 * @param id the public name
+	 * @throws UpdateException
+	 */
+	public ArtifactUpdater(String id) throws UpdateException {
+		m_identifier = new ResourceUpdaterIdentifier(id);
+		m_updateEngine = new ResourceUpdaterEngine();
+		resourceConfigInit();
+	}
+
+	/**
+	 * Construct a named ResourceUpdater 
+	 * @param id the public name
+	 * @throws UpdateException
+	 */
+	public ArtifactUpdater(ResourceUpdaterIdentifier id)
+		throws UpdateException {
+		m_identifier = id;
+		m_updateEngine = new ResourceUpdaterEngine();
+		resourceConfigInit();
+	}
+
+	/**
+	 * Construct an unnamed ResourceUpdater (the default) 
+	 * @param id the public name
+	 * @throws UpdateException
+	 */
+	public ArtifactUpdater() {
+		m_identifier = new ResourceUpdaterIdentifier(UpdateConstants.DEFAULT);
+		m_updateEngine = new ResourceUpdaterEngine();
+		resourceConfigInit();
+	}
+
+	/**
+	 * Configure the updater
+	 *
+	 */
+	private void resourceConfigInit() {
+		//TODO put the options like "BestOfAll", "ReleaseOnly"
+		// and the selector / comparator for it	
+	}
+
+	/**
+	 * Access configuration options
+	 * @return
+	 */
+	public Set getResourceConfigOptions() {
+		return m_resourceConfigOptions.keySet();
+	}
+
+	/** Access the context (files/protocols handle) this runs within.
+	 * 
+	 * @return
+	 */
+	public ResourceUpdaterContext getContext() {
+		return m_updateEngine.getContext();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.depot.update.api.ResourceAPIInterface#getDefaultRepositorySet()
+	 */
+	public RepositorySet getDefaultRepositorySet() {
+		return m_updateEngine.getDefaultSortedRepositorySet();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.depot.update.api.ResourceAPIInterface#setDefaultRepositorySet(org.apache.depot.update.repository.RepositorySet)
+	 */
+	public void setDefaultRepositorySet(RepositorySet set) {
+		m_updateEngine.setDefaultSortedRepositorySet(set);
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.depot.update.api.ResourceAPIInterface#setRepositorySetSortContext(org.apache.depot.update.repository.RepositorySetSortContext)
+	 */
+	public void setRepositorySetSortContext(RepositorySetSortContext sortContext) {
+
+		m_updateEngine.setDefaultRepositorySetSortContext(sortContext);
+	}
+
+	public RepositorySetSortContext getRepositorySetSortContext() {
+		return RepositorySetSortContext.getDefaultRepositorySetSortContext();
+	}
+
+	public RepositoryObject getRepositoryObject(String repositoryId)
+		throws UpdateException {
+
+		RepositoryObject repositoryObject = null;
+
+		Repository repository =
+			DefaultRepository.getRepository(repositoryId, true);
+		if (repository != null) {
+			repositoryObject = getRepositoryObject(repository);
+		}
+		return repositoryObject;
+	}
+
+	public RepositoryObject getRepositoryObject(Repository repository)
+		throws UpdateException {
+
+		RepositoryWrapper wrapper =
+			new RepositoryWrapper(repository, getContext());
+		RepositoryObject repositoryObject =
+			new RepositoryObject(
+				repository.getIdentifier().getId(),
+				RepositoryObject.REPOSITORY_ROOT,
+				wrapper);
+
+		// make sure the first level of children are got from the repository
+		repositoryObject.syncChildren();
+		return repositoryObject;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.depot.update.api.ResourceAPIInterface#updateResources(java.util.List)
+	 */
+	public void updateResources(List resources) throws UpdateException {
+		updateResources(resources, null);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.depot.update.api.ResourceAPIInterface#updateResources(java.util.List, org.apache.depot.update.repository.Repository)
+	 */
+	public void updateResources(List resources, Repository targetRepository)
+		throws UpdateException {
+		for (Iterator iterator = resources.iterator(); iterator.hasNext();) {
+			Artifact resource = (Artifact) iterator.next();
+			updateResource(resource, targetRepository);
+		}
+	}
+
+	/* (non-Javadoc)
+	 */
+	public void updateResource(Artifact resource) throws UpdateException {
+		updateResource(resource, null);
+	}
+
+	/* (non-Javadoc)
+	 */
+	public void updateResource(Artifact resource, Repository targetRepository)
+		throws UpdateException {
+
+		if (resource != null) {
+
+			// get the resource specifier query
+			ResourceQuery resourceQuery =
+				ResourceQueryHelper.getResourceQuery(resource);
+			updateResource(resourceQuery, targetRepository);
+		}
+		else {
+			String message = Messages.getString(MessageConstants.NULL_RESOURCE);
+			Logger.getLogger().error(message);
+
+			throw new UpdateException(message);
+		}
+	}
+
+	/* (non-Javadoc)
+	 */
+	public void updateResourceGroup(ArtifactGroup group)
+		throws UpdateException {
+		updateResourceGroup(group, null);
+	}
+
+	/* (non-Javadoc)
+	 */
+	public void updateResourceGroup(
+		ArtifactGroup group,
+		Repository targetRepository)
+		throws UpdateException {
+
+		if (group != null) {
+			// get the resource specifier query
+			ResourceQuery resourceQuery =
+				ResourceQueryHelper.getResourceGroupQuery(group);
+			updateResource(resourceQuery, targetRepository);
+		}
+		else {
+			String message = Messages.getString(MessageConstants.NULL_GROUP);
+			Logger.getLogger().error(message);
+
+			throw new UpdateException(message);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.depot.update.api.ResourceAPIInterface#updateResource(org.apache.depot.update.resource.Resource, org.apache.depot.update.query.ResourceQuery)
+	 */
+	public void updateResource(ResourceQuery resourceQuery)
+		throws UpdateException {
+		updateResource(resourceQuery, null);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.depot.update.api.ResourceAPIInterface#updateResource(org.apache.depot.update.resource.Resource, org.apache.depot.update.query.ResourceQuery)
+	 */
+	public void updateResource(
+		ResourceQuery resourceQuery,
+		Repository targetRepository)
+		throws UpdateException {
+
+		//check for target repository
+		if (targetRepository == null) {
+			targetRepository = this.m_targetRepository;
+		}
+		if (targetRepository == null) {
+			String message = "Resource Update failed with no target repository";
+			//String message = Messages.getString(MessageConstants.RESOURCE_REQUEST, request);
+			//Logger.getLog().error(message);
+			throw new UpdateException(message);
+		}
+
+		// Query the repositories to get the result	
+		ResourceResult resourceResult = m_updateEngine.query(resourceQuery);
+
+		// Query the target repository to get the result
+		resourceQuery.setRepositorySet(new RepositorySet(targetRepository));
+		ResourceResult targetResult = m_updateEngine.query(resourceQuery);
+
+		// Sort the two result sets
+		List resources =
+			determineUpdates(resourceQuery, resourceResult, targetResult);
+
+
+		// Copy the resource to the repository
+		if (resources != null)
+			downloadResources(resources, targetRepository);
+	}
+
+	/**
+	 * Sort results using the ORDER_BY clause of the query.
+	 * 
+	 * @param resourceQuery The query containing the order_by portion
+	 * @param resourceResult The result set
+	 * @param targetResult The (local|target) result set
+	 * @return
+	 */
+	private List determineUpdates(
+		ResourceQuery resourceQuery,
+		ResourceResult resourceResult,
+		ResourceResult targetResult) {
+
+		List resources = null;
+		
+		// Assuming we found something in the main search repositories...
+		if (!ResourceResultHelper.noResult(resourceResult)) {
+			// Compare Results Set using the OrderBy Comparator	
+			if (ResourceResultHelper
+				.compareTo(
+					resourceResult,
+					targetResult,
+					resourceQuery.getOrderBy())
+				> 0) {
+
+				resources =
+					ResourceResultHelper.getResourceList(resourceResult);
+
+				// Got something
+				Logger.getLogger().verbose(
+					Messages.getString(
+						MessageConstants.UPDATE_FOUND,
+						resources));
+			}
+			else
+				// Nothing to update
+				Logger.getLogger().verbose(
+					Messages.getString(
+						MessageConstants.NO_UPDATE_FOUND,
+						resourceQuery));
+		}
+		else
+			// Nothing found
+			Logger.getLogger().verbose(
+				Messages.getString(
+					MessageConstants.NO_RESOURCES_FOUND,
+					resourceQuery));
+
+		return resources;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.depot.update.api.ResourceAPIInterface#findResource(org.apache.depot.update.resource.Resource)
+	 */
+	public List findResource(Artifact resource) throws UpdateException {
+		return findResource(resource, null);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.depot.update.api.ResourceAPIInterface#findResources(java.util.List)
+	 */
+	public Map findResources(List resources) throws UpdateException {
+		return findResources(resources, null);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.depot.update.api.ResourceAPIInterface#findResources(java.util.List, org.apache.depot.update.repository.Repository)
+	 */
+	public Map findResources(List resources, Repository target)
+		throws UpdateException {
+		Map resourceMap = new HashMap();
+		List foundResources = null;
+
+		for (Iterator iterator = resources.iterator(); iterator.hasNext();) {
+			Artifact resource = (Artifact) iterator.next();
+			foundResources = findResource(resource, target);
+			if (foundResources != null) {
+				resourceMap.put(resource, foundResources);
+			}
+		}
+		return resourceMap;
+	}
+
+	/* (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)
+		throws UpdateException {
+		// get the resource specifier query
+		ResourceQuery resourceQuery =
+			ResourceQueryHelper.getResourceSpecifierQuery(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);
+
+		return resources;
+
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.depot.update.api.ResourceAPIInterface#findResource(org.apache.depot.update.resource.Resource, org.apache.depot.update.query.ResourceQuery)
+	 */
+	public List findResource(ResourceQuery resourceQuery)
+		throws UpdateException {
+		// Query the repositories to get the result	
+		ResourceResult resourceResult = m_updateEngine.query(resourceQuery);
+		List foundResources =
+			ResourceResultHelper.getResourceList(resourceResult);
+
+		return foundResources;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.depot.update.api.ResourceAPIInterface#copyResources(java.util.List)
+	 */
+	public void downloadResources(List resources) throws UpdateException {
+		downloadResources(resources, null);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.depot.update.api.ResourceAPIInterface#copyResource(org.apache.depot.update.resource.Resource)
+	 */
+	public void downloadResource(Artifact resource) throws UpdateException {
+		downloadResource(resource, null);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.depot.update.api.ResourceAPIInterface#copyResource(org.apache.depot.update.resource.Resource)
+	 */
+	public void downloadResource(
+		Artifact resource,
+		Repository targetRepository)
+		throws UpdateException {
+		if (resource != null) {
+			List resources = new ArrayList();
+			resources.add(resource);
+			downloadResources(resources, targetRepository);
+		}
+		else {
+			String message = Messages.getString(MessageConstants.NULL_RESOURCE);
+			Logger.getLogger().error(message);
+
+			throw new UpdateException(message);
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.depot.update.api.ResourceAPIInterface#copyResources(java.util.List)
+	 */
+	public void downloadResources(List resources, Repository targetRepository)
+		throws UpdateException {
+		//check for target repository
+		if (targetRepository == null) {
+			targetRepository = m_targetRepository;
+		}
+
+		if (targetRepository == null) {
+			String message =
+				Messages.getString(MessageConstants.NO_TARGET_REPOSITORY);
+			Logger.getLogger().error(message);
+
+			throw new UpdateException(message);
+		}
+
+		m_updateEngine.copyTo(resources, targetRepository);
+	}
+
+	public void downloadResourceGroup(
+		ArtifactGroup group,
+		Repository targetRepository)
+		throws UpdateException {
+
+		if (group != null) {
+			// get the resource specifier query
+			ResourceQuery resourceQuery =
+				ResourceQueryHelper.getResourceGroupQuery(group);
+			downloadResource(resourceQuery, targetRepository);
+		}
+		else {
+			String message = Messages.getString(MessageConstants.NULL_GROUP);
+			Logger.getLogger().error(message);
+
+			throw new UpdateException(message);
+		}
+	}
+
+	public void downloadResource(
+		ResourceQuery resourceQuery,
+		Repository targetRepository)
+		throws UpdateException {
+
+		// Query the repositories to get the result	
+		List resources = findResource(resourceQuery);
+
+		//
+		// Copy the resource to the repository
+		//
+		if (resources != null)
+			downloadResources(resources, targetRepository);
+	}
+
+	public void cleanTarget(ArtifactGroup group) throws UpdateException {
+		cleanRepository(m_targetRepository, group);
+	}
+
+	public void cleanRepository(Repository repository, ArtifactGroup group)
+		throws UpdateException {
+
+		// Query & sort by version
+		//		get the resource specifier query
+		ResourceQuery resourceQuery =
+			ResourceQueryHelper.getResourceGroupQuery(group);
+
+		// Where to look
+		resourceQuery.setRepositorySet(new RepositorySet(repository));
+
+		// Query the repositories to get the result	
+		ResourceResult resourceResult = m_updateEngine.query(resourceQuery);
+		List olderResources =
+			ResourceResultHelper.getRemainderResources(resourceResult);
+
+		//DebugUtils.dump("Older Resources", olderResources);
+
+		// Delete all but 'best'
+		m_updateEngine.delete(repository, olderResources);
+	}
+
+	/**
+	 * @return
+	 */
+	public Repository getDefaultTargetRepository() {
+		return m_targetRepository;
+	}
+
+	/**
+	 * @param repository
+	 */
+	public void setDefaultTargetRepository(Repository repository) {
+		m_targetRepository = repository;
+	}
+
+	public static ArtifactUpdater getDefaultResourceUpdater()
+		throws UpdateException {
+		return getResourceUpdater(
+			new ResourceUpdaterIdentifier(UpdateConstants.DEFAULT),
+			true);
+	}
+
+	public static ArtifactUpdater getResourceUpdater(
+		ResourceUpdaterIdentifier identifier,
+		final boolean createIfRequired)
+		throws UpdateException {
+
+		ArtifactUpdater updater = null;
+
+		if (ReferenceManager.hasReference(identifier)) {
+			updater = (ArtifactUpdater) ReferenceManager.getReference(identifier);
+		}
+		else {
+			if (!createIfRequired)
+				throw new UpdateException(
+					"Failed to access ResourceUpdater [" + identifier + "]");
+
+			updater = new ArtifactUpdater(identifier);
+
+			ReferenceManager.createReference(updater);
+		}
+
+		return updater;
+	}
+
+	/**
+	 * @return
+	 */
+	public GenericIdentifier getIdentifier() {
+		return m_identifier;
+	}
+
+	/**
+	 * @return
+	 */
+	public Repository getTargetRepository() {
+		return m_targetRepository;
+	}
+
+	/**
+	 * @param map
+	 */
+	public void setResourceConfigOptions(Map map) {
+		m_resourceConfigOptions = map;
+	}
+
+	/**
+	 * @param repository
+	 */
+	public void setTargetRepository(Repository repository) {
+		m_targetRepository = repository;
+	}
+
+	/**
+	 * 
+	 * :TODO: temporary, until we figure out what RU and RE both do.
+	 * @return
+	 */
+	ResourceUpdaterEngine getUpdateEngine() {
+		return m_updateEngine;
+	}
+}

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/DefaultArtifactUpdater.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/DefaultArtifactUpdater.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,62 @@
+/*
+ * 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.impl.ResourceUpdaterIdentifier;
+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(ResourceUpdaterIdentifier 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/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 09:04:50 2004
@@ -23,7 +23,7 @@
 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.resource.ResourceGroup;
+import org.apache.depot.update.resource.ArtifactGroup;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
 import org.apache.depot.update.util.reference.IReferenceable;
 import org.apache.depot.update.util.select.ISelector;
@@ -83,7 +83,7 @@
 	 */
 	List listSpecifiers(
 		ResourceUpdaterContext context,
-		ResourceGroup group,
+		ArtifactGroup group,
 		ISelector selector)
 		throws Exception;
 
@@ -94,7 +94,7 @@
 	 */
 	RepositoryManifest getManifest(
 		ResourceUpdaterContext context,
-		ResourceGroup group,
+		ArtifactGroup group,
 		ISelector selector)
 		throws Exception;
 
@@ -106,7 +106,7 @@
 	 */
 	List listResources(
 		ResourceUpdaterContext context,
-		ResourceGroup group,
+		ArtifactGroup group,
 		ISelector selector)
 		throws Exception;
 
@@ -116,7 +116,7 @@
 	 * @param selector
 	 * @return
 	*/
-	void deleteResource(ResourceUpdaterContext context, Resource resource)
+	void deleteResource(ResourceUpdaterContext context, Artifact resource)
 		throws Exception;
 
 	/**
@@ -125,7 +125,7 @@
 	 * @param selector
 	 * @return
 	*/
-	Resource publishResource(ResourceUpdaterContext context, Resource resource)
+	Artifact publishResource(ResourceUpdaterContext context, Artifact resource)
 		throws Exception;
 
 }

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/StandardArtifactUpdater.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/StandardArtifactUpdater.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,62 @@
+/*
+ * 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.config.UpdateConfig;
+import org.apache.depot.update.impl.ResourceUpdaterIdentifier;
+
+/**
+ * A StandardResourceUpdater is a {@link org.apache.depot.update.DefaultArtifactUpdater }
+ * that configures itself from an XML configuration file.
+ * 
+ * @author arb_jack
+ */
+public class StandardArtifactUpdater extends DefaultArtifactUpdater {
+
+	/**
+	 * @param id
+	 * @throws UpdateException
+	 */
+	public StandardArtifactUpdater(String id) throws UpdateException {
+		super(id);
+		initClass();
+	}
+
+	/**
+	 * @param id
+	 * @throws UpdateException
+	 */
+	public StandardArtifactUpdater(ResourceUpdaterIdentifier id)
+		throws UpdateException {
+		super(id);
+		initClass();
+	}
+
+	/**
+	 * @throws UpdateException
+	 */
+	public StandardArtifactUpdater() throws UpdateException {
+		super();
+		initClass();
+	}
+	
+	private void initClass() {
+		// Configure from the XML file...
+		//:TODO: *Maybe* move later, or allow user to pass filename
+		UpdateConfig.configure("standard.xml");
+	}
+}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedResourceSet.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedResourceSet.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/CachedResourceSet.java	Wed Jun 23 09:04:50 2004
@@ -25,8 +25,8 @@
 import org.apache.depot.common.ant.util.AntLogListener;
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.update.Repository;
-import org.apache.depot.update.Resource;
-import org.apache.depot.update.ResourceUpdater;
+import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactUpdater;
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.ant.AntUtils;
 import org.apache.depot.update.query.ResourceResult;
@@ -51,7 +51,7 @@
 	private final CachedResourceFileSet fileSet = new CachedResourceFileSet(
 			this);
 	private final List resourceList = new ArrayList();
-	private ResourceUpdater m_updater = null;
+	private ArtifactUpdater m_updater = null;
 	private boolean isAlwaysCheckRemote = false;
 	private boolean checkClassPath = true;
 	/**
@@ -161,7 +161,7 @@
 	 */
 	private void cacheFile(ResourceElement r) {
 		try {
-			Resource resource = findBestRemoteResource(r);
+			Artifact resource = findBestRemoteResource(r);
 			if (resource != null) {
 				
 				downLoadRemoteResult(resource);
@@ -175,7 +175,7 @@
 	 * @param r
 	 * @return
 	 */
-	Resource findBestRemoteResource(ResourceElement r) {
+	Artifact findBestRemoteResource(ResourceElement r) {
 		return r.findBestRemoteResource();
 	}
 	/**
@@ -236,7 +236,7 @@
 	 * @return
 	 */
 	private File getFirstFile(ResourceResult res) throws Exception {
-		Resource resource = ResourceResult.getFirstResource(res);
+		Artifact resource = ResourceResult.getFirstResource(res);
 		return resource.getLocation().getFile();
 	}
 	private ResourceResult query(ResourceElement r, Repository repo) {
@@ -254,8 +254,8 @@
 	 * @param resource
 	 * @throws UpdateException
 	 */
-	private void downLoadRemoteResult(Resource resource) throws UpdateException {
-		ResourceUpdater ru = new ResourceUpdater();
+	private void downLoadRemoteResult(Artifact resource) throws UpdateException {
+		ArtifactUpdater ru = new ArtifactUpdater();
 		ru.downloadResource(resource, getLocalRepository());
 	}
 	/**

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/ResourceElement.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/ResourceElement.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/cache/ResourceElement.java	Wed Jun 23 09:04:50 2004
@@ -19,7 +19,7 @@
 import java.io.File;
 
 import org.apache.depot.update.Repository;
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.impl.RepositorySetWrapper;
 import org.apache.depot.update.impl.ResourceUpdaterContext;
@@ -29,8 +29,8 @@
 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.resource.ResourceGroup;
-import org.apache.depot.update.resource.ResourceType;
+import org.apache.depot.update.resource.ArtifactGroup;
+import org.apache.depot.update.resource.ArtifactType;
 import org.apache.depot.update.resource.compare.VersionComparator;
 import org.apache.depot.update.resource.select.NameSelector;
 import org.apache.depot.update.resource.select.TypeSelector;
@@ -54,7 +54,7 @@
 	private String version;
 	private String repository;
 	private String ext;
-	private Resource bestRemoteResource;
+	private Artifact bestRemoteResource;
 	private final Project project;
 	/**
 	 * @return Returns the name.
@@ -113,8 +113,8 @@
 	/**
 	 * @return
 	 */
-	Resource initResource() {
-		Resource r = new Resource(getResourceGroup(), name, getVersionObject(),
+	Artifact initResource() {
+		Artifact r = new Artifact(getResourceGroup(), name, getVersionObject(),
 				getResourceType(), ext, getFileName(), getLocation());
 		return r;
 	}
@@ -137,8 +137,8 @@
 	/**
 	 * @return
 	 */
-	ResourceType getResourceType() {
-		return ResourceType.JAVA_BINARY;// TODO fix
+	ArtifactType getResourceType() {
+		return ArtifactType.JAVA_BINARY;// TODO fix
 	}
 	/**
 	 * @return
@@ -150,8 +150,8 @@
 	/**
 	 * @return
 	 */
-	ResourceGroup getResourceGroup() {
-		ResourceGroup rg = new ResourceGroup(group == null ? name : group);
+	ArtifactGroup getResourceGroup() {
+		ArtifactGroup rg = new ArtifactGroup(group == null ? name : group);
 		return rg;
 	}
 	/**
@@ -230,9 +230,9 @@
 	 * @param this
 	 * @return
 	 */
-	Resource findBestRemoteResource() {
+	Artifact findBestRemoteResource() {
 		ResourceResult res = query(getIRepository());
-		Resource resource = null;
+		Artifact resource = null;
 		if (res.size() == 0) {
 			resource = null;
 		} else if (res.size() == 1) {

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/sync/SynchronizeTask.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/sync/SynchronizeTask.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/sync/SynchronizeTask.java	Wed Jun 23 09:04:50 2004
@@ -17,10 +17,10 @@
 package org.apache.depot.update.ant.sync;
 
 import org.apache.depot.common.log.Logger;
-import org.apache.depot.update.ResourceUpdater;
+import org.apache.depot.update.ArtifactUpdater;
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.repository.DefaultRepository;
-import org.apache.depot.update.resource.ResourceGroup;
+import org.apache.depot.update.resource.ArtifactGroup;
 import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.common.ant.util.AntLogListener;
 import org.apache.tools.ant.BuildException;
@@ -90,7 +90,7 @@
 				log("Resource Updater: " + m_ruper, Project.MSG_INFO);
 
 			// Get the Resource Updater asked for
-			ResourceUpdater ruper = new ResourceUpdater(m_ruper);
+			ArtifactUpdater ruper = new ArtifactUpdater(m_ruper);
 
 			if (!UpdateConstants.LIBRARY.equals(m_target))
 				log("Target Repository: " + m_target, Project.MSG_INFO);
@@ -102,7 +102,7 @@
 			if (null != m_group) {
 
 				log("Update Group: " + m_group, Project.MSG_INFO);
-				ResourceGroup group = new ResourceGroup(m_group);
+				ArtifactGroup group = new ArtifactGroup(m_group);
 				
 				// Update...
 				ruper.updateResourceGroup(group);

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 09:04:50 2004
@@ -29,8 +29,8 @@
 import org.apache.depot.update.monitor.Monitor;
 import org.apache.depot.update.monitor.StatisticsMonitor;
 import org.apache.depot.update.repository.RepositorySet;
-import org.apache.depot.update.resource.ResourceGroup;
-import org.apache.depot.update.resource.ResourceSpecifier;
+import org.apache.depot.update.resource.ArtifactGroup;
+import org.apache.depot.update.resource.ArtifactSpecifier;
 import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.select.AllSelector;
 import org.apache.depot.common.ant.util.AntLogListener;
@@ -103,7 +103,7 @@
 						List groups = repo.listGroups(AllSelector.getInstance());
 
 						for (Iterator gi = groups.iterator(); gi.hasNext();) {
-							ResourceGroup group = (ResourceGroup) gi.next();
+							ArtifactGroup group = (ArtifactGroup) gi.next();
 
 							try {
 
@@ -114,7 +114,7 @@
 										+ specifiers.size() + ")");
 
 								for (Iterator si = specifiers.iterator(); si.hasNext();) {
-									ResourceSpecifier specifier = (ResourceSpecifier) si.next();
+									ArtifactSpecifier specifier = (ArtifactSpecifier) si.next();
 
 									log("  - " + specifier, Project.MSG_VERBOSE);
 								}
@@ -129,7 +129,7 @@
 								re);
 					}
 				} else {
-					ResourceGroup group = new ResourceGroup(m_group);
+					ArtifactGroup group = new ArtifactGroup(m_group);
 
 					try {
 						// List groups ...
@@ -137,7 +137,7 @@
 								AllSelector.getInstance());
 
 						for (Iterator gi = specifiers.iterator(); gi.hasNext();) {
-							ResourceSpecifier specifier = (ResourceSpecifier) gi.next();
+							ArtifactSpecifier specifier = (ArtifactSpecifier) gi.next();
 
 							log(" -  " + specifier, Project.MSG_VERBOSE);
 						}

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 09:04:50 2004
@@ -26,14 +26,14 @@
 import java.util.StringTokenizer;
 
 import org.apache.depot.common.log.Logger;
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.UpdateRuntimeException;
 import org.apache.depot.update.monitor.FileEvent;
 import org.apache.depot.update.monitor.Monitor;
-import org.apache.depot.update.resource.ResourceAttribute;
-import org.apache.depot.update.resource.ResourceGroup;
-import org.apache.depot.update.resource.ResourceType;
+import org.apache.depot.update.resource.ArtifactAttribute;
+import org.apache.depot.update.resource.ArtifactGroup;
+import org.apache.depot.update.resource.ArtifactType;
 import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.io.ResolvedFile;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
@@ -77,11 +77,11 @@
 		private Map m_md5map = new HashMap();
 		private Map m_ascmap = new HashMap();
 
-		boolean contains(Resource resource) {
+		boolean contains(Artifact resource) {
 			return m_map.containsKey(resource);
 		}
 
-		void addResource(Resource resource) {
+		void addResource(Artifact resource) {
 			String id = resource.getIdentifier().getId();
 
 			//
@@ -94,7 +94,7 @@
 				&& (extension.endsWith(UpdateConstants.MD5_EXTN))
 				&& (extension.length() > UpdateConstants.MD5_EXTN.length())) {
 
-				Resource orig = new Resource(resource);
+				Artifact orig = new Artifact(resource);
 
 				String newExtn =
 					extension.substring(
@@ -109,7 +109,7 @@
 					&& (extension.endsWith(UpdateConstants.ASC_EXTN))
 					&& (extension.length() > UpdateConstants.ASC_EXTN.length())) {
 
-				Resource orig = new Resource(resource);
+				Artifact orig = new Artifact(resource);
 
 				String newExtn =
 					extension.substring(
@@ -131,13 +131,13 @@
 			}
 		}
 
-		Resource getResource(Resource resource) {
-			return (Resource) m_map.get(resource);
+		Artifact getResource(Artifact resource) {
+			return (Artifact) m_map.get(resource);
 		}
 
 		List getCompletedList() {
 			for (Iterator i = m_list.iterator(); i.hasNext();) {
-				Resource resource = (Resource) i.next();
+				Artifact resource = (Artifact) i.next();
 
 				if (m_md5map.containsKey(resource)) {
 					// Store the MD5 location for this resource
@@ -147,7 +147,7 @@
 					// Set this as an attribute on the resource,
 					// future code could process this (to check)
 					resource.setAttribute(
-						ResourceAttribute.MD5_LOCATION,
+						ArtifactAttribute.MD5_LOCATION,
 						md5location);
 				}
 				else if (m_ascmap.containsKey(resource)) {
@@ -158,7 +158,7 @@
 					// Set this as an attribute on the resource,
 					// future code could process this (to check)
 					resource.setAttribute(
-						ResourceAttribute.ASC_LOCATION,
+						ArtifactAttribute.ASC_LOCATION,
 						asclocation);
 				}
 			}
@@ -206,7 +206,7 @@
 		return store.getCompletedList();
 	}
 
-	public Resource determineResource(Object entity) throws UpdateException {
+	public Artifact determineResource(Object entity) throws UpdateException {
 		ResourceWorkingStore store =
 			new DefaultResourceFilenameAnalyzer.ResourceWorkingStore();
 
@@ -243,7 +243,7 @@
 				re);
 		}
 
-		return (Resource) store.getCompletedList().get(0);
+		return (Artifact) store.getCompletedList().get(0);
 	}
 
 	void processVRL(
@@ -358,8 +358,8 @@
 					type = null; // ResourceType.JAVA_BINARY;
 				}
 				else if (
-					ResourceType.UNKNOWN.equals(
-						ResourceType.getFromString(type))) {
+					ArtifactType.UNKNOWN.equals(
+						ArtifactType.getFromString(type))) {
 					type = null;
 				}
 				else {
@@ -405,15 +405,15 @@
 
 		if (!ignore)
 			try {
-				ResourceGroup group =
-					new ResourceGroup((null == groupStr) ? name : groupStr);
+				ArtifactGroup group =
+					new ArtifactGroup((null == groupStr) ? name : groupStr);
 
-				Resource temp =
-					new Resource(
+				Artifact temp =
+					new Artifact(
 						group,
 						name,
 						(null == version ? null : new ApacheVersion(version)),
-						ResourceType.getFromString(type),
+						ArtifactType.getFromString(type),
 						extension,
 						resourceName,
 						location);

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/files/DefaultResourceGroupFilenameAnalyzer.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/files/DefaultResourceGroupFilenameAnalyzer.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/files/DefaultResourceGroupFilenameAnalyzer.java	Wed Jun 23 09:04:50 2004
@@ -25,7 +25,7 @@
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.monitor.FileEvent;
 import org.apache.depot.update.monitor.Monitor;
-import org.apache.depot.update.resource.ResourceGroup;
+import org.apache.depot.update.resource.ArtifactGroup;
 import org.apache.depot.update.util.io.ResolvedFile;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
 import org.apache.depot.update.util.text.MessageConstants;
@@ -81,7 +81,7 @@
 		return store;
 	}
 
-	public ResourceGroup determineGroup(Object entity) throws UpdateException {
+	public ArtifactGroup determineGroup(Object entity) throws UpdateException {
 		List store = new ArrayList();
 
 		try {
@@ -116,7 +116,7 @@
 
 		// Check for empty and through ???
 
-		return (ResourceGroup) store.get(0);
+		return (ArtifactGroup) store.get(0);
 	}
 
 	void processVRL(VirtualResourceLocator groupVRL, List store)
@@ -169,7 +169,7 @@
 				|| (groupName.startsWith(".") || (groupName.equals(("CVS"))));
 
 		if (!ignore) {
-			ResourceGroup group = new ResourceGroup(groupName);
+			ArtifactGroup group = new ArtifactGroup(groupName);
 
 			// Store it...
 			store.add(group);

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/files/ExtensionTable.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/files/ExtensionTable.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/files/ExtensionTable.java	Wed Jun 23 09:04:50 2004
@@ -19,7 +19,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.depot.update.resource.ResourceType;
+import org.apache.depot.update.resource.ArtifactType;
 
 /**
  * @author arb_jack
@@ -32,13 +32,13 @@
 		String m_extn;
 		String m_description;
 		String m_mime;
-		ResourceType m_type;
+		ArtifactType m_type;
 
 		ExtensionEntry(
 			String extn,
 			String description,
 			String mime,
-			ResourceType type) {
+			ArtifactType type) {
 			m_extn = extn;
 			m_description = description;
 			m_mime = mime;
@@ -59,7 +59,7 @@
 			"jar",
 			"Java Archive",
 			"TODO",
-			ResourceType.JAVA_BINARY);
+			ArtifactType.JAVA_BINARY);
 		DEFAULT_EXTENSION_TABLE.register("tar", "Tape Archive", "TODO", null);
 		DEFAULT_EXTENSION_TABLE.register("zip", "ZIP Archive", "TODO", null);
 		DEFAULT_EXTENSION_TABLE.register(
@@ -73,13 +73,13 @@
 		String extn,
 		String desc,
 		String mime,
-		ResourceType type) {
+		ArtifactType type) {
 		registerEntry(
 			new ExtensionTable.ExtensionEntry(extn, desc, mime, type));
 	}
 
-	public ResourceType getTypeFromExtension(String extn) {
-		ResourceType type = ResourceType.UNKNOWN;
+	public ArtifactType getTypeFromExtension(String extn) {
+		ArtifactType type = ArtifactType.UNKNOWN;
 
 		ExtensionEntry entry = getEntryByExtension(extn);
 

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 09:04:50 2004
@@ -18,7 +18,7 @@
 
 import java.util.List;
 
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.UpdateException;
 
 /**
@@ -26,5 +26,5 @@
  */
 public interface IResourceFilenameAnalyzer {
 	List determineResources(List entityList) throws UpdateException;
-	Resource determineResource(Object entity) throws UpdateException;
+	Artifact determineResource(Object entity) throws UpdateException;
 }

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/files/IResourceGroupFilenameAnalyzer.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/files/IResourceGroupFilenameAnalyzer.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/files/IResourceGroupFilenameAnalyzer.java	Wed Jun 23 09:04:50 2004
@@ -19,7 +19,7 @@
 import java.util.List;
 
 import org.apache.depot.update.UpdateException;
-import org.apache.depot.update.resource.ResourceGroup;
+import org.apache.depot.update.resource.ArtifactGroup;
 
 /**
  * @author arb_jack
@@ -27,5 +27,5 @@
 public interface IResourceGroupFilenameAnalyzer {
 
 	List determineGroups(List entityList) throws UpdateException;
-	ResourceGroup determineGroup(Object entity) throws UpdateException;
+	ArtifactGroup determineGroup(Object entity) throws UpdateException;
 }

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/RepositoryObject.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/RepositoryObject.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/RepositoryObject.java	Wed Jun 23 09:04:50 2004
@@ -20,9 +20,9 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.UpdateException;
-import org.apache.depot.update.resource.ResourceGroup;
+import org.apache.depot.update.resource.ArtifactGroup;
 import org.apache.depot.update.util.select.AllSelector;
 
 public class RepositoryObject {
@@ -70,7 +70,7 @@
         return getName();
     }
 
-	public void addChild(Resource resource) {
+	public void addChild(Artifact resource) {
 		RepositoryResourceObject node = new RepositoryResourceObject(resource);
 		addChild(node);													
 	}
@@ -165,7 +165,7 @@
 
 				if(list != null){
 					for(Iterator iterator = list.iterator(); iterator.hasNext();){
-						String name = ( (ResourceGroup)iterator.next() ).getGroup();
+						String name = ( (ArtifactGroup)iterator.next() ).getGroup();
 						addChild(name, RESOURCE_GROUP);													
 					}
 				}
@@ -174,12 +174,12 @@
 			break;
 			case RESOURCE_GROUP :
 			{
-				List list = this.m_repositoryWrapper.listResources( new ResourceGroup(m_name),
+				List list = this.m_repositoryWrapper.listResources( new ArtifactGroup(m_name),
 				AllSelector.getInstance());
 
 				if(list != null){
 					for(Iterator iterator = list.iterator(); iterator.hasNext();){
-						addChild( (Resource)iterator.next() );
+						addChild( (Artifact)iterator.next() );
 					}
 				}
 				

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/RepositoryResourceObject.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/RepositoryResourceObject.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/RepositoryResourceObject.java	Wed Jun 23 09:04:50 2004
@@ -16,7 +16,7 @@
 
 package org.apache.depot.update.impl;
 
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 
 /**
  * @author anou_mana
@@ -24,7 +24,7 @@
 public class RepositoryResourceObject extends RepositoryObject {
 
 	// the RepositoryObject.RESOURCE type - holds the resource
-	private Resource m_resource; 
+	private Artifact m_resource; 
 
 	/**
 	 * @param name
@@ -38,7 +38,7 @@
 	 * @param resource
 	 */
 
-	public RepositoryResourceObject(Resource resource) {
+	public RepositoryResourceObject(Artifact resource) {
 		super(resource.getFilename(),RESOURCE);
 		m_resource = resource;
 	}
@@ -56,7 +56,7 @@
 	}
 
 	public RepositoryResourceObject(
-		Resource resource,
+		Artifact resource,
 		RepositoryWrapper repository) {
 		super(resource.getFilename(),RESOURCE, repository);
 		m_resource = resource;
@@ -65,14 +65,14 @@
 	/**
 	 * @return
 	 */
-	public Resource getResource() {
+	public Artifact getResource() {
 		return m_resource;
 	}
 
 	/**
 	 * @param resource
 	 */
-	public void setResource(Resource resource) {
+	public void setResource(Artifact resource) {
 		m_resource = 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 09:04:50 2004
@@ -25,7 +25,7 @@
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.repository.DefaultRepository;
 import org.apache.depot.update.repository.RepositorySet;
-import org.apache.depot.update.resource.ResourceGroup;
+import org.apache.depot.update.resource.ArtifactGroup;
 import org.apache.depot.update.util.select.AllSelector;
 
 /**
@@ -87,7 +87,7 @@
 				List groups = repo.listGroups(AllSelector.getInstance());
 
 				for (Iterator gi = groups.iterator(); i.hasNext();) {
-					ResourceGroup group = (ResourceGroup) gi.next();
+					ArtifactGroup group = (ArtifactGroup) gi.next();
 
 					Logger.getLogger().info(" - Group: " + group);
 				}

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 09:04:50 2004
@@ -24,14 +24,14 @@
 import org.apache.depot.common.util.debug.DebugUtils;
 import org.apache.depot.common.util.debug.Dumpable;
 import org.apache.depot.update.Repository;
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.UpdateException;
 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.resource.ResourceGroup;
+import org.apache.depot.update.resource.ArtifactGroup;
 import org.apache.depot.update.util.select.ISelector;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
@@ -111,7 +111,7 @@
 	 * @param selector
 	 * @return
 	 */
-	public List listSpecifiers(ResourceGroup group, ISelector selector)
+	public List listSpecifiers(ArtifactGroup group, ISelector selector)
 		throws UpdateException {
 
 		Logger.getLogger().debug(
@@ -147,7 +147,7 @@
 	 * @return
 	 */
 	public RepositoryManifest getManifest(
-		ResourceGroup group,
+		ArtifactGroup group,
 		ISelector selector)
 		throws UpdateException {
 
@@ -181,7 +181,7 @@
 	 * @param selector
 	 * @return
 	 */
-	public List listResources(ResourceGroup group, ISelector selector)
+	public List listResources(ArtifactGroup group, ISelector selector)
 		throws UpdateException {
 
 		Logger.getLogger().debug(
@@ -203,7 +203,7 @@
 				Monitor.getMonitor().notify(
 					new ResourceEvent(
 						ResourceEvent.LISTED,
-						(Resource) i.next()));
+						(Artifact) i.next()));
 			}
 		}
 		catch (Exception e) {
@@ -223,7 +223,7 @@
 	 * @param selector
 	 * @return
 	*/
-	public void deleteResource(Resource resource) throws UpdateException {
+	public void deleteResource(Artifact resource) throws UpdateException {
 
 		Logger.getLogger().debug(
 			Messages.getString(
@@ -254,7 +254,7 @@
 	 * @param selector
 	 * @return
 	*/
-	public Resource publishResource(Resource resource) throws UpdateException {
+	public Artifact publishResource(Artifact resource) throws UpdateException {
 
 		Logger.getLogger().debug(
 			Messages.getString(
@@ -266,7 +266,7 @@
 		if (!m_initialized)
 			initialize(m_context);
 
-		Resource publishedResource = null;
+		Artifact publishedResource = null;
 		try {
 			publishedResource =
 				m_repository.publishResource(m_context, resource);

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ResourceUpdaterEngine.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ResourceUpdaterEngine.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/impl/ResourceUpdaterEngine.java	Wed Jun 23 09:04:50 2004
@@ -21,7 +21,7 @@
 
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.update.Repository;
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.messaging.ResourceRequest;
 import org.apache.depot.update.protocols.DefaultProtocolOperationsManager;
@@ -32,7 +32,7 @@
 import org.apache.depot.update.repository.RepositoryManager;
 import org.apache.depot.update.repository.RepositorySet;
 import org.apache.depot.update.repository.RepositorySetSortContext;
-import org.apache.depot.update.resource.ResourceIdentifier;
+import org.apache.depot.update.resource.ArtifactIdentifier;
 import org.apache.depot.update.util.text.Messages;
 
 /**
@@ -79,8 +79,8 @@
 	//
 	// Queries/Helper Methods
 	// 
-	public final ResourceIdentifier resolveResource(final String id) {
-		return new ResourceIdentifier(id);
+	public final ArtifactIdentifier resolveResource(final String id) {
+		return new ArtifactIdentifier(id);
 	}
 
 	/**
@@ -140,7 +140,7 @@
 		//
 
 		for (Iterator i = resources.iterator(); i.hasNext();) {
-			Resource resource = (Resource) i.next();
+			Artifact resource = (Artifact) i.next();
 			try {
 				target.publishResource(resource);
 			}
@@ -164,7 +164,7 @@
 			new RepositoryWrapper(repository, m_context);
 
 		for (Iterator i = resources.iterator(); i.hasNext();) {
-			Resource resource = (Resource) i.next();
+			Artifact resource = (Artifact) i.next();
 			try {
 				repo.deleteResource(resource);
 			}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/monitor/ResourceEvent.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/monitor/ResourceEvent.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/monitor/ResourceEvent.java	Wed Jun 23 09:04:50 2004
@@ -16,7 +16,7 @@
 
 package org.apache.depot.update.monitor;
 
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 
 /**
  * @author arb_jack
@@ -28,9 +28,9 @@
 	public static final int RESULT = 2;
 
 	private int m_type = UNSET;
-	private Resource m_resource = null;
+	private Artifact m_resource = null;
 
-	public ResourceEvent(int type, Resource resource) {
+	public ResourceEvent(int type, Artifact resource) {
 		m_type = type;
 		m_resource = resource;
 	}
@@ -38,14 +38,14 @@
 	/**
 	 * @return
 	 */
-	public Resource getResource() {
+	public Artifact getResource() {
 		return m_resource;
 	}
 
 	/**
 	 * @param resource
 	 */
-	public void setResource(Resource resource) {
+	public void setResource(Artifact resource) {
 		m_resource = resource;
 	}
 

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 09:04:50 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.Resource;
+import org.apache.depot.update.Artifact;
 
 /**
  * @author anou_mana
@@ -87,7 +87,7 @@
 			//			switch (resourceEvent.getType()) {
 			//				case ResourceEvent.LISTED :
 			//					{
-			Resource resource = resourceEvent.getResource();
+			Artifact resource = resourceEvent.getResource();
 
 			m_resources.add(resource);
 

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 09:04:50 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.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.impl.RepositorySetWrapper;
 import org.apache.depot.update.impl.RepositoryWrapper;
 import org.apache.depot.update.monitor.Monitor;
 import org.apache.depot.update.monitor.ResourceEvent;
-import org.apache.depot.update.resource.ResourceGroup;
-import org.apache.depot.update.resource.compare.StandardResourceComparisons;
+import org.apache.depot.update.resource.ArtifactGroup;
+import org.apache.depot.update.resource.compare.StandardArtifactComparisons;
 import org.apache.depot.update.util.select.AllSelector;
 import org.apache.depot.update.util.select.ISelector;
 import org.apache.depot.update.util.text.MessageConstants;
@@ -114,7 +114,7 @@
 			//
 			if (null == orderBy)
 				orderBy =
-					StandardResourceComparisons
+					StandardArtifactComparisons
 						.getNameTypeVersionComparatorSequence();
 			orderBy(result, orderBy);
 
@@ -129,7 +129,7 @@
 					Monitor.getMonitor().notify(
 						new ResourceEvent(
 							ResourceEvent.RESULT,
-							(Resource) i.next()));
+							(Artifact) i.next()));
 				}
 			}
 
@@ -162,7 +162,7 @@
 						repo));
 
 				for (Iterator ii = resourceGroups.iterator(); ii.hasNext();) {
-					ResourceGroup resourceGroup = (ResourceGroup) ii.next();
+					ArtifactGroup resourceGroup = (ArtifactGroup) ii.next();
 
 					Logger.getLogger().debug(
 						Messages.getString(
@@ -228,10 +228,10 @@
 			// no?
 			Collections.sort(allResults, groupBy);
 
-			Resource currentResource = null;
+			Artifact currentResource = null;
 			List currentList = null;
 			for (Iterator i = allResults.iterator(); i.hasNext();) {
-				Resource resource = (Resource) i.next();
+				Artifact resource = (Artifact) i.next();
 
 				// Do we have a new group?
 				if ((null == currentList)

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceQuery.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceQuery.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceQuery.java	Wed Jun 23 09:04:50 2004
@@ -25,7 +25,7 @@
 import org.apache.depot.common.util.debug.Dumpable;
 import org.apache.depot.update.repository.RepositorySet;
 import org.apache.depot.update.repository.RepositorySetSortContext;
-import org.apache.depot.update.resource.ResourceGroup;
+import org.apache.depot.update.resource.ArtifactGroup;
 import org.apache.depot.update.util.select.ISelector;
 
 /**
@@ -75,7 +75,7 @@
 	// to allow re-use (especially for the more generic) 
 	//
 	public ResourceQuery(
-		ResourceGroup group,
+		ArtifactGroup group,
 		RepositorySet repositories,
 		ISelector where,
 		Comparator groupBy,
@@ -90,7 +90,7 @@
 	}
 
 	public ResourceQuery(
-		ResourceGroup group,
+		ArtifactGroup group,
 		ISelector where,
 		Comparator groupBy,
 		Comparator orderBy) {
@@ -102,7 +102,7 @@
 		m_orderBy = orderBy;
 	}
 
-	public ResourceQuery(ResourceGroup group) {
+	public ResourceQuery(ArtifactGroup group) {
 		m_groups = new ArrayList();
 		m_groups.add(group);
 	}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceQueryHelper.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceQueryHelper.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceQueryHelper.java	Wed Jun 23 09:04:50 2004
@@ -19,12 +19,12 @@
 import java.util.Comparator;
 
 import org.apache.depot.common.log.Logger;
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.repository.RepositorySet;
-import org.apache.depot.update.resource.ResourceGroup;
-import org.apache.depot.update.resource.ResourceSpecifier;
-import org.apache.depot.update.resource.compare.StandardResourceComparisons;
+import org.apache.depot.update.resource.ArtifactGroup;
+import org.apache.depot.update.resource.ArtifactSpecifier;
+import org.apache.depot.update.resource.compare.StandardArtifactComparisons;
 import org.apache.depot.update.resource.select.StandardSelections;
 import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.select.AllSelector;
@@ -37,24 +37,24 @@
  */
 public class ResourceQueryHelper {
 
-	public static ResourceQuery getResourceQuery(Resource resource)
+	public static ResourceQuery getResourceQuery(Artifact resource)
 		throws UpdateException {
 		return getResourceSpecifierQuery(resource.getSpecifier());
 	}
 
-	public static ResourceQuery getResourceSpecifierQuery(Resource resource)
+	public static ResourceQuery getResourceSpecifierQuery(Artifact resource)
 		throws UpdateException {
 		return getResourceSpecifierQuery(resource.getSpecifier());
 	}
 
 	public static ResourceQuery getResourceSpecifierQuery(
-		Resource resource,
+		Artifact resource,
 		RepositorySet repos)
 		throws UpdateException {
 		return getResourceSpecifierQuery(resource.getSpecifier(), repos);
 	}
 
-	public static ResourceQuery getResourceSpecifierQuery(ResourceSpecifier specifier)
+	public static ResourceQuery getResourceSpecifierQuery(ArtifactSpecifier specifier)
 		throws UpdateException {
 		return getResourceSpecifierQuery(
 			specifier,
@@ -62,7 +62,7 @@
 	}
 
 	public static ResourceQuery getResourceSpecifierQuery(
-		ResourceSpecifier specifier,
+		ArtifactSpecifier specifier,
 		RepositorySet repos)
 		throws UpdateException {
 
@@ -71,11 +71,11 @@
 
 			ISelector where = StandardSelections.getNamedTypedVersion(specifier);
 			Comparator orderBy =
-				StandardResourceComparisons
+				StandardArtifactComparisons
 					.getNameTypeVersionComparatorSequence();
 			//Comparator groupBy = StandardResourceComparisons.getNameVersion();
 			Comparator groupBy =
-				StandardResourceComparisons.getNameVersionComparatorSequence();
+				StandardArtifactComparisons.getNameVersionComparatorSequence();
 
 			resourceQuery =
 				new ResourceQuery(
@@ -94,7 +94,7 @@
 		return resourceQuery;
 	}
 
-	public static ResourceQuery getResourceGroupQuery(ResourceGroup group)
+	public static ResourceQuery getResourceGroupQuery(ArtifactGroup group)
 		throws UpdateException {
 		return getResourceGroupQuery(
 			group,
@@ -102,7 +102,7 @@
 	}
 
 	public static ResourceQuery getResourceGroupQuery(
-		ResourceGroup group,
+		ArtifactGroup group,
 		RepositorySet repos)
 		throws UpdateException {
 
@@ -114,10 +114,10 @@
 			//
 			ISelector where = AllSelector.getInstance();
 			Comparator orderBy =
-				StandardResourceComparisons
+				StandardArtifactComparisons
 					.getNameTypeVersionComparatorSequence();
 			Comparator groupBy =
-				StandardResourceComparisons.getNameVersionComparatorSequence();
+				StandardArtifactComparisons.getNameVersionComparatorSequence();
 
 			resourceQuery =
 				new ResourceQuery(group, repos, where, groupBy, orderBy);

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceResult.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceResult.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceResult.java	Wed Jun 23 09:04:50 2004
@@ -24,7 +24,7 @@
 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.Resource;
+import org.apache.depot.update.Artifact;
 
 /**
  * @author arb_jack
@@ -113,9 +113,9 @@
 	 * @param this
 	 * @return
 	 */
-	public static Resource getFirstResource(ResourceResult res) {
+	public static Artifact getFirstResource(ResourceResult res) {
 		List l = (List) res.get(0);
-		Resource resource = (Resource) l.get(0);
+		Artifact resource = (Artifact) l.get(0);
 		return resource;
 	}
 

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceResultHelper.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceResultHelper.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/query/ResourceResultHelper.java	Wed Jun 23 09:04:50 2004
@@ -21,7 +21,7 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 
 /**
  * @author arb_jack
@@ -150,10 +150,10 @@
 
 						//:TODO: Hmm ... sort w/ comp?
 
-						Resource resource1 =
-							(Resource) list1.get(list1.size() - 1);
-						Resource resource2 =
-							(Resource) list2.get(list2.size() - 1);
+						Artifact resource1 =
+							(Artifact) list1.get(list1.size() - 1);
+						Artifact resource2 =
+							(Artifact) list2.get(list2.size() - 1);
 
 						comparison = comp.compare(resource1, resource2);
 					}

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 09:04:50 2004
@@ -21,10 +21,10 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.impl.ResourceUpdaterContext;
-import org.apache.depot.update.resource.ResourceGroup;
-import org.apache.depot.update.resource.compare.StandardResourceComparisons;
+import org.apache.depot.update.resource.ArtifactGroup;
+import org.apache.depot.update.resource.compare.StandardArtifactComparisons;
 import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.compare.ComparisonHelper;
 import org.apache.depot.update.util.flag.Flag;
@@ -116,7 +116,7 @@
 
 	public List listSpecifiers(
 		ResourceUpdaterContext context,
-		ResourceGroup group,
+		ArtifactGroup group,
 		ISelector selector)
 		throws Exception {
 
@@ -127,7 +127,7 @@
 			List unique =
 				ComparisonHelper.sortUnique(
 					resources,
-					StandardResourceComparisons
+					StandardArtifactComparisons
 						.getNameTypeComparatorSequence());
 
 			if (!unique.isEmpty()) {
@@ -138,13 +138,13 @@
 				//
 				Collections.sort(
 					unique,
-					StandardResourceComparisons
+					StandardArtifactComparisons
 						.getNameTypeVersionComparatorSequence());
 
 				results = new ArrayList(unique.size());
 
 				for (Iterator i = unique.iterator(); i.hasNext();) {
-					results.add(((Resource) i.next()).getSpecifier());
+					results.add(((Artifact) i.next()).getSpecifier());
 				}
 			}
 			else
@@ -158,14 +158,14 @@
 
 	public RepositoryManifest getManifest(
 		ResourceUpdaterContext context,
-		ResourceGroup group,
+		ArtifactGroup group,
 		ISelector selector)
 		throws Exception {
 
 		return new RepositoryManifest(listResources(context, group, selector));
 	}
 
-	public VirtualResourceLocator folderForGroup(ResourceGroup group) {
+	public VirtualResourceLocator folderForGroup(ArtifactGroup group) {
 
 		return m_hierarchical
 			? new VirtualResourceLocator(

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 09:04:50 2004
@@ -24,14 +24,14 @@
 import org.apache.depot.common.util.debug.DebugUtils;
 import org.apache.depot.common.util.debug.Dumpable;
 import org.apache.depot.update.Repository;
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 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.ResourceUpdaterContext;
-import org.apache.depot.update.resource.ResourceGroup;
+import org.apache.depot.update.resource.ArtifactGroup;
 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;
@@ -156,7 +156,7 @@
 
 	public List listSpecifiers(
 		ResourceUpdaterContext context,
-		ResourceGroup group,
+		ArtifactGroup group,
 		ISelector selector)
 		throws Exception {
 		throw new RepositoryException(
@@ -167,16 +167,16 @@
 
 	public void deleteResource(
 		ResourceUpdaterContext context,
-		Resource resource)
+		Artifact resource)
 		throws Exception {
 		throw new RepositoryException(
 			this,
 			"Unsupported Capability: " + RepositoryCapability.DELETABLE);
 	}
 
-	public Resource publishResource(
+	public Artifact publishResource(
 		ResourceUpdaterContext context,
-		Resource resource)
+		Artifact resource)
 		throws Exception {
 		if (true)
 			throw new RepositoryException(
@@ -216,7 +216,7 @@
 		DebugUtils.dump(out, depth + 1, "Atributes", verbose, m_attributes);
 	}
 
-	public abstract VirtualResourceLocator folderForGroup(ResourceGroup group);
+	public abstract VirtualResourceLocator folderForGroup(ArtifactGroup group);
 
 	public void initialize(ResourceUpdaterContext context) throws Exception {
 		if (m_init)

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 09:04:50 2004
@@ -16,7 +16,7 @@
 package org.apache.depot.update.repository;
 import java.util.List;
 import org.apache.depot.update.impl.ResourceUpdaterContext;
-import org.apache.depot.update.resource.ResourceGroup;
+import org.apache.depot.update.resource.ArtifactGroup;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
 import org.apache.depot.update.util.select.ISelector;
 /**
@@ -45,7 +45,7 @@
 	 * 
 	 * @see org.apache.depot.update.repository.AbstractRepository#folderForGroup(org.apache.depot.update.resource.ResourceGroup)
 	 */
-	public VirtualResourceLocator folderForGroup(ResourceGroup group) {
+	public VirtualResourceLocator folderForGroup(ArtifactGroup group) {
 		// TODO Auto-generated method stub
 		return null;
 	}
@@ -68,7 +68,7 @@
 	 *      org.apache.depot.update.util.select.ISelector)
 	 */
 	public RepositoryManifest getManifest(ResourceUpdaterContext context,
-			ResourceGroup group, ISelector selector) throws Exception {
+			ArtifactGroup group, ISelector selector) throws Exception {
 		// TODO Auto-generated method stub
 		return null;
 	}
@@ -80,7 +80,7 @@
 	 *      org.apache.depot.update.util.select.ISelector)
 	 */
 	public List listResources(ResourceUpdaterContext context,
-			ResourceGroup group, ISelector selector) throws Exception {
+			ArtifactGroup group, ISelector selector) throws Exception {
 		// TODO Auto-generated method stub
 		return null;
 	}

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 09:04:50 2004
@@ -21,10 +21,10 @@
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.common.util.SystemUtils;
 import org.apache.depot.update.Repository;
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.impl.ReferenceManager;
 import org.apache.depot.update.impl.ResourceUpdaterContext;
-import org.apache.depot.update.resource.ResourceGroup;
+import org.apache.depot.update.resource.ArtifactGroup;
 import org.apache.depot.update.util.UpdateConstants;
 import org.apache.depot.update.util.io.ResolvedFile;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
@@ -100,7 +100,7 @@
 	}
 
 	public List listResources(final ResourceUpdaterContext context,
-			final ResourceGroup group, final ISelector selector)
+			final ArtifactGroup group, final ISelector selector)
 			throws Exception {
 
 		List results = null;
@@ -125,11 +125,11 @@
 		return results;
 	}
 
-	public Resource publishResource(ResourceUpdaterContext context,
-			Resource resource) throws Exception {
+	public Artifact publishResource(ResourceUpdaterContext context,
+			Artifact resource) throws Exception {
 
 		// Create the 'remote' resource
-		Resource publishedResource = new Resource(resource);
+		Artifact publishedResource = new Artifact(resource);
 		publishedResource.setLocation(new VirtualResourceLocator(
 				folderForGroup(resource.getGroup()), resource.getFilename()));
 
@@ -140,7 +140,7 @@
 		return publishedResource;
 	}
 
-	public void deleteResource(ResourceUpdaterContext context, Resource resource)
+	public void deleteResource(ResourceUpdaterContext context, Artifact resource)
 			throws Exception {
 
 		// Perform copy

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 09:04:50 2004
@@ -20,9 +20,9 @@
 import java.util.List;
 
 import org.apache.depot.update.Repository;
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.impl.ResourceUpdaterContext;
-import org.apache.depot.update.resource.ResourceGroup;
+import org.apache.depot.update.resource.ArtifactGroup;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
 import org.apache.depot.update.util.select.ISelector;
 import org.apache.depot.update.util.select.SelectionHelper;
@@ -44,32 +44,32 @@
 		List groups = new ArrayList();
 
 		// :TODO: Populate with some test groups...
-		groups.add(ResourceGroup.getTestGroup("test1"));
-		groups.add(ResourceGroup.getTestGroup("test2"));
-		groups.add(ResourceGroup.getTestGroup("test3"));
+		groups.add(ArtifactGroup.getTestGroup("test1"));
+		groups.add(ArtifactGroup.getTestGroup("test2"));
+		groups.add(ArtifactGroup.getTestGroup("test3"));
 
 		return groups;
 	}
 
 	public List listResources(final ResourceUpdaterContext context,
-			final ResourceGroup group, final ISelector selector)
+			final ArtifactGroup group, final ISelector selector)
 			throws Exception {
 
 		List results = null;
 
 		folderForGroup(group);
 
-		List resourceList = Resource.getTestResourceList(group.getGroup(), 10);
+		List resourceList = Artifact.getTestResourceList(group.getGroup(), 10);
 
 		results = SelectionHelper.select(resourceList, selector);
 
 		return results;
 	}
 
-	public Resource publishResource(ResourceUpdaterContext context,
-			Resource resource) throws Exception {
+	public Artifact publishResource(ResourceUpdaterContext context,
+			Artifact resource) throws Exception {
 
-		Resource publishedResource = new Resource(resource);
+		Artifact publishedResource = new Artifact(resource);
 
 		publishedResource.setLocation(new VirtualResourceLocator(
 				folderForGroup(resource.getGroup()), resource.getFilename()));

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositoryManifest.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositoryManifest.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/repository/RepositoryManifest.java	Wed Jun 23 09:04:50 2004
@@ -23,8 +23,8 @@
 
 import org.apache.depot.common.util.debug.DebugUtils;
 import org.apache.depot.common.util.debug.Dumpable;
-import org.apache.depot.update.Resource;
-import org.apache.depot.update.resource.ResourceType;
+import org.apache.depot.update.Artifact;
+import org.apache.depot.update.resource.ArtifactType;
 import org.apache.depot.update.util.identity.GenericIdentifier;
 import org.apache.depot.version.Version;
 
@@ -96,10 +96,10 @@
 	public void importInformation(List resources) {
 
 		for (Iterator i = resources.iterator(); i.hasNext();) {
-			Resource resource = (Resource) i.next();
+			Artifact resource = (Artifact) i.next();
 
 			// Extract all the types, and store
-			ResourceType type = resource.getType();
+			ArtifactType type = resource.getType();
 			if (!m_types.contains(type))
 				m_types.add(type);
 

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactAttribute.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactAttribute.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,44 @@
+/*
+ * 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.resource;
+
+import org.apache.depot.update.util.flag.Flag;
+import org.apache.depot.update.util.xml.IXMLAttribute;
+
+/**
+ * @author arb_jack
+ */
+public class ArtifactAttribute extends Flag implements IXMLAttribute{
+	
+	public static final String RESOURCE_ATTRIBUTE_CLASSNAME = ArtifactAttribute.class.getName();
+	
+	/**
+	 * Where the MD5 checksum is ...
+	 */
+	public static final ArtifactAttribute MD5_LOCATION =
+		new ArtifactAttribute(ArtifactConstants.MD5_LOCATION);
+
+	/**
+	 * Where the ASC checksum is ...
+	 */
+	public static final ArtifactAttribute ASC_LOCATION =
+		new ArtifactAttribute(ArtifactConstants.ASC_LOCATION);
+
+	private ArtifactAttribute(final String name) {
+		super(name);
+	}
+}

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactAttributeMap.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactAttributeMap.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,55 @@
+/*
+ * 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.resource;
+
+import java.util.List;
+
+import org.apache.depot.update.util.flag.FlagMap;
+
+/**
+ * @author arb_jack
+ */
+public class ArtifactAttributeMap extends FlagMap {
+
+	/**
+	 * 
+	 */
+	public ArtifactAttributeMap() {
+		super();
+	}
+
+	/**
+	 * @param arg0
+	 */
+	public ArtifactAttributeMap(int initialSize) {
+		super(initialSize);
+	}
+	
+	/**
+	* Determines if this set has a particular attribute.
+	*/
+	public boolean hasAttribute(ArtifactAttribute attribute) {
+		return hasFlag(attribute);
+	}
+
+	/**
+	* Determines if this set has a particular set of attributes.
+	*/
+	public boolean hasAttributes(List attributes) {
+		return hasFlags(attributes);
+	}
+}

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactConstants.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactConstants.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,27 @@
+/*
+ * 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.resource;
+
+/**
+ * @author anou_mana
+ */
+public class ArtifactConstants
+{
+	// Attribute
+	public final static String MD5_LOCATION = "MD5_LOCATION";
+	public final static String ASC_LOCATION = "ASC_LOCATION";
+}

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactGroup.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactGroup.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,64 @@
+/*
+ * 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.resource;
+/**
+ * @author <a href="http://incubator.apache.org/depot">The Apache Incubator Depot Project</a>
+ */
+public class ArtifactGroup {
+	public String m_group = null;
+	
+	public ArtifactGroup(String group) {
+		if(group == null)throw new NullPointerException("group must be set");
+		m_group = group;
+	}	
+	
+	/*
+		  * (non-Javadoc)
+		  * 
+		  * @see java.lang.Object#equals(java.lang.Object)
+		  */
+	public boolean equals(Object otherGroup) {
+		return m_group.equals(((ArtifactGroup) otherGroup).m_group);
+	}
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		return m_group.hashCode();
+	}
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		return m_group;
+	}
+	/**
+	 * @return
+	 */
+	public String getGroup() {
+		return m_group;
+	}
+	public static ArtifactGroup getTestGroup() {
+		return getTestGroup("test");
+	}
+	public static ArtifactGroup getTestGroup(String name) {
+		return new ArtifactGroup(name);
+	}
+}

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactIdentifier.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactIdentifier.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,32 @@
+/*
+ * 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.resource;
+
+import org.apache.depot.update.util.identity.GenericIdentifier;
+
+/**
+ * @author arb_jack
+ */
+public class ArtifactIdentifier extends GenericIdentifier {
+
+	public final static String JAVA_URI = "http://apache.org/java";
+	public final static String JAVA_PREFIX = "java";
+
+	public ArtifactIdentifier(String id) {
+		super(JAVA_URI, JAVA_PREFIX, id);
+	}
+}

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactLocator.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactLocator.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,120 @@
+/*
+ * 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.resource;
+
+import java.io.PrintWriter;
+
+import org.apache.depot.common.util.debug.DebugUtils;
+import org.apache.depot.update.util.net.VirtualResourceLocator;
+
+/**
+ * @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  {
+
+	//
+	//	Where is this thing?
+	//	
+	private String m_filename = null;
+	private VirtualResourceLocator m_location = null;
+
+	//
+	// Construct a ResourceLocator
+	//
+	public ArtifactLocator(
+		String filename,
+		VirtualResourceLocator location) {
+
+		m_filename = filename;
+		m_location = location;
+
+	}
+
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
+	public boolean equals(Object other) {
+		boolean equal = true;
+
+		if (other instanceof ArtifactLocator) {
+			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);
+		}
+		else
+			throw new IllegalArgumentException(
+				"Not a ResourceLocator: " + other.getClass().getName());
+
+		return equal;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#hashCode()
+	 */
+	public int hashCode() {
+		int hash = 0;
+
+		hash += m_location.hashCode();
+		
+		return hash;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Object#toString()
+	 */
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+
+		if (null != m_filename) {
+			buffer.append(m_filename);
+		}
+		
+		if (null != m_location) {
+			buffer.append(':');
+			buffer.append(m_location.toString());
+		}
+
+		return buffer.toString();
+	}
+
+	public void dump(PrintWriter out, int depth, boolean verbose) {
+		String indent = DebugUtils.getIndent(depth);
+
+		out.print(indent);
+		out.println("ResourceLocator Filename: " + m_filename);
+
+		out.print(indent);
+		out.println("ResourceLocator Location: " + m_location);
+
+	}
+
+
+}

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactSpecifier.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactSpecifier.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,132 @@
+/*
+ * 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.resource;
+
+import java.io.PrintWriter;
+
+import org.apache.depot.common.util.debug.DebugUtils;
+import org.apache.depot.common.util.debug.Dumpable;
+import org.apache.depot.version.Version;
+
+/**
+ * @author arb_jack
+ */
+public class ArtifactSpecifier implements Dumpable {
+	private ArtifactGroup m_group = null;
+	private ArtifactIdentifier m_identifier = null;
+	private ArtifactType m_type = null;
+	private Version m_version = null;
+
+	public ArtifactSpecifier(String name) {
+		m_group = new ArtifactGroup(name);
+		m_identifier = new ArtifactIdentifier(name);
+		m_type = ArtifactType.JAVA_BINARY;
+		m_version = null;
+	}
+
+	public ArtifactSpecifier(
+		ArtifactGroup group,
+		ArtifactIdentifier identifier,
+		ArtifactType type,
+		Version version) {
+		m_group = group;
+		m_identifier = identifier;
+		m_type = type;
+		m_version = version;
+	}
+
+	/**
+	 * @return
+	 */
+	public ArtifactIdentifier getIdentifier() {
+		return m_identifier;
+	}
+
+	/**
+	 * @return
+	 */
+	public ArtifactType getType() {
+		return m_type;
+	}
+
+	/**
+	 * @param identifier
+	 */
+	public void setIdentifier(ArtifactIdentifier identifier) {
+		m_identifier = identifier;
+	}
+
+	/**
+	 * @param type
+	 */
+	public void setType(ArtifactType type) {
+		m_type = type;
+	}
+
+	/**
+	 * @return
+	 */
+	public Version getVersion() {
+		return m_version;
+	}
+
+	/**
+	 * @return
+	 */
+	public ArtifactGroup getGroup() {
+		return m_group;
+	}
+
+	public String toString() {
+		StringBuffer buffer = new StringBuffer();
+
+		if (!m_group.getGroup().equals(m_identifier.getId())) {
+			buffer.append("{");
+			buffer.append(m_group.toString());
+			buffer.append("}: ");
+		}
+
+		buffer.append(m_identifier.getId());
+		buffer.append(" (");
+		buffer.append(m_type.getPrefix());
+		buffer.append(") ");
+		
+		if (null != m_version) {
+			buffer.append(m_version.toString());
+		}
+
+		return buffer.toString();
+	}
+
+	public void dump(PrintWriter out, int depth, boolean verbose) {
+		String indent = DebugUtils.getIndent(depth);
+
+		out.print(indent);
+		out.println("Resource Identifier: " + m_identifier);
+
+		out.print(indent);
+		out.println("Resource Type: " + m_type);
+
+		out.print(indent);
+		out.println("Resource Group: " + m_group);
+
+		if (null != m_version) {
+			out.print(indent);
+			out.println("Resource Version: " + m_version);
+		}
+	}
+}

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactType.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/ArtifactType.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,65 @@
+/*
+ * 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.resource;
+
+import org.apache.depot.update.util.identity.GenericNamespace;
+
+/**
+ * @author arb_jack
+ */
+public class ArtifactType extends GenericNamespace {
+
+	public final static ArtifactType UNKNOWN =
+		new ArtifactType("http://apache.org/resource/unknown", "unknown");
+
+	public final static ArtifactType JAVA_BINARY =
+		new ArtifactType("http://apache.org/resource/java", "java");
+
+	public final static ArtifactType SOURCE_CODE =
+		new ArtifactType("http://apache.org/resource/src", "src");
+
+	public final static ArtifactType DOCUMENTATION =
+		new ArtifactType("http://apache.org/resource/docs", "docs");
+
+	public ArtifactType(String uri, String prefix) {
+		super(uri, prefix);
+	}
+
+	public static ArtifactType getFromString(String typeStr) {
+		ArtifactType type = ArtifactType.UNKNOWN;
+
+		if ((null == typeStr) || ("" == typeStr) || ("java" == typeStr)) {
+			type = ArtifactType.JAVA_BINARY;
+		}
+		//:TODO: Hack...
+		else if ("src".equals(typeStr)) {
+			type = ArtifactType.SOURCE_CODE;
+		}
+		else if ("docs".equals(typeStr)) {
+			type = ArtifactType.DOCUMENTATION;
+		}
+
+		// :TODO: 
+
+		return type;
+	}
+
+	// :TODO: Bit of a hack to allow RT -> String -> RT
+	public String toString() {
+		return getPrefix();
+	}
+}

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/AbstractArtifactComparator.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/AbstractArtifactComparator.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,79 @@
+/*
+ * 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.resource.compare;
+
+import java.util.Comparator;
+
+import org.apache.depot.update.Artifact;
+import org.apache.depot.update.util.text.MessageConstants;
+import org.apache.depot.update.util.text.Messages;
+
+/**
+ * @author arb_jack
+ */
+public abstract class AbstractArtifactComparator implements Comparator {
+	private String m_description = null;
+
+	protected AbstractArtifactComparator(String description) {
+		m_description = description;
+	}
+
+	public int compare(final Object object1, final Object object2) {
+		int comparison = 0;
+
+		if (object1 instanceof Artifact) {
+			if (object2 instanceof Artifact) {
+
+				//				System.out.println(
+				//					SystemUtils.getShortName(getClass())
+				//						+ ": "
+				//						+ object1
+				//						+ " & "
+				//						+ object2);
+
+				comparison =
+					compareResources((Artifact) object1, (Artifact) object2);
+			}
+			else {
+				throw new IllegalArgumentException(
+					Messages.getString(
+						MessageConstants.WRONG_TYPE,
+						new Object[] {
+							object2.getClass().getName(),
+							Artifact.class.getName()}));
+			}
+		}
+		else {
+			throw new IllegalArgumentException(
+				Messages.getString(
+					MessageConstants.WRONG_TYPE,
+					new Object[] {
+						object1.getClass().getName(),
+						Artifact.class.getName()}));
+		}
+
+		return comparison;
+	}
+
+	public String toString() {
+		return m_description;
+	}
+
+	public abstract int compareResources(
+		final Artifact resource1,
+		final Artifact resource2);
+}

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/AbstractArtifactGroupComparator.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/AbstractArtifactGroupComparator.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,79 @@
+/*
+ * 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.resource.compare;
+
+import java.util.Comparator;
+
+import org.apache.depot.update.resource.ArtifactGroup;
+import org.apache.depot.update.util.text.MessageConstants;
+import org.apache.depot.update.util.text.Messages;
+
+/**
+ * @author arb_jack
+ */
+public abstract class AbstractArtifactGroupComparator implements Comparator {
+	private String m_description = null;
+
+	protected AbstractArtifactGroupComparator(String description) {
+		m_description = description;
+	}
+
+	public int compare(final Object object1, final Object object2) {
+		int comparison = 0;
+
+		if (object1 instanceof ArtifactGroup) {
+			if (object2 instanceof ArtifactGroup) {
+
+				//				System.out.println(
+				//					SystemUtils.getShortName(getClass())
+				//						+ ": "
+				//						+ object1
+				//						+ " & "
+				//						+ object2);
+
+				comparison =
+					compareResourceGroups((ArtifactGroup) object1, (ArtifactGroup) object2);
+			}
+			else {
+				throw new IllegalArgumentException(
+					Messages.getString(
+						MessageConstants.WRONG_TYPE,
+						new Object[] {
+							object2.getClass().getName(),
+							ArtifactGroup.class.getName()}));
+			}
+		}
+		else {
+			throw new IllegalArgumentException(
+				Messages.getString(
+					MessageConstants.WRONG_TYPE,
+					new Object[] {
+						object1.getClass().getName(),
+						ArtifactGroup.class.getName()}));
+		}
+
+		return comparison;
+	}
+
+	public String toString() {
+		return m_description;
+	}
+
+	public abstract int compareResourceGroups(
+		final ArtifactGroup resourceGroup1,
+		final ArtifactGroup resourceGroup2);
+}

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/ArtifactGroupNameComparator.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/ArtifactGroupNameComparator.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,53 @@
+/*
+ * 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.resource.compare;
+
+import java.util.Comparator;
+
+import org.apache.depot.update.resource.ArtifactGroup;
+import org.apache.depot.update.util.text.MessageConstants;
+import org.apache.depot.update.util.text.Messages;
+
+/**
+ * @author arb_jack
+ * 
+ * Compare two entities by their group name.
+ */
+public final class ArtifactGroupNameComparator extends AbstractArtifactGroupComparator {
+
+	private static final ArtifactGroupNameComparator INSTANCE = new ArtifactGroupNameComparator();
+
+	/**
+	 * @param expression
+	 */
+	private ArtifactGroupNameComparator() {
+		super(Messages.getString(MessageConstants.NAME_COMPARATOR));
+	}
+
+	public static Comparator getInstance() {
+		return INSTANCE;
+	}
+
+	public int compareResourceGroups(
+		final ArtifactGroup resourceGroup1,
+		final ArtifactGroup resourceGroup2) {
+		int comparison =
+			resourceGroup1.getGroup().compareToIgnoreCase(
+				resourceGroup2.getGroup());
+		return comparison;
+	}
+}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/FilenameComparator.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/FilenameComparator.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/FilenameComparator.java	Wed Jun 23 09:04:50 2004
@@ -18,14 +18,14 @@
 
 import java.util.Comparator;
 
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
 
 /**
  * @author arb_jack
  */
-public final class FilenameComparator extends AbstractResourceComparator {
+public final class FilenameComparator extends AbstractArtifactComparator {
 
 	private static final FilenameComparator INSTANCE = new FilenameComparator();
 
@@ -40,7 +40,7 @@
 		return INSTANCE;
 	}
 
-	public int compareResources(final Resource resource1, final Resource resource2) {
+	public int compareResources(final Artifact resource1, final Artifact resource2) {
 		int comparison =
 			resource1.getFilename().compareToIgnoreCase(
 				resource2.getFilename());

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/NameComparator.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/NameComparator.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/NameComparator.java	Wed Jun 23 09:04:50 2004
@@ -18,7 +18,7 @@
 
 import java.util.Comparator;
 
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
 
@@ -27,7 +27,7 @@
  * 
  * Compare two entities by name (i.e. id).
  */
-public final class NameComparator extends AbstractResourceComparator {
+public final class NameComparator extends AbstractArtifactComparator {
 
 	private static final NameComparator INSTANCE = new NameComparator();
 
@@ -43,8 +43,8 @@
 	}
 
 	public int compareResources(
-		final Resource resource1,
-		final Resource resource2) {
+		final Artifact resource1,
+		final Artifact resource2) {
 		int comparison =
 			resource1.getIdentifier().getId().compareToIgnoreCase(
 				resource2.getIdentifier().getId());

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/StandardArtifactComparisons.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/StandardArtifactComparisons.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,88 @@
+/*
+ * 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.resource.compare;
+
+import org.apache.depot.update.util.compare.ComparatorSequence;
+
+/**
+ * @author arb_jack
+ * @author anou_mana
+ */
+public class StandardArtifactComparisons {
+
+	private static ComparatorSequence l_nameTypeVersion = null;
+	private static ComparatorSequence l_nameVersion = null;
+	private static ComparatorSequence l_name = null;
+	private static ComparatorSequence l_version = null;
+	private static ComparatorSequence l_nameType = null;
+
+	static {
+		l_nameTypeVersion = new ComparatorSequence();
+		l_nameTypeVersion.addComparator(NameComparator.getInstance());
+		l_nameTypeVersion.addComparator(TypeComparator.getInstance());
+		l_nameTypeVersion.addComparator(VersionComparator.getInstance());
+
+		l_nameVersion = new ComparatorSequence();
+		l_nameVersion.addComparator(NameComparator.getInstance());
+		l_nameVersion.addComparator(VersionComparator.getInstance());
+		
+		l_name = new ComparatorSequence();
+		l_name.addComparator(NameComparator.getInstance());
+		
+		l_version = new ComparatorSequence();
+		l_version.addComparator(VersionComparator.getInstance());
+		
+		l_nameType = new ComparatorSequence();
+		l_nameType.addComparator(NameComparator.getInstance());
+		l_nameType.addComparator(TypeComparator.getInstance());
+	}
+
+	/**
+	 * @return
+	 */
+	public static ComparatorSequence getNameTypeVersionComparatorSequence() {
+		return l_nameTypeVersion;
+	}
+	
+	/**
+	 * @return
+	 */
+	public static ComparatorSequence getNameTypeComparatorSequence() {
+		return l_nameType;
+	}
+	
+	/**
+	 * @return
+	 */
+	public static ComparatorSequence getNameVersionComparatorSequence() {
+		return l_nameVersion;
+	}
+	
+	/**
+	 * @return
+	 */
+	public static ComparatorSequence getVersionComparatorSequence() {
+		return l_version;
+	}
+	
+	/**
+	 * @return
+	 */
+	public static ComparatorSequence getNameComparatorSequence() {
+		return l_name;
+	}
+}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/TypeComparator.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/TypeComparator.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/TypeComparator.java	Wed Jun 23 09:04:50 2004
@@ -18,7 +18,7 @@
 
 import java.util.Comparator;
 
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
 
@@ -27,7 +27,7 @@
  * 
  * Compare two resources by their Type.
  */
-public final class TypeComparator extends AbstractResourceComparator {
+public final class TypeComparator extends AbstractArtifactComparator {
 
 	private static final TypeComparator INSTANCE = new TypeComparator();
 
@@ -43,8 +43,8 @@
 	}
 
 	public int compareResources(
-		final Resource resource1,
-		final Resource resource2) {
+		final Artifact resource1,
+		final Artifact resource2) {
 		int comparison =
 			resource1.getType().compareTo(
 				resource2.getType());

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/VersionComparator.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/VersionComparator.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/compare/VersionComparator.java	Wed Jun 23 09:04:50 2004
@@ -16,14 +16,14 @@
 package org.apache.depot.update.resource.compare;
 import java.util.Comparator;
 
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
 import org.apache.depot.version.Version;
 /**
  * Compare two Resources by Version.
  */
-public final class VersionComparator extends AbstractResourceComparator {
+public final class VersionComparator extends AbstractArtifactComparator {
 	public static final Comparator INSTANCE = new VersionComparator();
 	/**
 	 * Campare to Resources by Version in reverse order.
@@ -42,8 +42,8 @@
 	public static Comparator getInstance() {
 		return INSTANCE;
 	}
-	public int compareResources(final Resource resource1,
-			final Resource resource2) {
+	public int compareResources(final Artifact resource1,
+			final Artifact resource2) {
 		final Version version1 = resource1.getVersion();
 		final Version version2 = resource2.getVersion();
 		int comparison = 0;

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/AbstractArtifactSelector.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/AbstractArtifactSelector.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,57 @@
+/*
+ * 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.resource.select;
+
+import org.apache.depot.common.util.SystemUtils;
+import org.apache.depot.update.Artifact;
+import org.apache.depot.update.util.select.ISelector;
+import org.apache.depot.update.util.text.MessageConstants;
+import org.apache.depot.update.util.text.Messages;
+
+/**
+ * @author arb_jack
+ */
+public abstract class AbstractArtifactSelector implements ISelector {
+	private String m_description = null;
+
+	protected AbstractArtifactSelector(String description) {
+		m_description = description;
+	}
+
+	public boolean select(final Object object) {
+		boolean selected = false;
+
+		if (object instanceof Artifact) {
+			selected = selectResource((Artifact) object);
+		}
+		else {
+			throw new IllegalArgumentException(
+				Messages.getString(
+					MessageConstants.WRONG_TYPE,
+					object.getClass().getName(),
+					Artifact.class.getName()));
+		}
+
+		return selected;
+	}
+
+	public String toString() {
+		return SystemUtils.getShortName(getClass());
+	}
+
+	public abstract boolean selectResource(final Artifact resource);
+}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/FilenameSelector.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/FilenameSelector.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/FilenameSelector.java	Wed Jun 23 09:04:50 2004
@@ -16,7 +16,7 @@
 
 package org.apache.depot.update.resource.select;
 
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.util.regexp.RegularExpression;
 import org.apache.depot.update.util.regexp.RegularExpressionSelector;
 import org.apache.depot.update.util.text.MessageConstants;
@@ -25,7 +25,7 @@
 /**
  * @author arb_jack
  */
-public class FilenameSelector extends AbstractResourceSelector {
+public class FilenameSelector extends AbstractArtifactSelector {
 	RegularExpressionSelector m_regexp = null;
 
 	/**
@@ -45,7 +45,7 @@
 		m_regexp = new RegularExpressionSelector(expression);
 	}
 
-	public boolean selectResource(Resource resource) {
+	public boolean selectResource(Artifact resource) {
 		return m_regexp.select(resource.getFilename());
 	}
 

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/NameSelector.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/NameSelector.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/NameSelector.java	Wed Jun 23 09:04:50 2004
@@ -16,7 +16,7 @@
 
 package org.apache.depot.update.resource.select;
 
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.util.regexp.RegularExpression;
 import org.apache.depot.update.util.regexp.RegularExpressionSelector;
 import org.apache.depot.update.util.text.MessageConstants;
@@ -25,7 +25,7 @@
 /**
  * @author arb_jack
  */
-public class NameSelector extends AbstractResourceSelector {
+public class NameSelector extends AbstractArtifactSelector {
 	RegularExpressionSelector m_regexp = null;
 	
 	/**
@@ -46,7 +46,7 @@
 		m_regexp = new RegularExpressionSelector(expression);
 	}
 
-	public boolean selectResource(Resource resource) {
+	public boolean selectResource(Artifact resource) {
 		return m_regexp.select(resource.getIdentifier().getId());
 	}
 

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/ReleaseLevelSelector.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/ReleaseLevelSelector.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/ReleaseLevelSelector.java	Wed Jun 23 09:04:50 2004
@@ -17,7 +17,7 @@
 package org.apache.depot.update.resource.select;
 
 import org.apache.depot.common.log.Logger;
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
 import org.apache.depot.version.Version;
@@ -27,7 +27,7 @@
 /**
  * @author arb_jack
  */
-public class ReleaseLevelSelector extends AbstractResourceSelector {
+public class ReleaseLevelSelector extends AbstractArtifactSelector {
 	ReleaseLevel m_comparisonLevel = null;
 
 	/**
@@ -38,7 +38,7 @@
 		m_comparisonLevel = comparisonLevel;
 	}
 
-	public boolean selectResource(Resource resource) {
+	public boolean selectResource(Artifact resource) {
 		boolean selected = false;
 
 		Logger log = Logger.g_loggingOn ? Logger.getLogger() : null;

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/StandardSelections.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/StandardSelections.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/StandardSelections.java	Wed Jun 23 09:04:50 2004
@@ -16,7 +16,7 @@
 
 package org.apache.depot.update.resource.select;
 
-import org.apache.depot.update.resource.ResourceSpecifier;
+import org.apache.depot.update.resource.ArtifactSpecifier;
 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(ResourceSpecifier resource) {
+	public static ISelector getNamedTypedVersion(ArtifactSpecifier resource) {
 		AndSelector set = new AndSelector();
 
 		set.addSelector(new NameSelector(resource.getIdentifier().getId()));

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/TypeSelector.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/TypeSelector.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/TypeSelector.java	Wed Jun 23 09:04:50 2004
@@ -16,29 +16,29 @@
 
 package org.apache.depot.update.resource.select;
 
-import org.apache.depot.update.Resource;
-import org.apache.depot.update.resource.ResourceType;
+import org.apache.depot.update.Artifact;
+import org.apache.depot.update.resource.ArtifactType;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
 
 /**
  * @author arb_jack
  */
-public class TypeSelector extends AbstractResourceSelector  {
-	ResourceType m_comparisonType = null;
+public class TypeSelector extends AbstractArtifactSelector  {
+	ArtifactType m_comparisonType = null;
 
 	/**
 	 * @param expression
 	 */
-	public TypeSelector(ResourceType comparisonType) {
+	public TypeSelector(ArtifactType comparisonType) {
 		super(Messages.getString(MessageConstants.TYPE_SELECTOR));		
 		m_comparisonType = comparisonType;
 	}
 
-	public boolean selectResource(Resource resource) {
+	public boolean selectResource(Artifact resource) {
 		boolean selected = false;
 
-		ResourceType type = resource.getType();
+		ArtifactType type = resource.getType();
 
 		if (null != type) {
 			//:TODO: More features...

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/VersionConstraintsSelector.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/VersionConstraintsSelector.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/VersionConstraintsSelector.java	Wed Jun 23 09:04:50 2004
@@ -17,7 +17,7 @@
 package org.apache.depot.update.resource.select;
 
 import org.apache.depot.common.log.Logger;
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
 import org.apache.depot.version.Version;
@@ -29,7 +29,7 @@
 /**
  * @author arb_jack
  */
-public class VersionConstraintsSelector extends AbstractResourceSelector {
+public class VersionConstraintsSelector extends AbstractArtifactSelector {
 	ConstraintSet m_constraints = null;
 
 	/**
@@ -40,7 +40,7 @@
 		m_constraints = constraints;
 	}
 
-	public boolean selectResource(Resource resource) {
+	public boolean selectResource(Artifact resource) {
 		boolean selected = false;
 
 		Logger log = Logger.g_loggingOn ? Logger.getLogger() : null;

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/VersionSelector.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/VersionSelector.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/resource/select/VersionSelector.java	Wed Jun 23 09:04:50 2004
@@ -16,7 +16,7 @@
 
 package org.apache.depot.update.resource.select;
 
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.util.text.MessageConstants;
 import org.apache.depot.update.util.text.Messages;
 import org.apache.depot.version.Version;
@@ -24,7 +24,7 @@
 /**
  * @author arb_jack
  */
-public class VersionSelector extends AbstractResourceSelector {
+public class VersionSelector extends AbstractArtifactSelector {
 	Version m_comparisonVersion = null;
 
 	/**
@@ -35,7 +35,7 @@
 		m_comparisonVersion = comparisonVersion;
 	}
 
-	public boolean selectResource(Resource resource) {
+	public boolean selectResource(Artifact resource) {
 		boolean selected = false;
 
 		Version version = resource.getVersion();

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/sample/ClasspathUpdater.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/sample/ClasspathUpdater.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/sample/ClasspathUpdater.java	Wed Jun 23 09:04:50 2004
@@ -21,7 +21,7 @@
 
 import org.apache.depot.common.util.classpath.PathPart;
 import org.apache.depot.common.util.classpath.PathSet;
-import org.apache.depot.update.ResourceUpdater;
+import org.apache.depot.update.ArtifactUpdater;
 import org.apache.depot.update.UpdateException;
 
 /**
@@ -33,7 +33,7 @@
 	 * @param fileAPI
 	 * @param updateAPI
 	 */
-	public ClasspathUpdater(final FileAssistant filer, ResourceUpdater ruper) {
+	public ClasspathUpdater(final FileAssistant filer, ArtifactUpdater ruper) {
 		super(filer, ruper);
 	}
 

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 09:04:50 2004
@@ -21,11 +21,11 @@
 import java.util.List;
 
 import org.apache.depot.common.util.SystemUtils;
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.files.DefaultResourceFilenameAnalyzer;
 import org.apache.depot.update.files.IResourceFilenameAnalyzer;
-import org.apache.depot.update.resource.ResourceSpecifier;
+import org.apache.depot.update.resource.ArtifactSpecifier;
 import org.apache.depot.update.util.io.ResolvedFile;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
 
@@ -99,9 +99,9 @@
      *
      * @throws UpdateException TODO
      */
-    public ResourceSpecifier getResourceSpecifierForFile(File file)
+    public ArtifactSpecifier getResourceSpecifierForFile(File file)
                                                   throws UpdateException {
-        Resource resource = analyzer.determineResource(file);
+        Artifact 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 09:04:50 2004
@@ -22,7 +22,7 @@
 
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.update.Repository;
-import org.apache.depot.update.ResourceUpdater;
+import org.apache.depot.update.ArtifactUpdater;
 import org.apache.depot.update.UpdateException;
 import org.apache.depot.update.messaging.ResourceRequest;
 import org.apache.depot.update.query.ResourceQuery;
@@ -49,14 +49,14 @@
  * @author arb_jack
  */
 public class FileUpdater /* implements Referenceable */ {
-	private ResourceUpdater m_ruper = null;
+	private ArtifactUpdater m_ruper = null;
 	private FileAssistant m_filer = null;
 
 	/**
 	 * @throws UpdateException -- failed to construct
 	 */
 	public FileUpdater() throws UpdateException {
-		m_ruper = ResourceUpdater.getDefaultResourceUpdater();
+		m_ruper = ArtifactUpdater.getDefaultResourceUpdater();
 		m_filer = new FileAssistant();
 	}
 
@@ -66,7 +66,7 @@
 	*/
    public FileUpdater(
 	   final FileAssistant filer,
-	   final ResourceUpdater ruper) {
+	   final ArtifactUpdater ruper) {
 	   m_ruper = ruper;
 	   m_filer = filer;
    }
@@ -316,7 +316,7 @@
 		if (args.length > 0)
 			file = args[0];
 
-		FileUpdater fu = new FileUpdater(new FileAssistant(), new ResourceUpdater());
+		FileUpdater fu = new FileUpdater(new FileAssistant(), new ArtifactUpdater());
 
 		fu.updateFile(new File(file));
 	}

Added: incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/ArtifactTool.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/ArtifactTool.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,71 @@
+/*
+ * 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.tool;
+
+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.impl.ResourceUpdaterEngine;
+import org.apache.depot.update.messaging.ResourceRequest;
+import org.apache.depot.update.query.ResourceQueryHelper;
+import org.apache.depot.update.query.ResourceResult;
+import org.apache.depot.update.resource.ArtifactSpecifier;
+
+/**
+ */
+public class ArtifactTool extends Tool {
+
+	private static Option l_resourceOption = null;
+
+	static {
+		l_resourceOption =
+			new Option("r", "resource", true, "The resource to work on");
+	}
+
+	protected String getTitle() {
+		return "Depot Resource Tool";
+	}
+	
+	protected void init() {
+		getOptions().addOption(l_resourceOption);
+	}
+
+	public void execute(CommandLine cmdline) throws Exception {
+
+		String resource = cmdline.getMandatoryOptionValue(l_resourceOption);
+
+		ResourceUpdaterEngine ru = new ResourceUpdaterEngine();
+
+		ArtifactSpecifier specifier = new ArtifactSpecifier(resource);
+
+		//
+		// Generare a request from a query
+		//
+		ResourceRequest request =
+			new ResourceRequest(
+				ResourceQueryHelper.getResourceSpecifierQuery(specifier));
+
+		// :TODO: Hmm, ought request reply w/ Response (Query->Result)
+		ResourceResult result = ru.performRequest(request);
+
+		DebugUtils.dump(result);
+	}
+
+	public static void main(String[] args) {
+		(new ArtifactTool()).run(args);
+	}
+}

Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/DownloaderTool.java
==============================================================================
--- incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/DownloaderTool.java	(original)
+++ incubator/depot/trunk/update/src/java/org/apache/depot/update/tool/DownloaderTool.java	Wed Jun 23 09:04:50 2004
@@ -17,11 +17,11 @@
 import org.apache.depot.common.util.cli.CommandLine;
 import org.apache.depot.common.util.cli.Option;
 import org.apache.depot.update.Repository;
-import org.apache.depot.update.ResourceUpdater;
+import org.apache.depot.update.ArtifactUpdater;
 import org.apache.depot.update.config.UpdateConfig;
 import org.apache.depot.update.repository.DefaultRepository;
 import org.apache.depot.update.repository.RepositorySet;
-import org.apache.depot.update.resource.ResourceGroup;
+import org.apache.depot.update.resource.ArtifactGroup;
 /**
  */
 public class DownloaderTool extends Tool {
@@ -63,7 +63,7 @@
 		// Optional repository URL
 		String repoUrl=cmdline.getOptionValue(l_repoOption);
 		
-		ResourceUpdater updater = new ResourceUpdater();
+		ArtifactUpdater updater = new ArtifactUpdater();
 		
 		if (null != repoUrl)
 		{
@@ -84,7 +84,7 @@
 			UpdateConfig.configure(configName);
 		
 		// The group to go get
-		ResourceGroup group = new ResourceGroup(groupName);
+		ArtifactGroup group = new ArtifactGroup(groupName);
 
 		// Update...
 		updater.updateResourceGroup(group);

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 09:04:50 2004
@@ -25,12 +25,12 @@
 import org.apache.depot.common.util.cli.Option;
 import org.apache.depot.common.util.debug.DebugUtils;
 import org.apache.depot.update.Repository;
-import org.apache.depot.update.Resource;
-import org.apache.depot.update.ResourceUpdater;
+import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactUpdater;
 import org.apache.depot.update.impl.RepositoryWrapper;
 import org.apache.depot.update.impl.ResourceUpdaterContext;
 import org.apache.depot.update.repository.DefaultRepository;
-import org.apache.depot.update.resource.ResourceGroup;
+import org.apache.depot.update.resource.ArtifactGroup;
 import org.apache.depot.update.util.select.AllSelector;
 
 /**
@@ -79,7 +79,7 @@
 
 		Repository repository = DefaultRepository.getRepository(repoId);
 
-		ResourceUpdater ruper = ResourceUpdater.getDefaultResourceUpdater();
+		ArtifactUpdater ruper = ArtifactUpdater.getDefaultResourceUpdater();
 
 		if (null != repository) {
 			RepositoryWrapper repo =
@@ -92,8 +92,8 @@
 			DebugUtils.dump(repository);
 
 			if (cmdline.isSet(l_groupOption)) {
-				ResourceGroup group =
-					new ResourceGroup(
+				ArtifactGroup group =
+					new ArtifactGroup(
 						cmdline.getMandatoryOptionValue(l_groupOption));
 
 				if (cmdline.isSet(l_cleanOption)) {
@@ -118,7 +118,7 @@
 				List groups = repo.listGroups(AllSelector.getInstance());
 
 				for (Iterator i = groups.iterator(); i.hasNext();) {
-					ResourceGroup group = (ResourceGroup) i.next();
+					ArtifactGroup group = (ArtifactGroup) i.next();
 
 					out.println("Group: " + group);
 
@@ -126,7 +126,7 @@
 						repo.listResources(group, AllSelector.getInstance());
 
 					for (Iterator ii = resources.iterator(); ii.hasNext();) {
-						Resource resource = (Resource) ii.next();
+						Artifact resource = (Artifact) ii.next();
 
 						out.println("Resource : " + resource);
 					}

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 09:04:50 2004
@@ -21,9 +21,9 @@
 import junit.framework.TestCase;
 
 import org.apache.depot.common.util.debug.DebugUtils;
-import org.apache.depot.update.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.UpdateException;
-import org.apache.depot.update.resource.ResourceType;
+import org.apache.depot.update.resource.ArtifactType;
 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 Resource createResource(String filename, String name, String v,
+	private Artifact createResource(String filename, String name, String v,
 			String t, String e) throws UpdateException {
 		Version version = null;
 		if (null != v) {
@@ -105,25 +105,25 @@
 			}
 		}
 
-		ResourceType resourceType = null;
+		ArtifactType resourceType = null;
 		if (null != t )
-			resourceType = ResourceType.getFromString(t);
+			resourceType = ArtifactType.getFromString(t);
 		else
-			resourceType = ResourceType.UNKNOWN;
+			resourceType = ArtifactType.UNKNOWN;
 		
 
-		return new Resource(name, version, resourceType, e, filename,
+		return new Artifact(name, version, resourceType, e, filename,
 				new VirtualResourceLocator(new VirtualResourceLocator(
 						"http://www.apache.org/depot"), filename));
 	}
 
-	private void checkResource(String pattern, Resource expected)
+	private void checkResource(String pattern, Artifact expected)
 			throws UpdateException {
 
 		DebugUtils.printSeparator();
 		DebugUtils.dump(expected);
 
-		Resource resource = m_analyzer.determineResource(pattern);
+		Artifact 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 09:04:50 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.Resource;
+import org.apache.depot.update.Artifact;
 import org.apache.depot.update.UpdateException;
-import org.apache.depot.update.resource.ResourceType;
+import org.apache.depot.update.resource.ArtifactType;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
 import org.apache.depot.version.impl.ApacheVersion;
 
@@ -55,10 +55,10 @@
 		// Ought be jsut one thing in the list...
 		List expectedResults = new ArrayList();
 		expectedResults.add(
-			new Resource(
+			new Artifact(
 				"mystuff",
 				new ApacheVersion("1.2"),
-				ResourceType.JAVA_BINARY,
+				ArtifactType.JAVA_BINARY,
 				"jar",
 				filename1,
 				VirtualResourceLocator.getTestVRL()));
@@ -74,10 +74,10 @@
 		// Ought be jsut one thing in the list...
 		List expectedResults = new ArrayList();
 		expectedResults.add(
-			new Resource(
+			new Artifact(
 				"mystuff",
 				null,
-				ResourceType.JAVA_BINARY,
+				ArtifactType.JAVA_BINARY,
 				"jar",
 				filename1,
 				VirtualResourceLocator.getTestVRL()));
@@ -96,10 +96,10 @@
 		// Ought be jsut one thing in the list...
 		List expectedResults = new ArrayList();
 		expectedResults.add(
-			new Resource(
+			new Artifact(
 				"mystuff",
 				new ApacheVersion("1.2"),
-				ResourceType.JAVA_BINARY,
+				ArtifactType.JAVA_BINARY,
 				"jar",
 				filename1,
 				VirtualResourceLocator.getTestVRL()));
@@ -116,10 +116,10 @@
 		// Ought be jsut one thing in the list...
 		List expectedResults = new ArrayList();
 		expectedResults.add(
-			new Resource(
+			new Artifact(
 				"mystuff",
 				new ApacheVersion("1.2"),
-				ResourceType.JAVA_BINARY,
+				ArtifactType.JAVA_BINARY,
 				"jar",
 				filename1,
 				VirtualResourceLocator.getTestVRL()));
@@ -136,10 +136,10 @@
 			// Ought be just one thing in the list...
 			List expectedResults = new ArrayList();
 			expectedResults.add(
-				new Resource(
+				new Artifact(
 					"my-stuff",
 					null,
-					ResourceType.JAVA_BINARY,
+					ArtifactType.JAVA_BINARY,
 					"jar",
 					filename1,
 					VirtualResourceLocator.getTestVRL()));

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 09:04:50 2004
@@ -24,8 +24,8 @@
 import org.apache.depot.update.impl.RepositorySetWrapper;
 import org.apache.depot.update.impl.ResourceUpdaterContext;
 import org.apache.depot.update.repository.RepositorySet;
-import org.apache.depot.update.resource.ResourceGroup;
-import org.apache.depot.update.resource.ResourceType;
+import org.apache.depot.update.resource.ArtifactGroup;
+import org.apache.depot.update.resource.ArtifactType;
 import org.apache.depot.update.resource.compare.VersionComparator;
 import org.apache.depot.update.resource.select.ReleaseLevelSelector;
 import org.apache.depot.update.resource.select.TypeSelector;
@@ -66,15 +66,15 @@
 	}
 
 	public void testQuery1() throws UpdateException {
-		ResourceQuery query = new ResourceQuery(new ResourceGroup("test"));
+		ResourceQuery query = new ResourceQuery(new ArtifactGroup("test"));
 		perform(query);
 	}
 
 	public void testQuery2() throws UpdateException {
 		ResourceQuery query =
 			new ResourceQuery(
-				new ResourceGroup("junit"),
-				new TypeSelector(ResourceType.SOURCE_CODE),
+				new ArtifactGroup("junit"),
+				new TypeSelector(ArtifactType.SOURCE_CODE),
 				null,
 				null);
 		perform(query);
@@ -83,8 +83,8 @@
 	public void testQuery3() throws UpdateException {
 		ResourceQuery query =
 			new ResourceQuery(
-				new ResourceGroup("junit"),
-				new VersionSelector(new ApacheVersion(1, 3)),
+				new ArtifactGroup("junit"),
+				new VersionSelector(ApacheVersion.getTestVersion(1, 3)),
 				null,
 				null);
 		performAndCount(query, 1, 2);
@@ -93,10 +93,10 @@
 	public void testQuery4() throws UpdateException {
 		ResourceQuery query =
 			new ResourceQuery(
-				new ResourceGroup("junit"),
+				new ArtifactGroup("junit"),
 				new AndSelector(
-					new TypeSelector(ResourceType.SOURCE_CODE),
-					new VersionSelector(new ApacheVersion(1, 3))),
+					new TypeSelector(ArtifactType.SOURCE_CODE),
+					new VersionSelector(ApacheVersion.getTestVersion(1, 3))),
 				null,
 				null);
 		performAndCount(query, 1, 1);
@@ -105,10 +105,10 @@
 	public void testQuery5() throws UpdateException {
 		ResourceQuery query =
 			new ResourceQuery(
-				new ResourceGroup("junit"),
+				new ArtifactGroup("junit"),
 				new OrSelector(
-					new TypeSelector(ResourceType.SOURCE_CODE),
-					new VersionSelector(new ApacheVersion(1, 3))),
+					new TypeSelector(ArtifactType.SOURCE_CODE),
+					new VersionSelector(ApacheVersion.getTestVersion(1, 3))),
 				null,
 				null);
 		performAndCount(query, 1, 11);
@@ -117,10 +117,10 @@
 	public void testQuery6() throws UpdateException {
 		ResourceQuery query =
 			new ResourceQuery(
-				new ResourceGroup("junit"),
+				new ArtifactGroup("junit"),
 				new OrSelector(
-					new TypeSelector(ResourceType.SOURCE_CODE),
-					new VersionSelector(new ApacheVersion(1, 3))),
+					new TypeSelector(ArtifactType.SOURCE_CODE),
+					new VersionSelector(ApacheVersion.getTestVersion(1, 3))),
 				VersionComparator.getInstance(),
 				null);
 		performAndCount(query, 10, 11);
@@ -129,7 +129,7 @@
 	public void testQuery7() throws UpdateException {
 		ResourceQuery query =
 			new ResourceQuery(
-				new ResourceGroup("junit"),
+				new ArtifactGroup("junit"),
 				new ReleaseLevelSelector(ReleaseLevel.RELEASE),
 				VersionComparator.getInstance(),
 				null);

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 09:04:50 2004
@@ -23,7 +23,7 @@
 import org.apache.depot.common.log.Logger;
 import org.apache.depot.update.impl.RepositoryWrapper;
 import org.apache.depot.update.impl.ResourceUpdaterContext;
-import org.apache.depot.update.resource.ResourceGroup;
+import org.apache.depot.update.resource.ArtifactGroup;
 import org.apache.depot.update.util.select.AllSelector;
 
 /**
@@ -68,7 +68,7 @@
 	}
 
 	public void testListResources1() throws Exception {
-		ResourceGroup testGroup = new ResourceGroup("junit");
+		ArtifactGroup testGroup = new ArtifactGroup("junit");
 
 		List list1 = m_repo1.listResources(testGroup, AllSelector.getInstance());
 		assertNotNull("List Resources", list1);
@@ -83,7 +83,7 @@
 	}
 
 	public void testListSpecifiers1() throws Exception {
-		ResourceGroup testGroup = new ResourceGroup("junit");
+		ArtifactGroup testGroup = new ArtifactGroup("junit");
 
 		List specifiers1 = m_repo1.listSpecifiers(testGroup,
 				AllSelector.getInstance());

Added: incubator/depot/trunk/update/src/test/org/apache/depot/update/resource/ArtifactTests.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/test/org/apache/depot/update/resource/ArtifactTests.java	Wed Jun 23 09:04:50 2004
@@ -0,0 +1,82 @@
+/*
+ * 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.resource;
+
+import junit.framework.TestCase;
+
+import org.apache.depot.common.log.Logger;
+import org.apache.depot.update.Artifact;
+
+/**
+ * @author arb_jack
+ */
+public class ArtifactTests extends TestCase {
+
+	static {
+		Logger.testInit();
+	}
+
+	public ArtifactTests(String name) {
+		super(name);
+	}
+
+	public void setUp() throws Exception {
+
+	}
+
+	public void testArtifactEquality1() throws Exception {
+		Artifact r1 = Artifact.getTestResource();
+		Artifact r2 = Artifact.getTestResource();
+
+		assertEquals("Same are equal", r1, r2);
+		assertTrue("Same are equal", r1.equals(r2));
+		assertEquals("Same are same hash", r1.hashCode(), r2.hashCode());
+	}
+
+	public void testArtifactEquality2() throws Exception {
+		Artifact r1 = Artifact.getTestResource();
+		Artifact r2 = Artifact.getTestResource("bogus");
+
+		assertFalse("Different are NOT equal", r1.equals(r2));
+		assertFalse(
+			"Different are NOT equal hash",
+			r1.hashCode() == r2.hashCode());
+	}
+
+	public void testArtifactEquality3() throws Exception {
+		Artifact r1 = Artifact.getTestResource();
+		Artifact r2 = new Artifact(r1);
+
+		assertEquals("Clones are equal", r1, r2);
+		assertTrue("Clones are equal", r1.equals(r2));
+		assertEquals("Clones are same hash", r1.hashCode(), r2.hashCode());
+	}
+
+	public void testArtifactEquality4() throws Exception {
+		Artifact r1 = Artifact.getTestResource();
+		Artifact r2 = new Artifact(r1); r2.setExtension("bogus");
+
+		assertFalse("Different are NOT equal", r1.equals(r2));
+		assertFalse(
+			"Different are NOT equal hash",
+			r1.hashCode() == r2.hashCode());
+	}
+
+	public static void main(String[] args) {
+		junit.textui.TestRunner.run(ArtifactTests.class);
+	}
+}

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 09:04:50 2004
@@ -24,13 +24,13 @@
 import junit.framework.TestSuite;
 
 import org.apache.depot.update.Repository;
-import org.apache.depot.update.Resource;
-import org.apache.depot.update.ResourceUpdater;
+import org.apache.depot.update.Artifact;
+import org.apache.depot.update.ArtifactUpdater;
 import org.apache.depot.update.query.ResourceQuery;
 import org.apache.depot.update.query.ResourceQueryHelper;
 import org.apache.depot.update.repository.DefaultRepository;
 import org.apache.depot.update.repository.RepositorySet;
-import org.apache.depot.update.resource.ResourceSpecifier;
+import org.apache.depot.update.resource.ArtifactSpecifier;
 import org.apache.depot.update.util.io.ResolvedFile;
 import org.apache.depot.update.util.net.VirtualResourceLocator;
 
@@ -60,8 +60,8 @@
 				"gorilla/jars/gorilla-1.0.jar");
 
 		//  1. User configures Depot
-		ResourceUpdater ruper =
-			ResourceUpdater.getDefaultResourceUpdater();
+		ArtifactUpdater ruper =
+			ArtifactUpdater.getDefaultResourceUpdater();
 
 		Repository fileRepo =
 			new DefaultRepository("test", m_repoDir.toURL().toString());
@@ -69,7 +69,7 @@
 		repos.addRepository(fileRepo);
 
 		//  2. User supplies resource query and asks Depot process it
-		ResourceSpecifier specifier = new ResourceSpecifier("gorilla");
+		ArtifactSpecifier specifier = new ArtifactSpecifier("gorilla");
 		ResourceQuery query =
 				ResourceQueryHelper.getResourceSpecifierQuery(
 					specifier,
@@ -82,7 +82,7 @@
 
 		assertNotNull("Should get a result", results);
 		assertEquals("Result had wrong size", 1, results.size());
-		Resource resource = (Resource) results.get(0);
+		Artifact resource = (Artifact) results.get(0);
 
 		VirtualResourceLocator expected =
 			new VirtualResourceLocator(ResolvedFile.resolve(resourceFile));

Modified: incubator/depot/trunk/update/src/test/org/apache/depot/update/usecases/SynchronizeTests.java
==============================================================================
--- incubator/depot/trunk/update/src/test/org/apache/depot/update/usecases/SynchronizeTests.java	(original)
+++ incubator/depot/trunk/update/src/test/org/apache/depot/update/usecases/SynchronizeTests.java	Wed Jun 23 09:04:50 2004
@@ -23,7 +23,7 @@
 import junit.framework.TestSuite;
 
 import org.apache.depot.update.Repository;
-import org.apache.depot.update.ResourceUpdater;
+import org.apache.depot.update.ArtifactUpdater;
 import org.apache.depot.update.impl.ResourceUpdaterIdentifier;
 import org.apache.depot.update.repository.DefaultRepository;
 import org.apache.depot.update.repository.RepositorySet;
@@ -61,8 +61,8 @@
 		//  1. User configures Depot
 		ResourceUpdaterIdentifier identifier =
 			new ResourceUpdaterIdentifier("synchronizeTest");
-		ResourceUpdater ruper =
-			ResourceUpdater.getResourceUpdater(identifier, true);
+		ArtifactUpdater ruper =
+			ArtifactUpdater.getResourceUpdater(identifier, true);
 
 		Repository fileRepo =
 			new DefaultRepository("test", m_repoDir.toURL().toString());

Mime
View raw message