Fetches information from RCSB's RESTful Web Service
. A factory for
XML files. The factory methods
will return null if the data was not found (rather than throwing an exception); client code should test for this.
This is for consistency: if the factory could not read some part (corresponding to a field in a class in
) of the XML file, either because it was blank or contained an error that could not be
safely ignored, that field will simply be null. This holds even for numerical values. On some parse errors, the error
will additionally be printed to standard error.
RCSBLigands ligands = RCSBLigandsFactory.getFromPdbIds("1w0p");
List<RCSBLigand> list = ligands.getLigands();
System.out.println(list.get(0).getFormula()); // prints "CA 2"
System.out.println(list.get(1).getFormula()); // prints "C11 H19 N O9"