krysalis-update/src/java/org/krysalis/depot/update/artifact ArtifactAttributeMap.java,1.1,1.2 ArtifactConstants.java,1.1,1.2 ArtifactGroup.java,1.1,1.2 ArtifactAttribute.java,1.1,1.2 ArtifactLocator.java,1.1,1.2 ArtifactType.java,1.1,1.2
Nick Chalko <[email protected]> Wed, 08 Dec 2004 09:12:02 +0000
| Newsgroups | gmane.comp.krysalis.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/krysalis/krysalis-update/src/java/org/krysalis/depot/update/artifact
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26470/src/java/org/krysalis/depot/update/artifact
Modified Files:
ArtifactAttributeMap.java ArtifactConstants.java
ArtifactGroup.java ArtifactAttribute.java ArtifactLocator.java
ArtifactType.java
Log Message:
format
Index: ArtifactGroup.java
===================================================================
RCS file: /cvsroot/krysalis/krysalis-update/src/java/org/krysalis/depot/update/artifact/ArtifactGroup.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ArtifactGroup.java 8 Dec 2004 09:06:32 -0000 1.1
--- ArtifactGroup.java 8 Dec 2004 09:12:00 -0000 1.2
***************
*** 15,46 ****
*/
package org.krysalis.depot.update.artifact;
/**
*
*
! * @author <a href="http://incubator.apache.org/depot">The Apache Incubator Depot Project</a>
*/
public class ArtifactGroup {
public String m_name = null;
!
/**
! * Constructor
! * Builds an artifactGroup with the specified name
*
! * @param name name of the ArtifactGroup
*/
public ArtifactGroup(String name) {
! if(name == null)throw new NullPointerException("name of the group must be set");
m_name = name;
! }
!
/*
! * (non-Javadoc)
! *
! * @see java.lang.Object#equals(java.lang.Object)
! */
public boolean equals(Object otherGroup) {
return m_name.equals(((ArtifactGroup) otherGroup).getName());
}
!
/*
* (non-Javadoc)
--- 15,49 ----
*/
package org.krysalis.depot.update.artifact;
+
/**
*
*
! * @author <a href="http://incubator.apache.org/depot">The Apache Incubator
! * Depot Project </a>
*/
public class ArtifactGroup {
public String m_name = null;
!
/**
! * Constructor Builds an artifactGroup with the specified name
*
! * @param name
! * name of the ArtifactGroup
*/
public ArtifactGroup(String name) {
! if (name == null)
! throw new NullPointerException("name of the group must be set");
m_name = name;
! }
!
/*
! * (non-Javadoc)
! *
! * @see java.lang.Object#equals(java.lang.Object)
! */
public boolean equals(Object otherGroup) {
return m_name.equals(((ArtifactGroup) otherGroup).getName());
}
!
/*
* (non-Javadoc)
***************
*** 51,55 ****
return m_name.hashCode();
}
!
/*
* (non-Javadoc)
--- 54,58 ----
return m_name.hashCode();
}
!
/*
* (non-Javadoc)
***************
*** 60,64 ****
return m_name;
}
!
/**
* Gets the groupidentifier of this group
--- 63,67 ----
return m_name;
}
!
/**
* Gets the groupidentifier of this group
***************
*** 69,73 ****
return m_name;
}
!
/**
* returns a group for test purposes
--- 72,76 ----
return m_name;
}
!
/**
* returns a group for test purposes
***************
*** 78,88 ****
return getTestGroup("test");
}
!
/**
* returns a group for test purposes with the given identifier/name
*
! * @param name The identifier of the testgroup
* @return a Test artifactGroup
! */
public static ArtifactGroup getTestGroup(String name) {
return new ArtifactGroup(name);
--- 81,92 ----
return getTestGroup("test");
}
!
/**
* returns a group for test purposes with the given identifier/name
*
! * @param name
! * The identifier of the testgroup
* @return a Test artifactGroup
! */
public static ArtifactGroup getTestGroup(String name) {
return new ArtifactGroup(name);
Index: ArtifactLocator.java
===================================================================
RCS file: /cvsroot/krysalis/krysalis-update/src/java/org/krysalis/depot/update/artifact/ArtifactLocator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ArtifactLocator.java 8 Dec 2004 09:06:32 -0000 1.1
--- ArtifactLocator.java 8 Dec 2004 09:12:00 -0000 1.2
***************
*** 27,42 ****
*
*/
! public class ArtifactLocator {
//
! // Where is this thing?
//
private String m_filename = null;
private String m_extension = null;
!
!
// :TODO: Do we want to add reference to repository?
// :TODO: Are above to obsolete w/ below?
!
private VirtualResourceLocator m_location = null;
--- 27,42 ----
*
*/
! public class ArtifactLocator {
//
! // Where is this thing?
//
private String m_filename = null;
+
private String m_extension = null;
!
// :TODO: Do we want to add reference to repository?
// :TODO: Are above to obsolete w/ below?
!
private VirtualResourceLocator m_location = null;
***************
*** 44,51 ****
// Construct an ArtifactLocator
//
! public ArtifactLocator(
! String filename,
! String extension,
! VirtualResourceLocator location) {
m_filename = filename;
--- 44,49 ----
// Construct an ArtifactLocator
//
! public ArtifactLocator(String filename, String extension,
! VirtualResourceLocator location) {
m_filename = filename;
***************
*** 55,60 ****
/**
! * Constructor
! * Creates a new ArtifactLocator from another ArtifactLocator
*
* :TODO: should be deleted, see the clone method of the class
--- 53,57 ----
/**
! * Constructor Creates a new ArtifactLocator from another ArtifactLocator
*
* :TODO: should be deleted, see the clone method of the class
***************
*** 70,76 ****
}
! //:TODO: fix these
!
! /* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
--- 67,75 ----
}
! // :TODO: fix these
!
! /*
! * (non-Javadoc)
! *
* @see java.lang.Object#equals(java.lang.Object)
*/
***************
*** 87,104 ****
else
equal &= otherResourceLocator.m_filename.equals(m_filename);
!
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()
*/
--- 86,104 ----
else
equal &= otherResourceLocator.m_filename.equals(m_filename);
!
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()
*/
***************
*** 107,115 ****
hash += m_location.hashCode();
!
return hash;
}
! /* (non-Javadoc)
* @see java.lang.Object#toString()
*/
--- 107,117 ----
hash += m_location.hashCode();
!
return hash;
}
! /*
! * (non-Javadoc)
! *
* @see java.lang.Object#toString()
*/
***************
*** 120,124 ****
buffer.append(m_filename);
}
!
if (null != m_location) {
buffer.append(':');
--- 122,126 ----
buffer.append(m_filename);
}
!
if (null != m_location) {
buffer.append(':');
***************
*** 134,138 ****
out.print(indent);
out.println("ResourceLocator Filename: " + m_filename);
!
out.print(indent);
out.println("ResourceLocator Extn: " + m_extension);
--- 136,140 ----
out.print(indent);
out.println("ResourceLocator Filename: " + m_filename);
!
out.print(indent);
out.println("ResourceLocator Extn: " + m_extension);
***************
*** 147,152 ****
*/
public Object clone() {
! ArtifactLocator aLocator = new ArtifactLocator(this.m_filename,
! this.m_extension, this.m_location);
return aLocator;
}
--- 149,154 ----
*/
public Object clone() {
! ArtifactLocator aLocator = new ArtifactLocator(this.m_filename,
! this.m_extension, this.m_location);
return aLocator;
}
***************
*** 158,161 ****
--- 160,164 ----
return m_filename;
}
+
/**
* @return Returns the extension.
***************
*** 164,167 ****
--- 167,171 ----
return m_extension;
}
+
/**
* @return Returns the location.
***************
*** 170,187 ****
return m_location;
}
/**
! * @param extension The extension to set.
*/
public void setExtension(String extension) {
m_extension = extension;
}
/**
! * @param filename The filename to set.
*/
public void setFilename(String filename) {
m_filename = filename;
}
/**
! * @param location The location to set.
*/
public void setLocation(VirtualResourceLocator location) {
--- 174,197 ----
return m_location;
}
+
/**
! * @param extension
! * The extension to set.
*/
public void setExtension(String extension) {
m_extension = extension;
}
+
/**
! * @param filename
! * The filename to set.
*/
public void setFilename(String filename) {
m_filename = filename;
}
+
/**
! * @param location
! * The location to set.
*/
public void setLocation(VirtualResourceLocator location) {
Index: ArtifactType.java
===================================================================
RCS file: /cvsroot/krysalis/krysalis-update/src/java/org/krysalis/depot/update/artifact/ArtifactType.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ArtifactType.java 8 Dec 2004 09:06:32 -0000 1.1
--- ArtifactType.java 8 Dec 2004 09:12:00 -0000 1.2
***************
*** 19,23 ****
import org.krysalis.depot.update.util.identity.GenericNamespace;
-
/**
* @author arb_jack
--- 19,22 ----
***************
*** 25,39 ****
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) {
--- 24,38 ----
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) {
***************
*** 47,59 ****
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;
--- 46,57 ----
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;
Index: ArtifactAttribute.java
===================================================================
RCS file: /cvsroot/krysalis/krysalis-update/src/java/org/krysalis/depot/update/artifact/ArtifactAttribute.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ArtifactAttribute.java 8 Dec 2004 09:06:32 -0000 1.1
--- ArtifactAttribute.java 8 Dec 2004 09:12:00 -0000 1.2
***************
*** 20,42 ****
import org.krysalis.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) {
--- 20,42 ----
import org.krysalis.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) {
Index: ArtifactConstants.java
===================================================================
RCS file: /cvsroot/krysalis/krysalis-update/src/java/org/krysalis/depot/update/artifact/ArtifactConstants.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ArtifactConstants.java 8 Dec 2004 09:06:32 -0000 1.1
--- ArtifactConstants.java 8 Dec 2004 09:12:00 -0000 1.2
***************
*** 20,27 ****
* @author anou_mana
*/
! public class ArtifactConstants
! {
// Attribute
public final static String MD5_LOCATION = "MD5_LOCATION";
public final static String ASC_LOCATION = "ASC_LOCATION";
}
--- 20,27 ----
* @author anou_mana
*/
! public class ArtifactConstants {
// Attribute
public final static String MD5_LOCATION = "MD5_LOCATION";
+
public final static String ASC_LOCATION = "ASC_LOCATION";
}
Index: ArtifactAttributeMap.java
===================================================================
RCS file: /cvsroot/krysalis/krysalis-update/src/java/org/krysalis/depot/update/artifact/ArtifactAttributeMap.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ArtifactAttributeMap.java 8 Dec 2004 09:06:32 -0000 1.1
--- ArtifactAttributeMap.java 8 Dec 2004 09:12:00 -0000 1.2
***************
*** 39,46 ****
super(initialSize);
}
!
/**
! * Determines if this set has a particular attribute.
! */
public boolean hasAttribute(ArtifactAttribute attribute) {
return hasFlag(attribute);
--- 39,46 ----
super(initialSize);
}
!
/**
! * Determines if this set has a particular attribute.
! */
public boolean hasAttribute(ArtifactAttribute attribute) {
return hasFlag(attribute);
***************
*** 48,53 ****
/**
! * Determines if this set has a particular set of attributes.
! */
public boolean hasAttributes(List attributes) {
return hasFlags(attributes);
--- 48,53 ----
/**
! * Determines if this set has a particular set of attributes.
! */
public boolean hasAttributes(List attributes) {
return hasFlags(attributes);
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/