javax.media.jai
Class OperationRegistry

java.lang.Object
  |
  +--javax.media.jai.OperationRegistry
All Implemented Interfaces:
Externalizable, Serializable

public class OperationRegistry
extends Object
implements Externalizable

A class responsible for maintaining a registry of various types of factory objects and preferences among them. The operation registry hierarchy looks as follows


                                                      |-object1-
                                           |-product1-|-object2-
                             |-descriptor1-|          |-object3-
                             |             |
                             |             |          |-object1-
                             |             |-product2-|-object2-
                     |-mode1-|                        |-object3-
                     |       |
 |-OperationRegistry-|       |                        |-object1-
                     |       |             |-product1-|-object2-
                     |       |-descriptor2-|          |-object3-
                     |                     |
                     |                     |          |-object1-
                     |                     |-product2-|-object2-
                     |                                |-object3-
                     |
                     |-mode2-|-descriptor1-|-object1--
                             |
                             |-descriptor2-|-object1--
 

The OperationRegistry class maps a descriptor name (for example, an image operation name) into the particular kind of factory object requested, capable of implementing the functionality described by the descriptor. The mapping is constructed in several stages:

At the highest level all objects are registered against some mode. A mode is specified by a String which must be one of those returned by RegistryMode.getModeNames(). Examples of known registry modes include "rendered", "renderable", "collection", "renderableCollection", "tileEncoder", "tileDecoder", "remoteRendered", "remoteRenderable", etc.

Each registry mode is associated with a RegistryElementDescriptor which describes some functionality to be implemented by factory objects associated with this descriptor. For example, the "rendered" registry mode is associated with OperationDescriptor.class and "tileEncoder" is associated with TileCodecDescriptor.class. Different registry modes can share the same RegistryElementDescriptor. For example "rendered", "renderable" (and other image operation registry modes) are all associated with OperationDescriptor.class.

If a registry mode supports preferences (for example "rendered", "tileEncoder" etc.), then the hierarchy of objects registered under that mode looks like that of "mode1" above. Descriptors are first registered against all modes that the specific instance supports. Each factory object that implements the functionality specified by that descriptor is registered against some product (name) under that descriptor. Preferences can be set among products under a given descriptor or among objects under a specific product/descriptor.

The ordering of such factory objects is determined by the order of the products attached to an OperationDescriptor, and by the order of the factory objects within each product. The orders are established by setting pairwise preferences, resulting in a partial order which is then sorted topologically. The results of creating a cycle are undefined.

The ordering of factory objects within a product is intended to allow vendors to create complex "fallback" chains. An example would be installing a RenderedImageFactory that implements separable convolution ahead of a RenderedImageFactory that implements a more general algorithm.

If a registry mode does not support preferences (for example, "renderable", "remoteRenderable" etc.) then the hierarchy of objects registered under that mode looks like that of "mode2" above. Only a single factory object belonging to this mode can be associated with a given descriptor. If multiple objects are registered under the same descriptor, the last one registered is retained.

The OperationRegistry has several methods to manage this hierarchy, which accept a modeName and work with Objects. The preferred manner of usage is through the type-safe wrapper class which are specific to each mode (for example RIFRegistry, CRIFRegistry etc.)

Vendors are encouraged to use unique product names (by means of the Java programming language convention of reversed Internet addresses) in order to maximize the likelihood of clean installation. See The Java Programming Language, §10.1 for a discussion of this convention in the context of package naming.

Users will, for the most part, only wish to set ordering preferences on the product level, since the factory object level orderings will be complex. However, it is possible for a knowledgable user to insert a specific factory object into an existing product for tuning purposes.

The OperationRegistry also has the responsibility of associating a set of PropertyGenerators with each descriptor. This set will be coalesced into a PropertySource suitable for use by the getPropertySource() method. If several PropertyGenerators associated with a particular descriptor generate the same property, only the last one to be registered will have any effect.

The registry handles all names (except class names) in a case-insensitive but retentive manner.

Initialization and automatic loading of registry objects.

The user has two options for automatic loading of registry objects.

The initialization of the OperationRegistry of the default instance of JAI happens as follows

  1. Load the JAI distributed registry file "META-INF/javax.media.jai.registryFile.jai" (from jai_core.jar)
  2. Find and load all "META-INF/registryFile.jai" files found in the classpath in some arbitrary order.
  3. Look for registered service providers of OperationRegistrySpi listed in all "META-INF/services/javax.media.jai.OperationRegistrySpi" files found in the classpath and call their updateRegistry method passing in the default OperationRegistry. The order of these calls to updateRegistry is arbitrary.
Note that the user should not make any assumption about the order of loading WITHIN step 2 or 3. If there is a need for the updateRegistry method to be called right after the associated registryFile.jai is read in, the following could be done.

The user could give the registry file a package qualified name for e.g xxx.yyy.registryFile.jai and put this in the META-INF directory of the jar file. Then in the concrete class that implements OperationRegistrySpi

  void updateRegistry(OperationRegistry or) {
      String registryFile = "META-INF/xxx.yyy.registryFile.jai";
      InputStream is = ClassLoader.getResourceAsStream(registryFile);

      or.updateFromStream(is);

      // Make other changes to "or" ...
  }
 
For information on the format of the registry file, see the serialized form of the OperationRegistry.

See Also:
OperationRegistrySpi, RegistryMode, RegistryElementDescriptor, Serialized Form

Constructor Summary
OperationRegistry()
          Default Constructor.
 
Method Summary
 void addPropertyGenerator(String operationName, PropertyGenerator generator)
          Deprecated. as of JAI 1.1 in favor of the version where the modeName is explicitly specified. This is currently equivalent to addPropertyGenerator("rendered", ...)
 void addPropertyGenerator(String modeName, String descriptorName, PropertyGenerator generator)
          Adds a PropertyGenerator to the registry, associating it with a particular descriptor registered against a registry mode.
 void clearCIFPreferences(String operationName, String productName)
          Deprecated. as of JAI 1.1 in favor of CIFRegistry.clearPreferences(...) . This is currently equivalent to CIFRegistry.clearPreferences(this, operationName, productName)
 void clearFactoryPreferences(String modeName, String descriptorName, String productName)
          Removes all preferences between instances of a factory within a product registered under a particular OperationDescriptor.
 void clearOperationPreferences(String operationName, String productName)
          Deprecated. as of JAI 1.1 in favor of calling *IFRegistry.clearPreferences(..) on all image operation related modes.
 void clearProductPreferences(String operationName)
          Deprecated. as of JAI 1.1 in favor of clearProductPreferences(...) which specifies a modeName also. This is currently equivalent to clearProductPreferences("rendered", operationName)
 void clearProductPreferences(String modeName, String descriptorName)
          Remove all the preferences between products for a descriptor registered under a registry mode.
 void clearPropertyState()
          Deprecated. as of JAI 1.1 in factor of the version where the modeName is explicitly specified. This is currently equivalent to clearPropertyState("rendered")
 void clearPropertyState(String modeName)
          Removes all property associated information for this registry mode from this OperationRegistry.
 void clearRIFPreferences(String operationName, String productName)
          Deprecated. as of JAI 1.1 in favor of RIFRegistry.clearPreferences(...) . This is currently equivalent to RIFRegistry.clearPreferences(this, operationName, productName)
 void copyPropertyFromSource(String operationName, String propertyName, int sourceIndex)
          Deprecated. as of JAI 1.1 in favor of the version where the modeName is explicitly specified. This is currently equivalent to copyPropertyFromSource("rendered", ...)
 void copyPropertyFromSource(String modeName, String descriptorName, String propertyName, int sourceIndex)
          Forces a property to be copied from the specified source by nodes performing a particular operation.
 PlanarImage create(String operationName, ParameterBlock paramBlock, RenderingHints renderHints)
          Deprecated. as of JAI 1.1 in favor of RIFRegistry.create(...) which returns a RenderedImage and not a PlanarImage. This is currently equivalent to PlanarImage.wrapRenderedImage(RIFRegistry.create(this, operationName, paramBlock, renderHints))
 CollectionImage createCollection(String operationName, ParameterBlock args, RenderingHints hints)
          Deprecated. as of JAI 1.1 in favor of CIFRegistry.create(...) . This is currently equivalent to CIFRegistry.create(this, operationName, args, hints))
 ContextualRenderedImageFactory createRenderable(String operationName, ParameterBlock paramBlock)
          Deprecated. as of JAI 1.1 in favor of CRIFRegistry.get(...) This is currently equivalent to CRIFRegistry.get(this, operationName)
 RegistryElementDescriptor getDescriptor(Class descriptorClass, String descriptorName)
          Get the RegistryElementDescriptor corresponding to a descriptorClass and a descriptorName.
 RegistryElementDescriptor getDescriptor(String modeName, String descriptorName)
          Get the RegistryElementDescriptor corresponding to descriptorName which supports the specified mode.
 String[] getDescriptorNames(Class descriptorClass)
          Get an array of all the descriptor names corresponding to the descriptorClass.
 String[] getDescriptorNames(String modeName)
          Get an array of all descriptor-names of descriptors registered under a given registry mode.
 List getDescriptors(Class descriptorClass)
          Get a List of all RegistryElementDescriptor corresponding to the descriptorClass.
 List getDescriptors(String modeName)
          Get a list of all RegistryElementDescriptors registered under a given registry mode.
 Object getFactory(String modeName, String descriptorName)
          Returns the factory of the specified type for the named operation.
 Iterator getFactoryIterator(String modeName, String descriptorName)
          Returns an Iterator over all factory objects registered with the specified factory and operation names over all products.
 Object[][] getFactoryPreferences(String modeName, String descriptorName, String productName)
          Get all pairwise preferences between instances of a factory within a product registered under a particular OperationDescriptor.
 String[] getGeneratedPropertyNames(String operationName)
          Deprecated. as of JAI 1.1 in favor of the version where the modeName is explicitly specified. This is currently equivalent to getGeneratedPropertyNames("rendered", ...)
 String[] getGeneratedPropertyNames(String modeName, String descriptorName)
          Returns a list of the properties generated by nodes implementing the descriptor associated with a particular descriptor Name.
 OperationDescriptor getOperationDescriptor(String operationName)
          Deprecated. as of JAI 1.1 in favor of getDescriptor(...) where the mode name is explicitly specified.
 Vector getOperationDescriptors()
          Deprecated. as of JAI 1.1 in favor of getDescriptors( OperationDescriptor.class) which returns a List and not a Vector. This is currently equivalent to new Vector(getDescriptors(OperationDescriptor.class))
 String[] getOperationNames()
          Deprecated. as of JAI 1.1 in favor of getDescriptorNames( OperationDescriptor.class).
 Vector getOrderedCIFList(String operationName, String productName)
          Deprecated. as of JAI 1.1 in favor of CIFRegistry.getOrderedList(...) which returns a List and not a Vector. This is currently equivalent to new Vector(CIFRegistry.getOrderedList(this, operationName, productName))
 List getOrderedFactoryList(String modeName, String descriptorName, String productName)
          Returns a list of the factory instances of a product registered under a particular OperationDescriptor, in an ordering that satisfies all of the pairwise preferences that have been set.
 Vector getOrderedProductList(String operationName)
          Deprecated. as of JAI 1.1 in favor of getOrderedProductList(...) which accepts a modeName also. This is currently equivalent to getOrderedProductList("rendered", operationName)
 Vector getOrderedProductList(String modeName, String descriptorName)
          Returns a list of the products registered under a particular descriptor in an ordering that satisfies all of the pairwise preferences that have been set.
 Vector getOrderedRIFList(String operationName, String productName)
          Deprecated. as of JAI 1.1 in favor of RIFRegistry.getOrderedList(...) which returns a List and not a Vector. This is currently equivalent to new Vector(RIFRegistry.getOrderedList(this, operationName, productName))
 String[][] getProductPreferences(String operationName)
          Deprecated. as of JAI 1.1 in favor of getProductPreferences(...) which accepts a modeName also. This is currently equivalent to getProductPreferences("rendered", operationName)
 String[][] getProductPreferences(String modeName, String descriptorName)
          Returns a list of the pairwise product preferences under a particular descriptor registered against a registry mode.
 PropertySource getPropertySource(OperationNode op)
          Constructs and returns a PropertySource suitable for use by a given OperationNode.
 PropertySource getPropertySource(RenderableOp op)
          Deprecated. as of JAI 1.1 in favor CRIFRegistry.getPropertySource(op)
 PropertySource getPropertySource(RenderedOp op)
          Deprecated. as of JAI 1.1 in favor RIFRegistry.getPropertySource(op)
 PropertySource getPropertySource(String modeName, String descriptorName, Object op, Vector sources)
          Merge mode-specific property environment with mode-independent property environment of the descriptor.
 String[] getRegistryModes()
          Get's the list of known registry modes known to the OperationRegistry.
static OperationRegistry getThreadSafeOperationRegistry()
          Creates and returns a new thread-safe version of the OperationRegistry which uses reader-writer locks to wrap every method with a read or a write lock as appropriate.
 void initializeFromStream(InputStream in)
          Initializes the OperationRegistry from an InputStream.
 Object invokeFactory(String modeName, String descriptorName, Object[] args)
          Finds the factory of the specified type for the named operation and invokes its default factory method with the supplied parameters.
 void readExternal(ObjectInput in)
          Restores the contents of the registry from an ObjectInput which was previously written using the writeExternal method.
 void registerCIF(String operationName, String productName, CollectionImageFactory CIF)
          Deprecated. as of JAI 1.1 in favor of CIFRegistry.register(...) . This is currently equivalent to CIFRegistry.register(this, operationName, productName, CIF)
 void registerCRIF(String operationName, ContextualRenderedImageFactory CRIF)
          Deprecated. as of JAI 1.1 in favor of CRIFRegistry.register(...) . This is currently equivalent to CRIFRegistry.register(this, operationName, productName, CRIF)
 void registerDescriptor(RegistryElementDescriptor descriptor)
          Register a descriptor against all the registry modes it supports.
 void registerFactory(String modeName, String descriptorName, String productName, Object factory)
          Register a factory object with a particular product and descriptor against a specified mode.
 void registerOperationDescriptor(OperationDescriptor odesc, String operationName)
          Deprecated. as of JAI 1.1 in favor of registerDescriptor(odesc)
 void registerRIF(String operationName, String productName, RenderedImageFactory RIF)
          Deprecated. as of JAI 1.1 in favor of RIFRegistry.register(...) . This is currently equivalent to RIFRegistry.register(this, operationName, productName, RIF)
 void registerServices(ClassLoader cl)
          Load all the "META-INF/registryFile.jai" files and then called the updateRegistry() of the registered service provider of OperationRegistrySpi found in the classpath corresponding to this class loader.
 void removePropertyGenerator(String operationName, PropertyGenerator generator)
          Deprecated. as of JAI 1.1 in favor of the version where the modeName is explicitly specified. This is currently equivalent to removePropertyGenerator("rendered", ...)
 void removePropertyGenerator(String modeName, String descriptorName, PropertyGenerator generator)
          Removes a PropertyGenerator from its association with a particular descriptor/registry-mode in the registry.
 void removeRegistryMode(String modeName)
          Remove a registry mode (including pre-defined JAI modes) from the OperationRegistry.
 void setCIFPreference(String operationName, String productName, CollectionImageFactory preferredCIF, CollectionImageFactory otherCIF)
          Deprecated. as of JAI 1.1 in favor of CIFRegistry.setPreference(...) . This is currently equivalent to CIFRegistry.setPreference(this, operationName, productName, preferredCIF, otherCIF)
 void setFactoryPreference(String modeName, String descriptorName, String productName, Object preferredOp, Object otherOp)
          Sets a preference between two factory instances for a given operation under a specified product.
 void setProductPreference(String operationName, String preferredProductName, String otherProductName)
          Deprecated. as of JAI 1.1 in favor of setProductPreference(...) which specifies a modeName also. This is currently equivalent to setProductPreference("rendered", operationName, preferredProductName, otherProductName)
 void setProductPreference(String modeName, String descriptorName, String preferredProductName, String otherProductName)
          Set the preference between two products for a descriptor registered under a registry mode.
 void setRIFPreference(String operationName, String productName, RenderedImageFactory preferredRIF, RenderedImageFactory otherRIF)
          Deprecated. as of JAI 1.1 in favor of RIFRegistry.setPreference(...) . This is currently equivalent to RIFRegistry.setPreference(this, operationName, productName, preferredRIF, otherRIF)
 void suppressAllProperties(String operationName)
          Deprecated. as of JAI 1.1 in favor of the version where the modeName is explicitly specified. This is currently equivalent to suppressAllProperties("rendered", ...)
 void suppressAllProperties(String modeName, String descriptorName)
          Forces all properties to be suppressed by nodes performing a particular operation.
 void suppressProperty(String operationName, String propertyName)
          Deprecated. as of JAI 1.1 in favor of the version where the modeName is explicitly specified. This is currently equivalent to suppressProperty("rendered", ...)
 void suppressProperty(String modeName, String descriptorName, String propertyName)
          Forces a particular property to be suppressed by nodes performing a particular operation.
 String toString()
          Returns a String representation of the registry.
 void unregisterCIF(String operationName, String productName, CollectionImageFactory CIF)
          Deprecated. as of JAI 1.1 in favor of CIFRegistry.unregister(...) . This is currently equivalent to CIFRegistry.unregister(this, operationName, productName, CIF)
 void unregisterCRIF(String operationName, ContextualRenderedImageFactory CRIF)
          Deprecated. as of JAI 1.1 in favor of CRIFRegistry.unregister(...) . This is currently equivalent to CRIFRegistry.unregister(this, operationName, productName, CRIF)
 void unregisterDescriptor(RegistryElementDescriptor descriptor)
          Unregister a descriptor against all its supported modes from the operation registry.
 void unregisterFactory(String modeName, String descriptorName, String productName, Object factory)
          Unregister a factory object previously registered with a product and descriptor against the specified mode.
 void unregisterOperationDescriptor(String operationName)
          Deprecated. as of JAI 1.1 in favor of unregisterDescriptor(...) which accepts an OperationDescriptor and not a operationName.
 void unregisterRIF(String operationName, String productName, RenderedImageFactory RIF)
          Deprecated. as of JAI 1.1 in favor of RIFRegistry.unregister(...) . This is currently equivalent to RIFRegistry.unregister(this, operationName, productName, RIF)
 void unsetCIFPreference(String operationName, String productName, CollectionImageFactory preferredCIF, CollectionImageFactory otherCIF)
          Deprecated. as of JAI 1.1 in favor of CIFRegistry.unsetPreference(...) . This is currently equivalent to CIFRegistry.unsetPreference(this, operationName, productName, preferredCIF, otherCIF)
 void unsetFactoryPreference(String modeName, String descriptorName, String productName, Object preferredOp, Object otherOp)
          Unsets a preference between two factory instances for a given operation under a specified product.
 void unsetProductPreference(String operationName, String preferredProductName, String otherProductName)
          Deprecated. as of JAI 1.1 in favor of unsetProductPreference(...) which specifies a modeName also. This is currently equivalent to unsetProductPreference("rendered", operationName, preferredProductName, otherProductName)
 void unsetProductPreference(String modeName, String descriptorName, String preferredProductName, String otherProductName)
          Remove the preference between two products for a descriptor registered under a registry mode.
 void unsetRIFPreference(String operationName, String productName, RenderedImageFactory preferredRIF, RenderedImageFactory otherRIF)
          Deprecated. as of JAI 1.1 in favor of RIFRegistry.unsetPreference(...) . This is currently equivalent to RIFRegistry.unsetPreference(this, operationName, productName, preferredRIF, otherRIF)
 void updateFromStream(InputStream in)
          Updates the current OperationRegistry with the operations specified by the given InputStream.
 void writeExternal(ObjectOutput out)
          Saves the contents of the registry as described in the serialized form.
 void writeToStream(OutputStream out)
          Writes out the contents of the OperationRegistry to a stream as specified in the writeExternal method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OperationRegistry

public OperationRegistry()
Default Constructor. The OperationRegistry created is not thread-safe. Note that none of the automatic loading of registry files or services happens here.
See Also:
getThreadSafeOperationRegistry()
Method Detail

getThreadSafeOperationRegistry

public static OperationRegistry getThreadSafeOperationRegistry()
Creates and returns a new thread-safe version of the OperationRegistry which uses reader-writer locks to wrap every method with a read or a write lock as appropriate. Note that none of the automatic loading of registry files or services is done on this OperationRegistry.
Since:
JAI 1.1

toString

public String toString()
Returns a String representation of the registry.
Overrides:
toString in class Object
Returns:
the string representation of this OperationRegistry.

writeToStream

public void writeToStream(OutputStream out)
                   throws IOException
Writes out the contents of the OperationRegistry to a stream as specified in the writeExternal method. For more information see the serialized form.
Parameters:
out - The OutputStream to which the OperationRegistry state is written.
Throws:
IllegalArgumentException - if out is null.
See Also:
writeExternal(java.io.ObjectOutput)

initializeFromStream

public void initializeFromStream(InputStream in)
                          throws IOException
Initializes the OperationRegistry from an InputStream. All non-IO exceptions encountered while parsing the registry files are caught and their error messages are redirected to System.err. If System.err is null the error messages will never be seen.

The InputStream passed in will not be closed by this method, the caller should close the InputStream when it is no longer needed.

The format of the data from the InputStream is expected to be the same as that of the writeExternal method as specified in the serialized form.

Parameters:
in - The InputStream from which to read the data.
Throws:
IllegalArgumentException - if in is null.
See Also:
writeExternal(java.io.ObjectOutput)

updateFromStream

public void updateFromStream(InputStream in)
                      throws IOException
Updates the current OperationRegistry with the operations specified by the given InputStream. All non-IO exceptions encountered while parsing the registry files are caught and their error messages are redirected to System.err. If System.err is null the error messages will never be seen.

The InputStream passed in will not be closed by this method, the caller should close the InputStream when it is no longer needed.

The format of the data from the InputStream is expected to be the same as that of the writeExternal method as specified in the serialized form.

Parameters:
in - The InputStream from which to read the data.
Throws:
IllegalArgumentException - if in is null.
Since:
JAI 1.1
See Also:
writeExternal(java.io.ObjectOutput)

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Restores the contents of the registry from an ObjectInput which was previously written using the writeExternal method.

All non-IO exceptions encountered while parsing the registry files are caught and their error messages are redirected to System.err. If System.err is null the error messages will never be seen.

Specified by:
readExternal in interface Externalizable
Parameters:
in - An ObjectInput from which to read the data.
Throws:
IllegalArgumentException - if in is null.
See Also:
writeExternal(java.io.ObjectOutput)

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Saves the contents of the registry as described in the serialized form.
Specified by:
writeExternal in interface Externalizable
Parameters:
out - An ObjectOutput to which to write the data.
Throws:
IllegalArgumentException - if out is null.

removeRegistryMode

public void removeRegistryMode(String modeName)
Remove a registry mode (including pre-defined JAI modes) from the OperationRegistry. When a mode is removed, all associated descriptors are also removed unless associated with another mode. Note that this does not unregister or remove this mode from RegistryMode Also note that a registry mode need not be explicitly added to the OperationRegistry. All modes registered under RegistryMode are automatically recognized by the OperationRegistry.
Throws:
IllegalArgumentException - if modeName is null or if the modeName is not one of the modes returned RegistryMode.getModes()
Since:
JAI 1.1

getRegistryModes

public String[] getRegistryModes()
Get's the list of known registry modes known to the OperationRegistry. This might not be all modes listed in RegistryMode.getModeNames().
Since:
JAI 1.1

registerDescriptor

public void registerDescriptor(RegistryElementDescriptor descriptor)
Register a descriptor against all the registry modes it supports. The "descriptor" must be an instance of the RegistryMode.getDescriptorClass() The "descriptor" is keyed on descriptor.getName(). Only one descriptor can be registered against a descriptor name for a given mode.
Parameters:
descriptor - an instance of a concrete sub-class of RegistryElementDescriptor
Throws:
IllegalArgumentException - is descriptor is null
IllegalArgumentException - if any of the modes returned by descriptor.getSupportedModes() is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if another descriptor with the same name has already been registered against any of the modes supported by this descriptor.
Since:
JAI 1.1

unregisterDescriptor

public void unregisterDescriptor(RegistryElementDescriptor descriptor)
Unregister a descriptor against all its supported modes from the operation registry.
Parameters:
descriptor - an instance of a concrete sub-class of RegistryElementDescriptor
Throws:
IllegalArgumentException - is descriptor is null
IllegalArgumentException - if any of the modes returned by descriptor.getSupportedModes() is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if any of the PropertyGenerators associated with the RegistryElementDescriptor to be unregistered is null.
Since:
JAI 1.1

getDescriptor

public RegistryElementDescriptor getDescriptor(Class descriptorClass,
                                               String descriptorName)
Get the RegistryElementDescriptor corresponding to a descriptorClass and a descriptorName. For example, getDescriptor(OperationDescriptor.class, "add") would get the operation descriptor for the "add" image operation. Note that different descriptors might have been registered against each mode associated with the descriptorClass. In this case this methods will arbitrarily return the first descriptor it encounters with a matching descriptorName and descriptorClass.
Parameters:
descriptorClass - the descriptor Class
descriptorName - the descriptor name as a String
Throws:
IllegalArgumentException - if descriptorClass is null or if the descriptorClass is not associated with any of the modes returned RegistryMode.getModes()
IllegalArgumentException - if descriptorName is null
Since:
JAI 1.1

getDescriptors

public List getDescriptors(Class descriptorClass)
Get a List of all RegistryElementDescriptor corresponding to the descriptorClass. For example, getDescriptors(OperationDescriptor.class) would get a list of all image operation descriptors.
Parameters:
descriptorClass - the descriptor Class
Throws:
IllegalArgumentException - if descriptorClass is null or if the descriptorClass is not associated with any of the modes returned RegistryMode.getModes()
Since:
JAI 1.1

getDescriptorNames

public String[] getDescriptorNames(Class descriptorClass)
Get an array of all the descriptor names corresponding to the descriptorClass. For example, getDescriptorNames(OperationDescriptor.class) would get an array of all image operation descriptor names.
Parameters:
descriptorClass - the descriptor Class
Throws:
IllegalArgumentException - if descriptorClass is null or if the descriptorClass is not associated with any of the modes returned RegistryMode.getModes()
Since:
JAI 1.1

getDescriptor

public RegistryElementDescriptor getDescriptor(String modeName,
                                               String descriptorName)
Get the RegistryElementDescriptor corresponding to descriptorName which supports the specified mode. This is done by matching up the descriptorName against RegistryElementDescriptor.getName in a case-insensitive manner. This returns null if there no RegistryElementDescriptor corresponding to descriptorName that supports the specified mode.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
Throws:
IllegalArgumentException - if modeName is null or if the modeName is not one of the modes returned RegistryMode.getModes()
IllegalArgumentException - if descriptorName is null
Since:
JAI 1.1

getDescriptors

public List getDescriptors(String modeName)
Get a list of all RegistryElementDescriptors registered under a given registry mode.
Parameters:
modeName - the registry mode name as a String
Throws:
IllegalArgumentException - if modeName is null or if the modeName is not one of the modes returned RegistryMode.getModes()
Since:
JAI 1.1

getDescriptorNames

public String[] getDescriptorNames(String modeName)
Get an array of all descriptor-names of descriptors registered under a given registry mode.
Parameters:
modeName - the registry mode name as a String
Throws:
IllegalArgumentException - if modeName is null or if the modeName is not one of the modes returned RegistryMode.getModes()
Since:
JAI 1.1

setProductPreference

public void setProductPreference(String modeName,
                                 String descriptorName,
                                 String preferredProductName,
                                 String otherProductName)
Set the preference between two products for a descriptor registered under a registry mode.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
preferredProductName - the product to be preferred.
otherProductName - the other product.
Throws:
IllegalArgumentException - if any of the arguments is null
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if the registry mode does not support preferences
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName under modeName.
IllegalArgumentException - if either of the products are not registered against descriptorName under productName.
Since:
JAI 1.1

unsetProductPreference

public void unsetProductPreference(String modeName,
                                   String descriptorName,
                                   String preferredProductName,
                                   String otherProductName)
Remove the preference between two products for a descriptor registered under a registry mode.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
preferredProductName - the product formerly preferred.
otherProductName - the other product.
Throws:
IllegalArgumentException - if any of the arguments is null
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if the registry mode does not support preferences
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName under modeName.
IllegalArgumentException - if either of the products are not registered against descriptorName under productName.
Since:
JAI 1.1

clearProductPreferences

public void clearProductPreferences(String modeName,
                                    String descriptorName)
Remove all the preferences between products for a descriptor registered under a registry mode.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
Throws:
IllegalArgumentException - if modeName is null or if the modeName is not one of the modes returned RegistryMode.getModes()
IllegalArgumentException - if descriptorName is null
IllegalArgumentException - if the registry mode does not support preferences
Since:
JAI 1.1

getProductPreferences

public String[][] getProductPreferences(String modeName,
                                        String descriptorName)
Returns a list of the pairwise product preferences under a particular descriptor registered against a registry mode.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
Returns:
an array of 2-element arrays of Strings.
Throws:
IllegalArgumentException - if modeName is null or if the modeName is not one of the modes returned RegistryMode.getModes()
IllegalArgumentException - if descriptorName is null
IllegalArgumentException - if the registry mode does not support preferences
Since:
JAI 1.1

getOrderedProductList

public Vector getOrderedProductList(String modeName,
                                    String descriptorName)
Returns a list of the products registered under a particular descriptor in an ordering that satisfies all of the pairwise preferences that have been set. Returns null if cycles exist. Returns null if no descriptor has been registered under this descriptorName, or if no products exist for this operation.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
Returns:
a Vector of Strings representing product names.
Throws:
IllegalArgumentException - if modeName is null or if the modeName is not one of the modes returned RegistryMode.getModes()
IllegalArgumentException - if descriptorName is null
IllegalArgumentException - if the registry mode does not support preferences
Since:
JAI 1.1

registerFactory

public void registerFactory(String modeName,
                            String descriptorName,
                            String productName,
                            Object factory)
Register a factory object with a particular product and descriptor against a specified mode. For modes that do not support preferences the productName is ignored (can be null)
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
productName - the product name as a String
factory - the object to be registered.
Throws:
IllegalArgumentException - if any of the arguments is null (productName can be null for modes that do not support preferences).
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName
Since:
JAI 1.1

unregisterFactory

public void unregisterFactory(String modeName,
                              String descriptorName,
                              String productName,
                              Object factory)
Unregister a factory object previously registered with a product and descriptor against the specified mode. For modes that do not support preferences the productName is ignored (can be null)
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
productName - the product name as a String
factory - the object to be unregistered.
Throws:
IllegalArgumentException - if any of the arguments is null (productName can be null for modes that do not support preferences).
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName
IllegalArgumentException - if the factory object was not previously registered against descriptorName and productName
Since:
JAI 1.1

setFactoryPreference

public void setFactoryPreference(String modeName,
                                 String descriptorName,
                                 String productName,
                                 Object preferredOp,
                                 Object otherOp)
Sets a preference between two factory instances for a given operation under a specified product.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
productName - the product name as a String
preferredOp - the preferred factory object
otherOp - the other factory object
Throws:
IllegalArgumentException - if any of the arguments is null
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName
IllegalArgumentException - if either of the factory objects were not previously registered against descriptorName and productName
IllegalArgumentException - if the registry mode does not support preferences
Since:
JAI 1.1

unsetFactoryPreference

public void unsetFactoryPreference(String modeName,
                                   String descriptorName,
                                   String productName,
                                   Object preferredOp,
                                   Object otherOp)
Unsets a preference between two factory instances for a given operation under a specified product.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
productName - the product name as a String
preferredOp - the factory object formerly preferred
otherOp - the other factory object
Throws:
IllegalArgumentException - if any of the arguments is null
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName
IllegalArgumentException - if either of the factory objects were not previously registered against descriptorName and productName
IllegalArgumentException - if the registry mode does not support preferences
Since:
JAI 1.1

clearFactoryPreferences

public void clearFactoryPreferences(String modeName,
                                    String descriptorName,
                                    String productName)
Removes all preferences between instances of a factory within a product registered under a particular OperationDescriptor.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
productName - the product name as a String
Throws:
IllegalArgumentException - if any of the arguments is null
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName
Since:
JAI 1.1

getFactoryPreferences

public Object[][] getFactoryPreferences(String modeName,
                                        String descriptorName,
                                        String productName)
Get all pairwise preferences between instances of a factory within a product registered under a particular OperationDescriptor.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
productName - the product name as a String
Throws:
IllegalArgumentException - if any of the arguments is null
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName
Since:
JAI 1.1

getOrderedFactoryList

public List getOrderedFactoryList(String modeName,
                                  String descriptorName,
                                  String productName)
Returns a list of the factory instances of a product registered under a particular OperationDescriptor, in an ordering that satisfies all of the pairwise preferences that have been set. Returns null if cycles exist. Returns null, if the product does not exist under this descriptorName. If the particular registry mode does not support preferences then the returned List will contain a single factory.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
productName - the product name as a String
Returns:
an ordered List of factory instances
Throws:
IllegalArgumentException - if any of the arguments is null (productName can be null for modes that do not support preferences).
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName
Since:
JAI 1.1

getFactoryIterator

public Iterator getFactoryIterator(String modeName,
                                   String descriptorName)
Returns an Iterator over all factory objects registered with the specified factory and operation names over all products. The order of objects in the iteration will be according to the pairwise preferences among products and image factories within a product. The remove() method of the Iterator may not be implemented. If the particular factory does not have preferences then the returned Iterator will traverse a collection containing the single factory.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
Returns:
an Iterator over factory objects
Throws:
IllegalArgumentException - if any of the arguments is null
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName
Since:
JAI 1.1

getFactory

public Object getFactory(String modeName,
                         String descriptorName)
Returns the factory of the specified type for the named operation. This method will return the first factory that would be encountered by the Iterator returned by the getFactoryIterator() method.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
Returns:
a registered factory object
Throws:
IllegalArgumentException - if any of the arguments is null
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName
Since:
JAI 1.1

invokeFactory

public Object invokeFactory(String modeName,
                            String descriptorName,
                            Object[] args)
Finds the factory of the specified type for the named operation and invokes its default factory method with the supplied parameters. The class of the returned object is that of the object returned by the factory's object creation method.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
Returns:
an object created by the factory method
Throws:
IllegalArgumentException - if modeName or descriptorName is null
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName
Since:
JAI 1.1

addPropertyGenerator

public void addPropertyGenerator(String modeName,
                                 String descriptorName,
                                 PropertyGenerator generator)
Adds a PropertyGenerator to the registry, associating it with a particular descriptor registered against a registry mode.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
generator - the PropertyGenerator to be added.
Throws:
IllegalArgumentException - if any of the arguments is null
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName
IllegalArgumentException - if the specified mode does not support properties.
Since:
JAI 1.1

removePropertyGenerator

public void removePropertyGenerator(String modeName,
                                    String descriptorName,
                                    PropertyGenerator generator)
Removes a PropertyGenerator from its association with a particular descriptor/registry-mode in the registry. If the generator was not associated with the operation, nothing happens.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
generator - the PropertyGenerator to be removed.
Throws:
IllegalArgumentException - if any of the arguments is null
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName
IllegalArgumentException - if the specified mode does not support properties.
Since:
JAI 1.1

copyPropertyFromSource

public void copyPropertyFromSource(String modeName,
                                   String descriptorName,
                                   String propertyName,
                                   int sourceIndex)
Forces a property to be copied from the specified source by nodes performing a particular operation. By default, a property is copied from the first source node that emits it. The result of specifying an invalid source is undefined.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
propertyName - the name of the property to be copied.
sourceIndex - the index of the source to copy the property from.
Throws:
IllegalArgumentException - if any of the String arguments is null
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName
IllegalArgumentException - if the specified mode does not support properties.
Since:
JAI 1.1

suppressProperty

public void suppressProperty(String modeName,
                             String descriptorName,
                             String propertyName)
Forces a particular property to be suppressed by nodes performing a particular operation. By default, properties are passed through operations unchanged.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
propertyName - the name of the property to be suppressed.
Throws:
IllegalArgumentException - if any of the arguments is null
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName
IllegalArgumentException - if the specified mode does not support properties.
Since:
JAI 1.1

suppressAllProperties

public void suppressAllProperties(String modeName,
                                  String descriptorName)
Forces all properties to be suppressed by nodes performing a particular operation. By default, properties are passed through operations unchanged.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
Throws:
IllegalArgumentException - if any of the arguments is null
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName
IllegalArgumentException - if the specified mode does not support properties.
Since:
JAI 1.1

clearPropertyState

public void clearPropertyState(String modeName)
Removes all property associated information for this registry mode from this OperationRegistry.
Parameters:
modeName - the registry mode name as a String
Throws:
IllegalArgumentException - if modeName is null or is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if the specified mode does not support properties.
Since:
JAI 1.1

getGeneratedPropertyNames

public String[] getGeneratedPropertyNames(String modeName,
                                          String descriptorName)
Returns a list of the properties generated by nodes implementing the descriptor associated with a particular descriptor Name. Returns null if no properties are generated.
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
Throws:
IllegalArgumentException - if any of the arguments is null
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName
IllegalArgumentException - if the specified mode does not support properties.
Since:
JAI 1.1

getPropertySource

public PropertySource getPropertySource(String modeName,
                                        String descriptorName,
                                        Object op,
                                        Vector sources)
Merge mode-specific property environment with mode-independent property environment of the descriptor. Array elements of "sources" are expected to be in the same ordering as referenced by the "sourceIndex" parameter of copyPropertyFromSource().
Parameters:
modeName - the registry mode name as a String
descriptorName - the descriptor name as a String
op - the Object from which properties will be generated.
sources - the PropertySources corresponding to the sources of the object representing the named descriptor in the indicated mode. The supplied Vector may be empty to indicate that there are no sources.
Returns:
A PropertySource which encapsulates the global property environment for the object representing the named descriptor in the indicated mode.
Throws:
IllegalArgumentException - if any of the arguments is null
IllegalArgumentException - if modeName is not one of those returned by RegistryMode.getModes()
IllegalArgumentException - if there is no RegistryElementDescriptor registered against the descriptorName
IllegalArgumentException - if the specified mode does not support properties.
Since:
JAI 1.1

getPropertySource

public PropertySource getPropertySource(OperationNode op)
Constructs and returns a PropertySource suitable for use by a given OperationNode. The PropertySource includes properties copied from prior nodes as well as those generated at the node itself. Additionally, property suppression is taken into account. The actual implementation of getPropertySource() may make use of deferred execution and caching.
Parameters:
op - the OperationNode requesting its PropertySource.
Throws:
IllegalArgumentException - if op is null.
Since:
JAI 1.1

registerServices

public void registerServices(ClassLoader cl)
                      throws IOException
Load all the "META-INF/registryFile.jai" files and then called the updateRegistry() of the registered service provider of OperationRegistrySpi found in the classpath corresponding to this class loader. All non-IO exceptions encountered while parsing the registry files are caught and their error messages are redirected to System.err. If System.err is null the error messages will never be seen.

This is a convenience method to do automatic detection in runtime loaded jar files

Note that the JAI does not keep track of which JAR files have their registry files loaded and/or services initialized. Hence if registerServices is called twice with the same ClassLoader, the loading of the registry files and/or initialization of the services will happen twice.

Since:
JAI 1.1

registerOperationDescriptor

public void registerOperationDescriptor(OperationDescriptor odesc,
                                        String operationName)
Deprecated. as of JAI 1.1 in favor of registerDescriptor(odesc)

Registers an OperationDescriptor with the registry. Each operation must have an OperationDescriptor before registerRIF() may be called to add RIFs to the operation.
Parameters:
odesc - an OperationDescriptor containing information about the operation.
operationName - the operation name as a String.
See Also:
registerDescriptor - for list of exceptions thrown.

unregisterOperationDescriptor

public void unregisterOperationDescriptor(String operationName)
Deprecated. as of JAI 1.1 in favor of unregisterDescriptor(...) which accepts an OperationDescriptor and not a operationName.

Unregisters an OperationDescriptor from the registry.
Parameters:
operationName - the operation name as a String.
See Also:
unregisterDescriptor - for list of exceptions thrown.

getOperationDescriptor

public OperationDescriptor getOperationDescriptor(String operationName)
Deprecated. as of JAI 1.1 in favor of getDescriptor(...) where the mode name is explicitly specified.

Returns the OperationDescriptor that is currently registered under the given name, or null if none exists. Though unlikely, it is possible to have different descriptors registered under different modes. In this case this will arbitrarily return the first operation descriptor found.
Parameters:
operationName - the String to be queried.
Returns:
an OperationDescriptor.
Throws:
IllegalArgumentException - if operationName is null.
See Also:
getDescriptor(Class, String)

getOperationDescriptors

public Vector getOperationDescriptors()
Deprecated. as of JAI 1.1 in favor of getDescriptors( OperationDescriptor.class) which returns a List and not a Vector. This is currently equivalent to new Vector(getDescriptors(OperationDescriptor.class))

Returns a Vector of all currently registered OperationDescriptors.
Returns:
a Vector of OperationDescriptors.
See Also:
getDescriptors(Class)

getOperationNames

public String[] getOperationNames()
Deprecated. as of JAI 1.1 in favor of getDescriptorNames( OperationDescriptor.class).

Returns a list of names under which all the OperationDescriptors in the registry are registered.
Returns:
a list of currently existing operation names.
See Also:
getDescriptorNames(Class)

registerRIF

public void registerRIF(String operationName,
                        String productName,
                        RenderedImageFactory RIF)
Deprecated. as of JAI 1.1 in favor of RIFRegistry.register(...) . This is currently equivalent to RIFRegistry.register(this, operationName, productName, RIF)

Registers a RIF with a particular product and operation.
Parameters:
operationName - the operation name as a String.
productName - the product name, as a String.
RIF - the RenderedImageFactory to be registered.
See Also:
registerFactory - for list of exceptions thrown., RIFRegistry.register(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String, java.awt.image.renderable.RenderedImageFactory)

unregisterRIF

public void unregisterRIF(String operationName,
                          String productName,
                          RenderedImageFactory RIF)
Deprecated. as of JAI 1.1 in favor of RIFRegistry.unregister(...) . This is currently equivalent to RIFRegistry.unregister(this, operationName, productName, RIF)

Unregisters a RIF from a particular product and operation.
Parameters:
operationName - the operation name as a String.
productName - the product name, as a String.
RIF - the RenderedImageFactory to be unregistered.
See Also:
unregisterFactory - for list of exceptions thrown., RIFRegistry.unregister(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String, java.awt.image.renderable.RenderedImageFactory)

registerCRIF

public void registerCRIF(String operationName,
                         ContextualRenderedImageFactory CRIF)
Deprecated. as of JAI 1.1 in favor of CRIFRegistry.register(...) . This is currently equivalent to CRIFRegistry.register(this, operationName, productName, CRIF)

Registers a CRIF under a particular operation.
Parameters:
operationName - the operation name as a String.
CRIF - the ContextualRenderedImageFactory to be registered.
See Also:
registerFactory - for list of exceptions thrown., CRIFRegistry.register(javax.media.jai.OperationRegistry, java.lang.String, java.awt.image.renderable.ContextualRenderedImageFactory)

unregisterCRIF

public void unregisterCRIF(String operationName,
                           ContextualRenderedImageFactory CRIF)
Deprecated. as of JAI 1.1 in favor of CRIFRegistry.unregister(...) . This is currently equivalent to CRIFRegistry.unregister(this, operationName, productName, CRIF)

Unregisters a CRIF from a particular operation.
Parameters:
operationName - the operation name as a String.
CRIF - the ContextualRenderedImageFactory to be unregistered.
See Also:
unregisterFactory - for list of exceptions thrown., CRIFRegistry.unregister(javax.media.jai.OperationRegistry, java.lang.String, java.awt.image.renderable.ContextualRenderedImageFactory)

registerCIF

public void registerCIF(String operationName,
                        String productName,
                        CollectionImageFactory CIF)
Deprecated. as of JAI 1.1 in favor of CIFRegistry.register(...) . This is currently equivalent to CIFRegistry.register(this, operationName, productName, CIF)

Registers a CIF with a particular product and operation.
Parameters:
operationName - the operation name as a String.
productName - the product name, as a String.
CIF - the CollectionImageFactory to be registered.
See Also:
registerFactory - for list of exceptions thrown., CIFRegistry.register(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String, javax.media.jai.CollectionImageFactory)

unregisterCIF

public void unregisterCIF(String operationName,
                          String productName,
                          CollectionImageFactory CIF)
Deprecated. as of JAI 1.1 in favor of CIFRegistry.unregister(...) . This is currently equivalent to CIFRegistry.unregister(this, operationName, productName, CIF)

Unregisters a CIF from a particular product and operation.
Parameters:
operationName - the operation name as a String.
productName - the product name, as a String.
CIF - the CollectionImageFactory to be unregistered.
See Also:
unregisterFactory - for list of exceptions thrown., CIFRegistry.unregister(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String, javax.media.jai.CollectionImageFactory)

setProductPreference

public void setProductPreference(String operationName,
                                 String preferredProductName,
                                 String otherProductName)
Deprecated. as of JAI 1.1 in favor of setProductPreference(...) which specifies a modeName also. This is currently equivalent to setProductPreference("rendered", operationName, preferredProductName, otherProductName)

Sets a preference between two products registered under a common OperationDescriptor. Any attempt to set a preference between a product and itself will be ignored.
Parameters:
operationName - the operation name as a String.
preferredProductName - the product to be preferred.
otherProductName - the other product.
See Also:
setProductPreference - for list of exceptions thrown.

unsetProductPreference

public void unsetProductPreference(String operationName,
                                   String preferredProductName,
                                   String otherProductName)
Deprecated. as of JAI 1.1 in favor of unsetProductPreference(...) which specifies a modeName also. This is currently equivalent to unsetProductPreference("rendered", operationName, preferredProductName, otherProductName)

Removes a preference between two products registered under a common OperationDescriptor.
Parameters:
operationName - the operation name as a String.
preferredProductName - the product formerly preferred.
otherProductName - the other product.
See Also:
unsetProductPreference - for list of exceptions thrown.

clearProductPreferences

public void clearProductPreferences(String operationName)
Deprecated. as of JAI 1.1 in favor of clearProductPreferences(...) which specifies a modeName also. This is currently equivalent to clearProductPreferences("rendered", operationName)

Removes all preferences between products registered under a common OperationDescriptor.
Parameters:
operationName - the operation name as a String.
See Also:
clearProductPreferences - for list of exceptions thrown.

getProductPreferences

public String[][] getProductPreferences(String operationName)
Deprecated. as of JAI 1.1 in favor of getProductPreferences(...) which accepts a modeName also. This is currently equivalent to getProductPreferences("rendered", operationName)

Returns a list of the pairwise product preferences under a particular OperationDescriptor. If no product preferences have been set, returns null.
Parameters:
operationName - the operation name as a String.
Returns:
an array of 2-element arrays of Strings.
See Also:
getProductPreferences - for list of exceptions thrown.

getOrderedProductList

public Vector getOrderedProductList(String operationName)
Deprecated. as of JAI 1.1 in favor of getOrderedProductList(...) which accepts a modeName also. This is currently equivalent to getOrderedProductList("rendered", operationName)

Returns a list of the products registered under a particular OperationDescriptor, in an ordering that satisfies all of the pairwise preferences that have been set. Returns null if cycles exist. Returns null if no OperationDescriptor has been registered under this operationName, or if no products exist for this operation.
Parameters:
operationName - the operation name as a String.
Returns:
a Vector of Strings representing product names.
See Also:
getOrderedProductList - for list of exceptions thrown.

setRIFPreference

public void setRIFPreference(String operationName,
                             String productName,
                             RenderedImageFactory preferredRIF,
                             RenderedImageFactory otherRIF)
Deprecated. as of JAI 1.1 in favor of RIFRegistry.setPreference(...) . This is currently equivalent to RIFRegistry.setPreference(this, operationName, productName, preferredRIF, otherRIF)

Sets a preference between two RIFs within the same product. Any attempt to set a preference between a RIF and itself will be ignored.
Parameters:
operationName - the operation name as a String.
productName - the name of the product.
preferredRIF - the preferred RenderedImageFactory.
otherRIF - the other RenderedImageFactory.
See Also:
setFactoryPreference - for list of exceptions thrown., RIFRegistry.setPreference(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String, java.awt.image.renderable.RenderedImageFactory, java.awt.image.renderable.RenderedImageFactory)

setCIFPreference

public void setCIFPreference(String operationName,
                             String productName,
                             CollectionImageFactory preferredCIF,
                             CollectionImageFactory otherCIF)
Deprecated. as of JAI 1.1 in favor of CIFRegistry.setPreference(...) . This is currently equivalent to CIFRegistry.setPreference(this, operationName, productName, preferredCIF, otherCIF)

Sets a preference between two CIFs within the same product. Any attempt to set a preference between a CIF and itself will be ignored.
Parameters:
operationName - the operation name as a String.
productName - the name of the product.
preferredCIF - the preferred CollectionRenderedImageFactory.
otherCIF - the other CollectionRenderedImageFactory.
See Also:
setFactoryPreference - for list of exceptions thrown., CIFRegistry.setPreference(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String, javax.media.jai.CollectionImageFactory, javax.media.jai.CollectionImageFactory)

unsetRIFPreference

public void unsetRIFPreference(String operationName,
                               String productName,
                               RenderedImageFactory preferredRIF,
                               RenderedImageFactory otherRIF)
Deprecated. as of JAI 1.1 in favor of RIFRegistry.unsetPreference(...) . This is currently equivalent to RIFRegistry.unsetPreference(this, operationName, productName, preferredRIF, otherRIF)

Removes a preference between two RIFs within the same product.
Parameters:
operationName - the operation name as a String.
productName - the name of the product.
preferredRIF - the formerly preferred RenderedImageFactory.
otherRIF - the other RenderedImageFactory.
See Also:
unsetFactoryPreference - for list of exceptions thrown., RIFRegistry.unsetPreference(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String, java.awt.image.renderable.RenderedImageFactory, java.awt.image.renderable.RenderedImageFactory)

unsetCIFPreference

public void unsetCIFPreference(String operationName,
                               String productName,
                               CollectionImageFactory preferredCIF,
                               CollectionImageFactory otherCIF)
Deprecated. as of JAI 1.1 in favor of CIFRegistry.unsetPreference(...) . This is currently equivalent to CIFRegistry.unsetPreference(this, operationName, productName, preferredCIF, otherCIF)

Removes a preference between two CIFs within the same product.
Parameters:
operationName - the operation name as a String.
productName - the name of the product.
preferredCIF - the formerly preferred CollectionImageFactory.
otherCIF - the other CollectionImageFactory.
See Also:
unsetFactoryPreference - for list of exceptions thrown., CIFRegistry.unsetPreference(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String, javax.media.jai.CollectionImageFactory, javax.media.jai.CollectionImageFactory)

clearRIFPreferences

public void clearRIFPreferences(String operationName,
                                String productName)
Deprecated. as of JAI 1.1 in favor of RIFRegistry.clearPreferences(...) . This is currently equivalent to RIFRegistry.clearPreferences(this, operationName, productName)

Removes all preferences between RIFs within a product registered under a particular OperationDescriptor.
Parameters:
operationName - the operation name as a String.
productName - the name of the product.
See Also:
clearFactoryPreferences - for list of exceptions thrown., RIFRegistry.clearPreferences(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String)

clearCIFPreferences

public void clearCIFPreferences(String operationName,
                                String productName)
Deprecated. as of JAI 1.1 in favor of CIFRegistry.clearPreferences(...) . This is currently equivalent to CIFRegistry.clearPreferences(this, operationName, productName)

Removes all preferences between CIFs within a product registered under a particular OperationDescriptor.
Parameters:
operationName - the operation name as a String.
productName - the name of the product.
See Also:
clearFactoryPreferences - for list of exceptions thrown., CIFRegistry.clearPreferences(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String)

clearOperationPreferences

public void clearOperationPreferences(String operationName,
                                      String productName)
Deprecated. as of JAI 1.1 in favor of calling *IFRegistry.clearPreferences(..) on all image operation related modes.

Removes all RIF and CIF preferences within a product registered under a particular OperationDescriptor.
Parameters:
operationName - the operation name as a String.
productName - the name of the product.
See Also:
clearFactoryPreferences - for list of exceptions thrown., RIFRegistry.clearPreferences(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String), CIFRegistry.clearPreferences(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String)

getOrderedRIFList

public Vector getOrderedRIFList(String operationName,
                                String productName)
Deprecated. as of JAI 1.1 in favor of RIFRegistry.getOrderedList(...) which returns a List and not a Vector. This is currently equivalent to new Vector(RIFRegistry.getOrderedList(this, operationName, productName))

Returns a list of the RIFs of a product registered under a particular OperationDescriptor, in an ordering that satisfies all of the pairwise preferences that have been set. Returns null if cycles exist. Returns null, if the product does not exist under this operationName.
Parameters:
operationName - the operation name as a String.
productName - the name of the product.
Returns:
a Vector of RIFs.
See Also:
getOrderedFactoryList - for list of exceptions thrown., RIFRegistry.getOrderedList(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String)

getOrderedCIFList

public Vector getOrderedCIFList(String operationName,
                                String productName)
Deprecated. as of JAI 1.1 in favor of CIFRegistry.getOrderedList(...) which returns a List and not a Vector. This is currently equivalent to new Vector(CIFRegistry.getOrderedList(this, operationName, productName))

Returns a list of the CIFs of a product registered under a particular OperationDescriptor, in an ordering that satisfies all of the pairwise preferences that have been set. Returns null if cycles exist. Returns null, if the product does not exist under this operationName.
Parameters:
operationName - the operation name as a String.
productName - the name of the product.
Returns:
a Vector of CIFs.
See Also:
getOrderedFactoryList - for list of exceptions thrown., CIFRegistry.getOrderedList(javax.media.jai.OperationRegistry, java.lang.String, java.lang.String)

create

public PlanarImage create(String operationName,
                          ParameterBlock paramBlock,
                          RenderingHints renderHints)
Deprecated. as of JAI 1.1 in favor of RIFRegistry.create(...) which returns a RenderedImage and not a PlanarImage. This is currently equivalent to PlanarImage.wrapRenderedImage(RIFRegistry.create(this, operationName, paramBlock, renderHints))

Constructs a PlanarImage (usually a RenderedOp) representing the results of applying a given operation to a particular ParameterBlock and rendering hints. The registry is used to determine the RIF to be used to instantiate the operation.

If none of the RIFs registered with this OperationRegistry returns a non-null value, null is returned. Exceptions thrown by the RIFs will be caught by this method and will not be propagated.

Parameters:
operationName - the operation name as a String.
paramBlock - the operation's ParameterBlock.
renderHints - a RenderingHints object containing rendering hints.
Throws:
IllegalArgumentException - if operationName is null.
See Also:
RIFRegistry.create(javax.media.jai.OperationRegistry, java.lang.String, java.awt.image.renderable.ParameterBlock, java.awt.RenderingHints)

createRenderable

public ContextualRenderedImageFactory createRenderable(String operationName,
                                                       ParameterBlock paramBlock)
Deprecated. as of JAI 1.1 in favor of CRIFRegistry.get(...) This is currently equivalent to CRIFRegistry.get(this, operationName)

Constructs the CRIF to be used to instantiate the operation. Returns null, if no CRIF is registered with the given operation name.
Parameters:
operationName - the operation name as a String.
paramBlock - the operation's ParameterBlock.
Throws:
IllegalArgumentException - if operationName is null.
See Also:
CRIFRegistry.get(javax.media.jai.OperationRegistry, java.lang.String)

createCollection

public CollectionImage createCollection(String operationName,
                                        ParameterBlock args,
                                        RenderingHints hints)
Deprecated. as of JAI 1.1 in favor of CIFRegistry.create(...) . This is currently equivalent to CIFRegistry.create(this, operationName, args, hints))

Constructs a CollectionImage (usually a CollectionOp) representing the results of applying a given operation to a particular ParameterBlock and rendering hints. The registry is used to determine the CIF to be used to instantiate the operation.

If none of the CIFs registered with this OperationRegistry returns a non-null value, null is returned. Exceptions thrown by the CIFs will be caught by this method and will not be propagated.

Parameters:
operationName - The operation name as a String.
args - The operation's input parameters.
hints - A RenderingHints object containing rendering hints.
Throws:
IllegalArgumentException - if operationName is null.
See Also:
CIFRegistry.create(javax.media.jai.OperationRegistry, java.lang.String, java.awt.image.renderable.ParameterBlock, java.awt.RenderingHints)

clearPropertyState

public void clearPropertyState()
Deprecated. as of JAI 1.1 in factor of the version where the modeName is explicitly specified. This is currently equivalent to clearPropertyState("rendered")

Removes all property associated information from this OperationRegistry.
See Also:
clearPropertyState(java.lang.String)

addPropertyGenerator

public void addPropertyGenerator(String operationName,
                                 PropertyGenerator generator)
Deprecated. as of JAI 1.1 in favor of the version where the modeName is explicitly specified. This is currently equivalent to addPropertyGenerator("rendered", ...)

Adds a PropertyGenerator to the registry, associating it with a particular OperationDescriptor.
Parameters:
operationName - the operation name as a String.
generator - the PropertyGenerator to be added.
See Also:
addPropertyGenerator - for list of exceptions thrown.

removePropertyGenerator

public void removePropertyGenerator(String operationName,
                                    PropertyGenerator generator)
Deprecated. as of JAI 1.1 in favor of the version where the modeName is explicitly specified. This is currently equivalent to removePropertyGenerator("rendered", ...)

Removes a PropertyGenerator from its association with a particular OperationDescriptor in the registry. If the generator was not associated with the operation, nothing happens.
Parameters:
operationName - the operation name as a String.
generator - the PropertyGenerator to be removed.
See Also:
removePropertyGenerator - for list of exceptions thrown.

suppressProperty

public void suppressProperty(String operationName,
                             String propertyName)
Deprecated. as of JAI 1.1 in favor of the version where the modeName is explicitly specified. This is currently equivalent to suppressProperty("rendered", ...)

Forces a particular property to be suppressed by nodes performing a particular operation. By default, properties are passed through operations unchanged.
Parameters:
operationName - the operation name as a String.
propertyName - the name of the property to be suppressed.
See Also:
suppressProperty - for list of exceptions thrown.

suppressAllProperties

public void suppressAllProperties(String operationName)
Deprecated. as of JAI 1.1 in favor of the version where the modeName is explicitly specified. This is currently equivalent to suppressAllProperties("rendered", ...)

Forces all properties to be suppressed by nodes performing a particular operation. By default, properties are passed through operations unchanged.
Parameters:
operationName - the operation name as a String.
See Also:
suppressAllProperties - for list of exceptions thrown.

copyPropertyFromSource

public void copyPropertyFromSource(String operationName,
                                   String propertyName,
                                   int sourceIndex)
Deprecated. as of JAI 1.1 in favor of the version where the modeName is explicitly specified. This is currently equivalent to copyPropertyFromSource("rendered", ...)

Forces a property to be copied from the specified source image by RenderedOp nodes performing a particular operation. By default, a property is copied from the first source node that emits it. The result of specifying an invalid source is undefined.
Parameters:
operationName - the operation name as a String.
propertyName - the name of the property to be copied.
sourceIndex - the index of the source to copy the property from.
See Also:
copyPropertyFromSource - for list of exceptions thrown.

getGeneratedPropertyNames

public String[] getGeneratedPropertyNames(String operationName)
Deprecated. as of JAI 1.1 in favor of the version where the modeName is explicitly specified. This is currently equivalent to getGeneratedPropertyNames("rendered", ...)

Returns a list of the properties generated by nodes implementing the operation associated with a particular Operation Name. Returns null if no properties are generated.
Parameters:
operationName - the operation name as a String.
Returns:
an array of Strings.
See Also:
getGeneratedPropertyNames - for list of exceptions thrown.

getPropertySource

public PropertySource getPropertySource(RenderedOp op)
Deprecated. as of JAI 1.1 in favor RIFRegistry.getPropertySource(op)

Constructs and returns a PropertySource suitable for use by a given RenderedOp. The PropertySource includes properties copied from prior nodes as well as those generated at the node itself. Additionally, property suppression is taken into account. The actual implementation of getPropertySource() may make use of deferred execution and caching.
Parameters:
op - the RenderedOp requesting its PropertySource.
See Also:
#getPropertySource - for list of exceptions thrown.

getPropertySource

public PropertySource getPropertySource(RenderableOp op)
Deprecated. as of JAI 1.1 in favor CRIFRegistry.getPropertySource(op)

Constructs and returns a PropertySource suitable for use by a given RenderableOp. The PropertySource includes properties copied from prior nodes as well as those generated at the node itself. Additionally, property suppression is taken into account. The actual implementation of getPropertySource() may make use of deferred execution and caching.
Parameters:
op - the RenderableOp requesting its PropertySource.
See Also:
CRIFRegistry.getPropertySource(javax.media.jai.RenderableOp)