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(); }
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(); }
public void toXML(XMLWriter writer) throws IOException { writer.indent(); term.toXML(writer); writer.printEntireElement("term-freq", termFreq); writer.printEntireElement("term-weight", termWeight); writer.printEntireElement("doc-freq", docFreq); writer.unindent(); }