001package com.example.metaschema;
002
003import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter;
004import gov.nist.secauto.metaschema.core.datatype.adapter.UriAdapter;
005import gov.nist.secauto.metaschema.core.model.IBoundObject;
006import gov.nist.secauto.metaschema.core.model.IMetaschemaData;
007import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag;
008import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly;
009import java.lang.Override;
010import java.lang.String;
011import java.net.URI;
012import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
013import org.apache.commons.lang3.builder.ToStringStyle;
014
015/**
016 * Assigns a Metapath namespace to a prefix for use in a Metapath expression in a lexical qualified name.
017 */
018@MetaschemaAssembly(
019    formalName = "Metapath Namespace Declaration",
020    description = "Assigns a Metapath namespace to a prefix for use in a Metapath expression in a lexical qualified name.",
021    name = "metapath-namespace",
022    moduleClass = MetaschemaModelModule.class
023)
024public class MetapathNamespace implements IBoundObject {
025  private final IMetaschemaData __metaschemaData;
026
027  /**
028   * "The namespace URI to bind to the prefix."
029   */
030  @BoundFlag(
031      formalName = "Metapath Namespace URI",
032      description = "The namespace URI to bind to the prefix.",
033      name = "uri",
034      required = true,
035      typeAdapter = UriAdapter.class
036  )
037  private URI _uri;
038
039  /**
040   * "The prefix that is bound to the namespace."
041   */
042  @BoundFlag(
043      formalName = "Metapath Namespace Prefix",
044      description = "The prefix that is bound to the namespace.",
045      name = "prefix",
046      required = true,
047      typeAdapter = TokenAdapter.class
048  )
049  private String _prefix;
050
051  public MetapathNamespace() {
052    this(null);
053  }
054
055  public MetapathNamespace(IMetaschemaData data) {
056    this.__metaschemaData = data;
057  }
058
059  @Override
060  public IMetaschemaData getMetaschemaData() {
061    return __metaschemaData;
062  }
063
064  public URI getUri() {
065    return _uri;
066  }
067
068  public void setUri(URI value) {
069    _uri = value;
070  }
071
072  public String getPrefix() {
073    return _prefix;
074  }
075
076  public void setPrefix(String value) {
077    _prefix = value;
078  }
079
080  @Override
081  public String toString() {
082    return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString();
083  }
084}