|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectquickfix.DataDictionary
public class DataDictionary
Provide the message metadata for various versions of FIX.
Nested Class Summary | |
---|---|
static class |
DataDictionary.Exception
Data dictionary-related exception. |
static class |
DataDictionary.GroupInfo
Contains meta-data for FIX repeating groups |
Field Summary | |
---|---|
static java.lang.String |
ANY_VALUE
|
static java.lang.String |
HEADER_ID
|
static java.lang.String |
TRAILER_ID
|
Constructor Summary | |
---|---|
DataDictionary(DataDictionary source)
Copy a data dictionary. |
|
DataDictionary(java.io.InputStream in)
Initialize a data dictionary from an input stream. |
|
DataDictionary(java.lang.String location)
Initialize a data dictionary from a URL or a file path. |
Method Summary | |
---|---|
java.lang.String |
getFieldName(int field)
Get the field name for a specified tag. |
int |
getFieldTag(java.lang.String name)
Get the field tag given a field name. |
int |
getFieldType(int field)
Get the field type for a field. |
FieldType |
getFieldTypeEnum(int field)
Return the field type for a field. |
DataDictionary.GroupInfo |
getGroup(java.lang.String msg,
int field)
Get repeating group metadata. |
java.lang.String |
getMsgType(java.lang.String msgName)
Return the message type for the specified name. |
int[] |
getOrderedFields()
|
java.lang.String |
getValueName(int field,
java.lang.String value)
Get the value name, if any, for an enumerated field value. |
java.lang.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(java.lang.String msgType)
Predicate for determining if a message is in the admin category. |
boolean |
isAppMessage(java.lang.String msgType)
Predicate for determining if a message is in the app category. |
boolean |
isCheckFieldsOutOfOrder()
|
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,
java.lang.String value)
Predicate for determining if a field value is valid |
boolean |
isGroup(java.lang.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(java.lang.String msgType,
int field)
Predicate for determining if a field is valid for a given message type. |
boolean |
isMsgType(java.lang.String msgType)
Predicate for determining if message type is valid for a specified FIX version. |
boolean |
isRequiredField(java.lang.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 |
setCheckUserDefinedFields(boolean flag)
Controls whether user defined fields are checked. |
void |
validate(Message message)
Validate a mesasge, including the header and trailer fields. |
void |
validate(Message message,
boolean bodyOnly)
Validate the message body, with header and trailer fields being validated conditionally. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ANY_VALUE
public static final java.lang.String HEADER_ID
public static final java.lang.String TRAILER_ID
Constructor Detail |
---|
public DataDictionary(java.lang.String location) throws ConfigError
location
- a URL or file system path
ConfigError
public DataDictionary(java.io.InputStream in) throws ConfigError
in
- the input stream
ConfigError
public DataDictionary(DataDictionary source)
source
- the source dictionary that will be copied into this dictionaryMethod Detail |
---|
public java.lang.String getVersion()
public java.lang.String getFieldName(int field)
field
- the tag
public java.lang.String getValueName(int field, java.lang.String value)
field
- the tagvalue
- the value
public boolean isField(int field)
field
- the tag
public FieldType getFieldTypeEnum(int field)
field
- the tag
public java.lang.String getMsgType(java.lang.String msgName)
msgName
- The message name.
public boolean isMsgType(java.lang.String msgType)
msgType
- the message type value
public boolean isAdminMessage(java.lang.String msgType)
msgType
- the messageType
public boolean isAppMessage(java.lang.String msgType)
msgType
- the messageType
public boolean isMsgField(java.lang.String msgType, int field)
msgType
- the message typefield
- the tag
public boolean isHeaderField(int field)
field
- the tag
public boolean isTrailerField(int field)
field
- the tag
public int getFieldType(int field)
field
- a tag
getFieldTypeEnum(int)
public int getFieldTag(java.lang.String name)
name
- the field name
public boolean isRequiredField(java.lang.String msgType, int field)
msgType
- the message typefield
- the tag
public boolean isRequiredHeaderField(int field)
field
- the tag
public boolean isRequiredTrailerField(int field)
field
- the tag
public boolean hasFieldValue(int field)
field
- the tag
public boolean isFieldValue(int field, java.lang.String value)
field
- the tagvalue
- a possible field value
public boolean isGroup(java.lang.String msg, int field)
msg
- the message typefield
- the tag
public boolean isHeaderGroup(int field)
field
- the tag
public DataDictionary.GroupInfo getGroup(java.lang.String msg, int field)
msg
- the message typefield
- the tag
public boolean isDataField(int field)
field
- the tag
public void setCheckFieldsOutOfOrder(boolean flag)
flag
- true = checked, false = not checkedpublic boolean isCheckFieldsOutOfOrder()
public void setCheckFieldsHaveValues(boolean flag)
flag
- true = checked, false = not checkedpublic void setCheckUserDefinedFields(boolean flag)
flag
- true = checked, false = not checkedpublic void validate(Message message) throws IncorrectTagValue, FieldNotFound, IncorrectDataFormat
message
- the message
IncorrectTagValue
- if a field value is not valid
FieldNotFound
- if a field cannot be found
IncorrectDataFormat
public 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 valid
FieldNotFound
- if a field cannot be found
IncorrectDataFormat
public int[] getOrderedFields()
public void setAllowUnknownMessageFields(boolean allowUnknownFields)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |