|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Meta-information for a NewsML session.
This interface provides a node-independent access point for getting and setting information about a NewsML session.
Method Summary | |
BaseNode |
findReference(java.lang.String reference,
boolean useExternal)
Look up a reference to a NewsML node. |
java.lang.String |
getBaseURL()
Get the base URL for the document. |
NewsMLFactory |
getFactory()
Get the factory for creating new NewsML documents. |
BaseNode |
getRootNode()
Get the root node of the current NewsML document. |
java.net.URL |
resolveHref(java.lang.String href)
Resolve a reference. |
Method Detail |
public NewsMLFactory getFactory()
public BaseNode getRootNode()
public BaseNode findReference(java.lang.String reference, boolean useExternal) throws java.io.IOException
If the reference contains '#', the part following corresponds with a Duid in the target document (otherwise uses the root element); if the part preceding '#' is empty, the target document is the current document.
reference
- The node reference, as a string in URI
reference format (may include a '#').useExternal
- true to follow references in external URLs,
false otherwise.public java.lang.String getBaseURL()
resolveHref(String)
public java.net.URL resolveHref(java.lang.String href) throws java.net.MalformedURLException
This method is useful for retrieving an external resource --
text or binary -- referenced from a NewsML package. See the
standard Java URL
class for information on how your
application can use the URL returned to load remote resources.
The method automatically resolves any relative hrefs against
the NewsML document's base URL.
href
- A (possibly relative) URL to resolve.java.net.MalformedURLException
- if the href cannot be resolved
into a URL (this can be caught as an IOException
).getBaseURL()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |