public class MessageSchema extends Object implements IMessageSchema
Modifier and Type | Class and Description |
---|---|
static class |
MessageSchema.Endianess |
Modifier and Type | Field and Description |
---|---|
static String |
LICENSE_DIRECTORY_DEFAULT |
static String |
LICENSE_FILE_DEFAULT |
Constructor and Description |
---|
MessageSchema(Document xmlSchema)
Constructs object by XML template.
|
MessageSchema(Document xmlSchema,
boolean isMdp3)
Construct schema to use with CME specifications.
|
MessageSchema(Document xmlSchema,
FramingHeaderPolicy framingHeaderPolicy)
Constructs object by XML template.
|
Modifier and Type | Method and Description |
---|---|
void |
addMessage(UnifiedMetaData message) |
UnifiedMetaData |
findType(Function<UnifiedMetaData,Boolean> condition) |
String |
getDescription()
Returns schema description of the schema.
|
MessageSchema.Endianess |
getEndianess() |
int |
getFrameHeaderSize()
Returns size of the frame header.
|
FramingHeaderSpecification |
getFramingHeaderSpecification() |
UnifiedMetaData |
getHeaderType()
Returns definition of messages header type.
|
String |
getHeaderTypeName() |
int |
getId()
Returns schema id.
|
static String |
getLicense()
Gets license content.
|
static String |
getLicenseDirectory()
Gets path to the license file directory.
|
LocalDate |
getLicenseExpirationDate()
Gets license expiration date.
|
static String |
getLicenseFile()
Gets path to the license file.
|
Map<Integer,UnifiedMetaData> |
getMessages()
Gets map of all messages in the schema.
|
Map<String,UnifiedMetaData> |
getMessagesByNames() |
String |
getPackage()
Returns schema name.
|
String |
getPackageName() |
UnifiedMetaData |
getResolvedHeaderType() |
String |
getSemanticVersion()
Returns the semantic version of the schema.
|
UnifiedMetaData |
getType(String name)
Gets type from schema dictionary.
|
Map<String,UnifiedMetaData> |
getTypes() |
int |
getVersion()
Returns schema version.
|
boolean |
isLittleEndian()
Returns byte order.
|
boolean |
isMdp3Mode()
Returns CME MDP3 mode.
|
void |
recognizeTypes() |
void |
resolveHeaders() |
void |
resolveInternalLinks() |
void |
resolveOffsets() |
void |
resolveValues() |
static void |
setLicense(String license)
Sets license content.
|
static void |
setLicenseDirectory(String licenseDirectory)
Sets path to the license file directory.
|
static void |
setLicenseFile(String licenseFile)
Sets path to the license file.
|
public static final String LICENSE_DIRECTORY_DEFAULT
public static final String LICENSE_FILE_DEFAULT
public MessageSchema(Document xmlSchema, boolean isMdp3) throws LicenseException
xmlSchema
- CME SBE template schema.isMdp3
- true for MDP3 templates, false - for iLink3 templates.LicenseException
- if the license not found.public MessageSchema(Document xmlSchema) throws LicenseException
xmlSchema
- XML document with SBE template.LicenseException
- if valid license not found.public MessageSchema(Document xmlSchema, FramingHeaderPolicy framingHeaderPolicy) throws LicenseException
xmlSchema
- XML document with SBE template.framingHeaderPolicy
- framing header creating policy.LicenseException
- if valid license not found.public static String getLicenseDirectory()
LICENSE_DIRECTORY_DEFAULT
directory.public static void setLicenseDirectory(String licenseDirectory)
LICENSE_DIRECTORY_DEFAULT
directory.licenseDirectory
- path to directory.public static String getLicenseFile()
LICENSE_FILE_DEFAULT
.public static void setLicenseFile(String licenseFile)
LICENSE_FILE_DEFAULT
.licenseFile
- path to file.public static String getLicense()
public static void setLicense(String license)
license
- license content.public LocalDate getLicenseExpirationDate()
public String getPackageName()
public int getVersion()
IMessageSchema
getVersion
in interface IMessageSchema
public String getDescription()
IMessageSchema
getDescription
in interface IMessageSchema
public int getFrameHeaderSize()
IMessageSchema
getFrameHeaderSize
in interface IMessageSchema
public boolean isMdp3Mode()
IMessageSchema
isMdp3Mode
in interface IMessageSchema
public UnifiedMetaData getHeaderType()
IMessageSchema
getHeaderType
in interface IMessageSchema
public MessageSchema.Endianess getEndianess()
public boolean isLittleEndian()
IMessageSchema
isLittleEndian
in interface IMessageSchema
public String getSemanticVersion()
IMessageSchema
getSemanticVersion
in interface IMessageSchema
public String getPackage()
IMessageSchema
getPackage
in interface IMessageSchema
public int getId()
IMessageSchema
getId
in interface IMessageSchema
public Map<String,UnifiedMetaData> getTypes()
public Map<String,UnifiedMetaData> getMessagesByNames()
public String getHeaderTypeName()
public UnifiedMetaData getType(String name)
IMessageSchema
getType
in interface IMessageSchema
name
- name of a type in schema type dictionarypublic Map<Integer,UnifiedMetaData> getMessages()
IMessageSchema
getMessages
in interface IMessageSchema
public UnifiedMetaData getResolvedHeaderType()
public FramingHeaderSpecification getFramingHeaderSpecification()
public void addMessage(UnifiedMetaData message)
public void resolveInternalLinks()
public void recognizeTypes()
public void resolveOffsets()
public void resolveValues()
public UnifiedMetaData findType(Function<UnifiedMetaData,Boolean> condition)
public void resolveHeaders()
Copyright © 2005–2024 Onix Solutions. All rights reserved.