// Server-provided tests public static MappingScriptProxy getTestEmptyMappingModel() { try { URL url = new URL("http://www.europeana.eu/schemas/edm/EDM.xsd"); XMLSchema source = getXSDSchema(url); url = new URL("http://www.openarchives.org/OAI/2.0/oai_dc.xsd"); XMLSchema target = getXSDSchema(url); MappingScript mapping = getEmptyMapping(source, target, null); Mapping2UIAdapter adapter = new Mapping2UIAdapter(); return adapter.adapt(mapping); } catch (IOException e) { return null; } }
public static MappingScriptProxy getEmptyUserMappingModel(String source, String dest) { try { // usar getSchema?? URL url = new URL(source); XMLSchema sxml = getXSDSchema(url); url = new URL(dest); XMLSchema dxml = getXSDSchema(url); MappingScript mapping = getEmptyMapping(sxml, dxml, null); Mapping2UIAdapter adapter = new Mapping2UIAdapter(); return adapter.adapt(mapping); } catch (IOException e) { e.printStackTrace(); return null; } }