BUG-865: deprecate pre-Beryllium parser elements
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / builder / util / AbstractDocumentedNode.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 com.google.common.base.Preconditions;
12 import org.opendaylight.yangtools.yang.model.api.DocumentedNode;
13 import org.opendaylight.yangtools.yang.model.api.Status;
14
15 /**
16  * @deprecated Pre-Beryllium implementation, scheduled for removal.
17  */
18 @Deprecated
19 public abstract class AbstractDocumentedNode implements DocumentedNode {
20
21     private final String description;
22     private final String reference;
23     private final Status status;
24
25     AbstractDocumentedNode(final AbstractDocumentedNodeBuilder builder) {
26         Preconditions.checkArgument(builder.isSealed(), "Builder must be sealed.");
27         this.description = builder.getDescription();
28         this.reference = builder.getReference();
29         this.status = builder.getStatus();
30     }
31
32     @Override
33     public final String getDescription() {
34         return description;
35     }
36
37     @Override
38     public final String getReference() {
39         return reference;
40     }
41
42     @Override
43     public final Status getStatus() {
44         return status;
45     }
46
47 }