edu.ucsb.nceas.metacat.service

## Class XMLSchema

- java.lang.Object
- - edu.ucsb.nceas.metacat.service.XMLSchema

- Direct Known Subclasses:
    XMLNoNamespaceSchema

      public class XMLSchema
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XMLSchema(java.lang.String fileNamespace, java.lang.String externalFileUri, java.lang.String formatId)` Constructor - the schema file name will be extracted from the external file uri.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getExternalFileUri()` Gets the external file uri
    `java.lang.String` | `getFileName()` Gets the file name
    `java.lang.String` | `getFileNamespace()` Gets the file namespace
    `java.lang.String` | `getFormatId()` Get the format id
    `java.lang.String` | `getLocalFileDir()` Gets the local file directory path
    `java.lang.String` | `getLocalFileUri()` Gets the local file uri
    `static java.lang.String` | `getType()` Return the type of the schema.
    `void` | `setExternalFileUri(java.lang.String externalFileUri)` Sets the external file uri.
    `void` | `setFileName(java.lang.String fileName)` Set the file name.
    `void` | `setFileNamespace(java.lang.String fileNamespace)` Sets the file namespace
    `void` | `setFormatId(java.lang.String formatId)` Set the format id.

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### XMLSchema

          public XMLSchema(java.lang.String fileNamespace,
                           java.lang.String externalFileUri,
                           java.lang.String formatId)

      Constructor - the schema file name will be extracted from the external file uri. The local file uri and local file dir will be constructed using system values and the file name.
      Parameters:
        `fileNamespace` - the file's name space
        `externalFileUri` - the external uri where the schema is located

  - ### Method Detail

    - #### setFileName

          public void setFileName(java.lang.String fileName)

      Set the file name. The local file uri and local file dir will also get set using system context url and dir values and the schema directory value.
      Parameters:
        `fileName` - the file name to set

    - #### getFileName

          public java.lang.String getFileName()

      Gets the file name
      Returns:
        string holding the file name

    - #### setFileNamespace

          public void setFileNamespace(java.lang.String fileNamespace)

      Sets the file namespace
      Parameters:
        `fileNamespace` - the namespace to set

    - #### getFileNamespace

          public java.lang.String getFileNamespace()

      Gets the file namespace
      Returns:
        a string holding the file namespace

    - #### setExternalFileUri

          public void setExternalFileUri(java.lang.String externalFileUri)

      Sets the external file uri. Extracts the file name from the uri and sets the file name as well.
      Parameters:
        `externalFileUri` - the external file uri to set

    - #### getExternalFileUri

          public java.lang.String getExternalFileUri()

      Gets the external file uri
      Returns:
        a string holding the external file uri

    - #### getLocalFileUri

          public java.lang.String getLocalFileUri()

      Gets the local file uri
      Returns:
        a string holding the local file uri

    - #### getLocalFileDir

          public java.lang.String getLocalFileDir()

      Gets the local file directory path
      Returns:
        a string holding the local file directory path

    - #### getFormatId

          public java.lang.String getFormatId()

      Get the format id
      Returns:
        the format id

    - #### setFormatId

          public void setFormatId(java.lang.String formatId)

      Set the format id.
      Parameters:
        `formatId.` -

    - #### getType

          public static java.lang.String getType()

      Return the type of the schema. It always is "Schema"
      Returns:

Copyright © 2020 Regents of the University of California. All Rights Reserved.