Project

General

Profile

« Previous | Next » 

Revision 57671

1. Schema changes: Move each entity on its own collection - each entity keeps ids for its sub-entities.
2. New controllers for each entity: TopicController.java, CategoryController.java, SubCategoryController.java, IndicatorController.java.
3. New DAOs for each entity: TopicDAO.java, MongoDBTopicDAO.java, CategoryDAO.java, MongoDBCategoryDAO.java, SubCategoryDAO.java, MongoDBSubCategoryDAO.java.
4. New custom Exceptions: EntityNotFoundException.java, PathNotValidException.java.
5. ExceptionsHandler.java: Handle new EntityNotFoundException (id not in db) and PathNotValidException (id exists in db but not in path given).

View differences:

Indicator.java
1 1
package eu.dnetlib.uoamonitorservice.entities;
2 2

  
3 3
import com.fasterxml.jackson.annotation.JsonProperty;
4
import org.apache.log4j.Logger;
4 5
import org.springframework.data.annotation.Id;
5 6

  
6 7
import java.util.List;
......
54 55
        this.description = description;
55 56
    }
56 57

  
57
    public IndicatorType getType() {
58
        return type;
58
//    public IndicatorType getType() {
59
//        return type;
60
//    }
61
    public String getType() {
62
        return type.name();
59 63
    }
60 64

  
61 65
    public void setType(IndicatorType type) {
......
110 114
        this.indicatorPaths = indicatorPaths;
111 115
    }
112 116

  
113
    public boolean hasType(String str) {
114
        return this.type.equals(str);
115
    }
117
//    public String hasType() {
118
//        return this.type.name();
119
//    }
116 120
}

Also available in: Unified diff