io.proximax.model.DataInfoModel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-chain-xipfs-sdk Show documentation
Show all versions of java-chain-xipfs-sdk Show documentation
Official ProximaX P2P Storage SDK Library in Java.
The newest version!
package io.proximax.model;
import java.util.Collections;
import java.util.Map;
/**
* This model class defines the details of a data
*/
public abstract class DataInfoModel {
private final String description;
private final Map metadata;
private final String name;
private final String contentType;
/**
* Construct instance of this model
* @param description a description of the data
* @param name the name for the data
* @param contentType the content type of the data
* @param metadata the string-to-string keypair metadata of the data
*/
public DataInfoModel(String description, String name, String contentType, Map metadata) {
this.description = description;
this.metadata = metadata == null ? null : Collections.unmodifiableMap(metadata);
this.name = name;
this.contentType = contentType;
}
/**
* Get the description of the data
* @return the description
*/
public String getDescription() {
return description;
}
/**
* Get the string-to-string keypair metadata of the data
* @return the metadata
*/
public Map getMetadata() {
return metadata;
}
/**
* Get the name for the data
* @return the name
*/
public String getName() {
return name;
}
/**
* Get the content type of the data
* @return the content type
*/
public String getContentType() {
return contentType;
}
}