com.edustructures.sifworks.tools.mapping
Class MappingsFilter

java.lang.Object
  extended by com.edustructures.sifworks.tools.mapping.MappingsFilter

public class MappingsFilter
extends java.lang.Object

Encapsulates optional filtering attributes for field mapping rules.

A field mapping rule can define any of the following filters:


Constructor Summary
MappingsFilter()
           
 
Method Summary
 boolean evalDirection(MappingsDirection flag)
          Evaluates the Message Direction filter against a direction flag.
 boolean evalVersion(SIFVersion version)
          Evaluates the SIF Version filter against a SIFVersion instance.
 MappingsDirection getDirection()
          Gets the Message Direction filter.
 java.lang.String getSIFVersion()
          Gets the SIF Version filter.
 boolean hasDirectionFilter()
          Determines if the Message Direction filter is specified
 boolean hasVersionFilter()
          Determines if the SIF Version filter is specified
 void setDirection(MappingsDirection dir)
          Sets the Message Direction filter.
 void setSIFVersion(java.lang.String version)
          Sets the SIF Version filter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappingsFilter

public MappingsFilter()
Method Detail

setSIFVersion

public void setSIFVersion(java.lang.String version)
Sets the SIF Version filter.

Parameters:
version - A SIF Version string prefixed by a comparision operator "=", "+" or "-";. For example, specify "=1.5" to match SIF 1.5; "+1.1" to match all versions of SIF equal to or greater than 1.1, "-1.1" to match all versions of SIF less than or equal to SIF 1.1, etc. If no comparision operator is specified Equal To ("=") is assumed.

getSIFVersion

public java.lang.String getSIFVersion()
Gets the SIF Version filter.

Returns:
A SIF Version string prefixed by a comparision operator "=", "<" or ">";. For example, specify "=1.5" to match SIF 1.5; ">1.1" to match all versions of SIF equal to or greater than 1.1, etc. If no comparision operator is specified Equal To ("=") is assumed.

hasVersionFilter

public boolean hasVersionFilter()
Determines if the SIF Version filter is specified

Returns:
True if this filter contains a SIF Version filter.

setDirection

public void setDirection(MappingsDirection dir)
Sets the Message Direction filter.

Parameters:
dir - Any MappingsDirection. constant

getDirection

public MappingsDirection getDirection()
Gets the Message Direction filter.

Returns:
Any MappingsDirection. constant

hasDirectionFilter

public boolean hasDirectionFilter()
Determines if the Message Direction filter is specified

Returns:
True if this filter specifies a direction filter

evalDirection

public boolean evalDirection(MappingsDirection flag)
Evaluates the Message Direction filter against a direction flag.

Parameters:
flag - Any MappingsDirection value
Returns:
true If the message direction filter is undefined or matches the specified flag flag

evalVersion

public boolean evalVersion(SIFVersion version)
Evaluates the SIF Version filter against a SIFVersion instance.

Parameters:
version - A SIFVersion instance
Returns:
true If the SIF Version filter is undefined, or if the version parameter evaluates true given the comparision operator and version of SIF specified by the current filter


Copyright © 2001-2007 Edustructures LLC. All Rights Reserved. SIFWorks® and ADK® are registered trademarks of Edustructures LLC. SIF™ and Schools Interoperability Framework are trademarks of the Schools Interoperability Framework Association.