@Test public void testLoadXML() throws KettleException, URISyntaxException, SAXException, IOException, ParserConfigurationException { URL resource = getClass().getClassLoader() .getResource( getClass().getPackage().getName().replace( ".", "/" ) + "/AvroInput.xml" ); Path path = Paths.get( resource.toURI() ); Node node = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse( Files.newInputStream( path ) ) .getDocumentElement(); meta.loadXML( node, databases, metaStore ); assertEquals( "SampleFileName", meta.getDataLocation() ); assertEquals( "SampleSchemaFileName", meta.getSchemaLocation() ); AvroInputField field = meta.getInputFields()[ 0 ]; assertEquals( "SampleName", field.getPentahoFieldName() ); assertEquals( "SamplePath", field.getAvroFieldName() ); assertEquals( "string", field.getAvroType().getType() ); }
@Override public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException { readData( stepnode, metaStore ); }
AvroInputMetaBase extends BaseStepMeta implements StepMetaInterface, ResolvableResource { @Override public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException { readData( stepnode, metaStore ); } }
AvroInputMetaBase extends BaseStepMeta implements StepMetaInterface, ResolvableResource { @Override public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException { readData( stepnode, metaStore ); }  }
AvroInputMetaBase extends BaseStepMeta implements StepMetaInterface, ResolvableResource { @Override public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException { readData( stepnode, metaStore ); }  List<AvroLookupField> getLookupFields(); void setLookupFields( List<AvroLookupField> lookupFields ); String getDataLocation(); void setDataLocation( String dataLocation, LocationDescriptor locationDescriptor ); LocationDescriptor getDataLocationType(); void setFormat( int formatIndex ); int getFormat(); String getSchemaLocation(); void setSchemaLocation( String schemaLocation, LocationDescriptor locationDescriptor ); @Override void setDefault(); LocationDescriptor getSchemaLocationType(); boolean isCacheSchemas(); void setCacheSchemas( boolean cacheSchemas ); boolean isAllowNullForMissingFields(); void setAllowNullForMissingFields( boolean allowNullForMissingFields ); String getEncoding(); AvroInputField[] getInputFields(); void setInputFields( AvroInputField[] inputFields ); void setInputFields( List<AvroInputField> inputFields ); @Override void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); @Override String getXML(); @Override void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); @Override void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); @Override void getFields( RowMetaInterface rowMeta, String origin, RowMetaInterface[] info, StepMeta nextStep,
                         VariableSpace space, Repository repository, IMetaStore metaStore ); @Override void resolve(); @Injection( name = "AVRO_FILENAME" ) @Deprecated void setDataFileName( String fileName ); @Injection( name = "STREAM_FIELDNAME" ) @Deprecated void setDataFieldName( String fieldName ); @Injection( name = "SCHEMA_FILENAME" ) @Deprecated void setSchemaFileName( String fileName ); }
AvroInputMetaBase extends BaseStepMeta implements StepMetaInterface, ResolvableResource { @Override public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException { readData( stepnode, metaStore ); }  List<AvroLookupField> getLookupFields(); void setLookupFields( List<AvroLookupField> lookupFields ); String getDataLocation(); void setDataLocation( String dataLocation, LocationDescriptor locationDescriptor ); LocationDescriptor getDataLocationType(); void setFormat( int formatIndex ); int getFormat(); String getSchemaLocation(); void setSchemaLocation( String schemaLocation, LocationDescriptor locationDescriptor ); @Override void setDefault(); LocationDescriptor getSchemaLocationType(); boolean isCacheSchemas(); void setCacheSchemas( boolean cacheSchemas ); boolean isAllowNullForMissingFields(); void setAllowNullForMissingFields( boolean allowNullForMissingFields ); String getEncoding(); AvroInputField[] getInputFields(); void setInputFields( AvroInputField[] inputFields ); void setInputFields( List<AvroInputField> inputFields ); @Override void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); @Override String getXML(); @Override void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); @Override void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); @Override void getFields( RowMetaInterface rowMeta, String origin, RowMetaInterface[] info, StepMeta nextStep,
                         VariableSpace space, Repository repository, IMetaStore metaStore ); @Override void resolve(); @Injection( name = "AVRO_FILENAME" ) @Deprecated void setDataFileName( String fileName ); @Injection( name = "STREAM_FIELDNAME" ) @Deprecated void setDataFieldName( String fieldName ); @Injection( name = "SCHEMA_FILENAME" ) @Deprecated void setSchemaFileName( String fileName ); static final Class<?> PKG; @Injection( name = "DATA_LOCATION_TYPE" )
  @VisibleForTesting
  public int dataLocationType; @Injection( name = "PASS_THROUGH_FIELDS" )
  public boolean passingThruFields; @InjectionDeep
  public AvroInputField[] inputFields; }