Class EMFJSONSaver<E extends org.eclipse.emf.ecore.EObject>

java.lang.Object
com.amalgamasimulation.emf.json.EMFJSONSaverAndLoaderFactory<E>
com.amalgamasimulation.emf.json.EMFJSONSaver<E>
All Implemented Interfaces:
EMFLoaderFactory<E>, EMFSaver<E>, EMFSaverAndLoaderFactory<E>, EMFSaverFactory<E>, ErrorsContainer

public class EMFJSONSaver<E extends org.eclipse.emf.ecore.EObject> extends EMFJSONSaverAndLoaderFactory<E> implements EMFSaver<E>
  • Constructor Details

    • EMFJSONSaver

      protected EMFJSONSaver(E rootObject, String filePath)
  • Method Details

    • save

      public boolean save()
      Description copied from interface: EMFSaver
      Saves the data model to a file. Returns true if saving was successful, and false otherwise.
      Specified by:
      save in interface EMFSaver<E extends org.eclipse.emf.ecore.EObject>
      Returns:
      true if saving was successful, and false otherwise.
    • getSaveObstacles

      public List<String> getSaveObstacles()
      Description copied from interface: EMFSaver
      Checks that the data to be saved meets the limitations imposed by the file format.
      Specified by:
      getSaveObstacles in interface EMFSaver<E extends org.eclipse.emf.ecore.EObject>
      Returns:
      List of errors (as String-type messages) that prevent saving data to a file. If no errors are found, an empty list is returned.