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 Book
024    implements Item
025{
026
027    private String isbn;
028
029    private String title;
030
031    private String author;
032
033    private String desc;
034
035    public Book( String isbn )
036    {
037        this.isbn = isbn;
038    }
039
040    public void setTitle( String title )
041    {
042        this.title = title;
043    }
044
045    public void setAuthor( String author )
046    {
047        this.author = author;
048    }
049
050    public void setDesc( String desc )
051    {
052        this.desc = desc;
053    }
054
055    public void print()
056    {
057        System.out.println( "Book:" );
058        System.out.println( "  isbn=" + isbn );
059        System.out.println( "  title=" + title );
060        System.out.println( "  author=" + author );
061        System.out.println( "  desc=" + desc );
062    }
063
064}