27c46a2260e7ce09926871820598d4757fbf36c8
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / util / AbstractDocumentedNodeBuilder.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.yangtools.yang.parser.builder.util;
10
11 import org.opendaylight.yangtools.yang.model.api.DocumentedNode;
12 import org.opendaylight.yangtools.yang.model.api.Status;
13 import org.opendaylight.yangtools.yang.parser.builder.api.DocumentedNodeBuilder;
14
15 public abstract class AbstractDocumentedNodeBuilder extends AbstractBuilder implements DocumentedNodeBuilder{
16     private String description = null;
17     private String reference = null;
18     private Status status = Status.CURRENT;
19
20
21
22     public AbstractDocumentedNodeBuilder(final String moduleName, final int line) {
23         super(moduleName, line);
24     }
25
26     public AbstractDocumentedNodeBuilder(final String moduleName, final int line, final DocumentedNode node) {
27         super(moduleName, line);
28         description = node.getDescription();
29         reference = node.getReference();
30         status = node.getStatus();
31     }
32
33     @Override
34     public final void setDescription(final String description) {
35         this.description = description;
36     }
37
38     @Override
39     public final void setReference(final String reference) {
40         this.reference = reference;
41     }
42
43     @Override
44     public final void setStatus(final Status status) {
45         this.status  = status;
46     }
47
48     @Override
49     public final String getDescription() {
50         return description;
51     }
52
53     @Override
54     public final String getReference() {
55         return reference;
56     }
57
58     @Override
59     public final Status getStatus() {
60         return status;
61     }
62
63 }