Package javax.help
Class FlatMap
java.lang.Object
javax.help.FlatMap
- All Implemented Interfaces:
Serializable
,Map
A FlatMap is a simple implementation of a Map. It is used to represent a
Map for a single file.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
FlatMapResourceBundle is a ResourceBundle but unlike most ResourceBundles it is not locale-based and is loaded via the constructor, not getBundle. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets an enumeration of all the IDs in a Map.getClosestID
(URL url) Determines the ID that is "closest" to this URL (with a given anchor).The HelpSet for this Map.getIDFromURL
(URL url) Gets the ID for this URL.Determines the IDs related to this URL.getURLFromID
(Map.ID iden) Gets the URL that corresponds to a given ID in the map.boolean
Determines if the URL corresponds to an ID in the Map.boolean
Determines whether the given ID is valid.
-
Field Details
-
publicIDString
PublicID (known to this XML processor) to the DTD for version 1.0 of the Map- See Also:
-
publicIDString_V2
PublicID (known to this XML processor) to the DTD for version 1.0 of the Map- See Also:
-
-
Constructor Details
-
FlatMap
Create a FlatMap from a given URL.- Parameters:
hs
- The HelpSet providing "context" for this Map.source
- The URL that is the source for all references in this Map.- Throws:
IllegalArgumentException
- if hs doesn't have nested HelpSets.IOException
-
-
Method Details
-
getHelpSet
The HelpSet for this Map. -
isValidID
Determines whether the given ID is valid. If hs is null it is ignored. -
getAllIDs
Gets an enumeration of all the IDs in a Map. -
getURLFromID
Gets the URL that corresponds to a given ID in the map.- Specified by:
getURLFromID
in interfaceMap
- Parameters:
iden
- The iden to get the URL for. If iden is null it is treated as an unresolved ID and will return null.- Returns:
- URL The matching URL. Null if this map cannot solve the ID
- Throws:
MalformedURLException
- if the URLspecification found is malformed
-
isID
Determines if the URL corresponds to an ID in the Map. -
getIDFromURL
Gets the ID for this URL.- Specified by:
getIDFromURL
in interfaceMap
- Parameters:
url
- The URL to get the ID for.- Returns:
- The id (Map.ID) or null if URL is not an ID.
-
getClosestID
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().- Specified by:
getClosestID
in interfaceMap
- Parameters:
url
- A URL- Returns:
- The closest ID in this map to the given URL
-
getIDs
Determines the IDs related to this URL.
-