Пример #1
0
 @Override
 public int compareTo(SnippetField f) {
   int c = super.compareTo(f);
   if (c != 0) return c;
   if ((c =
           fragmenterTemplate
               .getClass()
               .getName()
               .compareTo(f.fragmenterTemplate.getClass().getName()))
       != 0) return c;
   if ((c = tag.compareTo(f.tag)) != 0) return c;
   if ((c = separator.compareTo(f.separator)) != 0) return c;
   if ((c = maxSnippetSize - f.maxSnippetSize) != 0) return c;
   if ((c = maxSnippetNumber - f.maxSnippetNumber) != 0) return c;
   return 0;
 }
Пример #2
0
 @Override
 public void writeXmlConfig(XmlWriter xmlWriter) throws SAXException {
   xmlWriter.startElement(
       "field",
       "name",
       name,
       "tag",
       tag,
       "separator",
       separator,
       "maxSnippetSize",
       Integer.toString(maxSnippetSize),
       "maxSnippetNumber",
       Integer.toString(maxSnippetNumber),
       "fragmenterClass",
       fragmenterTemplate != null ? fragmenterTemplate.getClass().getSimpleName() : null,
       "timeLimit",
       Long.toString(timeLimit));
   xmlWriter.endElement();
 }
Пример #3
0
 public String getFragmenter() {
   return fragmenterTemplate.getClass().getSimpleName();
 }