Interface MTImportConfig


public interface MTImportConfig
Configuration for a silent MT import.
  • Method Details

    • isCompatibleVersion

      boolean isCompatibleVersion()
    • isAlwaysOverwrite

      boolean isAlwaysOverwrite()
    • setAlwaysOverwrite

      void setAlwaysOverwrite(boolean value)
    • isImportCopies

      boolean isImportCopies()
    • setImportCopies

      void setImportCopies(boolean value)
    • isCreateRevisions

      boolean isCreateRevisions()
    • setCreateRevisions

      void setCreateRevisions(boolean createRevisions)
    • isKeepUsersFromImportFile

      boolean isKeepUsersFromImportFile()
    • setKeepUsersFromImportFile

      void setKeepUsersFromImportFile(boolean value)
    • getNewTimestampName

      String getNewTimestampName()
    • setNewTimestampName

      void setNewTimestampName(String name)
    • getDefaultColorSchemeTitle

      String getDefaultColorSchemeTitle()
    • getImportFileLanguages

      List<MTLanguage> getImportFileLanguages()
      Returns the languages from the export file. These languages can not be used in the language mapping. If you want to create new languages in the language mapping you have to create them manually and copy the values from these languages.
      Returns:
      the languages from the export file.
    • setLanguageMapping

      void setLanguageMapping(Map<String,MTLanguage> map)
      Sets the language mapping to use. The keys should be the UUID:s of the languages in the import file. Any newly created languages will be created given that the user has the privileges to do so.
      Parameters:
      map - The language mapping to use.
    • getImportFileLayerTypes

      List<MTLayerType> getImportFileLayerTypes() throws XMLStreamException, IOException
      Returns the layer types from the export file. NOTE: You have to set a valid language mapping to use before calling this method, since the titles of the imported layer types are dependent on the language mapping.
      Returns:
      the layer types from the export file.
      Throws:
      XMLStreamException - If an XML error occurs.
      IOException - If an IOException occurs.
    • setLayerTypeMapping

      void setLayerTypeMapping(Map<String,MTLayerType> map)
      Sets the layer type mapping to use. The keys should be the UUID:s of the layer types in the import file. The values can be repository layer types or newly created layer types. Any newly created layer types will be created given that the user has the privileges to do so.
      Parameters:
      map - The layer type mapping to use.
    • validateXMLFiles

      default void validateXMLFiles() throws SAXException, XMLStreamException, IOException
      Validates all XML files in the selected import archive against their schemas.
      Throws:
      SAXException - If an xml error occurs.
      XMLStreamException - If an xml error occurs.
      IOException - If an IOException occurs.
    • validateXMLFiles

      void validateXMLFiles(Consumer<Integer> progress) throws SAXException, XMLStreamException, IOException
      Throws:
      SAXException
      XMLStreamException
      IOException
    • getModelCount

      default Optional<Integer> getModelCount()