Class ModelReader<M extends Model>

  • Type Parameters:
    M - Model to create from reading input files
    Direct Known Subclasses:
    AbstractObjectModelReader, StateModelReader

    public abstract class ModelReader<M extends Model>
    extends Object
    ModelReader TODO real doc :) Created: 26 oct. 2009
    Author:
    Florian Desbois - desbois@codelutin.com
    • Field Detail

      • verbose

        protected boolean verbose
        A verbose flag to see more things.
        Since:
        2.3
      • strictLoading

        protected boolean strictLoading
        A flag to load only safe things. Usefull to have a safe loading of a model and his properties file.
        Since:
        2.3
      • tagValueMetadatasProvider

        protected TagValueMetadatasProvider tagValueMetadatasProvider
        Provider of tag values.
        Since:
        2.9
    • Constructor Detail

      • ModelReader

        public ModelReader()
    • Method Detail

      • getModelType

        public abstract String getModelType()
        Gets the type of model.
        Returns:
        the type of model.
        Since:
        2.6.3
        See Also:
        ModelHelper.ModelType
      • getInputType

        public abstract String getInputType()
        Gets the type of input file. For example xml, or yaml.
        Returns:
        the type of input file.
        Since:
        2.6.3
      • isVerbose

        public boolean isVerbose()
      • setVerbose

        public void setVerbose​(boolean verbose)
      • isStrictLoading

        public boolean isStrictLoading()
      • setStrictLoading

        public void setStrictLoading​(boolean strictLoading)
      • read

        public abstract M read​(File... file)
                        throws IOException
        Read files to produce a memory model.
        Parameters:
        file - files to read
        Returns:
        the new model builded from files
        Throws:
        IOException - if any IO errors while reading files