org.duracloud.domain.Content Maven / Gradle / Ivy
/*
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://duracloud.org/license/
*/
package org.duracloud.domain;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
/**
* Content - a stream of bits and properties to describe the stream.
*
* @author Bill Branan
*/
public class Content {
private String id;
private Map properties = new HashMap();
private InputStream stream = null;
/**
* Getter for the field id
.
*/
public String getId() {
return id;
}
/**
* Setter for the field id
.
*/
public void setId(String id) {
this.id = id;
}
/**
* Getter for the field properties
.
*/
public Map getProperties() {
return properties;
}
/**
* Setter for the field properties
.
*/
public void setProperties(Map properties) {
this.properties = properties;
}
/**
* Adds an item to the content properties map
*
* @param name properties key
* @param value properties value
*/
public void addProperties(String name, String value) {
properties.put(name, value);
}
/**
* Getter for the field stream
.
*/
public InputStream getStream() {
return stream;
}
/**
* Setter for the field stream
.
*/
public void setStream(InputStream stream) {
this.stream = stream;
}
}