001package gov.nist.secauto.oscal.lib.model; 002 003import gov.nist.secauto.metaschema.binding.model.annotations.BoundField; 004import gov.nist.secauto.metaschema.binding.model.annotations.BoundFieldValue; 005import gov.nist.secauto.metaschema.binding.model.annotations.BoundFlag; 006import gov.nist.secauto.metaschema.binding.model.annotations.MetaschemaAssembly; 007import gov.nist.secauto.metaschema.model.common.datatype.adapter.UriReferenceAdapter; 008import gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultiline; 009import gov.nist.secauto.metaschema.model.common.datatype.markup.MarkupMultilineAdapter; 010import java.lang.Override; 011import java.lang.String; 012import java.net.URI; 013import org.apache.commons.lang3.builder.MultilineRecursiveToStringStyle; 014import org.apache.commons.lang3.builder.ReflectionToStringBuilder; 015 016/** 017 * Used to import the OSCAL profile representing the system's control baseline. 018 */ 019@MetaschemaAssembly( 020 formalName = "Import Profile", 021 description = "Used to import the OSCAL profile representing the system's control baseline.", 022 name = "import-profile", 023 metaschema = OscalSspMetaschema.class 024) 025public class ImportProfile { 026 @BoundFlag( 027 formalName = "Profile Reference", 028 description = "A resolvable URL reference to the profile or catalog to use as the system's control baseline.", 029 useName = "href", 030 required = true, 031 typeAdapter = UriReferenceAdapter.class, 032 remarks = "This value may be one of:\n" 033 + "\n" 034 + "1. an [absolute URI](https://pages.nist.gov/OSCAL/concepts/uri-use/#absolute-uri) that points to a network resolvable resource,\n" 035 + "2. a [relative reference](https://pages.nist.gov/OSCAL/concepts/uri-use/#relative-reference) pointing to a network resolvable resource whose base URI is the URI of the containing document, or\n" 036 + "3. a bare URI fragment (i.e., \\`#uuid\\`) pointing to a `back-matter` resource in this or an imported document (see [linking to another OSCAL object](https://pages.nist.gov/OSCAL/concepts/uri-use/#linking-to-another-oscal-object)).\n" 037 + "\n" 038 + "If the resource is an OSCAL profile, it is expected that a tool will resolve the profile according to the OSCAL [profile resolution specification](https://pages.nist.gov/OSCAL/concepts/processing/profile-resolution/) to produce a resolved profile for use when processing the containing system security plan. This allows a system security plan processor to use the baseline as a catalog of controls.\n" 039 + "\n" 040 + "While it is possible to reference a previously resolved OSCAL profile as a catalog, this practice is discouraged since the unresolved form of the profile communicates more information about selections and changes to the underlying catalog. Furthermore, the underlying catalog can be maintained separately from the profile, which also has maintenance advantages for distinct maintainers, ensuring that the best available information is produced through profile resolution." 041 ) 042 private URI _href; 043 044 @BoundField( 045 formalName = "Remarks", 046 description = "Additional commentary about the containing object.", 047 useName = "remarks" 048 ) 049 @BoundFieldValue( 050 typeAdapter = MarkupMultilineAdapter.class 051 ) 052 private MarkupMultiline _remarks; 053 054 public ImportProfile() { 055 } 056 057 public URI getHref() { 058 return _href; 059 } 060 061 public void setHref(URI value) { 062 _href = value; 063 } 064 065 public MarkupMultiline getRemarks() { 066 return _remarks; 067 } 068 069 public void setRemarks(MarkupMultiline value) { 070 _remarks = value; 071 } 072 073 @Override 074 public String toString() { 075 return new ReflectionToStringBuilder(this, MultilineRecursiveToStringStyle.MULTI_LINE_STYLE).toString(); 076 } 077}