Class StereotypeApplicationListener

java.lang.Object
org.palladiosimulator.simulizar.measuringpoint.create.StereotypeApplicationListener
All Implemented Interfaces:
EventListener, IResourceChangeListener

public class StereotypeApplicationListener extends Object implements IResourceChangeListener
  • Field Details

  • Constructor Details

    • StereotypeApplicationListener

      public StereotypeApplicationListener(Set<String> currentIds)
  • Method Details

    • resourceChanged

      public void resourceChanged(IResourceChangeEvent event)
      Responding to the change of a resource. In this case we find all the profile application files concerning measuring point stereotypes. We create a measuring point per measuring point stereotype application.
      Specified by:
      resourceChanged in interface IResourceChangeListener
    • getParsedDocument

      public static Document getParsedDocument(IResource r) throws ParserConfigurationException, SAXException, IOException
      Parses the document represented by the resource.
      Parameters:
      r - the resource that represents the document which should be parsed.
      Returns:
      parsed document.
      Throws:
      ParserConfigurationException - exception thrown if the document could not be parsed.
      SAXException - an exception thrown by the SAX.
      IOException - an exception indicating some IO operation on the resource could not be performed correctly.
    • createMeasuringPoint

      public void createMeasuringPoint(String resourceURI) throws IOException
      Creating a ResourceURIMeasuringPoint file with the specified file name and the resourceURI of the element for which we want to create a measuring point.
      Parameters:
      fileName - name of the file to created that represents the measuring point.
      resourceURI - resourceURI of the element for which we create a measuring point.
      Throws:
      IOException - indicates that there was a problem with saving the resource.