2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.aaiclient.client.aai.entities.uri;
24 import javax.ws.rs.core.UriBuilder;
25 import org.onap.aaiclient.client.aai.AAIObjectPlurals;
26 import org.onap.aaiclient.client.aai.AAIObjectType;
27 import org.onap.aaiclient.client.graphinventory.entities.uri.SimpleUri;
29 public class AAISimpleUri extends SimpleUri<AAIResourceUri, AAIPluralResourceUri, AAIObjectType, AAIObjectPlurals>
30 implements AAIResourceUri {
32 private static final long serialVersionUID = -6397024057188453229L;
34 protected AAISimpleUri(AAIObjectType type, Object... values) {
39 protected AAISimpleUri(AAIObjectType type, URI uri) {
43 protected AAISimpleUri(AAIObjectType type, UriBuilder builder, Object... values) {
44 super(type, builder, values);
47 protected AAISimpleUri(AAIResourceUri parentUri, AAIObjectType childType, Object... childValues) {
48 super(parentUri, childType, childValues);
52 protected AAISimpleUri(AAISimpleUri copy) {
57 public AAISimpleUri clone() {
58 return new AAISimpleUri(this);
62 public AAISimpleUri relatedTo(AAIObjectType type, String... values) {
63 this.internalURI = internalURI.path(relatedTo);
64 return new AAISimpleUri(this, type, values);
68 public AAISimplePluralUri relatedTo(AAIObjectPlurals plural) {
69 this.internalURI.path(relatedTo);
70 return new AAISimplePluralUri(this, plural);