Package com.chemaxon.descriptors.db
Class MDTableReader<D extends Descriptor>
- java.lang.Object
-
- com.chemaxon.descriptors.db.MDTableReader<D>
-
- Type Parameters:
D
- Represented descriptor bare type
- Direct Known Subclasses:
CfpTableReader
,EcfpTableReader
,PfTableReader
@Beta @PublicAPI public abstract class MDTableReader<D extends Descriptor> extends Object
Deserialize fingerprint from MDTable (JChem).Please note that this interface is marked with @Beta annotation, so it can be subject of incompatible changes or removal in later releases.
-
-
Constructor Summary
Constructors Constructor Description MDTableReader()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static MDTableReader<? extends Descriptor>
createNewReader(String xmlConfig)
Create an MDTableReader from the xml configuration string.abstract DescriptorGenerator<D>
getDescriptorGenerator()
Associated descriptor generator.abstract StandardizerWrapper
getStandardizerWrapper()
Get represented standardizer wrapper.abstract String
getXmlConfig()
Gets configuration string.abstract D
read(byte[] serialized)
Generates a descriptor from a byte array.
-
-
-
Method Detail
-
read
public abstract D read(byte[] serialized)
Generates a descriptor from a byte array. Note that compatibility of the descriptor configuration used to create the serialized form and the one used to create this reader instance can not be checked. The binary form read by this method is compatible only with the binary form provided by thechemaxon.descriptors
API implementation for the represented XML configuration. This binary form is not compatible with theDescriptorSerializer
represented by theDescriptorGenerator
returned bygetDescriptorGenerator()
.- Parameters:
serialized
- Serialize byte array representation- Returns:
- a bare descriptor form
-
getXmlConfig
public abstract String getXmlConfig()
Gets configuration string.- Returns:
- xml config
-
getDescriptorGenerator
public abstract DescriptorGenerator<D> getDescriptorGenerator()
Associated descriptor generator. Associated generator is compatible with the read descriptors created by methodread(byte[])
. Note that theDescriptorSerializer
exposed by the returned generator is not compatible with the binary form represented by this reader.- Returns:
- Associated generator
-
getStandardizerWrapper
public abstract StandardizerWrapper getStandardizerWrapper()
Get represented standardizer wrapper. Note that the represented standardizer configuration might not be recognized by an implementation. In these cases anIllegalStateException
is thrown.- Returns:
- Represented standardizer wrapper
- Throws:
IllegalStateException
- When represented standardizer configuration is not recognized
-
createNewReader
public static MDTableReader<? extends Descriptor> createNewReader(String xmlConfig)
Create an MDTableReader from the xml configuration string.- Parameters:
xmlConfig
- xml config- Returns:
- an MDTableReader implementation
- Throws:
IllegalArgumentException
- invalid xml string
-
-