Containerization feature of SO
[so.git] / common / src / main / java / org / onap / so / client / aai / entities / uri / AAISimpleUri.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.so.client.aai.entities.uri;
22
23 import java.net.URI;
24
25 import javax.ws.rs.core.UriBuilder;
26
27 import org.onap.so.client.aai.AAIObjectPlurals;
28 import org.onap.so.client.aai.AAIObjectType;
29 import org.onap.so.client.graphinventory.Format;
30 import org.onap.so.client.graphinventory.entities.uri.Depth;
31 import org.onap.so.client.graphinventory.entities.uri.SimpleUri;
32
33 public class AAISimpleUri extends SimpleUri implements AAIResourceUri {
34         
35         protected AAISimpleUri(AAIObjectType type, Object... values) {
36                 super(type, values);
37                 
38         }
39         protected AAISimpleUri(AAIObjectType type, URI uri) {
40                 super(type, uri);
41         }
42         protected AAISimpleUri(AAIObjectType type, UriBuilder builder, Object... values) {
43                 super(type, builder, values);
44         }
45         protected AAISimpleUri(AAIObjectPlurals type, UriBuilder builder, Object... values) {
46                 super(type, builder, values);
47         }
48         protected AAISimpleUri(AAIObjectPlurals type) {
49                 super(type);
50         }
51         protected AAISimpleUri(AAIObjectPlurals type, Object... values) {
52                 super(type, values);
53         }
54         
55         @Override
56         public AAISimpleUri relationshipAPI() {
57                 return (AAISimpleUri) super.relationshipAPI();
58         }
59         
60         @Override
61         public AAISimpleUri relatedTo(AAIObjectPlurals plural) {
62                 return (AAISimpleUri) super.relatedTo(plural);
63         }
64         @Override
65         public AAISimpleUri relatedTo(AAIObjectType type, String... values) {
66                 return (AAISimpleUri) super.relatedTo(type, values);
67         }
68         
69         @Override
70         public AAISimpleUri resourceVersion(String version) {
71                 return (AAISimpleUri) super.resourceVersion(version);
72         }
73         
74         @Override
75         public AAISimpleUri queryParam(String name, String... values) {
76                 return (AAISimpleUri) super.queryParam(name, values);
77         }
78         
79         @Override
80         public AAISimpleUri replaceQueryParam(String name, String... values) {
81                 return (AAISimpleUri) super.replaceQueryParam(name, values);
82         }
83         
84         @Override
85         public AAISimpleUri clone() {
86                 if (this.type != null) {
87                         return new AAISimpleUri((AAIObjectType)this.type, this.internalURI.clone(), values);
88                 } else {
89                         return new AAISimpleUri((AAIObjectPlurals)this.pluralType, this.internalURI.clone(), values);
90                 }
91         }
92         
93         @Override
94         public AAIObjectType getObjectType() {
95                 return (AAIObjectType)this.type;
96         }
97
98         @Override
99         public AAISimpleUri depth(Depth depth) {
100                 return (AAISimpleUri) super.depth(depth);
101         }
102         @Override
103         public AAISimpleUri nodesOnly(boolean nodesOnly) {
104                 return (AAISimpleUri)super.nodesOnly(nodesOnly);
105         }
106         
107         @Override
108         public AAISimpleUri format(Format format) {
109                 return (AAISimpleUri)super.format(format);
110         }
111 }