Package uk.ac.starlink.ttools
Class DocUtils
java.lang.Object
uk.ac.starlink.ttools.DocUtils
Utilities used for automatically-generated documentation.
- Since:
- 27 Sep 2006
- Author:
- Mark Taylor
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
filterRef
(BasicFilter filter) Provides a snippet of XML which references a processing filter.static String
Does minimal conversion from XHTML-like XML to SUN-friendly XML.static String
getXmlDescription
(uk.ac.starlink.table.Documented item) Returns the XML description provided by an item implementing the Documented interface, in a form suitable for insertion into the STILTS user document.static String
Concatenates an array of strings, appending a carriage return to each one.static String
listInfos
(uk.ac.starlink.table.ValueInfo[] infos) Returns an string listing the supplied array of metadata objects.static String
Provides a snippet of XML which references a namedProcessingMode
.
-
Method Details
-
join
Concatenates an array of strings, appending a carriage return to each one.- Parameters:
lines
- array of input strings- Returns:
- one long output string
-
filterRef
Provides a snippet of XML which references a processing filter.- Parameters:
filter
- processing filter- Returns:
- filter reference
-
modeRef
Provides a snippet of XML which references a namedProcessingMode
.- Parameters:
name
- mode name- Returns:
- mode reference
-
listInfos
Returns an string listing the supplied array of metadata objects. The returned string should be suitable for inserting into XML text.- Parameters:
infos
- array of infos- Returns:
- string listing
infos
by name
-
getXmlDescription
Returns the XML description provided by an item implementing the Documented interface, in a form suitable for insertion into the STILTS user document.Note the implementation of this is currently somewhat scrappy; it works on the things that it's called upon to transform during the STILTS user document build, but it may need extra work if some less constrained XHTML gets fed to it. If that becomes the case, problems should show up at TTOOLS package build/test time.
- Parameters:
item
- supplier of (XHTML-like) documentation XML- Returns:
- SUN-compliant XML
- Throws:
IOException
-
fromXhtml
Does minimal conversion from XHTML-like XML to SUN-friendly XML. Since this works on strings, it's not intended for huge documents.- Parameters:
xhtml
- input XHTML-like XML string, expected to be a sequence of P elements- Returns:
- output SUN-friendly XML string
- Throws:
IOException
TransformerException
-