blob: 2d79a6ffd06a6a7e99751a19035d56d4972ad26a [file] [log] [blame]
Vinod Kumar S17711e52016-02-09 20:02:43 +05301/*
2 * Copyright 2016 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.yangutils.datamodel;
18
19import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
20import org.onosproject.yangutils.parser.Parsable;
21import org.onosproject.yangutils.parser.ParsableDataType;
22
23/*
24 * Reference:RFC 6020.
25 * The "namespace" statement defines the XML namespace that all
26 * identifiers defined by the module are qualified by, with the
27 * exception of data node identifiers defined inside a grouping.
28 * The argument to the "namespace" statement is the URI of the
29 * namespace.
30 */
31
32/**
33 * Name space to be used for the XML data tree.
34 */
35public class YangNameSpace implements Parsable {
36
37 private String uri;
38
39 /**
40 * Default constructor.
41 */
42 public YangNameSpace() {
43 }
44
45 /**
46 * Get the name space URI.
47 *
48 * @return the URI.
49 */
50 public String getUri() {
51 return uri;
52 }
53
54 /**
55 * Set the name space URI.
56 *
57 * @param uri the URI to set
58 */
59 public void setUri(String uri) {
60 this.uri = uri;
61 }
62
63 /**
64 * Returns the type of the parsed data.
65 *
66 * @return returns NAMESPACE_DATA.
67 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053068 @Override
Vinod Kumar S17711e52016-02-09 20:02:43 +053069 public ParsableDataType getParsableDataType() {
70 return ParsableDataType.NAMESPACE_DATA;
71 }
72
73 /**
74 * Validate the data on entering the corresponding parse tree node.
75 *
76 * @throws DataModelException a violation of data model rules.
77 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053078 @Override
Vinod Kumar S17711e52016-02-09 20:02:43 +053079 public void validateDataOnEntry() throws DataModelException {
80 // TODO auto-generated method stub, to be implemented by parser
81
82 }
83
84 /**
85 * Validate the data on exiting the corresponding parse tree node.
86 *
87 * @throws DataModelException a violation of data model rules.
88 */
Vinod Kumar S0c330cd2016-02-23 22:36:57 +053089 @Override
Vinod Kumar S17711e52016-02-09 20:02:43 +053090 public void validateDataOnExit() throws DataModelException {
91 // TODO auto-generated method stub, to be implemented by parser
92
93 }
94}