001/* 002 * SPDX-FileCopyrightText: none 003 * SPDX-License-Identifier: CC0-1.0 004 */ 005// Generated from: ../../../../../../metaschema/unit-tests.yaml 006// Do not edit - changes will be lost when regenerated. 007 008package dev.metaschema.model.testing.testsuite; 009 010import org.apache.commons.lang3.builder.ReflectionToStringBuilder; 011import org.apache.commons.lang3.builder.ToStringStyle; 012 013import java.net.URI; 014 015import dev.metaschema.core.datatype.adapter.UriReferenceAdapter; 016import dev.metaschema.core.model.IBoundObject; 017import dev.metaschema.core.model.IMetaschemaData; 018import dev.metaschema.core.util.ObjectUtils; 019import dev.metaschema.databind.model.annotations.BoundFlag; 020import dev.metaschema.databind.model.annotations.MetaschemaAssembly; 021import edu.umd.cs.findbugs.annotations.NonNull; 022 023/** 024 * Reference to a metaschema module to load. 025 */ 026@MetaschemaAssembly( 027 formalName = "Metaschema", 028 description = "Reference to a metaschema module to load.", 029 name = "metaschema", 030 moduleClass = MetaschemaTestSuiteModule.class) 031public class Metaschema implements IBoundObject { 032 private final IMetaschemaData __metaschemaData; 033 034 /** 035 * A URI reference to the metaschema module location. 036 */ 037 @BoundFlag( 038 formalName = "Location", 039 description = "A URI reference to the metaschema module location.", 040 name = "location", 041 required = true, 042 typeAdapter = UriReferenceAdapter.class) 043 private URI _location; 044 045 /** 046 * Constructs a new {@code dev.metaschema.model.testing.testsuite.Metaschema} 047 * instance with no metadata. 048 */ 049 public Metaschema() { 050 this(null); 051 } 052 053 /** 054 * Constructs a new {@code dev.metaschema.model.testing.testsuite.Metaschema} 055 * instance with the specified metadata. 056 * 057 * @param data 058 * the metaschema data, or {@code null} if none 059 */ 060 public Metaschema(IMetaschemaData data) { 061 this.__metaschemaData = data; 062 } 063 064 @Override 065 public IMetaschemaData getMetaschemaData() { 066 return __metaschemaData; 067 } 068 069 /** 070 * Get the location. 071 * 072 * <p> 073 * A URI reference to the metaschema module location. 074 * 075 * @return the location value 076 */ 077 @NonNull 078 public URI getLocation() { 079 return _location; 080 } 081 082 /** 083 * Set the location. 084 * 085 * <p> 086 * A URI reference to the metaschema module location. 087 * 088 * @param value 089 * the location value to set 090 */ 091 public void setLocation(@NonNull URI value) { 092 _location = value; 093 } 094 095 @Override 096 public String toString() { 097 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 098 } 099}