org.gcube.couchbase.entities
Class ForwardIndexDocument

java.lang.Object
  extended by 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

Field Summary
static String DOCID_FIELD
           
static String LANG_UNKNOWN
           
static String LANGUAGE_FIELD
           
 
Constructor Summary
ForwardIndexDocument()
           
ForwardIndexDocument(String rowset)
           
 
Method Summary
 String getColId()
           
 String getDocId()
           
 String getDocLang()
           
 Map<String,ArrayList<String>> getFields()
           
 String getID()
           
 Map<String,ArrayList<String>> getKeys()
           
static Document loadXMLFromString(String xml)
           
static void parseXML(Map<String,ArrayList<String>> keys, Map<String,ArrayList<String>> fields, String rowset)
           
 void parseXML(String rowset)
           
 String toJSON()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

ForwardIndexDocument

public ForwardIndexDocument()

ForwardIndexDocument

public ForwardIndexDocument(String rowset)
                     throws Exception
Throws:
Exception
Method Detail

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.