Revision 58394
Added by Konstantina Galouni almost 4 years ago
Statistics.java | ||
---|---|---|
14 | 14 |
@JsonProperty("_id") |
15 | 15 |
private String id; |
16 | 16 |
private String pid; |
17 |
private boolean isActive = true; |
|
17 | 18 |
Map<String,StatisticsEntity> entities = new HashMap<String, StatisticsEntity>(); |
18 | 19 |
public Statistics(String pid){ |
19 | 20 |
this.pid = pid; |
21 |
this.isActive = true; |
|
20 | 22 |
entities.put("publication",new StatisticsEntity()); |
21 | 23 |
entities.put("dataset",new StatisticsEntity()); |
22 | 24 |
entities.put("software",new StatisticsEntity()); |
... | ... | |
38 | 40 |
this.pid = pid; |
39 | 41 |
} |
40 | 42 |
|
43 |
public boolean getIsActive() { |
|
44 |
return isActive; |
|
45 |
} |
|
46 |
|
|
47 |
public void setIsActive(boolean isActive) { |
|
48 |
this.isActive = isActive; |
|
49 |
} |
|
50 |
|
|
41 | 51 |
public Map<String, StatisticsEntity> getEntities() { |
42 | 52 |
return entities; |
43 | 53 |
} |
... | ... | |
51 | 61 |
return "Statistics{" + |
52 | 62 |
"id='" + id + '\'' + |
53 | 63 |
", pid='" + pid + '\'' + |
64 |
", isActive= "+isActive + |
|
54 | 65 |
", entities=" + entities + |
55 | 66 |
'}'; |
56 | 67 |
} |
Also available in: Unified diff
[use-UoaAdminToolsLibrary | Admin Tools Service]:
REMINDER NOTE: change war name and properties (e.g. in MongoConfig.java) when merging to trunk.
1. Move MongoDBDAOs to folder /dao/MongoDBDAOs.
2. Move entities for Subscriber to folder /entities/subscriber.
3. Move entities for Curator to folder /entities/curator.
4. Add services for Layout, Statistics and Subscribers (to be called by controllers).
5. Rename "CommunitySubscribers" to "PortalSubscribers", "CommunitySubscribersController" to "PortalSubscribersController" and "CommunitySubscribersDAO" to "PortalSubscribersDAO".
6. Update all files to import appropriate files (from library or locally).
7. Create "ConnectController", "ExploreController" and update "CommunityController".
8. UoaAdminToolsApplication.java: scanBasePackages = {"eu.dnetlib.uoaadmintools", "eu.dnetlib.uoaadmintoolslibrary"}
9. MongoConnection.java: basePackages = {"eu.dnetlib.uoaadmintools.dao", "eu.dnetlib.uoaadmintoolslibrary.dao"}
10. Update update_db.js for changing db collections and entries according to new schema.