Examples of DIDLType


Examples of com.adactus.mpeg21.didl.entity.DIDLType

  }
 
  public void testSimple() throws Throwable {
    byte[] file = getFileContent("src/test/resources/xml/SimpleDigitalItem.xml");
   
    DIDLType didl = factory.unmarshal("UTF-8", new ByteArrayInputStream(file));
    assertFalse(didl.getChildren().isEmpty());
   
    int id = digitalItemDeclarartionsManager.addDigitalItem(didl);

    try {
      DIDLType persisted = digitalItemDeclarartionsManager.getDigitalItem(id);
      assertNotNull(persisted);
     
      factory.marshall(persisted, new ByteArrayOutputStream(), null); // validates
    } finally {   
      digitalItemDeclarartionsManager.removeDigitalItem(id);
View Full Code Here

Examples of com.adactus.mpeg21.didl.entity.DIDLType

  public DIDLType getDigitalItem(int id) {
    return mEm.find(DIDLType.class, id);
  }

  public boolean removeDigitalItem(int id) {
    DIDLType didl = getDigitalItem(id);
    if(didl == null) {
      return false;
    }
   
    mEm.remove(didl);
View Full Code Here

Examples of com.adactus.mpeg21.didl.entity.DIDLType

 
  public void testSimple() throws Exception {
    byte[] file = getFileContent("src/test/resources/xml/SimpleDigitalItem.xml");
    validateDigitalItemDeclaration(file, "UTF-8");
   
    DIDLType didl = factory.unmarshal("UTF-8", new ByteArrayInputStream(file));
   
    ByteArrayOutputStream bout = new ByteArrayOutputStream();
    factory.marshall(didl, bout, null);
   
    System.out.println(new String(bout.toByteArray()));
View Full Code Here

Examples of com.adactus.mpeg21.didl.entity.DIDLType

 
  public void testMedium() throws Exception {
    byte[] file = getFileContent("src/test/resources/xml/MediumDigitalItem.xml");
    validateDigitalItemDeclaration(file, "UTF-8");
   
    DIDLType didl = factory.unmarshal("UTF-8", new ByteArrayInputStream(file));
   
    ByteArrayOutputStream bout = new ByteArrayOutputStream();
    factory.marshall(didl, bout, null);
   
    System.out.println(new String(bout.toByteArray()));
View Full Code Here

Examples of com.adactus.mpeg21.didl.entity.DIDLType

  }

  public void testComplex() throws Throwable {
    byte[] file = getFileContent("src/test/resources/xml/ComplexDigitalItem.xml");
   
    DIDLType didl = factory.unmarshal("UTF-8", new ByteArrayInputStream(file));
    assertFalse(didl.getChildren().isEmpty());
   
    int id = digitalItemDeclarartionsManager.addDigitalItem(didl);

    try {
      DIDLType persisted = digitalItemDeclarartionsManager.getDigitalItem(id);
      assertNotNull(persisted);
     
      factory.marshall(persisted, new ByteArrayOutputStream(), null); // validates
    } finally {   
      digitalItemDeclarartionsManager.removeDigitalItem(id);
View Full Code Here

Examples of com.adactus.mpeg21.didl.entity.DIDLType

 
  public void testComplex() throws Exception {
    byte[] file = getFileContent("src/test/resources/xml/ComplexDigitalItem.xml");
    validateDigitalItemDeclaration(file, "UTF-8");

    DIDLType didl = factory.unmarshal("UTF-8", new ByteArrayInputStream(file));
   
    ByteArrayOutputStream bout = new ByteArrayOutputStream();
    factory.marshall(didl, bout, null);
   
    System.out.println(new String(bout.toByteArray()));
View Full Code Here

Examples of com.adactus.mpeg21.didl.entity.DIDLType

 
 
  public void testSimple() throws Throwable {
    byte[] file = getFileContent("src/test/resources/xml/SimpleDigitalItem.xml");
   
    DIDLType didl = factory.unmarshal("UTF-8", new ByteArrayInputStream(file));
    assertFalse(didl.getChildren().isEmpty());
   
    int id = digitalItemDeclarartionsWebsService.addDigitalItem(didl);

    try {
      DIDLType persisted = digitalItemDeclarartionsWebsService.getDigitalItem(id);
      assertNotNull(persisted);
     
      factory.marshall(persisted, new ByteArrayOutputStream(), null); // validates
    } finally {   
      digitalItemDeclarartionsWebsService.removeDigitalItem(id);
View Full Code Here

Examples of com.adactus.mpeg21.didl.entity.DIDLType

  }

  public void testComplex() throws Throwable {
    byte[] file = getFileContent("src/test/resources/xml/ComplexDigitalItem.xml");
   
    DIDLType didl = factory.unmarshal("UTF-8", new ByteArrayInputStream(file));
    assertFalse(didl.getChildren().isEmpty());
   
    int id = digitalItemDeclarartionsWebsService.addDigitalItem(didl);

    try {
      DIDLType persisted = digitalItemDeclarartionsWebsService.getDigitalItem(id);
      assertNotNull(persisted);
     
      factory.marshall(persisted, new ByteArrayOutputStream(), null); // validates
    } finally {   
      digitalItemDeclarartionsWebsService.removeDigitalItem(id);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.