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
ConstructorsConstructorDescriptionPatternIdentifierParser(String pattern, int identifierGroup) PatternIdentifierParser(Pattern pattern, int identifierGroup) -
Method Summary
Modifier and TypeMethodDescriptionintParse thereferenceTextfor the identifier.Substitute the providednewIdentifierwith the identifier in thereferenceText.
-
Constructor Details
-
PatternIdentifierParser
-
PatternIdentifierParser
-
-
Method Details
-
getPattern
-
getIdentifierGroup
-
parse
Description copied from interface:IIdentifierParserParse thereferenceTextfor the identifier.- Specified by:
parsein interfaceIIdentifierParser- Parameters:
referenceText- the reference text containing the identifier- Returns:
- the identifier, or
nullif the identifier could not be parsed
-
update
Description copied from interface:IIdentifierParserSubstitute the providednewIdentifierwith the identifier in thereferenceText.- Specified by:
updatein 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
-