001// Generated from: ../../../../../../../../oscal/src/metaschema/oscal_mapping-common_metaschema.xml 002// Do not edit - changes will be lost when regenerated. 003package dev.metaschema.oscal.lib.model; 004 005import dev.metaschema.core.datatype.adapter.StringAdapter; 006import dev.metaschema.core.model.IBoundObject; 007import dev.metaschema.core.model.IMetaschemaData; 008import dev.metaschema.core.util.ObjectUtils; 009import dev.metaschema.databind.model.annotations.BoundFlag; 010import dev.metaschema.databind.model.annotations.MetaschemaAssembly; 011import edu.umd.cs.findbugs.annotations.Nullable; 012import org.apache.commons.lang3.builder.ReflectionToStringBuilder; 013import org.apache.commons.lang3.builder.ToStringStyle; 014 015/** 016 * Selecting a set of controls by matching their IDs with a wildcard pattern. 017 */ 018@MetaschemaAssembly( 019 formalName = "Match Controls by Pattern", 020 description = "Selecting a set of controls by matching their IDs with a wildcard pattern.", 021 name = "matching", 022 moduleClass = OscalMappingCommonModule.class 023) 024public class MappedControlMatching implements IBoundObject { 025 private final IMetaschemaData __metaschemaData; 026 027 /** 028 * A <a href="https://en.wikipedia.org/wiki/Glob_(programming)">glob expression</a> matching the IDs of one or more controls to be selected. 029 */ 030 @BoundFlag( 031 formalName = "Pattern", 032 description = "A [glob expression](https://en.wikipedia.org/wiki/Glob_(programming)) matching the IDs of one or more controls to be selected.", 033 name = "pattern", 034 typeAdapter = StringAdapter.class 035 ) 036 private String _pattern; 037 038 /** 039 * Constructs a new {@code dev.metaschema.oscal.lib.model.MappedControlMatching} instance with no metadata. 040 */ 041 public MappedControlMatching() { 042 this(null); 043 } 044 045 /** 046 * Constructs a new {@code dev.metaschema.oscal.lib.model.MappedControlMatching} instance with the specified metadata. 047 * 048 * @param data 049 * the metaschema data, or {@code null} if none 050 */ 051 public MappedControlMatching(IMetaschemaData data) { 052 this.__metaschemaData = data; 053 } 054 055 @Override 056 public IMetaschemaData getMetaschemaData() { 057 return __metaschemaData; 058 } 059 060 /** 061 * Get the "{@literal Pattern}". 062 * 063 * <p> 064 * A <a href="https://en.wikipedia.org/wiki/Glob_(programming)">glob expression</a> matching the IDs of one or more controls to be selected. 065 * 066 * @return the pattern value, or {@code null} if not set 067 */ 068 @Nullable 069 public String getPattern() { 070 return _pattern; 071 } 072 073 /** 074 * Set the "{@literal Pattern}". 075 * 076 * <p> 077 * A <a href="https://en.wikipedia.org/wiki/Glob_(programming)">glob expression</a> matching the IDs of one or more controls to be selected. 078 * 079 * @param value 080 * the pattern value to set, or {@code null} to clear 081 */ 082 public void setPattern(@Nullable String value) { 083 _pattern = value; 084 } 085 086 @Override 087 public String toString() { 088 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 089 } 090}