@API(type=INTERNAL,
src=PUBLIC)
public class GenerateIDElementsInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_ID_GENERATION_PATTERN
The default id generation pattern.
|
static java.lang.String |
FILTER_IDS_ON_COPY_KEY
The key from options
|
static java.lang.String |
GENERATE_ID_ELEMENTS_ACTIVE_KEY
The key from options
|
static java.lang.String |
GENERATE_ID_ELEMENTS_KEY
The key from options
|
static java.lang.String |
GENERATE_ID_PATTERN_KEY
The key from options
|
static java.lang.String |
ID_PATTERN_DESCRIPTION
Description for the id pattern macro.
|
static java.lang.String |
LOCAL_NAME_PATTERN_DESCRIPTION
Description for the local name pattern macro.
|
static java.lang.String |
LOCAL_NAME_PATTERN_MACRO
Local name pattern macro.
|
static java.lang.String |
PATTERN_TOOLTIP
The default pattern tooltip.
|
static java.lang.String |
UUID_PATTERN_DESCRIPTION
Description for the uuid pattern macro.
|
Constructor and Description |
---|
GenerateIDElementsInfo(AuthorAccess authorAccess,
GenerateIDElementsInfo defaultOptions)
Constructor.
|
GenerateIDElementsInfo(boolean autoGenerateIds,
java.lang.String idGenerationPattern,
java.lang.String[] elementsWithIDGeneration)
Constructor.
|
GenerateIDElementsInfo(boolean autoGenerateIds,
java.lang.String idGenerationPattern,
java.lang.String[] elementsWithIDGeneration,
boolean filterIDsOnCopy)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
generateID(java.lang.String idGenerationPattern,
java.lang.String elementLocalName)
Generate an ID from a pattern for the specified element.
|
static java.lang.String |
generateID(java.lang.String idGenerationPattern,
java.lang.String elementLocalName,
java.lang.String editorLocation)
Generate an ID from a pattern for the specified element.
|
java.lang.String |
getAttrQname()
Get the QName of the attribute for which to generate the
|
java.lang.String[] |
getElementsWithIDGeneration() |
java.lang.String |
getIdGenerationPattern() |
java.lang.String |
getPatternTooltip()
Get the pattern tooltip.
|
boolean |
isAutoGenerateIDs() |
boolean |
isFilterIDsOnCopy() |
static GenerateIDElementsInfo |
loadDefaultsFromConfiguration(AuthorAccess authorAccess,
java.lang.String proposedXMLResourceName)
Load from the XML configuration.
|
void |
saveToOptions(AuthorAccess authorAccess)
Save to persistent options
|
void |
setAutoGenerateIds(boolean autoGenerateIds)
Set auto generate IDs.
|
void |
setElementsWithIDGeneration(java.lang.String[] elementsWithIDGeneration)
Set a list of elements with ID generation
|
void |
setIdGenerationPattern(java.lang.String idGenerationPattern)
Set the ID generation pattern.
|
void |
setPatternTooltip(java.lang.String patternTooltip)
Set the pattern tooltip which will be shown in the configuration dialog.
|
void |
setRemoveIDsOnCopy(boolean removeIDsOnCopy)
Set the flag which controls whether the IDs will be removed on copy.
|
public static final java.lang.String GENERATE_ID_ELEMENTS_KEY
public static final java.lang.String GENERATE_ID_ELEMENTS_ACTIVE_KEY
public static final java.lang.String GENERATE_ID_PATTERN_KEY
public static final java.lang.String FILTER_IDS_ON_COPY_KEY
public static final java.lang.String LOCAL_NAME_PATTERN_MACRO
public static final java.lang.String LOCAL_NAME_PATTERN_DESCRIPTION
public static final java.lang.String UUID_PATTERN_DESCRIPTION
public static final java.lang.String ID_PATTERN_DESCRIPTION
public static final java.lang.String DEFAULT_ID_GENERATION_PATTERN
public static java.lang.String PATTERN_TOOLTIP
public GenerateIDElementsInfo(AuthorAccess authorAccess, GenerateIDElementsInfo defaultOptions)
authorAccess
- The author accessdefaultOptions
- The default options.public GenerateIDElementsInfo(boolean autoGenerateIds, java.lang.String idGenerationPattern, java.lang.String[] elementsWithIDGeneration)
autoGenerateIds
- true
to auto generate IDs.idGenerationPattern
- The pattern for id generation.elementsWithIDGeneration
- List of elements for which to generate IDs.public GenerateIDElementsInfo(boolean autoGenerateIds, java.lang.String idGenerationPattern, java.lang.String[] elementsWithIDGeneration, boolean filterIDsOnCopy)
autoGenerateIds
- true
to auto generate IDs.idGenerationPattern
- The pattern for id generation.elementsWithIDGeneration
- List of elements for which to generate IDs.filterIDsOnCopy
- Filter IDs when copying content in the same file.public boolean isAutoGenerateIDs()
true
if auto generates IDs for elements.public boolean isFilterIDsOnCopy()
true
to filter IDs when copying content in the Author page.public java.lang.String getIdGenerationPattern()
public java.lang.String[] getElementsWithIDGeneration()
public void saveToOptions(AuthorAccess authorAccess)
authorAccess
- The author accesspublic static java.lang.String generateID(java.lang.String idGenerationPattern, java.lang.String elementLocalName)
idGenerationPattern
- The pattern.elementLocalName
- The element local namepublic static java.lang.String generateID(java.lang.String idGenerationPattern, java.lang.String elementLocalName, java.lang.String editorLocation)
idGenerationPattern
- The pattern.elementLocalName
- The element local nameeditorLocation
- Editor locationpublic void setAutoGenerateIds(boolean autoGenerateIds)
autoGenerateIds
- true
to auto generate IDs.public void setElementsWithIDGeneration(java.lang.String[] elementsWithIDGeneration)
elementsWithIDGeneration
- a list of elements with ID generationpublic void setRemoveIDsOnCopy(boolean removeIDsOnCopy)
removeIDsOnCopy
- The filterIDsOnCopy to set.public void setIdGenerationPattern(java.lang.String idGenerationPattern)
idGenerationPattern
- The idGeneration pattern.public java.lang.String getPatternTooltip()
public void setPatternTooltip(java.lang.String patternTooltip)
patternTooltip
- the pattern tooltip which will be shown in the configuration dialog.public static GenerateIDElementsInfo loadDefaultsFromConfiguration(AuthorAccess authorAccess, java.lang.String proposedXMLResourceName)
authorAccess
- The author accessproposedXMLResourceName
- The proposed name of the resource from which to load the configuration.public java.lang.String getAttrQname()
© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.