public static DataObjectType getInputOutput(Object object){
if (object != null){
DataObjectType dataObjectType = new DataObjectType();
if (object instanceof ExperimentInputResource){
ExperimentInputResource expInput = (ExperimentInputResource) object;
dataObjectType.setKey(expInput.getExperimentKey());
dataObjectType.setValue(expInput.getValue());
if (expInput.getInputType() != null){
dataObjectType.setType(DataType.valueOf(expInput.getInputType()));
}
dataObjectType.setMetaData(expInput.getMetadata());
return dataObjectType;
}else if (object instanceof ExperimentOutputResource){
ExperimentOutputResource expOutput = (ExperimentOutputResource)object;
dataObjectType.setKey(expOutput.getExperimentKey());
dataObjectType.setValue(expOutput.getValue());