test_class.file: descriptor/qsarsubstance/src/test/java/org/openscience/cdk/qsar/descriptors/substance/OxygenAtomCountDescriptorTest.java
test_class.identifier: OxygenAtomCountDescriptorTest
test_class.superclass: extends SubstanceDescriptorTest
test_case.body: @Test
      public void testCalculate_IronOxide() throws Exception {
          ISubstance material = new Substance();
          material.addAtomContainer(
              MolecularFormulaManipulator.getAtomContainer(
                  "Fe3O4", DefaultChemObjectBuilder.getInstance()
              )
          );
          DescriptorValue value = descriptor.calculate(material);
          Assert.assertNotNull(value);
          IDescriptorResult result = value.getValue();
          Assert.assertNotNull(result);
          Assert.assertEquals(4, ((IntegerResult)result).intValue());
      }
test_case.class_method_signature: OxygenAtomCountDescriptorTest.testCalculate_IronOxide()
test_case.full_signature: @Test public void testCalculate_IronOxide()
test_case.identifier: testCalculate_IronOxide
test_case.invocations: addAtomContainer getAtomContainer getInstance calculate assertNotNull getValue assertNotNull assertEquals intValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCalculate_IronOxide()
focal_class.file: descriptor/qsarsubstance/src/main/java/org/openscience/cdk/qsar/descriptors/substance/OxygenAtomCountDescriptor.java
focal_class.identifier: OxygenAtomCountDescriptor
focal_class.interfaces: implements ISubstanceDescriptor
focal_class.class_method_signature: OxygenAtomCountDescriptor.getDescriptorNames()
focal_class.full_signature: @Override public String[] getDescriptorNames()
focal_class.identifier: getDescriptorNames
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] getDescriptorNames()
focal_class.class_method_signature: OxygenAtomCountDescriptor.getParameterNames()
focal_class.full_signature: @Override public String[] getParameterNames()
focal_class.identifier: getParameterNames
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] getParameterNames()
focal_class.class_method_signature: OxygenAtomCountDescriptor.getParameterType(String substance)
focal_class.full_signature: @Override public Object getParameterType(String substance)
focal_class.identifier: getParameterType
focal_class.modifiers: @Override public
focal_class.parameters: (String substance)
focal_class.return: Object
focal_class.signature: Object getParameterType(String substance)
focal_class.class_method_signature: OxygenAtomCountDescriptor.getParameters()
focal_class.full_signature: @Override public Object[] getParameters()
focal_class.identifier: getParameters
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Object[]
focal_class.signature: Object[] getParameters()
focal_class.class_method_signature: OxygenAtomCountDescriptor.getSpecification()
focal_class.full_signature: @Override public DescriptorSpecification getSpecification()
focal_class.identifier: getSpecification
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: DescriptorSpecification
focal_class.signature: DescriptorSpecification getSpecification()
focal_class.class_method_signature: OxygenAtomCountDescriptor.setParameters(Object[] parameters)
focal_class.full_signature: @Override public void setParameters(Object[] parameters)
focal_class.identifier: setParameters
focal_class.modifiers: @Override public
focal_class.parameters: (Object[] parameters)
focal_class.return: void
focal_class.signature: void setParameters(Object[] parameters)
focal_class.class_method_signature: OxygenAtomCountDescriptor.calculate(ISubstance substance)
focal_class.full_signature: @Override public DescriptorValue calculate(ISubstance substance)
focal_class.identifier: calculate
focal_class.modifiers: @Override public
focal_class.parameters: (ISubstance substance)
focal_class.return: DescriptorValue
focal_class.signature: DescriptorValue calculate(ISubstance substance)
focal_class.class_method_signature: OxygenAtomCountDescriptor.getDescriptorResultType()
focal_class.full_signature: @Override public IDescriptorResult getDescriptorResultType()
focal_class.identifier: getDescriptorResultType
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: IDescriptorResult
focal_class.signature: IDescriptorResult getDescriptorResultType()
focal_class.class_method_signature: OxygenAtomCountDescriptor.initialise(IChemObjectBuilder builder)
focal_class.full_signature: @Override public void initialise(IChemObjectBuilder builder)
focal_class.identifier: initialise
focal_class.modifiers: @Override public
focal_class.parameters: (IChemObjectBuilder builder)
focal_class.return: void
focal_class.signature: void initialise(IChemObjectBuilder builder)
focal_method.body: @Override
  	public DescriptorValue calculate(ISubstance substance) {
          int count = 0;
          if (substance != null) {
              for (IAtomContainer container : substance.atomContainers()) {
                  for (IAtom atom : container.atoms()) {
                      if ("O".equals(atom.getSymbol()) || 8 == atom.getAtomicNumber())
                          count++;
                  }
              }
          }
  
  		return new DescriptorValue(
  		    getSpecification(), getParameterNames(), getParameters(),
  		    new IntegerResult(count), getDescriptorNames()
  		);
  	}
focal_method.class_method_signature: OxygenAtomCountDescriptor.calculate(ISubstance substance)
focal_method.full_signature: @Override public DescriptorValue calculate(ISubstance substance)
focal_method.identifier: calculate
focal_method.invocations: atomContainers atoms equals getSymbol getAtomicNumber getSpecification getParameterNames getParameters getDescriptorNames
focal_method.modifiers: @Override public
focal_method.parameters: (ISubstance substance)
focal_method.return: DescriptorValue
focal_method.signature: DescriptorValue calculate(ISubstance substance)