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