From: <eg...@us...> - 2006-06-30 09:18:02
|
Revision: 6531 Author: egonw Date: 2006-06-30 02:17:53 -0700 (Fri, 30 Jun 2006) ViewCVS: http://svn.sourceforge.net/cdk/?rev=6531&view=rev Log Message: ----------- Now allows customization of IBond CML output too, e.g. for bond descriptors. Modified Paths: -------------- trunk/cdk/src/org/openscience/cdk/libio/cml/ICMLCustomizer.java trunk/cdk/src/org/openscience/cdk/libio/cml/PDBAtomCustomizer.java trunk/cdk/src/org/openscience/cdk/libio/cml/QSARCustomizer.java Modified: trunk/cdk/src/org/openscience/cdk/libio/cml/ICMLCustomizer.java =================================================================== --- trunk/cdk/src/org/openscience/cdk/libio/cml/ICMLCustomizer.java 2006-06-29 12:20:08 UTC (rev 6530) +++ trunk/cdk/src/org/openscience/cdk/libio/cml/ICMLCustomizer.java 2006-06-30 09:17:53 UTC (rev 6531) @@ -30,6 +30,7 @@ import org.openscience.cdk.interfaces.IAtom; import org.openscience.cdk.interfaces.IAtomContainer; +import org.openscience.cdk.interfaces.IBond; /** * Interface for classes that allow the Convertor to be customized for certain @@ -52,6 +53,15 @@ */ public void customize(IAtom atom, Object nodeToAdd) throws Exception; + /** + * Customized the nodeToAdd for the given IBond. + * + * @param atom Bond to base the customization on + * @param nodeToAdd XOM Element to customize + * @throws Exception thrown if nodeToAdd is not an instance of nu.xom.Element + */ + public void customize(IBond bond, Object nodeToAdd) throws Exception; + /** * Customized the nodeToAdd for the given Molecule. * Modified: trunk/cdk/src/org/openscience/cdk/libio/cml/PDBAtomCustomizer.java =================================================================== --- trunk/cdk/src/org/openscience/cdk/libio/cml/PDBAtomCustomizer.java 2006-06-29 12:20:08 UTC (rev 6530) +++ trunk/cdk/src/org/openscience/cdk/libio/cml/PDBAtomCustomizer.java 2006-06-30 09:17:53 UTC (rev 6531) @@ -36,6 +36,7 @@ import org.openscience.cdk.exception.CDKException; import org.openscience.cdk.interfaces.IAtom; import org.openscience.cdk.interfaces.IAtomContainer; +import org.openscience.cdk.interfaces.IBond; import org.openscience.cdk.protein.data.PDBAtom; /** @@ -148,5 +149,9 @@ public void customize(IAtomContainer molecule, Object nodeToAdd) throws Exception { // nothing to do at this moment } + + public void customize(IBond bond, Object nodeToAdd) throws Exception { + // nothing to do at this moment + } } Modified: trunk/cdk/src/org/openscience/cdk/libio/cml/QSARCustomizer.java =================================================================== --- trunk/cdk/src/org/openscience/cdk/libio/cml/QSARCustomizer.java 2006-06-29 12:20:08 UTC (rev 6530) +++ trunk/cdk/src/org/openscience/cdk/libio/cml/QSARCustomizer.java 2006-06-30 09:17:53 UTC (rev 6531) @@ -36,6 +36,7 @@ import org.openscience.cdk.interfaces.IAtom; import org.openscience.cdk.interfaces.IAtomContainer; +import org.openscience.cdk.interfaces.IBond; import org.openscience.cdk.exception.CDKException; import org.openscience.cdk.qsar.DescriptorSpecification; import org.openscience.cdk.qsar.DescriptorValue; @@ -189,5 +190,8 @@ return scalar; } + public void customize(IBond bond, Object nodeToAdd) throws Exception { + // nothing to do at this moment + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |