net.sourceforge.nrl.parser.operators
Class Parameter

java.lang.Object
  extended by net.sourceforge.nrl.parser.operators.PropertyAwareObject
      extended by net.sourceforge.nrl.parser.operators.Parameter
All Implemented Interfaces:
Serializable, IParameter

public class Parameter
extends PropertyAwareObject
implements IParameter

A default implementation of an operator parameter.

See Also:
Serialized Form

Field Summary
static String IMPLEMENTATION_DETAILS_CHANGED
          Event - implementation details changed.
static String NAMED_CHANGED
          Event - name changed.
static String TYPE_CHANGED
          Event - type changed.
static String TYPE_IS_COLLECTION_CHANGED
          Event - type collection indicator changed.
static String TYPE_NAME_CHANGED
          Event - type name changed.
 
Constructor Summary
Parameter()
           
Parameter(Parameter other)
           
 
Method Summary
 void addImplementationDetail(IImplementationDetail detail)
           
 String getImplementationDetail(String label)
          Get an implementation detail associated with the parameter, given its label.
 Collection<IImplementationDetail> getImplementationDetails()
          Return all implementation details associated with the parameter.
 String getName()
          Return the parameter name.
 NRLDataType getNRLDataType()
          Return the NRL type of the parameter.
 IModelElement getType()
          Return the parameter type.
 String getTypeName()
          Return the type name as shown in the definition
 boolean isTypeCollection()
          Return true if the parameter type is a collection.
 void removeImplementationDetail(IImplementationDetail detail)
           
 List<NRLError> resolveModelReferences(IModelCollection models)
          Resolve all parameter type and return type references against models.
 void setName(String name)
           
 void setNRLDataType(NRLDataType type)
          Set the NRL type of the parameter.
 void setType(IModelElement type)
          Set the model type of the parameter.
 void setTypeIsCollection(boolean isCollection)
          Set a flag indicating whether the type is a collection type.
 void setTypeName(String typeName)
          Set the type name
 
Methods inherited from class net.sourceforge.nrl.parser.operators.PropertyAwareObject
addPropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMED_CHANGED

public static final String NAMED_CHANGED
Event - name changed.

See Also:
Constant Field Values

IMPLEMENTATION_DETAILS_CHANGED

public static final String IMPLEMENTATION_DETAILS_CHANGED
Event - implementation details changed.

See Also:
Constant Field Values

TYPE_CHANGED

public static final String TYPE_CHANGED
Event - type changed.

See Also:
Constant Field Values

TYPE_IS_COLLECTION_CHANGED

public static final String TYPE_IS_COLLECTION_CHANGED
Event - type collection indicator changed.

See Also:
Constant Field Values

TYPE_NAME_CHANGED

public static final String TYPE_NAME_CHANGED
Event - type name changed.

See Also:
Constant Field Values
Constructor Detail

Parameter

public Parameter()

Parameter

public Parameter(Parameter other)
Method Detail

addImplementationDetail

public void addImplementationDetail(IImplementationDetail detail)

getImplementationDetail

public String getImplementationDetail(String label)
Description copied from interface: IParameter
Get an implementation detail associated with the parameter, given its label. This is used by mappings to targets like Java or rule engines to obtain supplementary mapping information.

See IImplementationDetail for more information.

Specified by:
getImplementationDetail in interface IParameter
Parameters:
label - the label
Returns:
the detail value or null if not found

getImplementationDetails

public Collection<IImplementationDetail> getImplementationDetails()
Description copied from interface: IParameter
Return all implementation details associated with the parameter. This is used for mappings, see IImplementationDetail for more information.

Specified by:
getImplementationDetails in interface IParameter
Returns:
a collection of IImplementationDetail objects

getName

public String getName()
Description copied from interface: IParameter
Return the parameter name. This never returns null.

Specified by:
getName in interface IParameter
Returns:
the name

getNRLDataType

public NRLDataType getNRLDataType()
Description copied from interface: IParameter
Return the NRL type of the parameter. If it is not defined, this returns NRLDataType.UNKNOWN.

Specified by:
getNRLDataType in interface IParameter
Returns:
the type

getType

public IModelElement getType()
Description copied from interface: IParameter
Return the parameter type. This can be null if the type was not specified. It will also return null before IParameter.resolveModelReferences(IModelCollection) is called.

Specified by:
getType in interface IParameter
Returns:
the type

getTypeName

public String getTypeName()
Description copied from interface: IParameter
Return the type name as shown in the definition

Specified by:
getTypeName in interface IParameter
Returns:
the name

isTypeCollection

public boolean isTypeCollection()
Description copied from interface: IParameter
Return true if the parameter type is a collection. Note: Currently always returns false, included for future use.

Specified by:
isTypeCollection in interface IParameter
Returns:
collection indicator

resolveModelReferences

public List<NRLError> resolveModelReferences(IModelCollection models)
Description copied from interface: IParameter
Resolve all parameter type and return type references against models.

Specified by:
resolveModelReferences in interface IParameter
Parameters:
models - the models
Returns:
any errors encountered

removeImplementationDetail

public void removeImplementationDetail(IImplementationDetail detail)

setName

public void setName(String name)

setNRLDataType

public void setNRLDataType(NRLDataType type)
Description copied from interface: IParameter
Set the NRL type of the parameter. Mainly used by the type checker.

Specified by:
setNRLDataType in interface IParameter
Parameters:
type - the new type

setType

public void setType(IModelElement type)
Description copied from interface: IParameter
Set the model type of the parameter.

Specified by:
setType in interface IParameter
Parameters:
type - the new type

setTypeIsCollection

public void setTypeIsCollection(boolean isCollection)
Description copied from interface: IParameter
Set a flag indicating whether the type is a collection type. Note: Currently ignored, included for future use.

Specified by:
setTypeIsCollection in interface IParameter
Parameters:
isCollection - true if the type is a collection

setTypeName

public void setTypeName(String typeName)
Description copied from interface: IParameter
Set the type name

Specified by:
setTypeName in interface IParameter
Parameters:
typeName - the name


Copyright © 2006-2010 Christian Nentwich and others