sk.uniba.euromath.gene
Class CoordinatorInfo

java.lang.Object
  extended by sk.uniba.euromath.gene.CoordinatorInfo
All Implemented Interfaces:
INamespaceAcceptor

public class CoordinatorInfo
extends Object
implements INamespaceAcceptor

Holds information about the output document class.

Author:
Martin Vysny

Field Summary
 String desc
          Returns description of the output class.
 String extension
          Returns default file extension of the output class.
 String mime
          Returns MIME name.
 String outputClassId
          Returns the output document class identitifer.
 
Constructor Summary
CoordinatorInfo(String outputClassId, String extension, String desc, String mime, Map<String,EnumSet<SourceEnum>> namespaces)
          The constructor.
 
Method Summary
 boolean acceptsFiniteNamespaces()
          If true then coordinator processes only namespaces from the getNamespaces() function.
 Set<String> getNamespaces()
          Set containing all namespaces that this coordinator processes.
 EnumSet<SourceEnum> getSource(String namespace)
          Returns kind of source for this namespace.
 EnumSet<SourceEnum> getSourceNotNull(String namespace)
          Returns kind of source for this namespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outputClassId

public final String outputClassId
Returns the output document class identitifer. It is supposed to be used with API functions.


desc

public final String desc
Returns description of the output class.


extension

public final String extension
Returns default file extension of the output class.


mime

public final String mime
Returns MIME name.

Constructor Detail

CoordinatorInfo

public CoordinatorInfo(String outputClassId,
                       String extension,
                       String desc,
                       String mime,
                       Map<String,EnumSet<SourceEnum>> namespaces)
The constructor.

Parameters:
outputClassId - The output document class identitifer. It is intended to be used with API functions.
extension - default file extension of the output class.
desc - the displayable description of the output class.
mime - the MIME defined name of the document class.
namespaces - a map of namespace URIs that this coordinator accepts. For each namespace it must define a kind of source that is accepted for this namespace.
Method Detail

getNamespaces

public final Set<String> getNamespaces()
Set containing all namespaces that this coordinator processes.

Returns:
set of string namespace URI

acceptsFiniteNamespaces

public boolean acceptsFiniteNamespaces()
If true then coordinator processes only namespaces from the getNamespaces() function. If false then coordinator processes namespaces from the getNamespaces() function and more - whether the namespace is supported or not can be queried using the getSource() function.

Returns:
if this coordinator accepts finite number of namespaces.

getSource

public EnumSet<SourceEnum> getSource(String namespace)
Description copied from interface: INamespaceAcceptor
Returns kind of source for this namespace.

Specified by:
getSource in interface INamespaceAcceptor
Parameters:
namespace - the namespace URI
Returns:
kinds of sources that this coordinator accepts as input for given namespace. null if namespace is not accepted by the acceptor.

getSourceNotNull

public final EnumSet<SourceEnum> getSourceNotNull(String namespace)
Returns kind of source for this namespace. Never null.

Parameters:
namespace - the namespace URI
Returns:
kinds of sources that this coordinator accepts as input for given namespace.


Copyright 2003-2003-2006 null. All Rights Reserved.