package eu.socialsensor.framework.client.search.solr;

import org.apache.solr.client.solrj.beans.Field;

import eu.socialsensor.framework.common.domain.Item;

public class SolrNewsFeed {
	
	public SolrNewsFeed(){
		
	}
	
	public SolrNewsFeed(Item item){
		id = item.getId();
        title = item.getTitle();
        description = item.getDescription();
        publicationTime = item.getPublicationTime();
        source = item.getUrl();
	}
	
	public Item toItem(){
		Item item = new Item();
		
		item.setId(id);
		item.setTitle(title);
		item.setDescription(description);
		item.setPublicationTime(publicationTime);
		item.setUrl(source);
		
		return item;
	}
	
	@Field(value = "id")
    private String id;
    @Field(value = "source")
    private String source;
    @Field(value = "title")
    private String title;
    @Field(value = "description")
    private String description;
    @Field(value = "publicationTime")
    private long publicationTime;
    
    
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
    
    public Long getPublicationTime() {
        return publicationTime;
    }

    public void setPublicationTime(Long publicationTime) {
        this.publicationTime = publicationTime;
    }
}

@@ -449,16 +449,49 @@
 Url();%0D%0A
+        lists = item.getList();%0D%0A
 %09%7D%0D%0A%09%0D%0A%09
@@ -690,24 +690,48 @@
 l(source);%0D%0A
+%09%09item.setList(lists);%0D%0A
 %09%09%0D%0A%09%09return
@@ -1048,24 +1048,76 @@
 nTime;%0D%0A    
+@Field(value = %22lists%22)%0D%0A    private String%5B%5D lists;
 %0D%0A    %0D%0A    

Add lists in SolrNewsFeeds