@Test public void testRegister() throws IOException, SQLException { int assetstore = 0; File f = new File(testProps.get("test.bitstream").toString()); Bitstream registered = Bitstream.register(context,assetstore, f.getName()); assertThat("testRegister 0", registered.getFormat().getMIMEType(), equalTo("application/octet-stream")); assertThat("testRegister 1", registered.getName(), nullValue()); }
static Bitstream register(Context context, int assetstore, String bitstreamPath) throws IOException, SQLException { int bitstreamID = BitstreamStorageManager.register( context, assetstore, bitstreamPath); log.info(LogManager.getHeader(context, "create_bitstream", "bitstream_id=" + bitstreamID)); Bitstream bitstream = find(context, bitstreamID); bitstream.setFormat(null); context.addEvent(new Event(Event.CREATE, Constants.BITSTREAM, bitstreamID, "REGISTER")); return bitstream; }
Bitstream extends DSpaceObject { static Bitstream register(Context context, int assetstore, String bitstreamPath) throws IOException, SQLException { int bitstreamID = BitstreamStorageManager.register( context, assetstore, bitstreamPath); log.info(LogManager.getHeader(context, "create_bitstream", "bitstream_id=" + bitstreamID)); Bitstream bitstream = find(context, bitstreamID); bitstream.setFormat(null); context.addEvent(new Event(Event.CREATE, Constants.BITSTREAM, bitstreamID, "REGISTER")); return bitstream; } }
Bitstream extends DSpaceObject { static Bitstream register(Context context, int assetstore, String bitstreamPath) throws IOException, SQLException { int bitstreamID = BitstreamStorageManager.register( context, assetstore, bitstreamPath); log.info(LogManager.getHeader(context, "create_bitstream", "bitstream_id=" + bitstreamID)); Bitstream bitstream = find(context, bitstreamID); bitstream.setFormat(null); context.addEvent(new Event(Event.CREATE, Constants.BITSTREAM, bitstreamID, "REGISTER")); return bitstream; } Bitstream(Context context, TableRow row); }
Bitstream extends DSpaceObject { static Bitstream register(Context context, int assetstore, String bitstreamPath) throws IOException, SQLException { int bitstreamID = BitstreamStorageManager.register( context, assetstore, bitstreamPath); log.info(LogManager.getHeader(context, "create_bitstream", "bitstream_id=" + bitstreamID)); Bitstream bitstream = find(context, bitstreamID); bitstream.setFormat(null); context.addEvent(new Event(Event.CREATE, Constants.BITSTREAM, bitstreamID, "REGISTER")); return bitstream; } Bitstream(Context context, TableRow row); static Bitstream find(Context context, int id); static Bitstream[] findAll(Context context); int getID(); String getHandle(); int getSequenceID(); void setSequenceID(int sid); String getName(); void setName(String n); String getSource(); void setSource(String n); String getDescription(); void setDescription(String n); String getChecksum(); String getChecksumAlgorithm(); long getSize(); void setUserFormatDescription(String desc); String getUserFormatDescription(); String getFormatDescription(); BitstreamFormat getFormat(); void setFormat(BitstreamFormat f); void update(); InputStream retrieve(); Bundle[] getBundles(); int getType(); boolean isRegisteredBitstream(); int getStoreNumber(); DSpaceObject getParentObject(); }
Bitstream extends DSpaceObject { static Bitstream register(Context context, int assetstore, String bitstreamPath) throws IOException, SQLException { int bitstreamID = BitstreamStorageManager.register( context, assetstore, bitstreamPath); log.info(LogManager.getHeader(context, "create_bitstream", "bitstream_id=" + bitstreamID)); Bitstream bitstream = find(context, bitstreamID); bitstream.setFormat(null); context.addEvent(new Event(Event.CREATE, Constants.BITSTREAM, bitstreamID, "REGISTER")); return bitstream; } Bitstream(Context context, TableRow row); static Bitstream find(Context context, int id); static Bitstream[] findAll(Context context); int getID(); String getHandle(); int getSequenceID(); void setSequenceID(int sid); String getName(); void setName(String n); String getSource(); void setSource(String n); String getDescription(); void setDescription(String n); String getChecksum(); String getChecksumAlgorithm(); long getSize(); void setUserFormatDescription(String desc); String getUserFormatDescription(); String getFormatDescription(); BitstreamFormat getFormat(); void setFormat(BitstreamFormat f); void update(); InputStream retrieve(); Bundle[] getBundles(); int getType(); boolean isRegisteredBitstream(); int getStoreNumber(); DSpaceObject getParentObject();  }