Package org.openscience.cdk.io.formats
Class PubChemCompoundXMLFormat
- java.lang.Object
-
- org.openscience.cdk.io.formats.AbstractResourceFormat
-
- org.openscience.cdk.io.formats.PubChemCompoundXMLFormat
-
- All Implemented Interfaces:
IChemFormat,IChemFormatMatcher,IResourceFormat
public class PubChemCompoundXMLFormat extends AbstractResourceFormat implements IChemFormatMatcher
- Source code:
- main
- Belongs to CDK module:
- ioformats
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openscience.cdk.io.formats.IChemFormatMatcher
IChemFormatMatcher.MatchResult
-
-
Field Summary
-
Fields inherited from interface org.openscience.cdk.io.formats.IChemFormatMatcher
NO_MATCH
-
-
Constructor Summary
Constructors Constructor Description PubChemCompoundXMLFormat()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFormatName()Returns a one-lined format name of the format.static IResourceFormatgetInstance()StringgetMIMEType()Returns the accepted MIME type for this format.String[]getNameExtensions()Returns an array of common resource name extensions.StringgetPreferredNameExtension()Returns the preferred resource name extension.StringgetReaderClassName()Returns the class name of the CDK Reader for this format.intgetRequiredDataFeatures()Returns an integer indicating the data features that this format requires.intgetSupportedDataFeatures()Returns an integer indicating the data features that this format supports.StringgetWriterClassName()Returns the class name of the CDK Writer for this format.booleanisXMLBased()Indicates if the format is an XML-based language.IChemFormatMatcher.MatchResultmatches(List<String> lines)Method that checks whether the given lines are part of the format read by this reader.-
Methods inherited from class org.openscience.cdk.io.formats.AbstractResourceFormat
equals, hashCode
-
-
-
-
Method Detail
-
getInstance
public static IResourceFormat getInstance()
-
getFormatName
public String getFormatName()
Returns a one-lined format name of the format.- Specified by:
getFormatNamein interfaceIResourceFormat
-
getMIMEType
public String getMIMEType()
Returns the accepted MIME type for this format.- Specified by:
getMIMETypein interfaceIResourceFormat- Returns:
- null if no MIME type has been accepted on
-
getPreferredNameExtension
public String getPreferredNameExtension()
Returns the preferred resource name extension.- Specified by:
getPreferredNameExtensionin interfaceIResourceFormat
-
getNameExtensions
public String[] getNameExtensions()
Returns an array of common resource name extensions.- Specified by:
getNameExtensionsin interfaceIResourceFormat
-
getReaderClassName
public String getReaderClassName()
Returns the class name of the CDK Reader for this format.- Specified by:
getReaderClassNamein interfaceIChemFormat- Returns:
- null if no CDK Reader is available.
-
getWriterClassName
public String getWriterClassName()
Returns the class name of the CDK Writer for this format.- Specified by:
getWriterClassNamein interfaceIChemFormat- Returns:
- null if no CDK Writer is available.
-
isXMLBased
public boolean isXMLBased()
Indicates if the format is an XML-based language.- Specified by:
isXMLBasedin interfaceIResourceFormat- Returns:
- if the format is XML-based.
-
getSupportedDataFeatures
public int getSupportedDataFeatures()
Returns an integer indicating the data features that this format supports. The integer is composed as explained in DataFeatures. May be set to DataFeatures.NONE as default.- Specified by:
getSupportedDataFeaturesin interfaceIChemFormat- See Also:
DataFeatures
-
getRequiredDataFeatures
public int getRequiredDataFeatures()
Returns an integer indicating the data features that this format requires. For example, the XYZ format requires 3D coordinates.- Specified by:
getRequiredDataFeaturesin interfaceIChemFormat- See Also:
DataFeatures
-
matches
public IChemFormatMatcher.MatchResult matches(List<String> lines)
Method that checks whether the given lines are part of the format read by this reader.- Specified by:
matchesin interfaceIChemFormatMatcher- Parameters:
lines- lines of the input to be checked- Returns:
- whether the format matched and when it matched
-
-