org.gcube.data.spd.obisplugin
Class ObisClient
java.lang.Object
org.gcube.data.spd.obisplugin.ObisClient
public class ObisClient
- extends Object
- Author:
- "Federico De Faveri defaveri@isti.cnr.it"
|
Method Summary |
protected static void |
fillCommonNames(PluginSession session,
int taxonNameId,
org.gcube.data.spd.model.products.ResultItem item)
|
protected static void |
fillCommonNames(PluginSession session,
int taxonNameId,
org.gcube.data.spd.model.products.TaxonomyItem item)
|
protected static int |
fillDatasetInformation(ResultSet rs,
org.gcube.data.spd.model.products.ResultItem item)
|
protected static void |
fillProducts(PluginSession session,
int speciesId,
int datasetId,
String key,
SearchFilters filters,
org.gcube.data.spd.model.products.ResultItem item)
|
protected static void |
fillTaxon(PluginSession session,
int id,
org.gcube.data.spd.model.products.Taxon taxon,
String credits,
String citation)
Fills the node with the taxon information. |
protected static void |
fillTaxonomyItem(PluginSession session,
int id,
org.gcube.data.spd.model.products.TaxonomyItem item,
String credits,
String citation)
|
protected static String |
generateCitation()
|
protected static String |
generateCredits()
|
protected static org.gcube.data.spd.model.products.OccurrencePoint |
generateOccurrencePoint(ResultSet rs,
String credits)
|
protected static void |
generateResultItems(PluginSession session,
ResultSet rs,
SearchFilters filters,
Writer<org.gcube.data.spd.model.products.ResultItem> writer)
|
protected static void |
generateTaxonomyItems(PluginSession session,
ResultSet rs,
Writer<org.gcube.data.spd.model.products.TaxonomyItem> writer)
|
static org.gcube.data.spd.model.BasisOfRecord |
getBasisOfRecord(String basis)
|
protected static List<org.gcube.data.spd.model.products.TaxonomyItem> |
getChildrenTaxon(PluginSession session,
int id)
|
static Set<String> |
getCommonNames(PluginSession session,
String scientificName)
|
static org.gcube.data.spd.model.products.OccurrencePoint |
getOccurrenceById(PluginSession session,
String id)
|
static void |
getOccurrences(PluginSession session,
String key,
Writer<org.gcube.data.spd.model.products.OccurrencePoint> writer)
|
static int |
getOccurrencesCount(PluginSession session,
int taxonId,
int datasetId,
SearchFilters filters)
|
static void |
getScientificNames(PluginSession session,
String commonName,
Writer<String> writer)
|
static void |
getTaxonByCommonName(PluginSession session,
String commonName,
Writer<org.gcube.data.spd.model.products.TaxonomyItem> writer)
|
protected static org.gcube.data.spd.model.products.TaxonomyItem |
getTaxonById(PluginSession session,
int id)
|
static void |
getTaxonByScientificNames(PluginSession session,
String scientificName,
Writer<org.gcube.data.spd.model.products.TaxonomyItem> writer)
|
static void |
main(String[] args)
|
protected static void |
navigate(String indentation,
PluginSession session,
int id)
|
static void |
searchByCommonName(PluginSession session,
String searchTerm,
SearchFilters filters,
Writer<org.gcube.data.spd.model.products.ResultItem> writer)
|
static void |
searchByScientificName(PluginSession session,
String searchTerm,
SearchFilters filters,
Writer<org.gcube.data.spd.model.products.ResultItem> writer)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static org.gcube.common.core.utils.logging.GCUBELog logger
DATE_FORMAT
protected static final SimpleDateFormat DATE_FORMAT
DATE_UTIL
protected static final DateUtil DATE_UTIL
sdf
protected static final SimpleDateFormat sdf
taxonomyItemCache
public static final Cache<Integer,org.gcube.data.spd.model.products.TaxonomyItem> taxonomyItemCache
found
protected static Set<Integer> found
foundTaxon
protected static Map<String,org.gcube.data.spd.model.products.TaxonomyItem> foundTaxon
ObisClient
public ObisClient()
getOccurrencesCount
public static int getOccurrencesCount(PluginSession session,
int taxonId,
int datasetId,
SearchFilters filters)
throws SQLException
- Throws:
SQLException
getOccurrences
public static void getOccurrences(PluginSession session,
String key,
Writer<org.gcube.data.spd.model.products.OccurrencePoint> writer)
throws Exception
- Throws:
Exception
generateOccurrencePoint
protected static org.gcube.data.spd.model.products.OccurrencePoint generateOccurrencePoint(ResultSet rs,
String credits)
throws SQLException
- Throws:
SQLException
getOccurrenceById
public static org.gcube.data.spd.model.products.OccurrencePoint getOccurrenceById(PluginSession session,
String id)
throws Exception
- Throws:
Exception
getBasisOfRecord
public static org.gcube.data.spd.model.BasisOfRecord getBasisOfRecord(String basis)
searchByCommonName
public static void searchByCommonName(PluginSession session,
String searchTerm,
SearchFilters filters,
Writer<org.gcube.data.spd.model.products.ResultItem> writer)
throws Exception
- Throws:
Exception
fillProducts
protected static void fillProducts(PluginSession session,
int speciesId,
int datasetId,
String key,
SearchFilters filters,
org.gcube.data.spd.model.products.ResultItem item)
throws SQLException
- Throws:
SQLException
searchByScientificName
public static void searchByScientificName(PluginSession session,
String searchTerm,
SearchFilters filters,
Writer<org.gcube.data.spd.model.products.ResultItem> writer)
throws Exception
- Throws:
Exception
generateResultItems
protected static void generateResultItems(PluginSession session,
ResultSet rs,
SearchFilters filters,
Writer<org.gcube.data.spd.model.products.ResultItem> writer)
throws Exception
- Throws:
Exception
fillTaxon
protected static void fillTaxon(PluginSession session,
int id,
org.gcube.data.spd.model.products.Taxon taxon,
String credits,
String citation)
throws SQLException
- Fills the node with the taxon information. Also information about parent are retrieved.
- Parameters:
connection - the db connection.id - the taxon id.taxonNode - the node to fill.
- Throws:
SQLException
fillTaxonomyItem
protected static void fillTaxonomyItem(PluginSession session,
int id,
org.gcube.data.spd.model.products.TaxonomyItem item,
String credits,
String citation)
throws Exception
- Throws:
Exception
fillCommonNames
protected static void fillCommonNames(PluginSession session,
int taxonNameId,
org.gcube.data.spd.model.products.TaxonomyItem item)
throws SQLException
- Throws:
SQLException
fillCommonNames
protected static void fillCommonNames(PluginSession session,
int taxonNameId,
org.gcube.data.spd.model.products.ResultItem item)
throws SQLException
- Throws:
SQLException
fillDatasetInformation
protected static int fillDatasetInformation(ResultSet rs,
org.gcube.data.spd.model.products.ResultItem item)
throws SQLException
- Throws:
SQLException
getCommonNames
public static Set<String> getCommonNames(PluginSession session,
String scientificName)
throws SQLException
- Throws:
SQLException
getScientificNames
public static void getScientificNames(PluginSession session,
String commonName,
Writer<String> writer)
throws SQLException
- Throws:
SQLException
getTaxonByScientificNames
public static void getTaxonByScientificNames(PluginSession session,
String scientificName,
Writer<org.gcube.data.spd.model.products.TaxonomyItem> writer)
throws Exception
- Throws:
Exception
getTaxonByCommonName
public static void getTaxonByCommonName(PluginSession session,
String commonName,
Writer<org.gcube.data.spd.model.products.TaxonomyItem> writer)
throws Exception
- Throws:
Exception
generateTaxonomyItems
protected static void generateTaxonomyItems(PluginSession session,
ResultSet rs,
Writer<org.gcube.data.spd.model.products.TaxonomyItem> writer)
throws SQLException,
Exception
- Throws:
SQLException
Exception
getChildrenTaxon
protected static List<org.gcube.data.spd.model.products.TaxonomyItem> getChildrenTaxon(PluginSession session,
int id)
throws SQLException
- Throws:
SQLException
getTaxonById
protected static org.gcube.data.spd.model.products.TaxonomyItem getTaxonById(PluginSession session,
int id)
throws Exception
- Throws:
Exception
generateCitation
protected static String generateCitation()
generateCredits
protected static String generateCredits()
main
public static void main(String[] args)
throws Exception
- Parameters:
args -
- Throws:
Exception
navigate
protected static void navigate(String indentation,
PluginSession session,
int id)
throws SQLException
- Throws:
SQLException
Copyright © 2013. All Rights Reserved.