@Test public void testProvide() throws Exception { testProvide("src/test/resources/import/xml/schematest001.xml"); }
private XStream provide() { if (this.xStream == null) { XStream xStream = new XStream(new DomDriver()); xStream.addPermission(AnyTypePermission.ANY); xStream.alias("import-descriptor", XmlImportDescriptorImpl.class); xStream.addDefaultImplementation(XmlImportDescriptorImpl.class, ImportDescriptor.class); xStream.addDefaultImplementation(XmlImportDescriptorImpl.class, XmlImportDescriptor.class); xStream.aliasField("entity-type", XmlImportDescriptorImpl.class, "entityType"); xStream.aliasField("context", XmlImportDescriptorImpl.class, "context"); xStream.addDefaultImplementation(XmlImportContextImpl.class, XmlImportContext.class); xStream.aliasField("shop-code", XmlImportContextImpl.class, "shopCode"); xStream.aliasField("xml-handler", XmlImportDescriptorImpl.class, "xmlHandler"); xStream.aliasField("import-file-descriptor", XmlImportDescriptorImpl.class, "importFileDescriptor"); xStream.addDefaultImplementation(XmlImportFileImpl.class, XmlImportFile.class); xStream.aliasField("file-encoding", XmlImportFileImpl.class, "fileEncoding"); xStream.aliasField("file-name-mask", XmlImportFileImpl.class, "fileNameMask"); this.xStream = xStream; } return this.xStream; }
XmlImportDescriptorXStreamProvider implements XStreamProvider<XmlImportDescriptor> { private XStream provide() { if (this.xStream == null) { XStream xStream = new XStream(new DomDriver()); xStream.addPermission(AnyTypePermission.ANY); xStream.alias("import-descriptor", XmlImportDescriptorImpl.class); xStream.addDefaultImplementation(XmlImportDescriptorImpl.class, ImportDescriptor.class); xStream.addDefaultImplementation(XmlImportDescriptorImpl.class, XmlImportDescriptor.class); xStream.aliasField("entity-type", XmlImportDescriptorImpl.class, "entityType"); xStream.aliasField("context", XmlImportDescriptorImpl.class, "context"); xStream.addDefaultImplementation(XmlImportContextImpl.class, XmlImportContext.class); xStream.aliasField("shop-code", XmlImportContextImpl.class, "shopCode"); xStream.aliasField("xml-handler", XmlImportDescriptorImpl.class, "xmlHandler"); xStream.aliasField("import-file-descriptor", XmlImportDescriptorImpl.class, "importFileDescriptor"); xStream.addDefaultImplementation(XmlImportFileImpl.class, XmlImportFile.class); xStream.aliasField("file-encoding", XmlImportFileImpl.class, "fileEncoding"); xStream.aliasField("file-name-mask", XmlImportFileImpl.class, "fileNameMask"); this.xStream = xStream; } return this.xStream; } }
XmlImportDescriptorXStreamProvider implements XStreamProvider<XmlImportDescriptor> { private XStream provide() { if (this.xStream == null) { XStream xStream = new XStream(new DomDriver()); xStream.addPermission(AnyTypePermission.ANY); xStream.alias("import-descriptor", XmlImportDescriptorImpl.class); xStream.addDefaultImplementation(XmlImportDescriptorImpl.class, ImportDescriptor.class); xStream.addDefaultImplementation(XmlImportDescriptorImpl.class, XmlImportDescriptor.class); xStream.aliasField("entity-type", XmlImportDescriptorImpl.class, "entityType"); xStream.aliasField("context", XmlImportDescriptorImpl.class, "context"); xStream.addDefaultImplementation(XmlImportContextImpl.class, XmlImportContext.class); xStream.aliasField("shop-code", XmlImportContextImpl.class, "shopCode"); xStream.aliasField("xml-handler", XmlImportDescriptorImpl.class, "xmlHandler"); xStream.aliasField("import-file-descriptor", XmlImportDescriptorImpl.class, "importFileDescriptor"); xStream.addDefaultImplementation(XmlImportFileImpl.class, XmlImportFile.class); xStream.aliasField("file-encoding", XmlImportFileImpl.class, "fileEncoding"); xStream.aliasField("file-name-mask", XmlImportFileImpl.class, "fileNameMask"); this.xStream = xStream; } return this.xStream; }  }
XmlImportDescriptorXStreamProvider implements XStreamProvider<XmlImportDescriptor> { private XStream provide() { if (this.xStream == null) { XStream xStream = new XStream(new DomDriver()); xStream.addPermission(AnyTypePermission.ANY); xStream.alias("import-descriptor", XmlImportDescriptorImpl.class); xStream.addDefaultImplementation(XmlImportDescriptorImpl.class, ImportDescriptor.class); xStream.addDefaultImplementation(XmlImportDescriptorImpl.class, XmlImportDescriptor.class); xStream.aliasField("entity-type", XmlImportDescriptorImpl.class, "entityType"); xStream.aliasField("context", XmlImportDescriptorImpl.class, "context"); xStream.addDefaultImplementation(XmlImportContextImpl.class, XmlImportContext.class); xStream.aliasField("shop-code", XmlImportContextImpl.class, "shopCode"); xStream.aliasField("xml-handler", XmlImportDescriptorImpl.class, "xmlHandler"); xStream.aliasField("import-file-descriptor", XmlImportDescriptorImpl.class, "importFileDescriptor"); xStream.addDefaultImplementation(XmlImportFileImpl.class, XmlImportFile.class); xStream.aliasField("file-encoding", XmlImportFileImpl.class, "fileEncoding"); xStream.aliasField("file-name-mask", XmlImportFileImpl.class, "fileNameMask"); this.xStream = xStream; } return this.xStream; }  @Override XmlImportDescriptor fromXML(final String xml); @Override XmlImportDescriptor fromXML(final InputStream is); @Override String toXML(final XmlImportDescriptor object); }
XmlImportDescriptorXStreamProvider implements XStreamProvider<XmlImportDescriptor> { private XStream provide() { if (this.xStream == null) { XStream xStream = new XStream(new DomDriver()); xStream.addPermission(AnyTypePermission.ANY); xStream.alias("import-descriptor", XmlImportDescriptorImpl.class); xStream.addDefaultImplementation(XmlImportDescriptorImpl.class, ImportDescriptor.class); xStream.addDefaultImplementation(XmlImportDescriptorImpl.class, XmlImportDescriptor.class); xStream.aliasField("entity-type", XmlImportDescriptorImpl.class, "entityType"); xStream.aliasField("context", XmlImportDescriptorImpl.class, "context"); xStream.addDefaultImplementation(XmlImportContextImpl.class, XmlImportContext.class); xStream.aliasField("shop-code", XmlImportContextImpl.class, "shopCode"); xStream.aliasField("xml-handler", XmlImportDescriptorImpl.class, "xmlHandler"); xStream.aliasField("import-file-descriptor", XmlImportDescriptorImpl.class, "importFileDescriptor"); xStream.addDefaultImplementation(XmlImportFileImpl.class, XmlImportFile.class); xStream.aliasField("file-encoding", XmlImportFileImpl.class, "fileEncoding"); xStream.aliasField("file-name-mask", XmlImportFileImpl.class, "fileNameMask"); this.xStream = xStream; } return this.xStream; }  @Override XmlImportDescriptor fromXML(final String xml); @Override XmlImportDescriptor fromXML(final InputStream is); @Override String toXML(final XmlImportDescriptor object);  }