public final class IdMap extends Object
This object is loaded from an XML file conforming to the following RELAX NG (compact syntax) grammar.
JHelp.addIdMap(java.net.URL)
Modifier and Type | Field and Description |
---|---|
static IdMap[] |
EMPTY_LIST
A ready-to-use empty array of ID maps.
|
String |
href
The location of the first page of the help document.
|
URL |
sourceURL
The source URL of the XML file containing the ID map.
|
String |
title
The title of the help document.
|
URI |
uri
The URI of the first page of the help document.
|
Constructor and Description |
---|
IdMap(URL sourceURL)
Constructs a not yet loaded ID map.
|
IdMap(URL sourceURL,
String title,
String href)
Constructs a fully loaded ID map.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
URI |
getURI(URI helpBaseURI)
Returns
uri , possibly resolved against specified base URI. |
int |
hashCode() |
boolean |
isMainIdMap()
Returns
true if this IdMap has been marked
as being the main one. |
void |
setMainIdMap(boolean mainIdMap)
If
true , mark this IdMap as being the main one. |
String |
toString()
Returns a string representation of this ID map which may be used
for tests and debugging.
|
public final URL sourceURL
public final String title
null
if this ID map has not yet been loaded.
public final String href
null
if this ID map has not yet been loaded.
If relative, it's relative to JHelp.getHelpBaseURI()
.
public final URI uri
null
if this ID map has not yet been loaded.
If relative, it's relative to JHelp.getHelpBaseURI()
.
public static final IdMap[] EMPTY_LIST
public IdMap(URL sourceURL)
sourceURL
- the source URL of the XML file containing the ID mappublic IdMap(URL sourceURL, String title, String href) throws URISyntaxException
sourceURL
- the source URL of the XML file containing the ID maptitle
- the title of the help documenthref
- the location of the first page of the help documentURISyntaxException
public void setMainIdMap(boolean mainIdMap)
true
, mark this IdMap
as being the main one.isMainIdMap
public boolean isMainIdMap()
true
if this IdMap
has been marked
as being the main one.setMainIdMap(boolean)
public URI getURI(URI helpBaseURI)
uri
, possibly resolved against specified base URI.helpBaseURI
- to base URI used to resolve the relative URI of the
help document. May be null
.