Unified Typesetting API M1-20040817

de.inghuimische.uta.qm
Class QualityReport

java.lang.Object
  extended byde.inghuimische.uta.qm.QualityReport

public class QualityReport
extends Object

A quality report is generated and returned by the QualityManager.

The difference of calling the different getFeatures() methods is that the methods are guranteed not to return null. If the script provides no features an empty feature list is returned instead.

Author:
Christian Ziesemer

Field Summary
static int ADVANCED_SUPPORT
          Basic features and at least one more are supported.
static int BASIC_SUPPORT
          This is an absoulte value linked to a given list of features where all basic features are supported not more and not less.
static int FULL_SUPPORT
          Every feature needed for full support is available, this is the highest possible support level.
static int MINIMAL_SUPPORT
          Support for some but not all basic features, additional unkown or advanced features are not honored.
static int NO_SUPPORT
          No known features are supported.
static int UNKOWN_SUPPORT
          It is not possible to calculate the support level, cause either the component, reference list or feature list is null.
 
Constructor Summary
QualityReport(QualityManager aQualityManager, Typesetter aTypesetter)
          Creates a new quality report for the given typesetter.
 
Method Summary
 int justificationSupportLevel()
          Returns the support level of the justification component.
 int linebreakerSupportLevel()
          Returns the support level of the linebreaker component.
 FeatureList linebreakingFeatures()
          Return the features of the linebreaker or an empty list if none.
 FeatureList scriptFeatures(Script aScript)
          Returns the features of the given script or an empty list if it has none.
 int scriptSupportLevel(Locale aLocale)
          Returns the support level for the given locale.
 List supportedLocales()
          Returns a list of supported locales.
 List supportedScripts()
          Returns a list of supported scripts or an empty list if none.
static int supportLevel(ReferenceList reference, QManageable component)
          Utility method comparing the given component with the given reference.
 int typesetterSupportLevel()
          Returns the support level of the typesetter component.
 FeatureList typesettingFeatures()
          Return the features of the typesetter or an empty list if none.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKOWN_SUPPORT

public static final int UNKOWN_SUPPORT
It is not possible to calculate the support level, cause either the component, reference list or feature list is null. This is an absoulte value, there is no information and that's even worse than no support at all.

See Also:
Constant Field Values

NO_SUPPORT

public static final int NO_SUPPORT
No known features are supported. This is an absoulte value, there is absolutly no support.

See Also:
Constant Field Values

MINIMAL_SUPPORT

public static final int MINIMAL_SUPPORT
Support for some but not all basic features, additional unkown or advanced features are not honored. This is a relative value meant for little but not yet basic support.

See Also:
Constant Field Values

BASIC_SUPPORT

public static final int BASIC_SUPPORT
This is an absoulte value linked to a given list of features where all basic features are supported not more and not less. It is only returned by a ReferenceList not by a feature list.

See Also:
Constant Field Values

ADVANCED_SUPPORT

public static final int ADVANCED_SUPPORT
Basic features and at least one more are supported. This is a relative value for extended but not yet full support.

See Also:
Constant Field Values

FULL_SUPPORT

public static final int FULL_SUPPORT
Every feature needed for full support is available, this is the highest possible support level. Additional unkown features are not honored. This is an absoulte value linked to a given list of features where every feature is supported.

See Also:
Constant Field Values
Constructor Detail

QualityReport

public QualityReport(QualityManager aQualityManager,
                     Typesetter aTypesetter)
Creates a new quality report for the given typesetter. The qualtiy manager is needed to retrieve the reference lists.

Parameters:
aQualityManager - The quality manager. Must not be null.
aTypesetter - The typesetter. Must not be null.
Throws:
NullPointerException - If one of the parameters is null.
Method Detail

supportedScripts

public List supportedScripts()
Returns a list of supported scripts or an empty list if none.

Returns:
A list of supported scripts or an empty list if none.

supportedLocales

public List supportedLocales()
Returns a list of supported locales.

Returns:
A list of supported locales.

scriptFeatures

public FeatureList scriptFeatures(Script aScript)
Returns the features of the given script or an empty list if it has none.

Returns:
The features of the given script or an empty list if it has none.

typesettingFeatures

public FeatureList typesettingFeatures()
Return the features of the typesetter or an empty list if none.

Returns:
The features of the typesetter or an empty list if none.

linebreakingFeatures

public FeatureList linebreakingFeatures()
Return the features of the linebreaker or an empty list if none.

Returns:
The features of the linebreaker or an empty list if none.

typesetterSupportLevel

public int typesetterSupportLevel()
Returns the support level of the typesetter component.

Returns:
The support level of the typesetter component.
See Also:
supportLevel(ReferenceList, QManageable)

linebreakerSupportLevel

public int linebreakerSupportLevel()
Returns the support level of the linebreaker component.

Returns:
The support level of the linebreaker component.
See Also:
supportLevel(ReferenceList, QManageable)

justificationSupportLevel

public int justificationSupportLevel()
Returns the support level of the justification component.

Returns:
The support level of the justification component.
See Also:
supportLevel(ReferenceList, QManageable)

scriptSupportLevel

public int scriptSupportLevel(Locale aLocale)
Returns the support level for the given locale.

Returns:
The support level for the given locale.
See Also:
supportLevel(ReferenceList, QManageable)

supportLevel

public static int supportLevel(ReferenceList reference,
                               QManageable component)
Utility method comparing the given component with the given reference. If one of both is null the support level is UNKOWN_SUPPORT. This is also true if the feature list of the component is null. See ReferenceList and FeatureList.getSupportLevel(FeatureList) for how the support level is calculated.

Parameters:
reference - The reference list, maybe null.
component - The component in question.
Returns:
The level of support component provides compared to reference.

Unified Typesetting API M1-20040817


An inghuimische.de project.
Copyright (C) 2004 Christian Ziesemer; See the Mozilla Public License for more details.