Class PatternIdentifierParser
java.lang.Object
gov.nist.secauto.oscal.lib.profile.resolver.policy.PatternIdentifierParser
- All Implemented Interfaces:
IIdentifierParser
-
Field Summary
Fields inherited from interface gov.nist.secauto.oscal.lib.profile.resolver.policy.IIdentifierParser
FRAGMENT_PARSER, IDENTITY_PARSER
-
Constructor Summary
ConstructorDescriptionPatternIdentifierParser
(String pattern, int identifierGroup) PatternIdentifierParser
(Pattern pattern, int identifierGroup) -
Method Summary
Modifier and TypeMethodDescriptionint
Parse thereferenceText
for the identifier.Substitute the providednewIdentifier
with the identifier in thereferenceText
.
-
Constructor Details
-
PatternIdentifierParser
-
PatternIdentifierParser
-
-
Method Details
-
getPattern
-
getIdentifierGroup
-
parse
Description copied from interface:IIdentifierParser
Parse thereferenceText
for the identifier.- Specified by:
parse
in interfaceIIdentifierParser
- Parameters:
referenceText
- the reference text containing the identifier- Returns:
- the identifier, or
null
if the identifier could not be parsed
-
update
Description copied from interface:IIdentifierParser
Substitute the providednewIdentifier
with the identifier in thereferenceText
.- Specified by:
update
in interfaceIIdentifierParser
- Parameters:
referenceText
- the reference text containing the original identifiernewIdentifier
- the new identifier to replace the existing identifier- Returns:
- the updated reference text with the identifier replaced
-