Mercurial > dive4elements > gnv-client
view gnv/src/main/java/de/intevation/gnv/artifactdatabase/objects/ArtifactFactory.java @ 958:d5d4dbda17cc
Add more Javadocs
gnv/trunk@1102 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 18 May 2010 09:51:41 +0000 |
parents | 89ade245ca7a |
children | 28a0628b11b0 |
line wrap: on
line source
package de.intevation.gnv.artifactdatabase.objects; /** * Implementation of an <code>ArtifactObject> which represents an * <code>ArtifactFactory</code> * This Class provides the name, the description, the URL where the * the <code>ArtifactDatabase</code> the factory belongs to could be reached * and if the <code>ArtifacFactory</code> is currently selected or not. * * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> */ public class ArtifactFactory implements ArtifactObject { /** * The UID of this Class. */ private static final long serialVersionUID = 5453748230625831527L; /** * The name of the factory. */ private String name = null; /** * The description of the Factory. */ private String description = null; /** * Flag which mark the Artifactfactory as selected if value is true * unselected if value is false. */ private boolean selected = false; /** * The URL where the Factory could be reached. */ private String dataBaseUrl = null; /** * Returns the url of the artifact server. * * @return the dataBaseUrl */ public String getDataBaseUrl() { return dataBaseUrl; } /** * Constructor * @param name the name of the factory * @param description the description of the Factory * @param dataBaseUrl the URL where the Factory could be reached. */ public ArtifactFactory(String name, String description, String dataBaseUrl) { super(); this.name = name; this.description = description; this.dataBaseUrl = dataBaseUrl; } public String getId() { return this.name; } public boolean isSelected() { return this.selected; } public void setSelected(boolean selected) { this.selected = selected; } public String getName() { return name; } public String getDescription() { return description; } public String getHash() { return null; } /** * Two ArtifactFactories are equal, if the name and the url to the artifact * server are equal. * * @param obj * @return true, if the factories are equal - otherwise false. */ @Override public boolean equals(Object obj) { boolean returnValue = false; if (obj instanceof ArtifactFactory){ ArtifactFactory af = (ArtifactFactory)obj; returnValue = this.getName().equals(af.getName()) && this.getDataBaseUrl().equals(af.getDataBaseUrl()); } return returnValue; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :