public final class Imports extends Object
public static InputStream inputStreamFromLocationWithIae(String location, boolean autoGzip)
CmdlineUtils.inputStreamFromLocation(java.lang.String, boolean) with no checked exceptions.location - Location to openautoGzip - Use{CmdlineUtils.autoGzip(java.io.InputStream)IllegalArgumentException - from delegated method's IOException.public static InputStream inputStreamFromLocationWithIae(String location)
CmdlineUtils.inputStreamFromLocation(java.lang.String, boolean) with no checked exceptions.location - Location to openIllegalArgumentException - from delegated method's IOException.@Beta public static Iterable<Supplier<InputStream>> fromCliArgsPresent(String noneMsg, String bothMsg, List<String> inlineArgs, String location)
InputStream for inline and location specifications.noneMsg - Error message when none of the input sources are specifiedbothMsg - Error message when both input sources are specifiedinlineArgs - Inline arguments, each will be represented as a separate InputStreamlocation - Location of inputIllegalArgumentException - when none or both inlines and locations are specified@Beta public static Optional<Iterable<Supplier<InputStream>>> fromCliArgsOptional(String bothMsg, List<String> inlineArgs, String location)
InputStream for inline and location specifications.bothMsg - Error message when both input sources are specifiedinlineArgs - Inline arguments, each will be represented as a separate InputStreamlocation - Location of inputIllegalArgumentException - when both inlines and locations are specifiedpublic static Optional<Function<StructureRecord,String>> createIdExtractorWhenSpecified(boolean idName, String idPropOrNull)
idName - Use Molecule name when trueidPropOrNull - SD property to use as IDs when not nullpublic static DescriptorsWithMols generateDescriptorsWithMols(OverlapAnalysisContext context, Iterable<Supplier<InputStream>> inputs, boolean idName, String idPropOrNull, Map<String,PropertyExtractor> additionalPropertiesOrNull, SubProgressObserver po, ExecutorService ex) throws IOException
context - Context to useinputs - Inputs to read fromidName - Use Molecule name when trueidPropOrNull - SD property to use as IDs when not nulladditionalPropertiesOrNull - Additional properties to storepo - Progress observer to track executionex - ExecutorService for concurrent executionIOException - propagatedpublic static DescriptorsWithIds generateDescriptors(OverlapAnalysisContext context, Iterable<Supplier<InputStream>> inputs, boolean idName, String idPropOrNull, Supplier<SubProgressObserver> po, ExecutorService ex) throws IOException
context - Context to useinputs - Inputs to read fromidName - Use Molecule name when trueidPropOrNull - SD property to use as IDs when not nullpo - Progress observer to track executionex - ExecutorService for concurrent executionIOExceptionpublic static DescriptorsWithIds parseCustomDescriptors(OverlapAnalysisContext context, Iterable<Supplier<InputStream>> inputs, String idSplitter, String descSplitter, Supplier<SubProgressObserver> po, ExecutorService ex) throws IOException
context - Context to useinputs - Inputs to read fromidSplitter - Splitter for IDs or nulldescSplitter - Splitter for the descriptors part; requiredpo - Progress observer to track executionex - ExecutorService to track executionIOException - propagatedpublic static DescriptorsWithIds readSerializedStorages(String descriptors, String ids, Supplier<SubProgressObserver> descpo, Supplier<SubProgressObserver> idpo) throws IOException, ClassNotFoundException
descriptors - Location for serialized descriptors storageids - Optional location of serialized ID storage or null. When null passed a default ID store
will be useddescpo - Supplier for ProgressObserver for descriptor deserialization. Method
Supplier.get() will be invoked before deserialization, exactly onceidpo - Supplier for ProgressObserver for ID storage deserialization. Method will be invoked
when ID store is presented, just before ID storage deserializtion.
storage is allocated returning indices.ClassNotFoundException - propagated from SerializationUtil.expect(java.lang.Class, java.io.ObjectInputStream, com.chemaxon.calculations.common.SubProgressObserver)IOException - propagated