All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fr.pilato.elasticsearch.crawler.fs.meta.doc.Meta Maven / Gradle / Ivy

There is a newer version: 2.5
Show newest version
/*
 * Licensed to David Pilato (the "Author") under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. Author licenses this
 * file to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

package fr.pilato.elasticsearch.crawler.fs.meta.doc;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Represents document metadata
 */
public class Meta {

    /**
     * Generated json field names
     */
    static public final class FIELD_NAMES {
        public static final String AUTHOR = "author";
        public static final String TITLE = "title";
        public static final String DATE = "date";
        public static final String KEYWORDS = "keywords";
        public static final String LANGUAGE = "language";
        public static final String FORMAT = "format";
        public static final String IDENTIFIER = "identifier";
        public static final String CONTRIBUTOR = "contributor";
        public static final String COVERAGE = "coverage";
        public static final String MODIFIER = "modifier";
        public static final String CREATOR_TOOL = "creator_tool";
        public static final String PUBLISHER = "publisher";
        public static final String RELATION = "relation";
        public static final String RIGHTS = "rights";
        public static final String SOURCE = "source";
        public static final String TYPE = "type";
        public static final String DESCRIPTION = "description";
        public static final String CREATED = "created";
        public static final String PRINT_DATE = "print_date";
        public static final String METADATA_DATE = "metadata_date";
        public static final String LATITUDE = "latitude";
        public static final String LONGITUDE = "longitude";
        public static final String ALTITUDE = "altitude";
        public static final String RATING = "rating";
        public static final String COMMENTS = "comments";
    }

    private String author;
    private String title;
    private Date date;
    private List keywords;
    private String language;
    private String format;
    private String identifier;
    private String contributor;
    private String coverage;
    private String modifier;
    private String creatorTool;
    private String publisher;
    private String relation;
    private String rights;
    private String source;
    private String type;
    private String description;
    private Date created;
    private Date printDate;
    private Date metadataDate;
    private String latitude;
    private String longitude;
    private String altitude;
    private Integer rating;
    private String comments;

    private Map raw;

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getTitle() {
        return title;
    }

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

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public List getKeywords() {
        return keywords;
    }

    public void setKeywords(List keywords) {
        this.keywords = keywords;
    }

    public Map getRaw() {
        return raw;
    }

    public void setRaw(Map raw) {
        this.raw = raw;
    }

    public void addRaw(String key, String value) {
        if (this.raw == null) {
            this.raw = new HashMap<>();
        }
        this.raw.put(key, value);
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public String getFormat() {
        return format;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    public String getIdentifier() {
        return identifier;
    }

    public void setIdentifier(String identifier) {
        this.identifier = identifier;
    }

    public String getContributor() {
        return contributor;
    }

    public void setContributor(String contributor) {
        this.contributor = contributor;
    }

    public String getCoverage() {
        return coverage;
    }

    public void setCoverage(String coverage) {
        this.coverage = coverage;
    }

    public String getModifier() {
        return modifier;
    }

    public void setModifier(String modifier) {
        this.modifier = modifier;
    }

    public String getCreatorTool() {
        return creatorTool;
    }

    public void setCreatorTool(String creatorTool) {
        this.creatorTool = creatorTool;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public String getRelation() {
        return relation;
    }

    public void setRelation(String relation) {
        this.relation = relation;
    }

    public String getRights() {
        return rights;
    }

    public void setRights(String rights) {
        this.rights = rights;
    }

    public String getSource() {
        return source;
    }

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

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public Date getPrintDate() {
        return printDate;
    }

    public void setPrintDate(Date printDate) {
        this.printDate = printDate;
    }

    public Date getMetadataDate() {
        return metadataDate;
    }

    public void setMetadataDate(Date metadataDate) {
        this.metadataDate = metadataDate;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }
    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getAltitude() {
        return altitude;
    }

    public void setAltitude(String altitude) {
        this.altitude = altitude;
    }

    public Integer getRating() {
        return rating;
    }

    public void setRating(Integer rating) {
        this.rating = rating;
    }

    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy