001package org.apache.commons.digester3.examples.api.catalog;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one or more
005 * contributor license agreements.  See the NOTICE file distributed with
006 * this work for additional information regarding copyright ownership.
007 * The ASF licenses this file to You under the Apache License, Version 2.0
008 * (the "License"); you may not use this file except in compliance with
009 * the License.  You may obtain a copy of the License at
010 * 
011 *      http://www.apache.org/licenses/LICENSE-2.0
012 * 
013 * Unless required by applicable law or agreed to in writing, software
014 * distributed under the License is distributed on an "AS IS" BASIS,
015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016 * See the License for the specific language governing permissions and
017 * limitations under the License.
018 */ 
019 
020/**
021 *  See Main.java.
022 */
023public class AudioVisual
024    implements Item
025{
026
027    private int yearMade;
028
029    private String category;
030
031    private String name;
032
033    private String desc;
034
035    private Integer runtime;
036
037    private String type;
038
039    // note: digester can convert a string in the xml file to an int.
040    public void setYearMade( int yearMade )
041    {
042        this.yearMade = yearMade;
043    }
044
045    public void setCategory( String category )
046    {
047        this.category = category;
048    }
049
050    public void setName( String name )
051    {
052        this.name = name;
053    }
054
055    public void setDesc( String desc )
056    {
057        this.desc = desc;
058    }
059
060    // note: digester can convert a string in the xml file to an Integer
061    public void setRuntime( Integer runtime )
062    {
063        this.runtime = runtime;
064    }
065
066    public void setType( String type )
067    {
068        this.type = type;
069    }
070
071    public void print()
072    {
073        System.out.println( "AudioVisual:" );
074        System.out.println( "  type=" + type );
075        System.out.println( "  yearMade=" + yearMade );
076        System.out.println( "  category=" + category );
077        System.out.println( "  name=" + name );
078        System.out.println( "  desc=" + desc );
079        System.out.println( "  runtime=" + runtime );
080    }
081
082}