|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IMicroPattern
A IMicroPattern instance models the syntactical representation of a Micro Pattern
found in the source code. It is given as an input to the MP Processor dedicated for him
A Micro Pattern has the following structure:
- a MP BEGIN Delimiter sequence depending on the source code technology. It is currently '*{
' for the COBOL language
- a MP identifier (not unique) following the XML syntactical rules for DOM Element identifiers
- a list of well-formed attributes as pairs of name="value"
expressions following the XML syntactical rules for DOM Node Attributes declaration
- an Header Delimiter sequence depending on the source code technology. It is currently '/
' for the COBOL language
- an MP private declaration space that is specific to the MP technology. Its length is determined by the engine and may be reformatted depending on the source code technology
- a local generation area containing previously generated source code if any
- a MP END Delimiter sequence depending on the source code technology. It is currently '*}
' for the COBOL language
Example: the following is an example of a MP for the COBOL language (Pacbase Pattern)
*{WF namespace="com.ibm.pdp" enable="false"/ DSL=IZ
*SEL=60 DSP=SD
01 SD00.
05 SD00-SUITE.
15 FILLER PICTURE X(002016).
[...]
*}
A Micro-Pattern may include another Micro-Pattern in its private declaration area. This latter one is called a child.
Field Summary | |
---|---|
static java.lang.String |
ATTRIBUTE_ENABLED
The Enabled standard attribute name |
static java.lang.String |
ATTRIBUTE_FRAGMENT_ID
The Fragment ID attribute name |
static java.lang.String |
ATTRIBUTE_NAMESPACE
The Namespace standard attribute name |
static java.lang.String |
copyright
|
static java.lang.String |
MICRO_PATTERN_FRAGMENT_TAG_CATEGORY
SyntacticTag category for Micro-Pattern Fragment Tags |
static java.lang.String |
MICRO_PATTERN_LIST_CONTEXT_KEY
key used to retrieve the list of declared Micro-Patterns in the same source from the execution context |
static java.lang.String |
MICRO_PATTERN_TAG_CATEGORY
SyntacticTag category for Micro-Pattern Tags |
static int |
STATUS_OK
The default processing status |
static int |
UNRECOVERABLE_ERROR
|
static int |
WARNING_RAISED
|
Method Summary | |
---|---|
java.lang.String |
getAttribute(java.lang.String attributeName)
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
|
java.util.List<IMicroPattern> |
getChildren()
|
java.lang.String |
getClosingSequence()
|
java.lang.String |
getConfigurationArea()
|
java.lang.String |
getHeader()
|
java.lang.String |
getHeaderDelimiterSequence()
|
java.lang.String |
getId()
|
java.lang.String |
getLocalGenerationArea()
|
com.ibm.pdp.engine.ITextArtefactLocation |
getLocation()
|
java.lang.String |
getOpeningSequence()
|
java.lang.String |
getOriginalHeaderDeclaration()
|
IMicroPatternProcessingContext |
getProcessingContext()
|
java.lang.String |
getStandardHeaderArea()
|
boolean |
isWellFormed()
|
void |
setUsageId(java.lang.String usageId)
This method is intended to be used by Filters in such case as where several Micro-Patterns (with different names) are handled by the same IMicroPatternHandler Example : imagine the Micro-Pattern ID mask as Xnn where nn may be any character string. |
Field Detail |
---|
static final java.lang.String ATTRIBUTE_ENABLED
static final java.lang.String ATTRIBUTE_FRAGMENT_ID
static final java.lang.String ATTRIBUTE_NAMESPACE
static final java.lang.String copyright
static final java.lang.String MICRO_PATTERN_FRAGMENT_TAG_CATEGORY
static final java.lang.String MICRO_PATTERN_LIST_CONTEXT_KEY
static final java.lang.String MICRO_PATTERN_TAG_CATEGORY
static final int STATUS_OK
static final int UNRECOVERABLE_ERROR
static final int WARNING_RAISED
Method Detail |
---|
java.lang.String getAttribute(java.lang.String attributeName)
attributeName
- : the name of an existing attributenull
in case this attribute is not defined in the MP HeadergetAttribute("namespace")
returns com.ibm.pdp
java.util.Map<java.lang.String,java.lang.String> getAttributes()
java.util.List<IMicroPattern> getChildren()
java.lang.String getClosingSequence()
*}
java.lang.String getConfigurationArea()
DSL=IZ SEL=60 DSP=SD
java.lang.String getHeader()
java.lang.String getHeaderDelimiterSequence()
/
java.lang.String getId()
namespace
attribute further describes the Micro Pattern*{WF namespace="com.ibm.pdp" enable="false"/ DSL=IZ
getId()
returns WF
java.lang.String getLocalGenerationArea()
01 SD00.
05 SD00-SUITE.
15 FILLER PICTURE X(002016).
[...]
com.ibm.pdp.engine.ITextArtefactLocation getLocation()
java.lang.String getOpeningSequence()
*{
java.lang.String getOriginalHeaderDeclaration()
*{WF namespace="com.ibm.pdp" / 00012345 Z
IMicroPatternProcessingContext getProcessingContext()
java.lang.String getStandardHeaderArea()
boolean isWellFormed()
void setUsageId(java.lang.String usageId)
nn
may be any character string. To have one single Handler handle all this mask occurrences,
let define a filter that parses the mask and changes the UsageId (defaults to the ID) and replace nn
by a specific attribute
usageId
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |