new ChemDataWriterManager()
A manager to create suitable data writer.
- Source:
Methods
-
(static) createWriter(condition, srcObj) → {Kekule.IO.ChemDataWriter}
-
Create a new writer instance by condition and suitable for srcObj.
Parameters:
Name Type Description conditionHash srcObjKekule.ChemObject - Source:
Returns:
-
(static) createWriterByFileExt(fileExt, otherConditions, srcObj) → {Kekule.IO.ChemDataWriter}
-
Create writer instance by file ext.
Parameters:
Name Type Description fileExtString otherConditionsHash srcObjKekule.ChemObject - Source:
Returns:
-
(static) createWriterByFormat(formatId, otherConditions) → {Kekule.IO.ChemDataWriter}
-
Create new writer instance by formatId.
Parameters:
Name Type Description formatIdString otherConditionsHash - Source:
Returns:
-
(static) createWriterById(id, srcObj) → {Kekule.IO.ChemDataWriter}
-
Create a new writer instance by id and meet srcObj.
Parameters:
Name Type Description idString srcObjKekule.ChemObject - Source:
Returns:
-
(static) createWriterByMimeType(mimeType, srcObj) → {Kekule.IO.ChemDataWriter}
-
Create a new reader instance by MIME type.
Parameters:
Name Type Description mimeTypeString srcObjKekule.ChemObject - Source:
Returns:
-
(static) getAllWritableFormatIds() → {Array}
-
Returns all file format IDs that has corresponding writer.
- Source:
Returns:
Array of format id.- Type
- Array
-
(static) getAllWritableFormats() → {Array}
-
Returns all file formats that has corresponding writer.
- Source:
Returns:
Array of format object.- Type
- Array
-
(static) getAvailableWriterInfos(condition, srcObjOrClass) → {Array}
-
Get all available writer infos by condition provided and suitble for srcObj. For example: Kekule.IO.ChemDataWriterManager.getWriterInfo({'id': 'mol'});
Parameters:
Name Type Description conditionHash srcObjOrClassVariant - Source:
Returns:
- Type
- Array
-
(static) getWriter(condition, srcObj) → {Kekule.IO.ChemDataWriter}
-
Get a reusable writer instance by condition and suitable for srcObj.
Parameters:
Name Type Description conditionHash srcObjKekule.ChemObject - Source:
Returns:
-
(static) getWriterByFileExt(fileExt, otherConditions, srcObj) → {Kekule.IO.ChemDataWriter}
-
Get a reusbale writer instance by file ext.
Parameters:
Name Type Description fileExtString otherConditionsHash srcObjKekule.ChemObject - Source:
Returns:
-
(static) getWriterByFormat(formatId, otherConditions) → {Kekule.IO.ChemDataWriter}
-
Get new writer instance by formatId.
Parameters:
Name Type Description formatIdString otherConditionsHash - Source:
Returns:
-
(static) getWriterById(id, srcObj) → {Kekule.IO.ChemDataWriter}
-
Get a reusable writer instance by id and meet srcObj.
Parameters:
Name Type Description idString srcObjKekule.ChemObject - Source:
Returns:
-
(static) getWriterByMimeType(mimeType) → {Kekule.IO.ChemDataWriter}
-
Get a reusable new reader instance by MIME type.
Parameters:
Name Type Description mimeTypeString - Source:
Returns:
-
(static) getWriterInfo(condition, srcObj) → {Hash}
-
Get writer info by condition provided and suitble for srcObj. For example: Kekule.IO.ChemDataWriterManager.getWriterInfo({'id': 'mol'});
Parameters:
Name Type Description conditionHash srcObjKekule.ChemObject - Source:
Returns:
- Type
- Hash
-
(static) getWriterInfoByFileExt(fileExt, otherConditions, srcObj) → {Hash}
-
Get writer information by file ext.
Parameters:
Name Type Description fileExtString otherConditionsHash srcObjKekule.ChemObject - Source:
Returns:
- Type
- Hash
-
(static) getWriterInfoByFormat(formatId, otherConditions) → {Hash}
-
Get writer information by data format id.
Parameters:
Name Type Description formatIdString otherConditionsHash - Source:
Returns:
- Type
- Hash
-
(static) getWriterInfoById(id, srcObj) → {Hash}
-
Get writer information by Id.
Parameters:
Name Type Description idString srcObjKekule.ChemObject - Source:
Returns:
- Type
- Hash
-
(static) register(id, writerClass, srcClasses, formatId, additionalInfo)
-
Register a data writer.
Parameters:
Name Type Description idString A UID string for writer. writerClassClass Class of writer. srcClassesArray Instance of which classes can be written by this writer. formatIdVariant Data format, string or array. additionalInfoHash More information on this reader class. Can include the following fields: { {Hash} createOptions: hash passed into writer's constructor. (String) title: Writer title, (String) mimeType (String) fileExt: if write to a file, the file ext. } - Source:
-
(static) unregister(id)
-
Unregister a data writer.
Parameters:
Name Type Description idString A UID string for reader. - Source: