Class ProductToolsLabelReader
- java.lang.Object
-
- gov.nasa.pds.imaging.generate.readers.ProductToolsLabelReader
-
public class ProductToolsLabelReader extends Object
- Author:
- mcayanan
-
-
Constructor Summary
Constructors Constructor Description ProductToolsLabelReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getPDSObjectNames()
List<String>
getPDSSimpleItemNames()
gov.nasa.pds.tools.label.Label
parseLabel(String filePath)
Parse the label and create a XML DOM representation.void
setIncludePaths(List<String> paths)
Set the paths to search for files referenced by pointers.Map<String,Map>
traverseDOM(gov.nasa.pds.tools.label.Label label)
Traverses the DOM returned by the PDSLabelToDom object.
-
-
-
Method Detail
-
parseLabel
public gov.nasa.pds.tools.label.Label parseLabel(String filePath) throws gov.nasa.pds.tools.LabelParserException
Parse the label and create a XML DOM representation. PDSLabelToDom: Within the DOM returned the Elements are: PDS3 - At top of document to describe it is a PDS3 label COMMENT - All commented text in label is contained within these elements item - A data item at base level of label GROUP - A group of related elements containing a collection of items OBJECT - A group of related elements containing a collection of items- Parameters:
filePath
-- Throws:
LabelReaderException
gov.nasa.pds.tools.LabelParserException
Exception
-
traverseDOM
public Map<String,Map> traverseDOM(gov.nasa.pds.tools.label.Label label)
Traverses the DOM returned by the PDSLabelToDom object.- Parameters:
root
-
-
setIncludePaths
public void setIncludePaths(List<String> paths) throws MalformedURLException
Set the paths to search for files referenced by pointers.Default is to always look first in the same directory as the label, then search specified directories.
- Parameters:
i
- List of paths- Throws:
MalformedURLException
-
-