KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > catalog > spi > CatalogReader


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 package org.netbeans.modules.xml.catalog.spi;
20
21 import java.util.*;
22
23 /**
24  * An interface to catalog content reader.
25  * An implementation is responsible for reading catalog content (mappings).
26  * <p>
27  * Implementation class should provide its BeanInfo describing it.
28  * <p>Should also implement {@link CatalogDescriptor} and may also implement
29  * {@link CatalogWriter} and/or {@link org.xml.sax.EntityResolver} as needed.</p>
30  *
31  * @author Petr Kuzel
32  */

33 public interface CatalogReader {
34
35     /**
36      * Get String iterator representing all public IDs registered in catalog.
37      * @return null if cannot proceed, try later.
38      */

39     public Iterator getPublicIDs();
40     
41     /**
42      * Refresh content according to content of mounted catalog.
43      */

44     public void refresh();
45     
46     /**
47      * Get registered systemid for given public Id or null if not registered.
48      * @return null if not registered
49      */

50     public String JavaDoc getSystemID(String JavaDoc publicId);
51     /**
52      * Get registered URI for the given name or null if not registered.
53      * @return null if not registered
54      */

55     public String JavaDoc resolveURI(String JavaDoc name);
56     /**
57      * Get registered URI for the given publicId or null if not registered.
58      * @return null if not registered
59      */

60     public String JavaDoc resolvePublic(String JavaDoc publicId);
61     /**
62      * Optional operation allowing to listen at catalog for changes.
63      * @throws UnsupportedOpertaionException if not supported by the implementation.
64      */

65     public void addCatalogListener(CatalogListener l);
66     
67     /**
68      * Optional operation couled with addCatalogListener.
69      * @throws UnsupportedOpertaionException if not supported by the implementation.
70      */

71     public void removeCatalogListener(CatalogListener l);
72     
73 }
74
Popular Tags