* @param id
* @param master2
* @return
*/
private Information getInformationFor(String id, Document doc) {
Information info = new Information(id);
Element el = getElementFor(id, doc);
if(null != el){
// build path for element
String path = "";
StringBuffer header = new StringBuffer();
StringBuffer staticUrl = new StringBuffer();
StringBuffer staticUrlAnchor = new StringBuffer();
path = buildPath(el, path, header, staticUrl, staticUrlAnchor);
info.setPath(path);
// get pagenumber
info.setPageNumber(getLastPageNumber(el));
info.setHeader(header.toString());
// update url
String prefixUrl = PropertiesProvider.getInstance().getStaticDisplayURLPrefix();
String prefix = ((file1 == doc) ? PropertiesProvider.getInstance().getStaticDisplayPrefixFile1() : PropertiesProvider.getInstance().getStaticDisplayPrefixFile2());
String displayStaticUrl = prefixUrl + prefix + staticUrl.toString().substring(1) + ".html#" + prefix + staticUrlAnchor.toString().substring(1);
info.setLinkToStaticDisplay(displayStaticUrl);
}
return info;
}