Oxygen XML Editor 11.2 Author API

ro.sync.ecss.extensions.commons.id
Class GenerateIDElementsInfo

java.lang.Object
  extended by ro.sync.ecss.extensions.commons.id.GenerateIDElementsInfo

public class GenerateIDElementsInfo
extends Object

Information about the list of elements for which to generate auto ID + if the auto ID generation is activated


Field Summary
static String DEFAULT_ID_GENERATION_PATTERN
          The default id generation pattern.
static String GENERATE_ID_ELEMENTS_ACTIVE_KEY
          The key from options
static String GENERATE_ID_ELEMENTS_KEY
          The key from options
static String GENERATE_ID_PATTERN_KEY
          The key from options
static String LOCAL_NAME_PATTERN_DESCRIPTION
          Description for the local name pattern macro.
static String LOCAL_NAME_PATTERN_MACRO
          Local name pattern macro.
static String UUID_PATTERN_DESCRIPTION
          Description for the uuid pattern macro.
static String UUID_PATTERN_MACRO
          UUID pattern macro.
 
Constructor Summary
GenerateIDElementsInfo(AuthorAccess authorAccess, GenerateIDElementsInfo defaultOptions)
          Constructor.
GenerateIDElementsInfo(boolean autoGenerateIds, String idGenerationPattern, String[] elementsWithIDGeneration)
          Constructor.
 
Method Summary
static String generateID(String idGenerationPattern, String elementLocalName)
          Generate an ID from a pattern for the specified element.
 String[] getElementsWithIDGeneration()
           
 String getIdGenerationPattern()
           
 boolean isAutoGenerateIDs()
           
 void saveToOptions(AuthorAccess authorAccess)
          Save to persistent options
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GENERATE_ID_ELEMENTS_KEY

public static final String GENERATE_ID_ELEMENTS_KEY
The key from options

See Also:
Constant Field Values

GENERATE_ID_ELEMENTS_ACTIVE_KEY

public static final String GENERATE_ID_ELEMENTS_ACTIVE_KEY
The key from options

See Also:
Constant Field Values

GENERATE_ID_PATTERN_KEY

public static final String GENERATE_ID_PATTERN_KEY
The key from options

See Also:
Constant Field Values

LOCAL_NAME_PATTERN_MACRO

public static final String LOCAL_NAME_PATTERN_MACRO
Local name pattern macro.

See Also:
Constant Field Values

LOCAL_NAME_PATTERN_DESCRIPTION

public static final String LOCAL_NAME_PATTERN_DESCRIPTION
Description for the local name pattern macro.

See Also:
Constant Field Values

UUID_PATTERN_MACRO

public static final String UUID_PATTERN_MACRO
UUID pattern macro.

See Also:
Constant Field Values

UUID_PATTERN_DESCRIPTION

public static final String UUID_PATTERN_DESCRIPTION
Description for the uuid pattern macro.

See Also:
Constant Field Values

DEFAULT_ID_GENERATION_PATTERN

public static final String DEFAULT_ID_GENERATION_PATTERN
The default id generation pattern.

See Also:
Constant Field Values
Constructor Detail

GenerateIDElementsInfo

public GenerateIDElementsInfo(AuthorAccess authorAccess,
                              GenerateIDElementsInfo defaultOptions)
Constructor.

Parameters:
authorAccess - The author access
defaultOptions - The default options.

GenerateIDElementsInfo

public GenerateIDElementsInfo(boolean autoGenerateIds,
                              String idGenerationPattern,
                              String[] elementsWithIDGeneration)
Constructor.

Parameters:
autoGenerateIds - True to auto generate IDs
idGenerationPattern - The pattern for id generation.
elementsWithIDGeneration - List of elements for which to generate IDs
Method Detail

isAutoGenerateIDs

public boolean isAutoGenerateIDs()
Returns:
Returns true if auto generates IDs for elements.

getIdGenerationPattern

public String getIdGenerationPattern()
Returns:
Returns the pattern for id generation.

getElementsWithIDGeneration

public String[] getElementsWithIDGeneration()
Returns:
Returns the elements for which to generate IDs.

saveToOptions

public void saveToOptions(AuthorAccess authorAccess)
Save to persistent options

Parameters:
authorAccess - The author access

generateID

public static String generateID(String idGenerationPattern,
                                String elementLocalName)
Generate an ID from a pattern for the specified element.

Parameters:
idGenerationPattern - The pattern.
elementLocalName - The element local name
Returns:
The generated ID.

Oxygen XML Editor 11.2 Author API

© Copyright SyncRO Soft SRL 2002 - 2010.