/**
* 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;
/**
* This class represents an XSLT stylesheet. The stylesheet is applicable
* to articles of a specific type and for a specific output media.
*
* @author who wrote this originally?
* @author Erlend Hamnaberg<erlenha@underdusken.no>
* @version $Revision$, $Date$
*/
public class Stylesheet implements Serializable {
/**
* The ID of this stylesheet
*/
private Integer id;
/**
* The description of this stylesheet
*/
private String description;
/**
* The description of this stylesheet
*/
private String name;
/**
* The URL of this stylesheet
*/
private String stylesheetURL;
/**
* The articletype applicable to this stylesheet
*/
private Section articleType;
/**
* The publicahing media applicable to this stylesheet
*/
private PublishingMediaEnum publishingMedia;
/**
* The constructor for a stylesheet tahing an ID, a name, a description,
* a stylesheetURL, and articletype and a publishing media as arguments
*
* @param id the id
* @param name the name
* @param description the description
* @param stylesheetURL the url
* @param articleType the article type
* @param publishingMedia the publishing media
*/
public Stylesheet(Integer id,
String name,
String description,
String stylesheetURL,
Section articleType,
PublishingMediaEnum publishingMedia) {
this.id = id;
this.name = name;
this.description = description;
this.stylesheetURL = stylesheetURL;
this.articleType = articleType;
this.publishingMedia = publishingMedia;
}
/**
* Empty constructor
*/
public Stylesheet() {
}
/**
* 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 stylesheetURL.
*
* @return value of stylesheetURL.
*/
public String getStylesheetURL() {
return stylesheetURL;
}
/**
* Set the value of stylesheetURL.
*
* @param stylesheetURL Value to assign to stylesheetURL.
*/
public void setStylesheetURL(String stylesheetURL) {
this.stylesheetURL = stylesheetURL;
}
/**
* 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;
}
/**
* Get the value of articleType.
*
* @return value of articleType.
*/
public Section getArticleType() {
return articleType;
}
/**
* Set the value of articleType.
*
* @param articleType Value to assign to articleType.
*/
public void setArticleType(Section articleType) {
this.articleType = articleType;
}
/**
* Get the value of publishingMedia.
*
* @return value of publishingMedia.
*/
public PublishingMediaEnum getPublishingMedia() {
return publishingMedia;
}
/**
* Set the value of publishingMedia.
*
* @param publishingMedia Value to assign to publishingMedia.
*/
public void setPublishingMedia(PublishingMediaEnum publishingMedia) {
this.publishingMedia = publishingMedia;
}
/**
* Clone this object. Will perform a deep clone.
*
* @return The clone.
*/
public Object clone() {
Stylesheet s = new Stylesheet();
s.id = id;
s.name = name == null ? null : name;
s.description = description == null ? null : description;
s.stylesheetURL = stylesheetURL == null ? null : stylesheetURL;
s.articleType = articleType == null ? null : (Section) articleType.clone();
s.publishingMedia = publishingMedia == null ? null : publishingMedia;
return s;
}
}