org.eclipse.tigerstripe.workbench.plugins
Interface IDiagramGenerator


public interface IDiagramGenerator

This defines the interface presented to a Tigerstripe Generator for the purposes of manipulating diagrams. The interface provides methods for:

Author:
jworrell

Nested Class Summary
static class IDiagramGenerator.ImageType
          This enum classifies the types of image file that may be created.
 
Field Summary
static java.util.EnumSet<IDiagramDescriptor.DiagramType> DIAGRAM_TYPES
          An EnumSet that collects all available diagram types
 
Method Summary
 boolean generateDiagram(IDiagramDescriptor diagram, java.lang.String outputPath, IDiagramGenerator.ImageType imageType)
          Render the diagram described by the supplied IDiagramDescriptor to the directory at the supplied "outputPath" relative to the output path for the generator, of the supplied "imageType".
 boolean generateDiagram(IDiagramDescriptor path, java.lang.String outputPath, java.lang.String imageType)
          Render the diagram described by the supplied IDiagramDescriptor to the directory at the supplied "outputPath" relative to the output path for the generator, of the supplied "imageType".
 java.util.Collection<IDiagramDescriptor> getAllDiagrams()
          Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation.
 java.util.Collection<IDiagramDescriptor> getAllDiagrams(boolean includeDependencies)
          Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation if the supplied boolean is false, or for all referenced projects also if true.
 java.util.Collection<IDiagramDescriptor> getAllDiagrams(boolean includeDependencies, IDiagramDescriptor.DiagramType diagramType)
          Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation, and in the referenced projects if "includeDependencies" is supplied as true, that are of the type identified by the "diagramType".
 java.util.Collection<IDiagramDescriptor> getAllDiagrams(boolean includeDependencies, IDiagramDescriptor.DiagramType diagramType, IPackageArtifact packij, java.lang.String namePattern)
          Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation, and in the referenced projects if "includeDependencies" is supplied as true, that are of the type identified by the supplied "diagramType", that are in the supplied package, and which match the supplied "namePattern".
 java.util.Collection<IDiagramDescriptor> getAllDiagrams(boolean includeDependencies, IDiagramDescriptor.DiagramType diagramType, java.lang.String namePattern)
          Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation, and in the referenced projects if "includeDependencies" is supplied as true, that are of the type identified by the supplied "diagramType" and which match the supplied "namePattern".
 java.util.Collection<IDiagramDescriptor> getAllDiagrams(boolean includeDependencies, java.lang.String diagramType)
          Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation, and in the referenced projects if "includeDependencies" is supplied as true, that are of the type identified by the "diagramType".
 java.util.Collection<IDiagramDescriptor> getAllDiagrams(boolean includeDependencies, java.lang.String diagramType, IPackageArtifact packij, java.lang.String namePattern)
          Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation, and in the referenced projects if "includeDependencies" is supplied as true, that are of the type identified by the supplied "diagramType", that are in the supplied package, and which match the supplied "namePattern".
 java.util.Collection<IDiagramDescriptor> getAllDiagrams(boolean includeDependencies, java.lang.String diagramType, java.lang.String namePattern)
          Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation, and in the referenced projects if "includeDependencies" is supplied as true, that are of the type identified by the supplied "diagramType" and which match the supplied "namePattern".
 java.util.Collection<IDiagramDescriptor> getAllDiagrams(IDiagramDescriptor.DiagramType diagramType)
          Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation that are of the type identified by the "diagramType".
 java.util.Collection<IDiagramDescriptor> getAllDiagrams(IDiagramDescriptor.DiagramType diagramType, IPackageArtifact packij, java.lang.String namePattern)
          Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation that are of the type identified by the supplied "diagramType", that are in the supplied package, and which match the supplied "namePattern".
 java.util.Collection<IDiagramDescriptor> getAllDiagrams(IDiagramDescriptor.DiagramType diagramType, java.lang.String namePattern)
          Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation that are of the type identified by the supplied "diagramType" and which match the supplied "namePattern".
 java.util.Collection<IDiagramDescriptor> getAllDiagrams(java.lang.String diagramType)
          Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation that are of the type identified by the "diagramType".
 java.util.Collection<IDiagramDescriptor> getAllDiagrams(java.lang.String diagramType, IPackageArtifact packij, java.lang.String namePattern)
          Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation that are of the type identified by the supplied "diagramType", that are in the supplied package, and which match the supplied "namePattern".
 java.util.Collection<IDiagramDescriptor> getAllDiagrams(java.lang.String diagramType, java.lang.String namePattern)
          Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation that are of the type identified by the supplied "diagramType" and which match the supplied "namePattern".
 boolean isDiagramGenerationAvailable()
          Returns the value true if diagram generation is available, that is, if not running in head-less mode.
 

Field Detail

DIAGRAM_TYPES

static final java.util.EnumSet<IDiagramDescriptor.DiagramType> DIAGRAM_TYPES
An EnumSet that collects all available diagram types

Method Detail

isDiagramGenerationAvailable

boolean isDiagramGenerationAvailable()
Returns the value true if diagram generation is available, that is, if not running in head-less mode. By testing the value returned a Generator can be written to generate suitable alternative text.

Returns:
the value true if diagram generation is available

getAllDiagrams

java.util.Collection<IDiagramDescriptor> getAllDiagrams()
Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation.

Returns:
a Collection of all IDiagramDescriptor objects in the project selected for generation

getAllDiagrams

java.util.Collection<IDiagramDescriptor> getAllDiagrams(IDiagramDescriptor.DiagramType diagramType)
Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation that are of the type identified by the "diagramType".

Parameters:
diagramType - the type of diagram to be included in the results, i.e. "class" or "instance"
Returns:
a Collection of all IDiagramDescriptor objects in the project selected for generation that are of the type identified by the "diagramType"

getAllDiagrams

java.util.Collection<IDiagramDescriptor> getAllDiagrams(IDiagramDescriptor.DiagramType diagramType,
                                                        java.lang.String namePattern)
Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation that are of the type identified by the supplied "diagramType" and which match the supplied "namePattern".

Parameters:
diagramType - the type of diagram to be included in the results, i.e. "class" or "instance"
namePattern - the pattern that when matched against the names of the diagrams selects those that will be included in the results
Returns:
a Collection of all IDiagramDescriptor objects in the project selected for generation that are of the type identified by the "diagramType"

getAllDiagrams

java.util.Collection<IDiagramDescriptor> getAllDiagrams(IDiagramDescriptor.DiagramType diagramType,
                                                        IPackageArtifact packij,
                                                        java.lang.String namePattern)
Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation that are of the type identified by the supplied "diagramType", that are in the supplied package, and which match the supplied "namePattern".

Parameters:
diagramType - the type of diagram to be included in the results, i.e. "class" or "instance"
packij - the package in which to search for diagrams
namePattern - the pattern that when matched against the names of the diagrams selects those that will be included in the results
Returns:
a Collection of all IDiagramDescriptor objects in the project selected for generation that are of the type identified by the "diagramType", are in the supplied package , and match the supplied name-pattern

getAllDiagrams

java.util.Collection<IDiagramDescriptor> getAllDiagrams(java.lang.String diagramType)
Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation that are of the type identified by the "diagramType".

Parameters:
diagramType - the type of diagram to be included in the results, i.e. "class" or "instance"
Returns:
a Collection of all IDiagramDescriptor objects in the project selected for generation that are of the type identified by the "diagramType"

getAllDiagrams

java.util.Collection<IDiagramDescriptor> getAllDiagrams(java.lang.String diagramType,
                                                        java.lang.String namePattern)
Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation that are of the type identified by the supplied "diagramType" and which match the supplied "namePattern".

Parameters:
diagramType - the type of diagram to be included in the results, i.e. "class" or "instance"
namePattern - the pattern that when matched against the names of the diagrams selects those that will be included in the results
Returns:
a Collection of all IDiagramDescriptor objects in the project selected for generation that are of the type identified by the "diagramType"

getAllDiagrams

java.util.Collection<IDiagramDescriptor> getAllDiagrams(java.lang.String diagramType,
                                                        IPackageArtifact packij,
                                                        java.lang.String namePattern)
Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation that are of the type identified by the supplied "diagramType", that are in the supplied package, and which match the supplied "namePattern".

Parameters:
diagramType - the type of diagram to be included in the results, i.e. "class" or "instance"
packij - the package in which to search for diagrams
namePattern - the pattern that when matched against the names of the diagrams selects those that will be included in the results
Returns:
a Collection of all IDiagramDescriptor objects in the project selected for generation that are of the type identified by the "diagramType", are in the supplied package , and match the supplied name-pattern

getAllDiagrams

java.util.Collection<IDiagramDescriptor> getAllDiagrams(boolean includeDependencies)
Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation if the supplied boolean is false, or for all referenced projects also if true.

Parameters:
includeDependencies - if supplied as true include diagrams from all referenced projects as well as from the project selected
Returns:
a Collection of all IDiagramDescriptor objects in the project selected for generation

getAllDiagrams

java.util.Collection<IDiagramDescriptor> getAllDiagrams(boolean includeDependencies,
                                                        IDiagramDescriptor.DiagramType diagramType)
Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation, and in the referenced projects if "includeDependencies" is supplied as true, that are of the type identified by the "diagramType".

Parameters:
includeDependencies - if supplied as true include diagrams from all referenced projects as well as from the project selected
diagramType - the type of diagram to be included in the results, i.e. "class" or "instance"
Returns:
a Collection of all IDiagramDescriptor objects in the project selected for generation that are of the type identified by the "diagramType"

getAllDiagrams

java.util.Collection<IDiagramDescriptor> getAllDiagrams(boolean includeDependencies,
                                                        IDiagramDescriptor.DiagramType diagramType,
                                                        java.lang.String namePattern)
Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation, and in the referenced projects if "includeDependencies" is supplied as true, that are of the type identified by the supplied "diagramType" and which match the supplied "namePattern".

Parameters:
includeDependencies - if supplied as true include diagrams from all referenced projects as well as from the project selected
diagramType - the type of diagram to be included in the results, i.e. "class" or "instance"
namePattern - the pattern that when matched against the names of the diagrams selects those that will be included in the results
Returns:
a Collection of all IDiagramDescriptor objects in the project selected for generation that are of the type identified by the "diagramType"

getAllDiagrams

java.util.Collection<IDiagramDescriptor> getAllDiagrams(boolean includeDependencies,
                                                        IDiagramDescriptor.DiagramType diagramType,
                                                        IPackageArtifact packij,
                                                        java.lang.String namePattern)
Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation, and in the referenced projects if "includeDependencies" is supplied as true, that are of the type identified by the supplied "diagramType", that are in the supplied package, and which match the supplied "namePattern".

Parameters:
includeDependencies - if supplied as true include diagrams from all referenced projects as well as from the project selected
diagramType - the type of diagram to be included in the results, i.e. "class" or "instance"
packij - the package in which to search for diagrams
namePattern - the pattern that when matched against the names of the diagrams selects those that will be included in the results
Returns:
a Collection of all IDiagramDescriptor objects in the project selected for generation that are of the type identified by the "diagramType", are in the supplied package , and match the supplied name-pattern

getAllDiagrams

java.util.Collection<IDiagramDescriptor> getAllDiagrams(boolean includeDependencies,
                                                        java.lang.String diagramType)
Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation, and in the referenced projects if "includeDependencies" is supplied as true, that are of the type identified by the "diagramType".

Parameters:
includeDependencies - if supplied as true include diagrams from all referenced projects as well as from the project selected
diagramType - the type of diagram to be included in the results, i.e. "class" or "instance"
Returns:
a Collection of all IDiagramDescriptor objects in the project selected for generation that are of the type identified by the "diagramType"

getAllDiagrams

java.util.Collection<IDiagramDescriptor> getAllDiagrams(boolean includeDependencies,
                                                        java.lang.String diagramType,
                                                        java.lang.String namePattern)
Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation, and in the referenced projects if "includeDependencies" is supplied as true, that are of the type identified by the supplied "diagramType" and which match the supplied "namePattern".

Parameters:
includeDependencies - if supplied as true include diagrams from all referenced projects as well as from the project selected
diagramType - the type of diagram to be included in the results, i.e. "class" or "instance"
namePattern - the pattern that when matched against the names of the diagrams selects those that will be included in the results
Returns:
a Collection of all IDiagramDescriptor objects in the project selected for generation that are of the type identified by the "diagramType"

getAllDiagrams

java.util.Collection<IDiagramDescriptor> getAllDiagrams(boolean includeDependencies,
                                                        java.lang.String diagramType,
                                                        IPackageArtifact packij,
                                                        java.lang.String namePattern)
Returns a Collection of all IDiagramDescriptor objects (each of which contains the data necessary to identify a diagram) in the project selected for generation, and in the referenced projects if "includeDependencies" is supplied as true, that are of the type identified by the supplied "diagramType", that are in the supplied package, and which match the supplied "namePattern".

Parameters:
includeDependencies - if supplied as true include diagrams from all referenced projects as well as from the project selected
diagramType - the type of diagram to be included in the results, i.e. "class" or "instance"
packij - the package in which to search for diagrams
namePattern - the pattern that when matched against the names of the diagrams selects those that will be included in the results
Returns:
a Collection of all IDiagramDescriptor objects in the project selected for generation that are of the type identified by the "diagramType", are in the supplied package , and match the supplied name-pattern

generateDiagram

boolean generateDiagram(IDiagramDescriptor diagram,
                        java.lang.String outputPath,
                        IDiagramGenerator.ImageType imageType)
Render the diagram described by the supplied IDiagramDescriptor to the directory at the supplied "outputPath" relative to the output path for the generator, of the supplied "imageType".

Parameters:
diagram - the IDiagramdescriptor that describes the diagram to be rendered
outputPath - the path, relative to the output path for the generator, into which the image file should be placed
imageType - the type of the image file required, i.e. JPEG or GIF
Returns:
the value true if the diagram was rendered successfully

generateDiagram

boolean generateDiagram(IDiagramDescriptor path,
                        java.lang.String outputPath,
                        java.lang.String imageType)
Render the diagram described by the supplied IDiagramDescriptor to the directory at the supplied "outputPath" relative to the output path for the generator, of the supplied "imageType".

Parameters:
diagram - the IDiagramdescriptor that describes the diagram to be rendered
outputPath - the path, relative to the output path for the generator, into which the image file should be placed
imageType - the type of the image file required, i.e. JPEG or GIF
Returns:
the value true if the diagram was rendered successfully