X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-parser-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fparser%2Fstmt%2Frfc6020%2Feffective%2FAbstractEffectiveDocumentedNode.java;h=ce4eeff53bf1ced17cd67884bedc1f3ec9aa2db3;hb=91f43b1ce6453fef9e04e6673e7637fb5dba8b38;hp=763b14216238f55b21f27703df9ebae18e9c2cad;hpb=5c3e87d88694d9f0bbb2ab872b4e68c7d6823dd3;p=yangtools.git
diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AbstractEffectiveDocumentedNode.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AbstractEffectiveDocumentedNode.java
index 763b142162..ce4eeff53b 100644
--- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AbstractEffectiveDocumentedNode.java
+++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AbstractEffectiveDocumentedNode.java
@@ -1,4 +1,4 @@
-/**
+/*
* Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -7,38 +7,47 @@
*/
package org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective;
-import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
-
-import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
import org.opendaylight.yangtools.yang.model.api.DocumentedNode;
import org.opendaylight.yangtools.yang.model.api.Status;
+import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
public abstract class AbstractEffectiveDocumentedNode>
- extends EffectiveStatementBase implements DocumentedNode {
+ extends DeclaredEffectiveStatementBase implements DocumentedNode {
private final String description;
private final String reference;
private final Status status;
- AbstractEffectiveDocumentedNode(final StmtContext ctx) {
+ /**
+ * Constructor.
+ *
+ * @param ctx
+ * context of statement.
+ */
+ protected AbstractEffectiveDocumentedNode(final StmtContext ctx) {
super(ctx);
- DescriptionEffectiveStatementImpl descStmt = firstEffective(DescriptionEffectiveStatementImpl.class);
+ final DescriptionEffectiveStatementImpl descStmt = firstEffective(DescriptionEffectiveStatementImpl.class);
if (descStmt != null) {
description = descStmt.argument();
} else {
- description = "";
+ description = null;
}
- ReferenceEffectiveStatementImpl refStmt = firstEffective(ReferenceEffectiveStatementImpl.class);
+ final ReferenceEffectiveStatementImpl refStmt = firstEffective(ReferenceEffectiveStatementImpl.class);
if (refStmt != null) {
reference = refStmt.argument();
} else {
- reference = "";
+ reference = null;
}
- // :TODO
- status = null;
+ final StatusEffectiveStatementImpl statusStmt = firstEffective(StatusEffectiveStatementImpl.class);
+ if (statusStmt != null) {
+ status = statusStmt.argument();
+ } else {
+ status = Status.CURRENT;
+ }
}
@Override
@@ -55,5 +64,4 @@ public abstract class AbstractEffectiveDocumentedNode