/* * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.controller.yang.parser.builder.api; import java.util.List; import org.opendaylight.controller.yang.common.QName; import org.opendaylight.controller.yang.model.api.SchemaPath; import org.opendaylight.controller.yang.model.api.Status; import org.opendaylight.controller.yang.model.api.UnknownSchemaNode; /** * Basic implementation of SchemaNodeBuilder. */ public abstract class AbstractSchemaNodeBuilder extends AbstractBuilder implements SchemaNodeBuilder { protected final QName qname; protected SchemaPath schemaPath; protected String description; protected String reference; protected Status status = Status.CURRENT; protected List unknownNodes; protected AbstractSchemaNodeBuilder(final String moduleName, final int line, final QName qname) { super(moduleName, line); this.qname = qname; } public QName getQName() { return qname; } @Override public SchemaPath getPath() { return schemaPath; } @Override public void setPath(SchemaPath schemaPath) { this.schemaPath = schemaPath; } @Override public String getDescription() { return description; } @Override public void setDescription(String description) { this.description = description; } @Override public String getReference() { return reference; } @Override public void setReference(String reference) { this.reference = reference; } @Override public Status getStatus() { return status; } @Override public void setStatus(Status status) { if (status != null) { this.status = status; } } public void setUnknownNodes(List unknownNodes) { this.unknownNodes = unknownNodes; } }