@Test public void testGetUsedFields_isNotAcceptingFilenames() throws Exception { when( meta.isAcceptingFilenames() ).thenReturn( false ); when( meta.getAcceptingField() ).thenReturn( "filename" ); Set<StepField> usedFields = analyzerMock.getUsedFields( meta ); assertNotNull( usedFields ); assertEquals( 0, usedFields.size() ); }
@Override protected Set<StepField> getUsedFields( final JsonInputMeta meta ) { Set<StepField> usedFields = new HashSet<>(); if ( meta.isAcceptingFilenames() && StringUtils.isNotEmpty( meta.getAcceptingField() ) ) { final Set<String> inpusStepNames = getInputStepNames( meta, meta.getAcceptingField() ); for ( final String inpusStepName : inpusStepNames ) { final StepField stepField = new StepField( inpusStepName, meta.getAcceptingField() ); usedFields.add( stepField ); } } return usedFields; }
JsonInputAnalyzer extends ExternalResourceStepAnalyzer<JsonInputMeta> { @Override protected Set<StepField> getUsedFields( final JsonInputMeta meta ) { Set<StepField> usedFields = new HashSet<>(); if ( meta.isAcceptingFilenames() && StringUtils.isNotEmpty( meta.getAcceptingField() ) ) { final Set<String> inpusStepNames = getInputStepNames( meta, meta.getAcceptingField() ); for ( final String inpusStepName : inpusStepNames ) { final StepField stepField = new StepField( inpusStepName, meta.getAcceptingField() ); usedFields.add( stepField ); } } return usedFields; } }
JsonInputAnalyzer extends ExternalResourceStepAnalyzer<JsonInputMeta> { @Override protected Set<StepField> getUsedFields( final JsonInputMeta meta ) { Set<StepField> usedFields = new HashSet<>(); if ( meta.isAcceptingFilenames() && StringUtils.isNotEmpty( meta.getAcceptingField() ) ) { final Set<String> inpusStepNames = getInputStepNames( meta, meta.getAcceptingField() ); for ( final String inpusStepName : inpusStepNames ) { final StepField stepField = new StepField( inpusStepName, meta.getAcceptingField() ); usedFields.add( stepField ); } } return usedFields; }  }
JsonInputAnalyzer extends ExternalResourceStepAnalyzer<JsonInputMeta> { @Override protected Set<StepField> getUsedFields( final JsonInputMeta meta ) { Set<StepField> usedFields = new HashSet<>(); if ( meta.isAcceptingFilenames() && StringUtils.isNotEmpty( meta.getAcceptingField() ) ) { final Set<String> inpusStepNames = getInputStepNames( meta, meta.getAcceptingField() ); for ( final String inpusStepName : inpusStepNames ) { final StepField stepField = new StepField( inpusStepName, meta.getAcceptingField() ); usedFields.add( stepField ); } } return usedFields; }  @Override Set<Class<? extends BaseStepMeta>> getSupportedSteps(); @Override String getResourceInputNodeType(); @Override String getResourceOutputNodeType(); @Override boolean isOutput(); @Override boolean isInput(); @Override IMetaverseNode createResourceNode( final IExternalResourceInfo resource ); }
JsonInputAnalyzer extends ExternalResourceStepAnalyzer<JsonInputMeta> { @Override protected Set<StepField> getUsedFields( final JsonInputMeta meta ) { Set<StepField> usedFields = new HashSet<>(); if ( meta.isAcceptingFilenames() && StringUtils.isNotEmpty( meta.getAcceptingField() ) ) { final Set<String> inpusStepNames = getInputStepNames( meta, meta.getAcceptingField() ); for ( final String inpusStepName : inpusStepNames ) { final StepField stepField = new StepField( inpusStepName, meta.getAcceptingField() ); usedFields.add( stepField ); } } return usedFields; }  @Override Set<Class<? extends BaseStepMeta>> getSupportedSteps(); @Override String getResourceInputNodeType(); @Override String getResourceOutputNodeType(); @Override boolean isOutput(); @Override boolean isInput(); @Override IMetaverseNode createResourceNode( final IExternalResourceInfo resource );  }