Package org.tei.comparator.web.client

Examples of org.tei.comparator.web.client.Information


   * @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;
  }
View Full Code Here

TOP

Related Classes of org.tei.comparator.web.client.Information

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.