org.hpccsystems.ws.client.wrappers.EclRecordWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wsclient Show documentation
Show all versions of wsclient Show documentation
This project allows a user to interact with ESP services in a controlled manner. The API calls available under org.hpccsystems.ws.client.platform allow for a user to target ESP's across multiple environments running a range of hpccsystems-platform versions. There is no guarantee that if a user utilizes org.hpccsystems.ws.client.gen generated stub code from wsdl, that the calls will be backwards compatible with older hpccsystems-platform versions.
package org.hpccsystems.ws.client.wrappers;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import org.hpccsystems.ws.client.utils.FileFormat;
import org.hpccsystems.ws.client.wrappers.wsdfu.DFURecordDefWrapper;
public class EclRecordWrapper implements java.io.Serializable
{
private static final long serialVersionUID = 7430756413782258252L;
private String originalEcl;
private List parseErrors = new ArrayList();
/**
* Instantiates a new ecl record wrapper.
*/
public EclRecordWrapper()
{
}
/**
* Instantiates a new ecl record wrapper.
*
* @param recs
* the recs
*/
public EclRecordWrapper(DFURecordDefWrapper recs)
{
this.setRecordsets(new HashMap());
this.getRecordsets().put(EclRecordWrapper.UNNAMED, recs);
}
public HashMap recordsets = new HashMap();
int unnamed = 0;
public static String UNNAMED = "unnamed";
private FileFormat fileType = FileFormat.UNKNOWN;
/**
* Gets the recordsets.
*
* @return the recordsets
*/
public HashMap getRecordsets()
{
return recordsets;
}
/**
* Sets the recordsets.
*
* @param recordsets
* the recordsets
*/
public void setRecordsets(HashMap recordsets)
{
this.recordsets = recordsets;
}
/**
* Adds the recordset.
*
* @param rec
* the rec
*/
public void addRecordset(DFURecordDefWrapper rec)
{
String name = rec.getRecordName();
if (name == null)
{
name = UNNAMED + String.valueOf(unnamed);
unnamed++;
}
this.recordsets.put(name, rec);
}
/**
* Gets the original ecl.
*
* @return the original ecl
*/
public String getOriginalEcl()
{
return originalEcl;
}
/**
* Sets the original ecl.
*
* @param originalEcl
* the new original ecl
*/
public void setOriginalEcl(String originalEcl)
{
this.originalEcl = originalEcl;
}
/**
* Gets the file type.
*
* @return the file type
*/
public FileFormat getFileType()
{
return fileType;
}
/**
* Sets the file type.
*
* @param ft
* the new file type
*/
public void setFileType(FileFormat ft)
{
this.fileType = ft;
if (this.getRecordsets() != null)
{
for (DFURecordDefWrapper d : this.getRecordsets().values())
{
d.setFileType(ft);
}
}
}
/**
* Gets the parses the errors.
*
* @return the parseErrors
*/
public List getParseErrors()
{
return parseErrors;
}
/**
* Sets the parses the errors.
*
* @param parseErrors
* the parseErrors to set
*/
public void setParseErrors(List parseErrors)
{
this.parseErrors = parseErrors;
}
}