2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.yangtools.yang.model.api;
10 import java.util.Optional;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.yangtools.yang.common.QNameModule;
13 import org.opendaylight.yangtools.yang.common.Revision;
14 import org.opendaylight.yangtools.yang.common.XMLNamespace;
16 public interface QNameModuleAware {
18 * Returns a {@link QNameModule}, which contains the namespace and the revision of the module.
20 * @return QNameModule identifier.
22 @NonNull QNameModule getQNameModule();
24 default @NonNull XMLNamespace getNamespace() {
25 return getQNameModule().getNamespace();
28 default @NonNull Optional<Revision> getRevision() {
29 return getQNameModule().getRevision();