01: // LabelBureauFactory.java
02: // $Id: LabelBureauFactory.java,v 1.4 1998/07/24 14:14:02 bmahe Exp $
03: // (c) COPYRIGHT MIT and INRIA, 1996.
04: // Please first read the full copyright statement in file COPYRIGHT.html
05:
06: package org.w3c.jigsaw.pics;
07:
08: import java.io.File;
09:
10: import java.util.Hashtable;
11: import java.util.StringTokenizer;
12:
13: /**
14: * This class manages label bureau creation.
15: * It follows the general pattern for creating interface objects.
16: */
17:
18: public class LabelBureauFactory {
19:
20: private static Hashtable bureaus = new Hashtable();
21:
22: public static LabelBureauInterface getLabelBureau(File identifier) {
23: String name = identifier.getName();
24: SampleLabelBureau b = (SampleLabelBureau) bureaus
25: .get(identifier);
26: if (b == null) {
27: b = new SampleLabelBureau(identifier);
28: bureaus.put(identifier, b);
29: }
30: return b;
31: }
32:
33: }
|