Class SimilarityModelReader

All Implemented Interfaces:
IO, ProCAKEReader

public class SimilarityModelReader extends AbstractXMLReader

SimilarityModelReader class.

Author:
Rainer Maximini
  • Field Details

  • Constructor Details

    • SimilarityModelReader

      public SimilarityModelReader()
  • Method Details

    • getName

      public String getName()
      Each io component must have a name that is used in IOFactory.newIO(String). The name must be unique thus it is usefull to use a short description or to the class name ( this.getClass().getName()).
      Returns:
      Returns the name of the io component.
    • provideHandler

      protected AbstractXMLHandler provideHandler()
      Description copied from class: AbstractXMLReader
      Provides a handler by the subclass in order to be used to create the parser. This should reduce code duplicates.
      Specified by:
      provideHandler in class AbstractXMLReader
      Returns:
      the provided content handler
    • setTargetSimilarityModel

      public void setTargetSimilarityModel(SimilarityModel simModel)
    • setModelDependency

      public void setModelDependency(Model dataModel)
    • isHandlerFor

      public boolean isHandlerFor(Class value)
      Checks if the io component is capable to perform the operation for objects of this class.

      A typical implementation looks like:

       public boolean isHandlerFor(Class value) {
              if (DataObject.class.isAssignableFrom(value))
                      return true;
              return false;
       }
       
      Parameters:
      value - The class that has to be checked.
      Returns:
      Results true if the class can oeprate with the given class.
    • copy

      public IO copy()
      overwritten copy-method from Object; use it to copy a complete operator
      Returns:
    • read

      public Object read() throws CAKEIOException
      Reads the give filename or input source and returns the parsed object.
      Specified by:
      read in interface ProCAKEReader
      Overrides:
      read in class AbstractXMLReader
      Returns:
      Returns the parsed object.
      Throws:
      CAKEIOException