View Javadoc
1   package gov.nist.secauto.oscal.lib.model;
2   
3   import gov.nist.secauto.metaschema.binding.model.annotations.BoundFlag;
4   import gov.nist.secauto.metaschema.binding.model.annotations.MetaschemaAssembly;
5   import gov.nist.secauto.metaschema.model.common.datatype.adapter.UriReferenceAdapter;
6   import java.lang.Override;
7   import java.lang.String;
8   import java.net.URI;
9   import org.apache.commons.lang3.builder.MultilineRecursiveToStringStyle;
10  import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
11  
12  /**
13   * Loads a component definition from another resource.
14   */
15  @MetaschemaAssembly(
16      formalName = "Import Component Definition",
17      description = "Loads a component definition from another resource.",
18      name = "import-component-definition",
19      metaschema = OscalComponentDefinitionMetaschema.class
20  )
21  public class ImportComponentDefinition {
22    @BoundFlag(
23        formalName = "Hyperlink Reference",
24        description = "A link to a resource that defines a set of components and/or capabilities to import into this collection.",
25        useName = "href",
26        required = true,
27        typeAdapter = UriReferenceAdapter.class,
28        remarks = "This value may be one of:\n"
29                + "\n"
30                + "1. an [absolute URI](https://pages.nist.gov/OSCAL/concepts/uri-use/#absolute-uri) that points to a network resolvable resource,\n"
31                + "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"
32                + "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))."
33    )
34    private URI _href;
35  
36    public ImportComponentDefinition() {
37    }
38  
39    public URI getHref() {
40      return _href;
41    }
42  
43    public void setHref(URI value) {
44      _href = value;
45    }
46  
47    @Override
48    public String toString() {
49      return new ReflectionToStringBuilder(this, MultilineRecursiveToStringStyle.MULTI_LINE_STYLE).toString();
50    }
51  }