Unified Typesetting API M1-20040817

de.inghuimische.uta.qm
Class ReferenceList

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

public class ReferenceList
extends Object

A reference list describes which features a particulary script must implement to fulfil basic or all requirements. While in many scripts ligatures are an optional "eye candy" and therefore full-feature other scripts need them for even simple requirements.

A reference list compares a given feature list with to internal feature list. There is one basic and one full feature list. If the given list contains all (or more) features from the full list the script has a support level of QualityReport.FULL_SUPPORT. If the list contains all and more than the basic list the level is QualityReport.ADVANCED_SUPPORT, if the list has exactly the same features as the basic list the support level is QualityReport.BASIC_SUPPORT, if only a subset is supported support is QualityReport.MINIMAL_SUPPORT, QualityReport.NO_SUPPORT if feature list has length zero and the reference list has a length >0 and finally QualityReport.UNKOWN_SUPPORT if the feature list is null.

Providing Reference Lists

Although UTA has currently no class for reading reference lists from an XML file it is strongly recommended to define them in XML. This ensures that they are not hard-coded and can be reused. The following is how the XML file should look like. DTD or Schema to come...

 <?xml version="1.0"?>
 <UTA version="1.0">
    <referenceList>
       <script locale="de_DE">
          <featureList support="basic">
             <feature key="aKey" />
             <feature key="anotherKey" />
             ...
          </featureList>
          <featureList support="full">
             <feature key="aKey" />
             <feature key="anotherKey" />
             ...
          </featureList>
       </script>
    </referenceList>
    <referenceList>
       <linebreaker>
          ...
       </linebreaker>
    </referenceList>
   <referenceList>
       <typesetter>
          ...
       </typesetter>
   </referenceList>
 </UTA>
 

Author:
Christian Ziesemer
See Also:
FeatureList

Constructor Summary
ReferenceList()
          Creates a new reference list without any features.
ReferenceList(FeatureList basicFeatures, FeatureList fullFeatures)
          Creates a new reference list with the given basic and full features.
 
Method Summary
 int getSupportLevel(FeatureList features)
          Calculates the support level of the given feature list.
 void setBasicFeatures(FeatureList features)
          Sets the list of basic features.
 void setFullFeatures(FeatureList features)
          Sets the list of full features.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceList

public ReferenceList()
Creates a new reference list without any features.


ReferenceList

public ReferenceList(FeatureList basicFeatures,
                     FeatureList fullFeatures)
Creates a new reference list with the given basic and full features.

Parameters:
basicFeatures - The list of features treated as basic ones.
fullFeatures - The list of features which describe full support.
Method Detail

getSupportLevel

public int getSupportLevel(FeatureList features)
Calculates the support level of the given feature list. The support level is a measure how well the list supports the features of this reference list. Compare the class comment for the return values.

Parameters:
features - The feature list to compare with this reference.
Returns:
Compare the class comment for the return values.

setBasicFeatures

public void setBasicFeatures(FeatureList features)
Sets the list of basic features. A component has to implement all of the basic features to reach basic-support level.

Parameters:
features - The list of basic features.

setFullFeatures

public void setFullFeatures(FeatureList features)
Sets the list of full features. A component has to implement all of the full features to reach full-support level.

Parameters:
features - The list of full features.

Unified Typesetting API M1-20040817


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