Package org.eclipse.app4mc.amalthea.model.io

## Class AmaltheaFileHelper

- Object
- - AmaltheaFileHelper

    public final class AmaltheaFileHelper
    extends Object

### Field Summary

Fields
`static String` `INVALID`

### Method Summary

All Methods
`static String` `getNamespaceFromFile​(Path inputPath)` Extract the model namespace of the given input file.
`static String` `getNamespaceFromModel​(File inputFile)` Extract the model namespace of the given input file.
`static String` `getNamespaceFromZip​(Path inputPath)` Extract the model namespace of the given input file.
`static boolean` `isZipFile​(File file)` Check if the given file is a zip archive.

### Methods inherited from class Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### INVALID

    public static final String INVALID

See Also:
  Constant Field Values

### Method Detail

#### isZipFile

    public static boolean isZipFile​(File file)

Check if the given file is a zip archive.

Parameters:
  `file` - The `File` to check.
Returns:
  `true` if the given file is a zip archive, `false` if not.

#### getNamespaceFromModel

    public static String getNamespaceFromModel​(File inputFile)

Extract the model namespace of the given input file.

Parameters:
  `inputFile` - The file for which the model namespace is requested.
Returns:
  The model namespace of the given input file or invalid if an error occurs on parsing or the model namespace is invalid.

#### getNamespaceFromZip

    public static String getNamespaceFromZip​(Path inputPath)

Extract the model namespace of the given input file.

Parameters:
  `inputPath` - The `Path` of the model file for which the model namespace is requested.
Returns:
  The model namespace of the given input file or invalid if an error occurs on parsing or the model namespace is invalid.

#### getNamespaceFromFile

    public static String getNamespaceFromFile​(Path inputPath)

Extract the model namespace of the given input file.

Parameters:
  `inputPath` - The `Path` of the model file for which the model namespace is requested.
Returns:
  The model namespace of the given input file or invalid if an error occurs on parsing or the model namespace is invalid.