diff options
Diffstat (limited to 'graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri')
4 files changed, 54 insertions, 2 deletions
diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIPluralFragment.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIPluralFragment.java new file mode 100644 index 0000000000..4733c55bf8 --- /dev/null +++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIPluralFragment.java @@ -0,0 +1,20 @@ +package org.onap.aaiclient.client.aai.entities.uri; + +import java.io.Serializable; +import org.onap.aaiclient.client.graphinventory.GraphInventoryPluralFragment; + +public class AAIPluralFragment implements Serializable, GraphInventoryPluralFragment<AAIFluentPluralType> { + + private static final long serialVersionUID = 1L; + + private final AAIFluentPluralType type; + + public AAIPluralFragment(AAIFluentPluralType type) { + this.type = type; + } + + public AAIFluentPluralType get() { + return type; + } + +} diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIResourceUri.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIResourceUri.java index 3d01258f71..3d7fc0e198 100644 --- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIResourceUri.java +++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAIResourceUri.java @@ -5,6 +5,6 @@ import org.onap.aaiclient.client.aai.AAIObjectType; import org.onap.aaiclient.client.graphinventory.entities.uri.GraphInventorySingleResourceUri; public interface AAIResourceUri extends AAIBaseResourceUri<AAIResourceUri, AAIObjectType>, - GraphInventorySingleResourceUri<AAIResourceUri, AAIPluralResourceUri, AAIObjectType, AAIObjectPlurals> { + GraphInventorySingleResourceUri<AAIResourceUri, AAIPluralResourceUri, AAIObjectType, AAIObjectPlurals, AAISingleFragment, AAIPluralFragment> { } diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUri.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUri.java index 40184b028b..041c02ff2d 100644 --- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUri.java +++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAISimpleUri.java @@ -26,7 +26,8 @@ import org.onap.aaiclient.client.aai.AAIObjectPlurals; import org.onap.aaiclient.client.aai.AAIObjectType; import org.onap.aaiclient.client.graphinventory.entities.uri.SimpleUri; -public class AAISimpleUri extends SimpleUri<AAIResourceUri, AAIPluralResourceUri, AAIObjectType, AAIObjectPlurals> +public class AAISimpleUri extends + SimpleUri<AAIResourceUri, AAIPluralResourceUri, AAIObjectType, AAIObjectPlurals, AAISingleFragment, AAIPluralFragment> implements AAIResourceUri { private static final long serialVersionUID = -6397024057188453229L; @@ -70,4 +71,16 @@ public class AAISimpleUri extends SimpleUri<AAIResourceUri, AAIPluralResourceUri return new AAISimplePluralUri(this, plural); } + @Override + public AAISimpleUri relatedTo(AAISingleFragment fragment) { + this.internalURI.path(relatedTo); + return new AAISimpleUri(this, fragment.get().build(), fragment.get().values()); + } + + @Override + public AAISimplePluralUri relatedTo(AAIPluralFragment fragment) { + this.internalURI.path(relatedTo); + return new AAISimplePluralUri(this, fragment.get().build()); + } + } diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAISingleFragment.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAISingleFragment.java new file mode 100644 index 0000000000..a988899ed2 --- /dev/null +++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/entities/uri/AAISingleFragment.java @@ -0,0 +1,19 @@ +package org.onap.aaiclient.client.aai.entities.uri; + +import java.io.Serializable; +import org.onap.aaiclient.client.graphinventory.GraphInventorySingleFragment; + +public class AAISingleFragment implements Serializable, GraphInventorySingleFragment<AAIFluentSingleType> { + + private static final long serialVersionUID = 1L; + + private final AAIFluentSingleType type; + + public AAISingleFragment(AAIFluentSingleType type) { + this.type = type; + } + + public AAIFluentSingleType get() { + return type; + } +} |