001package gov.nist.secauto.oscal.lib.model;
002
003import gov.nist.secauto.metaschema.core.datatype.adapter.UriReferenceAdapter;
004import gov.nist.secauto.metaschema.core.model.IBoundObject;
005import gov.nist.secauto.metaschema.core.model.IMetaschemaData;
006import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag;
007import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly;
008import java.lang.Override;
009import java.lang.String;
010import java.net.URI;
011import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
012import org.apache.commons.lang3.builder.ToStringStyle;
013
014/**
015 * Loads a component definition from another resource.
016 */
017@MetaschemaAssembly(
018    formalName = "Import Component Definition",
019    description = "Loads a component definition from another resource.",
020    name = "import-component-definition",
021    moduleClass = OscalComponentDefinitionModule.class
022)
023public class ImportComponentDefinition implements IBoundObject {
024  private final IMetaschemaData __metaschemaData;
025
026  /**
027   * "A link to a resource that defines a set of components and/or capabilities to import into this collection."
028   */
029  @BoundFlag(
030      formalName = "Hyperlink Reference",
031      description = "A link to a resource that defines a set of components and/or capabilities to import into this collection.",
032      name = "href",
033      required = true,
034      typeAdapter = UriReferenceAdapter.class,
035      remarks = "This value may be one of:\n"
036              + "\n"
037              + "1. an [absolute URI](https://pages.nist.gov/OSCAL/concepts/uri-use/#absolute-uri) that points to a network resolvable resource,\n"
038              + "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"
039              + "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))."
040  )
041  private URI _href;
042
043  public ImportComponentDefinition() {
044    this(null);
045  }
046
047  public ImportComponentDefinition(IMetaschemaData data) {
048    this.__metaschemaData = data;
049  }
050
051  @Override
052  public IMetaschemaData getMetaschemaData() {
053    return __metaschemaData;
054  }
055
056  public URI getHref() {
057    return _href;
058  }
059
060  public void setHref(URI value) {
061    _href = value;
062  }
063
064  @Override
065  public String toString() {
066    return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString();
067  }
068}