/** * Method isSink returns true if this Tap instance can be used as a sink. * * @return boolean */ public boolean isSink() { return getScheme().isSink(); }
private void setFields( Scheme scheme ) { if( scheme.isSource() ) { Fields sourceFields = normalize( scheme.getSourceFields() ); if( fields == null ) fields = sourceFields; else if( !fields.equals( sourceFields ) ) throw new IllegalArgumentException( "all schemes added to stereotype must have the same source fields, expected: " + fields + ", received: " + sourceFields + " in stereotype: " + getName() ); } if( scheme.isSink() ) { Fields sinkFields = normalize( scheme.getSinkFields() ); if( fields == null ) fields = sinkFields; else if( !fields.equals( sinkFields ) ) throw new IllegalArgumentException( "all schemes added to stereotype must have the same sink fields, expected: " + fields + ", received: " + sinkFields + " in stereotype: " + getName() ); } }