- private final class ModuleImpl implements Module {
- private URI namespace;
- private final String name;
- private Date revision;
- private String prefix;
- private String yangVersion;
- private String description;
- private String reference;
- private String organization;
- private String contact;
- private Set<ModuleImport> imports = Collections.emptySet();
- private Set<FeatureDefinition> features = Collections.emptySet();
- private Set<TypeDefinition<?>> typeDefinitions = Collections.emptySet();
- private Set<NotificationDefinition> notifications = Collections.emptySet();
- private Set<AugmentationSchema> augmentations = Collections.emptySet();
- private Set<RpcDefinition> rpcs = Collections.emptySet();
- private Set<Deviation> deviations = Collections.emptySet();
- private Map<QName, DataSchemaNode> childNodes = Collections.emptyMap();
- private Set<GroupingDefinition> groupings = Collections.emptySet();
- private Set<UsesNode> uses = Collections.emptySet();
- private List<ExtensionDefinition> extensionNodes = Collections.emptyList();
- private Set<IdentitySchemaNode> identities = Collections.emptySet();
- private List<UnknownSchemaNode> unknownNodes = Collections.emptyList();
-
- private ModuleImpl(String name) {
- this.name = name;
- }
-
- @Override
- public URI getNamespace() {
- return namespace;
- }
-
- private void setNamespace(URI namespace) {
- this.namespace = namespace;
- }
-
- @Override
- public String getName() {
- return name;
- }
-
- @Override
- public Date getRevision() {
- return revision;
- }
-
- private void setRevision(Date revision) {
- this.revision = revision;
- }
-
- @Override
- public String getPrefix() {
- return prefix;
- }
-
- private void setPrefix(String prefix) {
- this.prefix = prefix;
- }
-
- @Override
- public String getYangVersion() {
- return yangVersion;
- }
-
- private void setYangVersion(String yangVersion) {
- this.yangVersion = yangVersion;
- }
-
- @Override
- public String getDescription() {
- return description;
- }
-
- private void setDescription(String description) {
- this.description = description;
- }
-
- @Override
- public String getReference() {
- return reference;
- }
-
- private void setReference(String reference) {
- this.reference = reference;
- }
-
- @Override
- public String getOrganization() {
- return organization;
- }
-
- private void setOrganization(String organization) {
- this.organization = organization;
- }
-
- @Override
- public String getContact() {
- return contact;
- }
-
- private void setContact(String contact) {
- this.contact = contact;
- }
-
- @Override
- public Set<ModuleImport> getImports() {
- return imports;
- }
-
- private void setImports(Set<ModuleImport> imports) {
- if (imports != null) {
- this.imports = imports;
- }
- }
-
- @Override
- public Set<FeatureDefinition> getFeatures() {
- return features;
- }
-
- private void setFeatures(Set<FeatureDefinition> features) {
- if (features != null) {
- this.features = features;
- }
- }
-
- @Override
- public Set<TypeDefinition<?>> getTypeDefinitions() {
- return typeDefinitions;
- }
-
- private void setTypeDefinitions(Set<TypeDefinition<?>> typeDefinitions) {
- if (typeDefinitions != null) {
- this.typeDefinitions = typeDefinitions;
- }
- }
-
- @Override
- public Set<NotificationDefinition> getNotifications() {
- return notifications;
- }
-
- private void setNotifications(Set<NotificationDefinition> notifications) {
- if (notifications != null) {
- this.notifications = notifications;
- }
- }
-
- @Override
- public Set<AugmentationSchema> getAugmentations() {
- return augmentations;
- }
-
- private void setAugmentations(Set<AugmentationSchema> augmentations) {
- if (augmentations != null) {
- this.augmentations = augmentations;
- }
- }
-
- @Override
- public Set<RpcDefinition> getRpcs() {
- return rpcs;
- }
-
- private void setRpcs(Set<RpcDefinition> rpcs) {
- if (rpcs != null) {
- this.rpcs = rpcs;
- }
- }
-
- @Override
- public Set<Deviation> getDeviations() {
- return deviations;
- }
-
- private void setDeviations(Set<Deviation> deviations) {
- if (deviations != null) {
- this.deviations = deviations;
- }
- }
-
- @Override
- public Set<DataSchemaNode> getChildNodes() {
- return new LinkedHashSet<DataSchemaNode>(childNodes.values());
- }
-
- private void setChildNodes(Map<QName, DataSchemaNode> childNodes) {
- if (childNodes != null) {
- this.childNodes = childNodes;
- }
- }