com.microfocus.awm.model.internal

## Class TaurusConfigLoader

- java.lang.Object
- - java.util.Observable
  - - com.microfocus.awm.model.internal.TaurusConfigLoader

- All Implemented Interfaces:
    ITaurusConfigLoader

      public class TaurusConfigLoader
      extends java.util.Observable
      implements ITaurusConfigLoader

  Implementation of the `ITaurusConfigLoader`.
  Author:
    Ralf Pakosch

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `TaurusConfigLoader.EModelLocation` Enumeration for possible model locations.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.lang.String` | `_endReference` Closing symbol for model references
    `java.lang.String` | `_startReference` Opening symbol for model references

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static org.eclipse.core.resources.IFile` | `getFileFromURI(org.eclipse.emf.common.util.URI pUri)` Gets any workspace file from the given URI.
    `static TaurusConfigLoader` | `getInstance()` Gets the singleton instance.
    `TAURUSConfiguration` | `getTaurusConfiguration()` Gets the last loaded AWM model.
    `TAURUSConfiguration` | `loadConfiguration(org.eclipse.emf.common.util.URI pXMLModelUri, org.eclipse.core.runtime.IProgressMonitor pMon)` Loads the configuration file.

    - ### Methods inherited from class java.util.Observable

      `addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers`

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

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

    - ### Methods inherited from interface com.microfocus.awm.model.ITaurusConfigLoader

      `addObserver, deleteObserver`

- - ### Field Detail

    - #### _startReference

          public java.lang.String _startReference

      Opening symbol for model references

    - #### _endReference

          public java.lang.String _endReference

      Closing symbol for model references

  - ### Method Detail

    - #### getInstance

          public static TaurusConfigLoader getInstance()

      Gets the singleton instance.
      Returns:
        the instance

    - #### getTaurusConfiguration

          public TAURUSConfiguration getTaurusConfiguration()

      Description copied from interface: `ITaurusConfigLoader`
      Gets the last loaded AWM model.
      Specified by:
        `getTaurusConfiguration` in interface `ITaurusConfigLoader`
      Returns:
        the last loaded model.

    - #### loadConfiguration

          public TAURUSConfiguration loadConfiguration(org.eclipse.emf.common.util.URI pXMLModelUri,
                                                       org.eclipse.core.runtime.IProgressMonitor pMon)
                                                throws TaurusCoreException

      Description copied from interface: `ITaurusConfigLoader`
      Loads the configuration file.
      Specified by:
        `loadConfiguration` in interface `ITaurusConfigLoader`
      Parameters:
        `pXMLModelUri` - the URI to an AWM XML model
        `pMon` - a progress monitor
      Returns:
        the loaded AWM model
      Throws:
        `TaurusCoreException` -
        - If the URI is not pointing to an AWM model.
        - If the URI target cannot be read.
        - If the target model is invalid or contains XML syntax errors.
        - If the target model is outdated and needs to be converted, but cannot be modified (read-only).

    - #### getFileFromURI

          public static org.eclipse.core.resources.IFile getFileFromURI(org.eclipse.emf.common.util.URI pUri)

      Gets any workspace file from the given URI.
      Parameters:
        `pUri` - the URI
      Returns:
        the file (may not exist)

Copyright © 2015 Micro Focus GmbH. All rights reserved.