ReaderUtils { public static MmtfStructure getDataFromUrl(String pdbId) throws IOException { return getDataFromUrl(pdbId, false, false); }  static MmtfStructure getDataFromUrl(String pdbId); static MmtfStructure getDataFromUrl(String pdbId, boolean https, boolean reduced); static byte[] getByteArrayFromUrl(String pdbId); static byte[] getByteArrayFromUrl(String pdbId, boolean https, boolean reduced); static byte[] deflateGzip(byte[] inputBytes); static MmtfStructure getDataFromFile(Path filePath); static MmtfStructure getDataFromInputStream(InputStream inStream);  }
@Test public void testReadFromUrl() throws IOException, ParseException { MmtfStructure mmtfBean = ReaderUtils.getDataFromUrl("4CUP"); assertNotEquals(mmtfBean, null); assertEquals(mmtfBean.getDepositionDate(), "2014-03-21"); assertEquals(mmtfBean.getNumAtoms(), 1107); assertEquals(mmtfBean.getNumBonds(), 978); }
@Test public void testReadFromHttpsUrl() throws IOException, ParseException { MmtfStructure mmtfBean = ReaderUtils.getDataFromUrl("4CUP", true, false); assertNotEquals(mmtfBean, null); assertEquals(mmtfBean.getDepositionDate(), "2014-03-21"); assertEquals(mmtfBean.getNumAtoms(), 1107); assertEquals(mmtfBean.getNumBonds(), 978); }
@Test public void testReadFromReducedUrl() throws IOException, ParseException { MmtfStructure mmtfBean = ReaderUtils.getDataFromUrl("4CUP", true, true); assertNotEquals(mmtfBean, null); assertEquals(mmtfBean.getDepositionDate(), "2014-03-21"); assertEquals(mmtfBean.getNumAtoms(), 139); assertEquals(mmtfBean.getNumBonds(), 21); }
@Test public void testReadFromReducedHttpsUrl() throws IOException, ParseException { MmtfStructure mmtfBean = ReaderUtils.getDataFromUrl("4CUP", true, true); assertNotEquals(mmtfBean, null); assertEquals(mmtfBean.getDepositionDate(), "2014-03-21"); assertEquals(mmtfBean.getNumAtoms(), 139); assertEquals(mmtfBean.getNumBonds(), 21); }