FileDocCategorySizeDatePackage
Library.javaAPI DocExample1116Sun Sep 02 14:59:02 BST 2001chap1

Library

public class Library extends Object
A helper class used by LibraryDOMCreator and LibraryJDOMCreator, presented as Examples 1-4 and 1-5 in Chapter 1.
author
Eric M. Burke

Fields Summary
private List
publishers
private List
books
Constructors Summary
public Library()
Construct a new instance of the library. This is a hard-coded example. In a real app, the books and publishers would come from a database.

        Publisher oreilly = new Publisher("oreilly", "O'Reilly",
                "101 Morris Street", "Sebastopol", "CA", "95472");
        this.publishers.add(oreilly);

        this.books.add(new Book(oreilly, "XML Pocket Reference", 1,
                "Robert Eckstein", "1-56592-709-5", 10, 1999));
        this.books.add(new Book(oreilly, "Java and XML", 1,
                "Brett McLaughlin", "0-596-00016-2", 6, 2000));
    
Methods Summary
public java.util.ListgetBooks()

        return this.books;
    
public java.util.ListgetPublishers()


       
        return this.publishers;