Merge "removed dead code that was causing a warning"
[controller.git] / opendaylight / sal / yang-prototype / code-generator / yang-model-parser-impl / src / main / java / org / opendaylight / controller / model / parser / builder / MustDefinitionBuilder.java
1 /*\r
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 package org.opendaylight.controller.model.parser.builder;\r
9 \r
10 import org.opendaylight.controller.model.parser.api.Builder;\r
11 import org.opendaylight.controller.yang.model.api.MustDefinition;\r
12 import org.opendaylight.controller.yang.model.api.RevisionAwareXPath;\r
13 \r
14 \r
15 public class MustDefinitionBuilder implements Builder {\r
16 \r
17         private final MustDefinitionImpl instance;\r
18 \r
19         MustDefinitionBuilder(String xpathStr) {\r
20                 instance = new MustDefinitionImpl(xpathStr);\r
21         }\r
22 \r
23         @Override\r
24         public MustDefinition build() {\r
25                 return instance;\r
26         }\r
27 \r
28         public void setDescription(String description) {\r
29                 instance.setDescription(description);\r
30         }\r
31 \r
32         public void setReference(String reference) {\r
33                 instance.setReference(reference);\r
34         }\r
35 \r
36         private static class MustDefinitionImpl implements MustDefinition {\r
37 \r
38                 private final String xpathStr;\r
39                 private String description;\r
40                 private String reference;\r
41 \r
42                 private MustDefinitionImpl(String xpathStr) {\r
43                         this.xpathStr = xpathStr;\r
44                 }\r
45 \r
46                 @Override\r
47                 public String getDescription() {\r
48                         return description;\r
49                 }\r
50                 private void setDescription(String description) {\r
51                         this.description = description;\r
52                 }\r
53 \r
54                 @Override\r
55                 public String getErrorAppTag() {\r
56                         // TODO Auto-generated method stub\r
57                         return null;\r
58                 }\r
59 \r
60                 @Override\r
61                 public String getErrorMessage() {\r
62                         // TODO Auto-generated method stub\r
63                         return null;\r
64                 }\r
65 \r
66                 @Override\r
67                 public String getReference() {\r
68                         return reference;\r
69                 }\r
70                 private void setReference(String reference) {\r
71                         this.reference = reference;\r
72                 }\r
73 \r
74                 @Override\r
75                 public RevisionAwareXPath getXpath() {\r
76                         // TODO Auto-generated method stub\r
77                         return null;\r
78                 }\r
79 \r
80                 @Override\r
81                 public String toString() {\r
82                         return MustDefinitionImpl.class.getSimpleName() +"[xpathStr="+ xpathStr +"]";\r
83                 }\r
84         }\r
85 \r
86 }\r