XDC - v. 0.6.1

net.sf.xdc.processing
Class XdcSourceCollector

java.lang.Object
  extended bynet.sf.xdc.processing.XdcSourceCollector

public class XdcSourceCollector
extends java.lang.Object

The XdcSourceCollector class is used to assemble the possible XML source files specified for processing into XDC documentation.

Since:
0.5
Version:
0.5
Author:
Jens Voß

Constructor Summary
XdcSourceCollector(org.apache.commons.cli.CommandLine commandLine)
          Public constructor.
 
Method Summary
 int getFramesetSize()
          This method is used to determine the number of frames contained in the main frameset of the generated XDC documentation.
 java.io.File getLeadingSourcePath()
          This method returns the directory specified as the first argument of the -sourcepath option.
 java.lang.String[] getPackageNames()
          This method returns an array of the names of all packages containing XML source files specified for processing.
 java.lang.String getSummaryText()
          This method attempts to extract text from an overview file (which is specified by the -overview option and must be placed in of the root directories specified as arguments to the -sourcepath options).
 XdcPackage getXdcPackage(java.lang.String packageName)
          This method retrieves an XdcPackage object specified for processing by the XDC tool.
 XdcSource getXdcSource(java.lang.String sourceName)
          This method retrieves a particular XdcSource by its (fully-qualified) source name.
 XdcSource[] getXdcSources()
          This getter method retrieves all assembled XML source files.
 XdcSource[] getXdcSources(java.lang.String packageName)
          This method retrieves all XdcSource objects contained in an XdcPackage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XdcSourceCollector

public XdcSourceCollector(org.apache.commons.cli.CommandLine commandLine)
Public constructor.

Parameters:
commandLine - The CommandLine containing all option values of the XDC invocation
Method Detail

getXdcSources

public XdcSource[] getXdcSources()
This getter method retrieves all assembled XML source files.

Returns:
All XML source files specified for processing (in the form of an array of XdcSource objects)

getXdcPackage

public XdcPackage getXdcPackage(java.lang.String packageName)
This method retrieves an XdcPackage object specified for processing by the XDC tool.

Parameters:
packageName - The name of the package
Returns:
The XdcPackage with the specified name

getXdcSources

public XdcSource[] getXdcSources(java.lang.String packageName)
This method retrieves all XdcSource objects contained in an XdcPackage.

Parameters:
packageName - The name of the package from which the sources are returned
Returns:
All XML source files (in the form of an array of XdcSource objects) contained in the package with the specified name.

getXdcSource

public XdcSource getXdcSource(java.lang.String sourceName)
This method retrieves a particular XdcSource by its (fully-qualified) source name.

Parameters:
sourceName - The fully-qualified name of the XdcSource to be retrieved
Returns:
The XdcSource with the given name

getLeadingSourcePath

public java.io.File getLeadingSourcePath()
This method returns the directory specified as the first argument of the -sourcepath option. (This value is used as the root directory of the XDC output if no -d option is specified.)

Returns:
The File specified as the first sourcepath

getPackageNames

public java.lang.String[] getPackageNames()
This method returns an array of the names of all packages containing XML source files specified for processing.

Returns:
The names of all collected XdcPackages

getFramesetSize

public int getFramesetSize()
This method is used to determine the number of frames contained in the main frameset of the generated XDC documentation.

Returns:
If sources from just one XdcPackage have been assembled, the method returns 2; otherwise it returns 3.

getSummaryText

public java.lang.String getSummaryText()
This method attempts to extract text from an overview file (which is specified by the -overview option and must be placed in of the root directories specified as arguments to the -sourcepath options).

Returns:
All text placed between the opening and the closing <body> tags of the overview file. Note that this text is returned "raw", i.e. no XDC tags are processed yet.

XDC - v. 0.6.1