public class BagOfWordsParser extends java.lang.Object implements ParserDef
BagOfWords
to or from XML.Constructor and Description |
---|
BagOfWordsParser()
Create a new instance of BagOfWordsParser
|
Modifier and Type | Method and Description |
---|---|
BagOfWords |
parse(org.licas_xml.abs.Element toParse)
Parse the XML element back into the appropriate Object.
|
org.licas_xml.abs.Element |
serialize(BagOfWords bagOfWords)
Serialize the object into an XML element.
|
org.licas_xml.abs.Element |
serialize(java.lang.Object toSerialize)
Serialize the object into an XML element.
|
public BagOfWordsParser()
public org.licas_xml.abs.Element serialize(java.lang.Object toSerialize) throws java.lang.Exception
serialize
in interface ParserDef
toSerialize
- the object to serialize. Of type BagOfWords
.java.lang.Exception
- any error.public org.licas_xml.abs.Element serialize(BagOfWords bagOfWords) throws java.lang.Exception
bagOfWords
- the bag of words to serialize.java.lang.Exception
- any error.public BagOfWords parse(org.licas_xml.abs.Element toParse) throws java.lang.Exception