org.fudgemsg.json
Class JSONSettings

java.lang.Object
  extended by org.fudgemsg.json.JSONSettings

public class JSONSettings
extends Object

Tunable parameters for the JSON encoding/decoding. Please refer to JSON Fudge Messages for details on the representation.


Field Summary
static String DEFAULT_PROCESSINGDIRECTIVES_FIELD
          Default name for the processing directives field.
static String DEFAULT_SCHEMAVERSION_FIELD
          Default name for the schema version field.
static String DEFAULT_TAXONOMY_FIELD
          Default name for the taxonomy field.
 
Constructor Summary
JSONSettings()
          Creates a new settings object with the default values.
JSONSettings(JSONSettings copy)
          Creates a new settings object copying the current values from another.
 
Method Summary
 boolean getPreferFieldNames()
           
 String getProcessingDirectivesField()
          Returns the name of the field to use for the processing directives, or null if it is to be omitted.
 String getSchemaVersionField()
          Returns the name of the field to use for the schema version, or null if it is to be omitted.
 String getTaxonomyField()
          Returns the name of the field to use for the taxonomy, or null if it is to be omitted.
 void setPreferFieldNames(boolean preferFieldNames)
           
 void setProcessingDirectivesField(String processingDirectivesField)
          Sets the field name to use for adding the message processing directives to the JSON object.
 void setSchemaVersionField(String schemaVersionField)
          Sets the field name to use for adding the schema version to the JSON object.
 void setTaxonomyField(String taxonomyField)
          Sets the field name to use for adding the taxonomy Id to the JSON object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PROCESSINGDIRECTIVES_FIELD

public static final String DEFAULT_PROCESSINGDIRECTIVES_FIELD
Default name for the processing directives field.

See Also:
Constant Field Values

DEFAULT_SCHEMAVERSION_FIELD

public static final String DEFAULT_SCHEMAVERSION_FIELD
Default name for the schema version field.

See Also:
Constant Field Values

DEFAULT_TAXONOMY_FIELD

public static final String DEFAULT_TAXONOMY_FIELD
Default name for the taxonomy field.

See Also:
Constant Field Values
Constructor Detail

JSONSettings

public JSONSettings()
Creates a new settings object with the default values.


JSONSettings

public JSONSettings(JSONSettings copy)
Creates a new settings object copying the current values from another.

Parameters:
copy - object to copy the settings from
Method Detail

getProcessingDirectivesField

public String getProcessingDirectivesField()
Returns the name of the field to use for the processing directives, or null if it is to be omitted.

Returns:
the field name, or null to omit

getSchemaVersionField

public String getSchemaVersionField()
Returns the name of the field to use for the schema version, or null if it is to be omitted.

Returns:
the field name, or null to omit

getTaxonomyField

public String getTaxonomyField()
Returns the name of the field to use for the taxonomy, or null if it is to be omitted.

Returns:
the field name, or null to omit

setProcessingDirectivesField

public void setProcessingDirectivesField(String processingDirectivesField)
Sets the field name to use for adding the message processing directives to the JSON object. Set to null to omit the field.

Parameters:
processingDirectivesField - field name or null to omit

setSchemaVersionField

public void setSchemaVersionField(String schemaVersionField)
Sets the field name to use for adding the schema version to the JSON object. Set to null to omit the field.

Parameters:
schemaVersionField - field name or null to omit

setTaxonomyField

public void setTaxonomyField(String taxonomyField)
Sets the field name to use for adding the taxonomy Id to the JSON object. Set to null to omit the field.

Parameters:
taxonomyField - field name or null to omit

setPreferFieldNames

public void setPreferFieldNames(boolean preferFieldNames)

getPreferFieldNames

public boolean getPreferFieldNames()


Copyright 2009-Present by OpenGamma Inc. and individual contributors
Released under the Apache License, Version 2.0