Class Factory


  • public class Factory
    extends Object
    Factory class to get the instance of PDFimporter by the interface PDFimporter and to get instances of new Documents by the interface Documents.
    • Field Detail

      • GROBIDhome

        public static String GROBIDhome
      • GROBIDproperties

        public static String GROBIDproperties
      • sentenceExtracionFlagKey

        public static final String sentenceExtracionFlagKey
      • citationSpotFlagKey

        public static final String citationSpotFlagKey
      • citationLinkFlagKey

        public static final String citationLinkFlagKey
      • citationEnrichFlagKey

        public static final String citationEnrichFlagKey
      • graphExtractionFlagKey

        public static final String graphExtractionFlagKey
      • sentenceRhetoricalAnnotationFlagKey

        public static final String sentenceRhetoricalAnnotationFlagKey
      • terminologyExtractionFlagKey

        public static final String terminologyExtractionFlagKey
      • metaannotationsExtractionFlagKey

        public static final String metaannotationsExtractionFlagKey
      • headerAnalysisFlagKey

        public static final String headerAnalysisFlagKey
      • coreferenceAnalysisFlagKey

        public static final String coreferenceAnalysisFlagKey
      • causalityAnalysisFlagKey

        public static final String causalityAnalysisFlagKey
      • babelNetAnalysisFlagKey

        public static final String babelNetAnalysisFlagKey
      • summaryAnalysisFlagKey

        public static final String summaryAnalysisFlagKey
      • inputCandidateInlineCitationAStype_citationSanitizerResource

        public static String inputCandidateInlineCitationAStype_citationSanitizerResource
      • inputCandidateInlineCitationMarkerAStype_citationSanitizerResource

        public static String inputCandidateInlineCitationMarkerAStype_citationSanitizerResource
      • PDFXimporter_Resource

        protected static ImporterPDFX PDFXimporter_Resource
      • PDFEXTimporter_Resource

        protected static ImporterPDFEXT PDFEXTimporter_Resource
      • GROBIDimporter_Resource

        protected static ImporterGROBID GROBIDimporter_Resource
      • JATSimporter_Resource

        protected static ImporterJATS JATSimporter_Resource
      • RhetoricalClassifier_Resource

        protected static RhetoricalClassifier RhetoricalClassifier_Resource
      • TermAnnotator_Resource

        protected static TermAnnotator TermAnnotator_Resource
      • MetaAnnotator_Resource

        protected static MetaAnnotator MetaAnnotator_Resource
      • LanguageDetector_Resource

        protected static LanguageDetector LanguageDetector_Resource
      • CitationLinker_Resource

        protected static CitationLinker CitationLinker_Resource
      • BiblioEntryParser_Resource

        protected static BiblioEntryParser BiblioEntryParser_Resource
      • HeaderAnalyzer_Resource

        protected static HeaderAnalyzer HeaderAnalyzer_Resource
      • CorefChainBuilder_Resource

        protected static CorefChainBuilder CorefChainBuilder_Resource
      • BabelnetAnnotator_Resource

        public static BabelnetAnnotator BabelnetAnnotator_Resource
      • LexRankSummarizer_Resource

        protected static LexRankSummarizer LexRankSummarizer_Resource
      • TitleSimSummarizer_Resource

        protected static TitleSimSummarizer TitleSimSummarizer_Resource
      • corpusController_preprocess_XGAPPpreprocStep1

        protected static gate.CorpusController corpusController_preprocess_XGAPPpreprocStep1
      • corpusController_preprocess_XGAPPpreprocStep2

        protected static gate.CorpusController corpusController_preprocess_XGAPPpreprocStep2
      • corpusController_XGAPPheader

        protected static gate.CorpusController corpusController_XGAPPheader
      • corpusController_XGAPPcitMarker

        protected static gate.CorpusController corpusController_XGAPPcitMarker
      • corpusController_XGAPPcorefMentionSpot

        protected static gate.CorpusController corpusController_XGAPPcorefMentionSpot
      • corpusController_XGAPPcausality

        protected static gate.CorpusController corpusController_XGAPPcausality
      • corpusController_XGAPPmetaAnnotator

        protected static gate.CorpusController corpusController_XGAPPmetaAnnotator
    • Constructor Detail

      • Factory

        public Factory()
    • Method Detail

      • checkConfig

        public static String checkConfig()
        This method returns a String with the status check results of the configuration settings and the current status of the resources of Dr. Inventor Text Mining Framework
      • setDRIPropertyFilePath

        public static boolean setDRIPropertyFilePath​(String filePath)
        Set programmatically the value of the full local path to DRI property file. If the value of this path is specified by the system property named 'DRIconf', the system property value has priority
        Parameters:
        filePath -
        Returns:
      • initFramework

        public static void initFramework()
                                  throws DRIexception
        This method should be invoked in order to initialize the resources of Dr. Inventor Text Mining Framework. After the first call, subsequent calls will check if Dr. Inventor Text Mining Framework has already been initialized and, if so, the initialization process is simply skipped.
        Throws:
        DRIexception
      • createNewDocument

        public static Document createNewDocument​(String absoluteFilePath)
                                          throws DRIexception
        Instantiates a new Document, populating it with the XML string-serialized contents read from a file.
        Parameters:
        absoluteFilePath - the absolute path of the file with the XML string-serialized contents of the document to load
        Returns:
        the new Document instance populated with the XML string-serialized contents
        Throws:
        DRIexception
      • createNewDocument

        public static Document createNewDocument​(File file)
                                          throws DRIexception
        Instantiates a new Document, populating it with the XML string-serialized contents read from a file.
        Parameters:
        file - the file with the XML string-serialized contents of the document to load
        Returns:
        the new Document instance populated with the XML string-serialized contents
        Throws:
        DRIexception
      • isEnableMate

        public static boolean isEnableMate()
        Check if the sentence parser is enabled. The parsing of sentences should be enabled for the library to properly work.
        Returns:
      • setEnableMate

        public static void setEnableMate​(boolean enableSentenceParsing)
        Enable or disable the parsing of sentences. The parsing of sentences should be enabled for the library to properly work.
        Parameters:
        enableSentenceParsing -
      • checkPDFtoTextConverter

        public static PDFtoTextConvMethod checkPDFtoTextConverter()
        Get the PDF to text converter currently used by the library.
        Returns:
      • setPDFtoTextConverter

        public static void setPDFtoTextConverter​(PDFtoTextConvMethod converter)
        Set the PDF to text converter that the library should use.
        Parameters:
        enableSentenceParsing -
      • getResourceFolderFullPath

        public static String getResourceFolderFullPath()
        Get resource folder full path
        Returns:
      • getVersion

        public static String getVersion()
        Get the version of the library
        Returns:
      • setModuleConfig

        public static void setModuleConfig​(ModuleConfig configurationObject)
        Set the module configuration by passing an instance of the ModuleConfig class that specifies which modules of the library are enabled.
        Parameters:
        configurationObject -
      • getModuleConfig

        public static ModuleConfig getModuleConfig()
        Get a copy of the current module configuration of the library. IMPORTANT; changes to the boolean flags of the returned ModuleConfig instance do not change any module configuration (enable or disable any module). To change the module configuration, provide a new instance of ModuleConfig by the the setModuleConfig(ModuleConfig configurationObject) method.
        Returns: