javax.help
Class FlatMap
- Map, Serializable
public class FlatMap
extends java.lang.Object
implements Map, Serializable
A FlatMap is a simple implementation of a Map. It is used to represent a
Map for a single file.
protected class | FlatMap.FlatMapResourceBundle- FlatMapResourceBundle is a ResourceBundle but unlike most
ResourceBundles it is not locale-based and is loaded via the
constructor, not getBundle.
|
static String | publicIDString- PublicID (known to this XML processor) to the DTD for version 1.0 of the Map
|
static String | publicIDString_V2- PublicID (known to this XML processor) to the DTD for version 1.0 of the Map
|
Enumeration | getAllIDs()- Gets an enumeration of all the IDs in a Map.
|
Map.ID | getClosestID(URL url)- Determines the ID that is "closest" to this URL (with a given anchor).
|
HelpSet | getHelpSet()- The HelpSet for this Map.
|
Map.ID | getIDFromURL(URL url)- Gets the ID for this URL.
|
Enumeration | getIDs(URL url)- Determines the IDs related to this URL.
|
URL | getURLFromID(Map.ID iden)- Gets the URL that corresponds to a given ID in the map.
|
boolean | isID(URL url)- Determines if the URL corresponds to an ID in the Map.
|
boolean | isValidID(String id, HelpSet hs)- Determines whether the given ID is valid.
|
publicIDString
public static final String publicIDString
PublicID (known to this XML processor) to the DTD for version 1.0 of the Map
publicIDString_V2
public static final String publicIDString_V2
PublicID (known to this XML processor) to the DTD for version 1.0 of the Map
FlatMap
public FlatMap(URL base,
HelpSet hs)
throws IOException Create a FlatMap from a given URL.
hs - The HelpSet providing "context" for this Map.
getAllIDs
public Enumeration getAllIDs()
Gets an enumeration of all the IDs in a Map.
- getAllIDs in interface Map
- An enumeration of all the IDs in a Map.
getClosestID
public Map.ID getClosestID(URL url)
Determines the ID that is "closest" to this URL (with a given anchor).
The definition of this is up to the implementation of Map. In particular,
it may be the same as getIDFromURL().
- getClosestID in interface Map
- The closest ID in this map to the given URL
getHelpSet
public HelpSet getHelpSet()
The HelpSet for this Map.
getIDFromURL
public Map.ID getIDFromURL(URL url)
Gets the ID for this URL.
- getIDFromURL in interface Map
url - The URL to get the ID for.
- The id (Map.ID) or null if URL is not an ID.
getIDs
public Enumeration getIDs(URL url)
Determines the IDs related to this URL.
- getIDs in interface Map
getURLFromID
public URL getURLFromID(Map.ID iden)
throws MalformedURLException Gets the URL that corresponds to a given ID in the map.
- getURLFromID in interface Map
iden - The iden to get the URL for. If iden is null it is
treated as an unresolved ID and will return null.
- URL The matching URL. Null if this map cannot solve the ID
isID
public boolean isID(URL url)
Determines if the URL corresponds to an ID in the Map.
- isID in interface Map
url - The URL to check on.
- true If this is an ID, otherwise false.
isValidID
public boolean isValidID(String id,
HelpSet hs) Determines whether the given ID is valid. If hs is null
it is ignored.
- isValidID in interface Map
id - The String ID.hs - The HelpSet against which to resolve the string.
- True if id is valid, false if not valid.