org.inria.ns.reflex.xml.json
Class Configuration

java.lang.Object
  extended by org.inria.ns.reflex.util.json.JSONConfiguration
      extended by org.inria.ns.reflex.xml.json.Configuration

public class Configuration
extends JSONConfiguration

Indicates how to map JSON structures to XML.

Author:
Philippe Poulard

Constructor Summary
Configuration()
           
 
Method Summary
 boolean areArraysNamed()
          Indicates whether non-member arrays will be named or not.
 boolean areObjectsNamed()
           
 QName getArraysName()
          Return the name to set on JSON arrays that are not members.
 QName getObjectsName()
           
 QName getRootName()
           
 boolean isAtomicMembersAreAttributes()
           
 boolean isAttachObjectsToParent()
          Attach directly an object to its parent if the object is not a member.
 boolean isAttachRootObjectToParent()
           
 boolean isMembersAreAttributes()
           
 boolean isMembersAreMultiValuatedAttributes()
           
 boolean isMembersAreUniqueAttributes()
           
 boolean isRootNamed()
           
 Configuration setArraysName(QName arraysName)
          Set the name for JSON arrays that are not members.
 Configuration setAtomicMembersAreAttributes(boolean atomicMembersAreAttributes)
           
 Configuration setAttachObjectsToParent(boolean attachObjectsToParent)
           
 Configuration setAttachRootObjectToParent(boolean attachRootObjectToParent)
           
 Configuration setMembersAreAttributes(boolean membersAreAttributes)
           
 Configuration setMembersAreMultiValuatedAttributes(boolean membersAreMultiValuatedAttributes)
           
 Configuration setMembersAreUniqueAttributes(boolean membersAreUniqueAttributes)
           
 Configuration setObjectNames(QName objectNames)
           
 Configuration setRootName(QName rootName)
           
 
Methods inherited from class org.inria.ns.reflex.util.json.JSONConfiguration
areCommentsEnabled, areCommentsIgnored, areNamesUnique, areStringNamesStrict, disableComments, enableComments, hasToTrackPosition, isAllowingMissingValues, isRootStrict, setAllowingMissingValues, setNamesUniqueness, setRootStrictness, setStringNamesStrictness, setTrackability
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration()
Method Detail

setRootName

public Configuration setRootName(QName rootName)
Parameters:
rootName -
Returns:
This, to allow chaining settings.

getRootName

public QName getRootName()
Returns:

isRootNamed

public boolean isRootNamed()
Returns:

getObjectsName

public QName getObjectsName()
Returns:
the objectNames

setObjectNames

public Configuration setObjectNames(QName objectNames)
Parameters:
objectNames - the objectNames to set

areObjectsNamed

public boolean areObjectsNamed()
Returns:

getArraysName

public QName getArraysName()
Return the name to set on JSON arrays that are not members. Members arrays have their proper name.

Returns:
The name for non-member JSON arrays.

setArraysName

public Configuration setArraysName(QName arraysName)
Set the name for JSON arrays that are not members. Members arrays have their proper name.

Parameters:
arraysName - The name for non-member JSON arrays.

areArraysNamed

public boolean areArraysNamed()
Indicates whether non-member arrays will be named or not. Members arrays have their proper name.

Returns:
true if JSON arrays that are not members have to be named, false otherwise.

isMembersAreAttributes

public boolean isMembersAreAttributes()
Returns:
the membersAreAttributes

setMembersAreAttributes

public Configuration setMembersAreAttributes(boolean membersAreAttributes)
Parameters:
membersAreAttributes - the membersAreAttributes to set

isAtomicMembersAreAttributes

public boolean isAtomicMembersAreAttributes()
Returns:
the atomicMembersAreAttributes

setAtomicMembersAreAttributes

public Configuration setAtomicMembersAreAttributes(boolean atomicMembersAreAttributes)
Parameters:
atomicMembersAreAttributes - the atomicMembersAreAttributes to set

isMembersAreUniqueAttributes

public boolean isMembersAreUniqueAttributes()
Returns:
the membersAreUniqueAttributes

setMembersAreUniqueAttributes

public Configuration setMembersAreUniqueAttributes(boolean membersAreUniqueAttributes)
Parameters:
membersAreUniqueAttributes - the membersAreUniqueAttributes to set

isMembersAreMultiValuatedAttributes

public boolean isMembersAreMultiValuatedAttributes()
Returns:
the membersAreMultiValuatedAttributes

setMembersAreMultiValuatedAttributes

public Configuration setMembersAreMultiValuatedAttributes(boolean membersAreMultiValuatedAttributes)
Parameters:
membersAreMultiValuatedAttributes - the membersAreMultiValuatedAttributes to set

isAttachObjectsToParent

public boolean isAttachObjectsToParent()
Attach directly an object to its parent if the object is not a member. The members of the object will be added as attributes or elements to the parent.

Returns:
the attachObjectsToParent

setAttachObjectsToParent

public Configuration setAttachObjectsToParent(boolean attachObjectsToParent)
Parameters:
attachObjectsToParent - the attachObjectsToParent to set

setAttachRootObjectToParent

public Configuration setAttachRootObjectToParent(boolean attachRootObjectToParent)

isAttachRootObjectToParent

public boolean isAttachRootObjectToParent()