public class DataDictionary extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DataDictionary.GroupInfo
Contains meta-data for FIX repeating groups
|
| Modifier and Type | Field and Description |
|---|---|
static String |
ANY_VALUE |
static String |
HEADER_ID |
static String |
TRAILER_ID |
| Constructor and Description |
|---|
DataDictionary(DataDictionary source)
Copy a data dictionary.
|
DataDictionary(InputStream in)
Initialize a data dictionary from an input stream.
|
DataDictionary(String location)
Initialize a data dictionary from a URL or a file path.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getFieldName(int field)
Get the field name for a specified tag.
|
int |
getFieldTag(String name)
Get the field tag given a field name.
|
FieldType |
getFieldType(int field)
Return the field type for a field.
|
DataDictionary.GroupInfo |
getGroup(String msg,
int field)
Get repeating group metadata.
|
String |
getMsgType(String msgName)
Return the message type for the specified name.
|
int |
getNumMessageCategories() |
int[] |
getOrderedFields() |
String |
getValue(int field,
String name)
Get the value, if any, for an enumerated value name.
|
String |
getValueName(int field,
String value)
Get the value name, if any, for an enumerated field value.
|
String |
getVersion()
Get the FIX version associated with this dictionary.
|
boolean |
hasFieldValue(int field)
Predicate for determining if a field has enumerated values.
|
boolean |
isAdminMessage(String msgType)
Predicate for determining if a message is in the admin category.
|
boolean |
isAllowUnknownMessageFields() |
boolean |
isAppMessage(String msgType)
Predicate for determining if a message is in the app category.
|
boolean |
isCheckFieldsHaveValues() |
boolean |
isCheckFieldsOutOfOrder() |
boolean |
isCheckUnorderedGroupFields() |
boolean |
isCheckUserDefinedFields() |
boolean |
isDataField(int field)
Predicate for determining if a field is a FIX raw data field.
|
boolean |
isField(int field)
Predicate for determining if a tag is a defined field.
|
boolean |
isFieldValue(int field,
String value)
Predicate for determining if a field value is valid
|
boolean |
isGroup(String msg,
int field)
Predicate for determining if a field is a group count field for a message
type.
|
boolean |
isHeaderField(int field)
Predicate for determining if field is a header field.
|
boolean |
isHeaderGroup(int field)
Predicate for determining if a field is a header group count field
|
boolean |
isMsgField(String msgType,
int field)
Predicate for determining if a field is valid for a given message type.
|
boolean |
isMsgType(String msgType)
Predicate for determining if message type is valid for a specified FIX
version.
|
boolean |
isRequiredField(String msgType,
int field)
Predicate for determining if a field is required for a message type
|
boolean |
isRequiredHeaderField(int field)
Predicate for determining if a header field is a required field
|
boolean |
isRequiredTrailerField(int field)
Predicate for determining if a trailer field is a required field
|
boolean |
isTrailerField(int field)
Predicate for determining if field is a trailer field.
|
void |
setAllowUnknownMessageFields(boolean allowUnknownFields) |
void |
setCheckFieldsHaveValues(boolean flag)
Controls whether empty field values are checked.
|
void |
setCheckFieldsOutOfOrder(boolean flag)
Controls whether out of order fields are checked.
|
void |
setCheckUnorderedGroupFields(boolean flag)
Controls whether group fields are in the same order
|
void |
setCheckUserDefinedFields(boolean flag)
Controls whether user defined fields are checked.
|
void |
validate(Message message)
Validate a message, including the header and trailer fields.
|
void |
validate(Message message,
boolean bodyOnly)
Validate the message body, with header and trailer fields being validated conditionally.
|
public static final String ANY_VALUE
public static final String HEADER_ID
public static final String TRAILER_ID
public DataDictionary(String location) throws ConfigError
location - a URL or file system pathConfigErrorpublic DataDictionary(InputStream in) throws ConfigError
in - the input streamConfigErrorpublic DataDictionary(DataDictionary source)
source - the source dictionary that will be copied into this dictionarypublic String getVersion()
public String getFieldName(int field)
field - the tagpublic String getValueName(int field, String value)
field - the tagvalue - the valuepublic String getValue(int field, String name)
field - the tagname - the value namepublic boolean isField(int field)
field - the tagpublic FieldType getFieldType(int field)
field - the tagpublic String getMsgType(String msgName)
msgName - The message name.public boolean isMsgType(String msgType)
msgType - the message type valuepublic boolean isAdminMessage(String msgType)
msgType - the messageTypepublic boolean isAppMessage(String msgType)
msgType - the messageTypepublic boolean isMsgField(String msgType, int field)
msgType - the message typefield - the tagpublic boolean isHeaderField(int field)
field - the tagpublic boolean isTrailerField(int field)
field - the tagpublic int getFieldTag(String name)
name - the field namepublic boolean isRequiredField(String msgType, int field)
msgType - the message typefield - the tagpublic boolean isRequiredHeaderField(int field)
field - the tagpublic boolean isRequiredTrailerField(int field)
field - the tagpublic boolean hasFieldValue(int field)
field - the tagpublic boolean isFieldValue(int field,
String value)
field - the tagvalue - a possible field valuepublic boolean isGroup(String msg, int field)
msg - the message typefield - the tagpublic boolean isHeaderGroup(int field)
field - the tagpublic DataDictionary.GroupInfo getGroup(String msg, int field)
msg - the message typefield - the tagpublic boolean isDataField(int field)
field - the tagpublic void setCheckFieldsOutOfOrder(boolean flag)
flag - true = checked, false = not checkedpublic boolean isCheckFieldsOutOfOrder()
public boolean isCheckUnorderedGroupFields()
public boolean isCheckFieldsHaveValues()
public boolean isCheckUserDefinedFields()
public boolean isAllowUnknownMessageFields()
public void setCheckUnorderedGroupFields(boolean flag)
flag - true = checked, false = not checkedpublic void setCheckFieldsHaveValues(boolean flag)
flag - true = checked, false = not checkedpublic void setCheckUserDefinedFields(boolean flag)
flag - true = checked, false = not checkedpublic void setAllowUnknownMessageFields(boolean allowUnknownFields)
public void validate(Message message) throws IncorrectTagValue, FieldNotFound, IncorrectDataFormat
message - the messageIncorrectTagValue - if a field value is not validFieldNotFound - if a field cannot be foundIncorrectDataFormat - if a field value has a wrong data typepublic void validate(Message message, boolean bodyOnly) throws IncorrectTagValue, FieldNotFound, IncorrectDataFormat
message - the messagebodyOnly - whether to validate just the message body, or to validate the header and trailer sections as well.IncorrectTagValue - if a field value is not validFieldNotFound - if a field cannot be foundIncorrectDataFormat - if a field value has a wrong data typepublic int getNumMessageCategories()
public int[] getOrderedFields()
Copyright © 2020. All rights reserved.