Package uk.ac.starlink.vo
Class DaliExampleReader
java.lang.Object
uk.ac.starlink.vo.DaliExampleReader
Extracts DaliExample objects from a document.
The document is probably XHTML with RDFa markup.
Instances of this class are not thread-safe.
- Since:
- 12 May 2015
- Author:
- Mark Taylor
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateExample
(Element exEl, URL docUrl) Creates an example from a given DOM element.static void
Reports basic information about the examples in a document at a URL supplied on the command line.readExamples
(URL url) Reads a list of examples from a document at a given URL.
-
Constructor Details
-
DaliExampleReader
public DaliExampleReader()Constructor.
-
-
Method Details
-
readExamples
Reads a list of examples from a document at a given URL. Any fragment identifier on the URL is ignored.- Parameters:
url
- location of examples document- Returns:
- list of examples
- Throws:
IOException
-
createExample
Creates an example from a given DOM element.- Parameters:
exEl
- element node with DALI RDFa example contentdocUrl
- base URL of host document- Returns:
- example object
- Throws:
IOException
-
main
Reports basic information about the examples in a document at a URL supplied on the command line.- Throws:
IOException
-