/** * Copyright 1999-2009 The Pegadi Team * * 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.pegadi.model; import java.io.Serializable; /** * A class representing a publishing media, such as QuarkXPress tags, HTML or * FO. */ public class PublishingMedia implements Serializable { /** * The ID of this publising media */ private Integer id; /** * The name of this publising media */ private String name; /** * The description of this publising media */ private String description; /** * Empty constructor. */ public PublishingMedia() { } /** * Constructor taking an ID and a name as an argument * * @param id the ID * @param name the name * @param description the description */ public PublishingMedia(Integer id, String name, String description) { setId(id); setName(name); setDescription(description); } /** * Get the value of ID. * * @return value of ID. */ public Integer getId() { return id; } /** * Set the value of ID. * * @param id Value to assign to ID. */ public void setId(Integer id) { this.id = id; } /** * Get the value of name. * * @return value of name. */ public String getName() { return name; } /** * Set the value of name. * * @param name value to assign to name. */ public void setName(String name) { this.name = name; } /** * Get the value of description. * * @return value of description. */ public String getDescription() { return description; } /** * Set the value of description. * * @param description Value to assign to description. */ public void setDescription(String description) { this.description = description; } /** * Returns a string representation of this publicshing media * * @return the name */ public String toString() { return this.getName(); } public Object clone() { PublishingMedia pubMed = new PublishingMedia(); pubMed.setId(this.getId()); pubMed.setName(this.getName()); pubMed.setDescription(this.getDescription()); return pubMed; } }