Class GenerateCopyrights


  • public class GenerateCopyrights
    extends java.lang.Object
    Generate an HTML file that contains links to the appropriate copyrights for entities in the configuration. This class looks for particular classes, and if the class is found in the classpath, then a corresponding html file is included in the list of copyrights.
    Since:
    Ptolemy II 2.0
    Version:
    $Id$
    Author:
    Christopher Hylands
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String generateHTML​(Configuration configuration)
      Generate HTML about the copyrights for classes that might be present in the configuration.
      static java.lang.String generatePrimaryCopyrightHTML​(Configuration configuration)
      Generate the primary copyright.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GenerateCopyrights

        public GenerateCopyrights()
    • Method Detail

      • generateHTML

        public static java.lang.String generateHTML​(Configuration configuration)
        Generate HTML about the copyrights for classes that might be present in the configuration. This method contains a list of classes and corresponding copyrights. If a class in the list is present, then we generate html that contains a link to the copyright. Note that if the copyright file need not be present on the local machine, we generate a link to the copy on the Ptolemy website.

        If the configuration contains an _applicationName attribute then that attributed is used as the name of the application in the generated text. If _applicationName is not present, then the default name is "Ptolemy II".

        If the configuration contains an _applicationCopyright StringAttribute, then the value of that attributed is used as the location of the copyright html file. If _applicationCopyright is not present, then "ptolemy/configs/doc/copyright.htm" is used.

        If the configuration has a parameter called _applicationCopyrights that is an array of records where each element is a record

          {actor="ptolemy.actor.lib.Foo", copyright="foo.htm"}
          
        then we add that actor/copyright pair to the list of potential copyrights.
        Parameters:
        configuration - The configuration to look for the _applicationName and _applicationCopyright attributes in.
        Returns:
        A String containing HTML that describes what copyrights are used by Entities in the configuration
      • generatePrimaryCopyrightHTML

        public static java.lang.String generatePrimaryCopyrightHTML​(Configuration configuration)
        Generate the primary copyright. Include a link to the other copyrights.
        Parameters:
        configuration - The configuration in which to look for the _applicationName attribute.
        Returns:
        A String containing HTML that describes what copyrights are used by Entities in the configuration