APISonar


org.apache.sysml.hops.Hop.FileFormatTypes.CSV

> org > apache > sysml > hops > Hop > FileFormatTypes > CSV
org APIs apache APIs sysml APIs hops APIs Hop APIs FileFormatTypes APIs CSV APIs

Example 1
public boolean isValidInputFormatForOperation( FileFormatTypes format )
	{
		return (   _hop instanceof UnaryOp && format!=FileFormatTypes.CSV
				|| (_hop instanceof AggUnaryOp && ((AggUnaryOp)_hop).getDirection()==Direction.RowCol && format!=FileFormatTypes.CSV)
				|| (_hop instanceof ReorgOp && ((ReorgOp)_hop).getOp()==ReOrgOp.TRANSPOSE && format!=FileFormatTypes.CSV)
				|| format==FileFormatTypes.BINARY ); //any op
	}
Example 2
public void setFileFormatAndProperties(FileFormatTypes type) 
	{
		this.formatType = type ;
		if(type == FileFormatTypes.BINARY)
			this.outParams.setFormat(Format.BINARY) ;
		else if(type == FileFormatTypes.TEXT)
			this.outParams.setFormat(Format.TEXT) ;
		else if (type == FileFormatTypes.MM)
			this.outParams.setFormat(Format.MM);
		else if (type == FileFormatTypes.CSV )
			this.outParams.setFormat(Format.CSV);
		else 
			throw new LopsException("Unexpected format: " + type);
		setLopProperties();
	}