Mercurial > hg > de.mpg.mpiwg.itgroup.digilib.plugin
diff src/de/mpg/mpiwg/itgroup/indexMeta/Utils/ParseIndexMeta.java @ 9:e63a64652f4d
added comments
author | dwinter |
---|---|
date | Mon, 03 Jan 2011 16:53:48 +0100 |
parents | 83c58ea33792 |
children |
line wrap: on
line diff
--- a/src/de/mpg/mpiwg/itgroup/indexMeta/Utils/ParseIndexMeta.java Mon Jan 03 09:13:17 2011 +0100 +++ b/src/de/mpg/mpiwg/itgroup/indexMeta/Utils/ParseIndexMeta.java Mon Jan 03 16:53:48 2011 +0100 @@ -1,10 +1,8 @@ package de.mpg.mpiwg.itgroup.indexMeta.Utils; -import java.io.File; import java.io.IOException; import java.io.InputStream; - import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; import org.jdom.Document; @@ -13,6 +11,12 @@ import org.jdom.input.SAXBuilder; import org.jdom.xpath.XPath; +/** + * + * Utilities to parse index.meta files following the standards of the MPIWG + * @author dwinter + * + */ public class ParseIndexMeta { private Document dom; @@ -23,8 +27,12 @@ dom = builder.build(is); } + /** + * @return the content of the archive-path tag. + * @throws JDOMException + */ public String getPath() throws JDOMException { - // TODO Auto-generated method stub + XPath xpath = XPath.newInstance("//archive-path"); Element el = (Element)xpath.selectSingleNode(dom); if (el==null) @@ -32,6 +40,10 @@ return el.getTextTrim(); } + /** + * @return the content of //texttool/image + * @throws JDOMException + */ public String getImagePath() throws JDOMException{ String path = getPath();