test_class.declarator: logger = LoggingToolFactory.createLoggingTool(PCSubstanceXMLReaderTest.class)
test_class.modifier: private static
test_class.original_string: private static ILoggingTool logger = LoggingToolFactory.createLoggingTool(PCSubstanceXMLReaderTest.class);
test_class.type: ILoggingTool
test_class.var_name: logger
test_class.file: storage/io/src/test/java/org/openscience/cdk/io/PCSubstanceXMLReaderTest.java
test_class.identifier: PCSubstanceXMLReaderTest
test_class.superclass: extends SimpleChemObjectReaderTest
test_case.body: @Test
      public void testReading() throws Exception {
          String filename = "data/asn/pubchem/sid577309.xml";
          logger.info("Testing: " + filename);
          InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
          PCSubstanceXMLReader reader = new PCSubstanceXMLReader(ins);
          IAtomContainer molecule = (IAtomContainer) reader.read(new AtomContainer());
          Assert.assertNotNull(molecule);
  
          // check atom stuff
          Assert.assertEquals(19, molecule.getAtomCount());
          Assert.assertTrue(molecule.getAtom(0) instanceof IPseudoAtom);
  
          // check bond stuff
          Assert.assertEquals(19, molecule.getBondCount());
          Assert.assertNotNull(molecule.getBond(3));
      }
test_case.class_method_signature: PCSubstanceXMLReaderTest.testReading()
test_case.full_signature: @Test public void testReading()
test_case.identifier: testReading
test_case.invocations: info getResourceAsStream getClassLoader getClass read assertNotNull assertEquals getAtomCount assertTrue getAtom assertEquals getBondCount assertNotNull getBond
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testReading()
focal_class.declarator: input
focal_class.modifier: private
focal_class.original_string: private Reader             input;
focal_class.type: Reader
focal_class.var_name: input
focal_class.declarator: parser
focal_class.modifier: private
focal_class.original_string: private XMLStreamReader    parser;
focal_class.type: XMLStreamReader
focal_class.var_name: parser
focal_class.declarator: parserHelper
focal_class.modifier: private
focal_class.original_string: private PubChemXMLHelper   parserHelper;
focal_class.type: PubChemXMLHelper
focal_class.var_name: parserHelper
focal_class.declarator: builder
focal_class.modifier: private
focal_class.original_string: private IChemObjectBuilder builder;
focal_class.type: IChemObjectBuilder
focal_class.var_name: builder
focal_class.declarator: molecule = null
focal_class.original_string: IAtomContainer             molecule = null;
focal_class.type: IAtomContainer
focal_class.var_name: molecule
focal_class.file: storage/io/src/main/java/org/openscience/cdk/io/PCSubstanceXMLReader.java
focal_class.identifier: PCSubstanceXMLReader
focal_class.class_method_signature: PCSubstanceXMLReader.PCSubstanceXMLReader(Reader input)
focal_class.full_signature: public  PCSubstanceXMLReader(Reader input)
focal_class.identifier: PCSubstanceXMLReader
focal_class.modifiers: public
focal_class.parameters: (Reader input)
focal_class.signature:  PCSubstanceXMLReader(Reader input)
focal_class.class_method_signature: PCSubstanceXMLReader.PCSubstanceXMLReader(InputStream input)
focal_class.full_signature: public  PCSubstanceXMLReader(InputStream input)
focal_class.identifier: PCSubstanceXMLReader
focal_class.modifiers: public
focal_class.parameters: (InputStream input)
focal_class.signature:  PCSubstanceXMLReader(InputStream input)
focal_class.class_method_signature: PCSubstanceXMLReader.PCSubstanceXMLReader()
focal_class.full_signature: public  PCSubstanceXMLReader()
focal_class.identifier: PCSubstanceXMLReader
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  PCSubstanceXMLReader()
focal_class.class_method_signature: PCSubstanceXMLReader.getFormat()
focal_class.full_signature: @Override public IResourceFormat getFormat()
focal_class.identifier: getFormat
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: IResourceFormat
focal_class.signature: IResourceFormat getFormat()
focal_class.class_method_signature: PCSubstanceXMLReader.setReader(Reader input)
focal_class.full_signature: @Override public void setReader(Reader input)
focal_class.identifier: setReader
focal_class.modifiers: @Override public
focal_class.parameters: (Reader input)
focal_class.return: void
focal_class.signature: void setReader(Reader input)
focal_class.class_method_signature: PCSubstanceXMLReader.setReader(InputStream input)
focal_class.full_signature: @Override public void setReader(InputStream input)
focal_class.identifier: setReader
focal_class.modifiers: @Override public
focal_class.parameters: (InputStream input)
focal_class.return: void
focal_class.signature: void setReader(InputStream input)
focal_class.class_method_signature: PCSubstanceXMLReader.accepts(Class<? extends IChemObject> classObject)
focal_class.full_signature: @Override public boolean accepts(Class<? extends IChemObject> classObject)
focal_class.identifier: accepts
focal_class.modifiers: @Override public
focal_class.parameters: (Class<? extends IChemObject> classObject)
focal_class.return: boolean
focal_class.signature: boolean accepts(Class<? extends IChemObject> classObject)
focal_class.class_method_signature: PCSubstanceXMLReader.read(T object)
focal_class.full_signature: @Override public T read(T object)
focal_class.identifier: read
focal_class.modifiers: @Override public
focal_class.parameters: (T object)
focal_class.return: T
focal_class.signature: T read(T object)
focal_class.class_method_signature: PCSubstanceXMLReader.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: PCSubstanceXMLReader.readMolecule()
focal_class.full_signature: private IAtomContainer readMolecule()
focal_class.identifier: readMolecule
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: IAtomContainer
focal_class.signature: IAtomContainer readMolecule()
focal_class.superclass: extends DefaultChemObjectReader
focal_method.body: @Override
      public <T extends IChemObject> T read(T object) throws CDKException {
          if (object instanceof IAtomContainer) {
              try {
                  parserHelper = new PubChemXMLHelper(object.getBuilder());
                  builder = object.getBuilder();
                  return (T) readMolecule();
              } catch (IOException e) {
                  throw new CDKException("An IO Exception occurred while reading the file.", e);
              } catch (CDKException e) {
                  throw e;
              } catch (Exception e) {
                  throw new CDKException("An error occurred: " + e.getMessage(), e);
              }
          } else {
              throw new CDKException("Only supported is reading of ChemFile objects.");
          }
      }
focal_method.class_method_signature: PCSubstanceXMLReader.read(T object)
focal_method.full_signature: @Override public T read(T object)
focal_method.identifier: read
focal_method.invocations: getBuilder getBuilder readMolecule getMessage
focal_method.modifiers: @Override public
focal_method.parameters: (T object)
focal_method.return: T
focal_method.signature: T read(T object)