Package com.kurento.kmf.repository.internal.repoimpl.filesystem

Examples of com.kurento.kmf.repository.internal.repoimpl.filesystem.ItemsMetadata


  @Test
  public void test() throws IOException {

    File tempFile = File.createTempFile("metadata", "");

    ItemsMetadata itemsMetadata = new ItemsMetadata(tempFile);

    for (int i = 0; i < 10; i++) {
      Map<String, String> md1 = itemsMetadata.loadMetadata("o" + i);
      md1.put("differentAtt", "value" + i);
      md1.put("sameAtt", "value");
    }

    itemsMetadata.save();

    itemsMetadata = new ItemsMetadata(tempFile);

    assertEquals(10, itemsMetadata.findByAttValue("sameAtt", "value")
        .size());
    assertEquals(1, itemsMetadata.findByAttValue("differentAtt", "value1")
        .size());
    assertEquals(10, itemsMetadata
        .findByAttRegex("differentAtt", "value.*").size());

  }
 
View Full Code Here

TOP

Related Classes of com.kurento.kmf.repository.internal.repoimpl.filesystem.ItemsMetadata

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.