1 22 23 28 package org.xquark.mapper.metadata; 29 30 import java.sql.Timestamp ; 31 32 36 public class DocumentInfo 37 { 38 private static final String RCSRevision = "$Revision: 1.1 $"; 39 private static final String RCSName = "$Name: $"; 40 41 private static final int MARKUP_OFFSET = 8; 42 43 public String docID; 44 public long udid = -1; 45 public long nodeCount = -1; 46 public int avgNodeLen = -1; 47 public Timestamp creationDate; 48 49 public DocumentInfo(String docID, long udid, Timestamp creationDate, long nodeCount, int avgNodeLen) 50 { 51 this.docID = docID; 52 this.udid = udid; 53 this.nodeCount = nodeCount; 54 this.avgNodeLen = avgNodeLen; 55 this.creationDate = creationDate; 56 } 57 58 public long getEstimatedDocumentLength() 59 { 60 return nodeCount*(avgNodeLen + MARKUP_OFFSET); 61 } 62 } 63 | Popular Tags |