@Test public void testRead() throws Exception { LocalStorage storage = new LocalStorage(); LocalObject local = storage.create(); ModsStreamEditor editor = new ModsStreamEditor(local); editor.write(new ModsDefinition(), 0, null); ModsDefinition result = editor.read(); assertNotNull(result); }
public ModsDefinition read() throws DigitalObjectException { Source src = editor.read(); if (src == null) { throw new DigitalObjectException(object.getPid(), "MODS not initialized!"); } return ModsUtils.unmarshalModsType(src); }
ModsStreamEditor { public ModsDefinition read() throws DigitalObjectException { Source src = editor.read(); if (src == null) { throw new DigitalObjectException(object.getPid(), "MODS not initialized!"); } return ModsUtils.unmarshalModsType(src); } }
ModsStreamEditor { public ModsDefinition read() throws DigitalObjectException { Source src = editor.read(); if (src == null) { throw new DigitalObjectException(object.getPid(), "MODS not initialized!"); } return ModsUtils.unmarshalModsType(src); } ModsStreamEditor(FedoraObject object);  ModsStreamEditor(XmlStreamEditor editor, FedoraObject object); }
ModsStreamEditor { public ModsDefinition read() throws DigitalObjectException { Source src = editor.read(); if (src == null) { throw new DigitalObjectException(object.getPid(), "MODS not initialized!"); } return ModsUtils.unmarshalModsType(src); } ModsStreamEditor(FedoraObject object);  ModsStreamEditor(XmlStreamEditor editor, FedoraObject object); ModsDefinition read(); String readAsString(); long getLastModified(); void write(ModsDefinition mods, long timestamp, String message); @Deprecated static ModsDefinition defaultMods33(String pid); static ModsDefinition defaultMods(String pid); static ModsDefinition addPid(ModsDefinition mods, String pid); @Deprecated ModsDefinition createPage(String pid, String pageIndex, String pageNumber, String pageType); @Deprecated static ModsDefinition create(String pid, String model); @Deprecated static ModsDefinition create33(String pid, String model, String xml); @Deprecated static ModsDefinition create(String pid, String model, ModsDefinition mods); }
ModsStreamEditor { public ModsDefinition read() throws DigitalObjectException { Source src = editor.read(); if (src == null) { throw new DigitalObjectException(object.getPid(), "MODS not initialized!"); } return ModsUtils.unmarshalModsType(src); } ModsStreamEditor(FedoraObject object);  ModsStreamEditor(XmlStreamEditor editor, FedoraObject object); ModsDefinition read(); String readAsString(); long getLastModified(); void write(ModsDefinition mods, long timestamp, String message); @Deprecated static ModsDefinition defaultMods33(String pid); static ModsDefinition defaultMods(String pid); static ModsDefinition addPid(ModsDefinition mods, String pid); @Deprecated ModsDefinition createPage(String pid, String pageIndex, String pageNumber, String pageType); @Deprecated static ModsDefinition create(String pid, String model); @Deprecated static ModsDefinition create33(String pid, String model, String xml); @Deprecated static ModsDefinition create(String pid, String model, ModsDefinition mods); static final String DATASTREAM_ID; static final String DATASTREAM_FORMAT_URI; static final String DATASTREAM_LABEL; }