Package com.bhle.access.storage.akubra.mapper.file

Examples of com.bhle.access.storage.akubra.mapper.file.FileMapper


    ConverterManager.converters = convertors;
  }

  @Test
  public void testFileMapperToInternalFileWithSubFolder() {
    FileMapper fileMapper = new SubFolderFileMapper();

    String internalFile = fileMapper.getInternalFile(URI
        .create("info:fedora/bhle:10706-a000test-00001/JPG"));
    Assert.assertEquals("jpg/a000test_00001.*", internalFile);

    internalFile = fileMapper.getInternalFile(URI
        .create("info:fedora/bhle:10706-a000test-00001"));
    Assert.assertEquals("*/a000test_00001.*", internalFile);
  }
View Full Code Here


    Assert.assertEquals("*/a000test_00001.*", internalFile);
  }

  @Test
  public void testFileMapperToInternalFileWithoutSubFolder() {
    FileMapper fileMapper = new SubFolderFileMapper();

    String internalFile = fileMapper.getInternalFile(URI
        .create("info:fedora/bhle:10706-a000test/JP2"));
    Assert.assertEquals("a000test_jp2.*", internalFile);

    internalFile = fileMapper.getInternalFile(URI
        .create("info:fedora/bhle:10706-a000test"));
    Assert.assertEquals("a000test_*.*", internalFile);
  }
View Full Code Here

    Assert.assertEquals("a000test_*.*", internalFile);
  }

  @Test
  public void testFileMapperToExternalFile() {
    FileMapper fileMapper = new SubFolderFileMapper();

    String externalFile = fileMapper.getExternalFile(URI
        .create("file:a0/00/te/st/a000test/a000test_dc.xml"));
    Assert.assertEquals("DC", externalFile);
   
    externalFile = fileMapper.getExternalFile(URI
        .create("file:a0/00/te/st/a000test/a000test_full_dc.xml"));
    Assert.assertEquals("FULL_DC", externalFile);

    externalFile = fileMapper.getExternalFile(URI
        .create("file:a0/00/te/st/a000test/dc/a000test_00001.xml"));
    Assert.assertEquals("DC", externalFile);
  }
View Full Code Here

TOP

Related Classes of com.bhle.access.storage.akubra.mapper.file.FileMapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.