/**
* Copyright 2011 Oliver Buchtala
*
* This file is part of ndogen.
*
* ndogen is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ndogen is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ndogen. If not, see <http://www.gnu.org/licenses/>.
*/
package org.ndogen.substance;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import com.google.gson.annotations.Expose;
public class Document extends NestedNode {
/*
"_id": "/document/oliver/2dfa279e1ff47d6afb8015ca06142393",
"_rev": "30-0591927ea2269de0e35775eff03e3344",
"subjects": [
],
"entities": [
],
"children": [
"/section/76ca736376570718c56b4108542811b5"
],
"creator": "/user/oliver",
"created_at": "2011-05-09T18:48:30.260Z",
"updated_at": "2011-05-09T20:08:22.169Z",
"name": "Test",
"title": "Markdown2SubstanceTest",
"type": [
"/type/document",
"/type/article"
]
*/
@Expose
List<String> subjects = new LinkedList<String>();
@Expose
List<String> entities = new LinkedList<String>();
@Expose
String creator;
@Expose
Date created_at;
@Expose
Date updated_at;
@Expose
String name;
@Expose
String title;
public Document() {
type = new String[] {
"/type/document",
"/type/article"
};
}
public void addSubject(String subject) {
this.subjects.add(subject);
}
public void addEntity(String entity) {
this.entities.add(entity);
}
public void setCreator(String creator) {
this.creator = "/user/"+creator;
}
public void setCreated_at(Date createdAt) {
created_at = createdAt;
}
public void setUpdated_at(Date updatedAt) {
updated_at = updatedAt;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}