org.gcube.couchbase.entities
Class ForwardIndexDocument
java.lang.Object
org.gcube.couchbase.entities.ForwardIndexDocument
- All Implemented Interfaces:
- Serializable
public class ForwardIndexDocument
- extends Object
- implements Serializable
Simple parsing of the Rowsets that are produced from the gDTS and are fed to
the index.
After the parsing collections of the keys and fields are kept as
ForwardIndexDocument that can be easily transformed to JSON so they can be
stored in Couchbase.
- Author:
- Alex Antoniadis
- See Also:
- Serialized Form
LANGUAGE_FIELD
public static final String LANGUAGE_FIELD
- See Also:
- Constant Field Values
LANG_UNKNOWN
public static final String LANG_UNKNOWN
- See Also:
- Constant Field Values
DOCID_FIELD
public static final String DOCID_FIELD
- See Also:
- Constant Field Values
ForwardIndexDocument
public ForwardIndexDocument()
ForwardIndexDocument
public ForwardIndexDocument(String rowset)
throws Exception
- Throws:
Exception
parseXML
public void parseXML(String rowset)
throws Exception
- Throws:
Exception
parseXML
public static void parseXML(Map<String,ArrayList<String>> keys,
Map<String,ArrayList<String>> fields,
String rowset)
throws Exception
- Throws:
Exception
getID
public String getID()
getDocLang
public String getDocLang()
getDocId
public String getDocId()
getColId
public String getColId()
toString
public String toString()
- Overrides:
toString in class Object
toJSON
public String toJSON()
loadXMLFromString
public static Document loadXMLFromString(String xml)
throws Exception
- Throws:
Exception
getKeys
public Map<String,ArrayList<String>> getKeys()
getFields
public Map<String,ArrayList<String>> getFields()
Copyright © 2013. All Rights Reserved.