コード例 #1
0
ファイル: LSPDoc.java プロジェクト: nlalak/SDARTS
 public void toXML(XMLWriter writer) throws IOException {
   writer.setDefaultFormat();
   writer.enterNamespace(STARTS.NAMESPACE_NAME);
   writer.printStartElement("sqrdocument", true);
   writer.printAttribute("version", version);
   writer.printStartElementClose();
   writer.indent();
   writer.printEntireElement("rawscore", rawScore);
   for (Iterator it = sources.iterator(); it.hasNext(); ) {
     LSPSource source = (LSPSource) it.next();
     source.toXML(writer);
   }
   for (Iterator it = fieldValues.iterator(); it.hasNext(); ) {
     FieldValue fv = (FieldValue) it.next();
     fv.toXML(writer);
   }
   writer.printStartElement("term-stats-list");
   for (Iterator it = termStats.iterator(); it.hasNext(); ) {
     TermStat ts = (TermStat) it.next();
     ts.toXML(writer);
   }
   writer.printEndElement("term-stats-list");
   writer.printEntireElement("docsize", docSize);
   writer.printEntireElement("doccount", docCount);
   writer.unindent();
   writer.printEndElement("sqrdocument");
   writer.exitNamespace();
 }
コード例 #2
0
ファイル: LSPField.java プロジェクト: nlalak/SDARTS
 public void toXML(XMLWriter writer) throws IOException {
   writer.setDefaultFormat();
   writer.enterNamespace(STARTS.NAMESPACE_NAME);
   writer.printStartElement("field", true);
   writer.printAttribute("type-set", typeSet);
   writer.printAttribute("name", name);
   writer.printEmptyElementClose();
   writer.exitNamespace();
 }
コード例 #3
0
ファイル: LSPDoc.java プロジェクト: nlalak/SDARTS
 public void toXML(XMLWriter writer) throws IOException {
   writer.indent();
   writer.printStartElement("doc-term");
   writer.indent();
   field.toXML(writer);
   writer.unindent();
   writer.indent();
   writer.printEntireElement("value", fieldValue);
   writer.unindent();
   writer.printEndElement("doc-term");
   writer.unindent();
 }