Class LMSXmlDocument
java.lang.Object
loci.formats.in.LeicaMicrosystemsMetadata.LMSXmlDocument
- Direct Known Subclasses:
LMSCollectionXmlDocument,LMSImageXmlDocument
This class loads and represents a Leica Microsystems XML document (from
file or xml string)
- Author:
- Constanze Wendlandt constanze.wendlandt at leica-microsystems.com
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLMSXmlDocument(String xml) LMSXmlDocument(String filepath, LMSCollectionXmlDocument parent) -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringfileExists(String path) Checks if file at path exists and corrects paths to be case sensitiveprotected StringReturns the value of an attribute of a node, if existingprotected NodeGetChildWithName(Node node, String name) getDoc()Returns all files which directly or indirectly reference this LMS xml file.private voidinitFromFilepath(String filepath) private voidinitFromXmlString(String xml) nodeToString(Node node) protected StringparseFilePath(String refPath) Translates Leica XML file paths to absolute url decoded pathstoString()Searches the XML document for expressions using xPath.Searches a node for expressions using xPath.
-
Field Details
-
doc
-
xPath
-
dir
-
filepath
-
LOGGER
protected static final org.slf4j.Logger LOGGER -
parent
LMSCollectionXmlDocument parent
-
-
Constructor Details
-
LMSXmlDocument
-
LMSXmlDocument
-
-
Method Details
-
getDoc
-
getFilepath
-
initFromXmlString
-
initFromFilepath
-
xPath
Searches the XML document for expressions using xPath.- Parameters:
expression- expression in xPath syntax- Returns:
- list of found nodes
-
xPath
Searches a node for expressions using xPath.- Parameters:
node- node in which to searchexpression- expression in xPath syntax- Returns:
- list of found nodes
-
toString
-
getAttr
Returns the value of an attribute of a node, if existing- Parameters:
node- node in which to search for the attributeattrName- name of the attribute- Returns:
-
parseFilePath
Translates Leica XML file paths to absolute url decoded paths- Parameters:
refPath- path string found in Leica XML reference- Returns:
- absolute, url decoded path
-
nodeToString
-
GetChildWithName
-
getParentFiles
Returns all files which directly or indirectly reference this LMS xml file.- Returns:
- list of LMS xml documents (xlef and optionally xlcfs)
-
fileExists
Checks if file at path exists and corrects paths to be case sensitive- Parameters:
path- whole file path
-