test_class.declarator: builder
test_class.modifier: private static
test_class.original_string: private static IChemObjectBuilder builder;
test_class.type: IChemObjectBuilder
test_class.var_name: builder
test_class.file: storage/ctab/src/test/java/org/openscience/cdk/io/SDFWriterTest.java
test_class.identifier: SDFWriterTest
test_class.superclass: extends ChemObjectWriterTest
test_case.body: @Test
      public void setProgramName() {
          StringWriter sw = new StringWriter();
          try (SDFWriter sdfw = new SDFWriter(sw)) {
              sdfw.getSetting(MDLV2000Writer.OptWriteDefaultProperties)
                  .setSetting("false");
              sdfw.getSetting(MDLV2000Writer.OptProgramName)
                  .setSetting("Bioclipse");
  
              sdfw.write(TestMoleculeFactory.make123Triazole());
  
              sdfw.getSetting(SDFWriter.OptAlwaysV3000)
                  .setSetting("true");
  
              sdfw.write(TestMoleculeFactory.make123Triazole());
          } catch (IOException | CDKException e) {
              e.printStackTrace();
          }
          String sdf = sw.toString();
          for (String mol : sdf.split("\\$\\$\\$\\$", 2)) {
              assertThat(mol, CoreMatchers.containsString("Bioclip"));
          }
      }
test_case.class_method_signature: SDFWriterTest.setProgramName()
test_case.full_signature: @Test public void setProgramName()
test_case.identifier: setProgramName
test_case.invocations: setSetting getSetting setSetting getSetting write make123Triazole setSetting getSetting write make123Triazole printStackTrace toString split assertThat containsString
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void setProgramName()
focal_class.declarator: logger = LoggingToolFactory.createLoggingTool(SDFWriter.class)
focal_class.modifier: private final static
focal_class.original_string: private final static ILoggingTool logger = LoggingToolFactory.createLoggingTool(SDFWriter.class);
focal_class.type: ILoggingTool
focal_class.var_name: logger
focal_class.declarator: OptAlwaysV3000 = "writeV3000"
focal_class.modifier: public static final
focal_class.original_string: public static final String OptAlwaysV3000 = "writeV3000";
focal_class.type: String
focal_class.var_name: OptAlwaysV3000
focal_class.declarator: OptWriteData = "writeProperties"
focal_class.modifier: public static final
focal_class.original_string: public static final String OptWriteData = "writeProperties";
focal_class.type: String
focal_class.var_name: OptWriteData
focal_class.declarator: OptTruncateLongData  = "TruncateLongData"
focal_class.modifier: public static final
focal_class.original_string: public static final String OptTruncateLongData  = "TruncateLongData";
focal_class.type: String
focal_class.var_name: OptTruncateLongData
focal_class.declarator: writer
focal_class.modifier: private
focal_class.original_string: private BufferedWriter   writer;
focal_class.type: BufferedWriter
focal_class.var_name: writer
focal_class.declarator: paramWriteData
focal_class.modifier: private
focal_class.original_string: private BooleanIOSetting paramWriteData;
focal_class.type: BooleanIOSetting
focal_class.var_name: paramWriteData
focal_class.declarator: paramWriteV3000
focal_class.modifier: private
focal_class.original_string: private BooleanIOSetting paramWriteV3000;
focal_class.type: BooleanIOSetting
focal_class.var_name: paramWriteV3000
focal_class.declarator: truncateData
focal_class.modifier: private
focal_class.original_string: private BooleanIOSetting truncateData;
focal_class.type: BooleanIOSetting
focal_class.var_name: truncateData
focal_class.declarator: propertiesToWrite
focal_class.modifier: private
focal_class.original_string: private Set<String>      propertiesToWrite;
focal_class.type: Set<String>
focal_class.var_name: propertiesToWrite
focal_class.declarator: cdkInternalProperties = new ArrayList<String>()
focal_class.modifier: private static
focal_class.original_string: private static List<String> cdkInternalProperties = new ArrayList<String>();
focal_class.type: List<String>
focal_class.var_name: cdkInternalProperties
focal_class.file: storage/ctab/src/main/java/org/openscience/cdk/io/SDFWriter.java
focal_class.identifier: SDFWriter
focal_class.class_method_signature: SDFWriter.SDFWriter(BufferedWriter wtr)
focal_class.full_signature: public  SDFWriter(BufferedWriter wtr)
focal_class.identifier: SDFWriter
focal_class.modifiers: public
focal_class.parameters: (BufferedWriter wtr)
focal_class.signature:  SDFWriter(BufferedWriter wtr)
focal_class.class_method_signature: SDFWriter.SDFWriter(Writer wtr)
focal_class.full_signature: public  SDFWriter(Writer wtr)
focal_class.identifier: SDFWriter
focal_class.modifiers: public
focal_class.parameters: (Writer wtr)
focal_class.signature:  SDFWriter(Writer wtr)
focal_class.class_method_signature: SDFWriter.SDFWriter(OutputStream output)
focal_class.full_signature: public  SDFWriter(OutputStream output)
focal_class.identifier: SDFWriter
focal_class.modifiers: public
focal_class.parameters: (OutputStream output)
focal_class.signature:  SDFWriter(OutputStream output)
focal_class.class_method_signature: SDFWriter.SDFWriter()
focal_class.full_signature: public  SDFWriter()
focal_class.identifier: SDFWriter
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  SDFWriter()
focal_class.class_method_signature: SDFWriter.SDFWriter(Writer out, Set<String> propertiesToWrite)
focal_class.full_signature: public  SDFWriter(Writer out, Set<String> propertiesToWrite)
focal_class.identifier: SDFWriter
focal_class.modifiers: public
focal_class.parameters: (Writer out, Set<String> propertiesToWrite)
focal_class.signature:  SDFWriter(Writer out, Set<String> propertiesToWrite)
focal_class.class_method_signature: SDFWriter.SDFWriter(OutputStream output, Set<String> propertiesToWrite)
focal_class.full_signature: public  SDFWriter(OutputStream output, Set<String> propertiesToWrite)
focal_class.identifier: SDFWriter
focal_class.modifiers: public
focal_class.parameters: (OutputStream output, Set<String> propertiesToWrite)
focal_class.signature:  SDFWriter(OutputStream output, Set<String> propertiesToWrite)
focal_class.class_method_signature: SDFWriter.SDFWriter(Set<String> propertiesToWrite)
focal_class.full_signature: public  SDFWriter(Set<String> propertiesToWrite)
focal_class.identifier: SDFWriter
focal_class.modifiers: public
focal_class.parameters: (Set<String> propertiesToWrite)
focal_class.signature:  SDFWriter(Set<String> propertiesToWrite)
focal_class.class_method_signature: SDFWriter.ensureBuffered(Writer wtr)
focal_class.full_signature: private static BufferedWriter ensureBuffered(Writer wtr)
focal_class.identifier: ensureBuffered
focal_class.modifiers: private static
focal_class.parameters: (Writer wtr)
focal_class.return: BufferedWriter
focal_class.signature: BufferedWriter ensureBuffered(Writer wtr)
focal_class.class_method_signature: SDFWriter.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: SDFWriter.setWriter(Writer out)
focal_class.full_signature: @Override public void setWriter(Writer out)
focal_class.identifier: setWriter
focal_class.modifiers: @Override public
focal_class.parameters: (Writer out)
focal_class.return: void
focal_class.signature: void setWriter(Writer out)
focal_class.class_method_signature: SDFWriter.setWriter(OutputStream output)
focal_class.full_signature: @Override public void setWriter(OutputStream output)
focal_class.identifier: setWriter
focal_class.modifiers: @Override public
focal_class.parameters: (OutputStream output)
focal_class.return: void
focal_class.signature: void setWriter(OutputStream output)
focal_class.class_method_signature: SDFWriter.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: SDFWriter.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: SDFWriter.write(IChemObject object)
focal_class.full_signature: @Override public void write(IChemObject object)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (IChemObject object)
focal_class.return: void
focal_class.signature: void write(IChemObject object)
focal_class.class_method_signature: SDFWriter.writeMoleculeSet(IAtomContainerSet som)
focal_class.full_signature: private void writeMoleculeSet(IAtomContainerSet som)
focal_class.identifier: writeMoleculeSet
focal_class.modifiers: private
focal_class.parameters: (IAtomContainerSet som)
focal_class.return: void
focal_class.signature: void writeMoleculeSet(IAtomContainerSet som)
focal_class.class_method_signature: SDFWriter.writeChemFile(IChemFile file)
focal_class.full_signature: private void writeChemFile(IChemFile file)
focal_class.identifier: writeChemFile
focal_class.modifiers: private
focal_class.parameters: (IChemFile file)
focal_class.return: void
focal_class.signature: void writeChemFile(IChemFile file)
focal_class.class_method_signature: SDFWriter.replaceInvalidHeaderChars(String headerKey)
focal_class.full_signature: private static String replaceInvalidHeaderChars(String headerKey)
focal_class.identifier: replaceInvalidHeaderChars
focal_class.modifiers: private static
focal_class.parameters: (String headerKey)
focal_class.return: String
focal_class.signature: String replaceInvalidHeaderChars(String headerKey)
focal_class.class_method_signature: SDFWriter.writeMolecule(IAtomContainer container)
focal_class.full_signature: private void writeMolecule(IAtomContainer container)
focal_class.identifier: writeMolecule
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer container)
focal_class.return: void
focal_class.signature: void writeMolecule(IAtomContainer container)
focal_class.class_method_signature: SDFWriter.isPrimitiveDataValue(Object obj)
focal_class.full_signature: private static boolean isPrimitiveDataValue(Object obj)
focal_class.identifier: isPrimitiveDataValue
focal_class.modifiers: private static
focal_class.parameters: (Object obj)
focal_class.return: boolean
focal_class.signature: boolean isPrimitiveDataValue(Object obj)
focal_class.class_method_signature: SDFWriter.writeV3000(IAtomContainer container)
focal_class.full_signature: private boolean writeV3000(IAtomContainer container)
focal_class.identifier: writeV3000
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer container)
focal_class.return: boolean
focal_class.signature: boolean writeV3000(IAtomContainer container)
focal_class.class_method_signature: SDFWriter.isCDKInternalProperty(Object propKey)
focal_class.full_signature: private boolean isCDKInternalProperty(Object propKey)
focal_class.identifier: isCDKInternalProperty
focal_class.modifiers: private
focal_class.parameters: (Object propKey)
focal_class.return: boolean
focal_class.signature: boolean isCDKInternalProperty(Object propKey)
focal_class.class_method_signature: SDFWriter.initIOSettings()
focal_class.full_signature: private void initIOSettings()
focal_class.identifier: initIOSettings
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initIOSettings()
focal_class.class_method_signature: SDFWriter.setAlwaysV3000(boolean val)
focal_class.full_signature: public void setAlwaysV3000(boolean val)
focal_class.identifier: setAlwaysV3000
focal_class.modifiers: public
focal_class.parameters: (boolean val)
focal_class.return: void
focal_class.signature: void setAlwaysV3000(boolean val)
focal_class.class_method_signature: SDFWriter.customizeJob()
focal_class.full_signature: public void customizeJob()
focal_class.identifier: customizeJob
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void customizeJob()
focal_class.superclass: extends DefaultChemObjectWriter
focal_method.body: @Override
      public void write(IChemObject object) throws CDKException {
          try {
              if (object instanceof IAtomContainerSet) {
                  writeMoleculeSet((IAtomContainerSet) object);
                  return;
              } else if (object instanceof IChemFile) {
                  writeChemFile((IChemFile) object);
                  return;
              } else if (object instanceof IChemModel) {
                  IChemFile file = object.getBuilder().newInstance(IChemFile.class);
                  IChemSequence sequence = object.getBuilder().newInstance(IChemSequence.class);
                  sequence.addChemModel((IChemModel) object);
                  file.addChemSequence(sequence);
                  writeChemFile((IChemFile) file);
                  return;
              } else if (object instanceof IAtomContainer) {
                  writeMolecule((IAtomContainer) object);
                  return;
              }
          } catch (Exception ex) {
              logger.error(ex.getMessage());
              logger.debug(ex);
              throw new CDKException("Exception while writing MDL file: " + ex.getMessage(), ex);
          }
          throw new CDKException(
                  "Only supported is writing of ChemFile, MoleculeSet, AtomContainer and Molecule objects.");
      }
focal_method.class_method_signature: SDFWriter.write(IChemObject object)
focal_method.full_signature: @Override public void write(IChemObject object)
focal_method.identifier: write
focal_method.invocations: writeMoleculeSet writeChemFile newInstance getBuilder newInstance getBuilder addChemModel addChemSequence writeChemFile writeMolecule error getMessage debug getMessage
focal_method.modifiers: @Override public
focal_method.parameters: (IChemObject object)
focal_method.return: void
focal_method.signature: void write(IChemObject object)