Revision 39219
Added by Sandro La Bruzzo over 8 years ago
DLIDBManager.java | ||
---|---|---|
794 | 794 |
public HashMap<String, StatsInfo> getStats() { |
795 | 795 |
|
796 | 796 |
String getAllObjectSQL = |
797 |
"select count(*) as total, d.ds_id as datasource from dli_object o left outer join record_provenance r on o.dli_id= r.dli_id left outer join dli_datasource d on r.ds_id = d.ds_id group by d.ds_id"; |
|
797 |
"select count(*) as total, d.ds_id as datasource from dli_object o left outer join record_provenance r on o.dli_id= r.dli_id left outer join dli_datasource d on r.ds_id = d.ds_id where d.exportable= true group by d.ds_id";
|
|
798 | 798 |
String getAllObjectByTypeSQL = |
799 |
"select count(*) as total, d.ds_id as datasource from dli_object o left outer join record_provenance r on o.dli_id= r.dli_id left outer join dli_datasource d on r.ds_id = d.ds_id where o.type=? group by d.ds_id"; |
|
799 |
"select count(*) as total, d.ds_id as datasource from dli_object o left outer join record_provenance r on o.dli_id= r.dli_id left outer join dli_datasource d on r.ds_id = d.ds_id where o.type=? and d.exportable= true group by d.ds_id";
|
|
800 | 800 |
String getAllRelationByTypeSQL = |
801 | 801 |
"select count(*) as total, rp.ds_id as datasource from dli_object o left outer join dli_relation r on o.dli_id = r.source_record left outer join relation_provenance rp on r.id_relation = rp.id_relation where o.type=? and r.target_type=? group by rp.ds_id"; |
802 | 802 |
String getTotalRelationSQL = "select count(*) as total , ds_id as datasource from relation_provenance group by ds_id"; |
... | ... | |
817 | 817 |
String ds = result.getString("datasource"); |
818 | 818 |
|
819 | 819 |
String nameDS = datasourceMap.get(ds).getKey(); |
820 |
if (!stats.containsKey(nameDS)) { |
|
821 |
stats.put(nameDS, new StatsInfo(nameDS)); |
|
820 |
if (datasourceMap.get(ds).getValue()) { |
|
821 |
if (!stats.containsKey(nameDS)) { |
|
822 |
stats.put(nameDS, new StatsInfo(nameDS)); |
|
823 |
} |
|
824 |
StatsInfo currentStats = stats.get(nameDS); |
|
825 |
currentStats.setNumberOfPublication(total); |
|
822 | 826 |
} |
823 |
StatsInfo currentStats = stats.get(nameDS); |
|
824 |
currentStats.setNumberOfPublication(total); |
|
825 | 827 |
} |
826 | 828 |
|
827 | 829 |
ps = connection.prepareStatement(getAllObjectSQL); |
Also available in: Unified diff
added wf for generation of intersetction with pid