90 lines
1.8 KiB
Java
90 lines
1.8 KiB
Java
package org.gcube.data.publishing.gCatFeeder.collectors.dm.model;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.HashSet;
|
|
import java.util.List;
|
|
import java.util.Set;
|
|
|
|
import org.gcube.data.publishing.gCatFeeder.collectors.dm.model.ckan.GCatModel;
|
|
import org.gcube.data.publishing.gCatfeeder.collectors.model.CustomData;
|
|
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Getter;
|
|
import lombok.Setter;
|
|
|
|
@Getter
|
|
@Setter
|
|
public class InternalAlgorithmDescriptor implements CustomData {
|
|
|
|
@AllArgsConstructor
|
|
@Getter
|
|
public static class Parameter{
|
|
private String name;
|
|
private String type;
|
|
private String description;
|
|
private String value;
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
final int prime = 31;
|
|
int result = 1;
|
|
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
|
return result;
|
|
}
|
|
@Override
|
|
public boolean equals(Object obj) {
|
|
if (this == obj)
|
|
return true;
|
|
if (obj == null)
|
|
return false;
|
|
if (getClass() != obj.getClass())
|
|
return false;
|
|
Parameter other = (Parameter) obj;
|
|
if (name == null) {
|
|
if (other.name != null)
|
|
return false;
|
|
} else if (!name.equals(other.name))
|
|
return false;
|
|
return true;
|
|
}
|
|
|
|
|
|
}
|
|
|
|
private String className;
|
|
|
|
//operator info
|
|
private String name;
|
|
private String description;
|
|
private String briefDescription;
|
|
private String id;
|
|
|
|
private String author;
|
|
private String maintainer;
|
|
|
|
//category info
|
|
|
|
private String categoryBriefDescription;
|
|
private String categoryDescription;
|
|
private String categoryID;
|
|
private String categoryName;
|
|
|
|
|
|
private Set<Parameter> parameters=new HashSet<>();
|
|
|
|
private String guiLink;
|
|
private String wpsLink;
|
|
|
|
private String visibility;
|
|
|
|
|
|
private List<String> tags=new ArrayList<>();
|
|
|
|
public GCatModel asCKANModel() {
|
|
return new GCatModel(this);
|
|
}
|
|
|
|
|
|
|
|
}
|