Class PipComponentInformation
- java.lang.Object
-
- de.fraunhofer.iese.mydata.common.MyDataEntity
-
- de.fraunhofer.iese.mydata.component.information.PipComponentInformation
-
@Entity public class PipComponentInformation extends MyDataEntity
-
-
Field Summary
Fields Modifier and Type Field Description protected @Valid @NotNull ComponentId
componentId
protected List<URI>
urls
A list ofURI
s that can be used to communicate with the Component.
-
Constructor Summary
Constructors Modifier Constructor Description protected
PipComponentInformation()
Default constructor for JPA.PipComponentInformation(@NonNull ComponentId id, List<URI> urls, List<MethodInterfaceDescription> methodInterfaceDescriptions)
Constructs aPipComponentInformation
, including its location (URI
) and its usage (MethodInterfaceDescription
).PipComponentInformation(ComponentId id)
Constructs aPipComponentInformation
without URLs or ComponentInterface.PipComponentInformation(ComponentId id, List<URI> urls, MethodInterfaceDescription... componentInterface)
Constructs aPipComponentInformation
, including its location (URI
) and its usage (MethodInterfaceDescription
).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addUrl(URI url)
Adds a URL to the list ofURI
s that can be used to communicate with the component.boolean
equals(Object o)
List<MethodInterfaceDescription>
getMethodInterfaceDescriptions()
List<URI>
getUrls()
List<URI>
getUrlsForProtocol(String... protocols)
Provides a list of URLs of a certain protocol/scheme.int
hashCode()
void
setMethodInterfaceDescriptions(@NonNull List<MethodInterfaceDescription> methodInterfaceDescriptions)
void
setUrls(@NonNull List<URI> urls)
-
Methods inherited from class de.fraunhofer.iese.mydata.common.MyDataEntity
fromJson, getGson, getGson, toJson, toString, validate, validateAndNullCheck
-
-
-
-
Field Detail
-
componentId
@Valid @NotNull protected @Valid @NotNull ComponentId componentId
-
-
Constructor Detail
-
PipComponentInformation
protected PipComponentInformation()
Default constructor for JPA.
-
PipComponentInformation
public PipComponentInformation(ComponentId id)
Constructs aPipComponentInformation
without URLs or ComponentInterface.- Parameters:
id
- the unique ID of thePipComponentInformation
.
-
PipComponentInformation
public PipComponentInformation(@NonNull @NonNull ComponentId id, List<URI> urls, List<MethodInterfaceDescription> methodInterfaceDescriptions)
Constructs aPipComponentInformation
, including its location (URI
) and its usage (MethodInterfaceDescription
).- Parameters:
id
- the unique ID of thePipComponentInformation
urls
- a list ofURI
s that can be used to communicate with thePipComponentInformation
methodInterfaceDescriptions
- the component interfaces
-
PipComponentInformation
public PipComponentInformation(ComponentId id, List<URI> urls, MethodInterfaceDescription... componentInterface)
Constructs aPipComponentInformation
, including its location (URI
) and its usage (MethodInterfaceDescription
).- Parameters:
id
- the unique ID of thePipComponentInformation
urls
- a list ofURI
s that can be used to communicate with thePipComponentInformation
componentInterface
- a list of methods provided by thePipComponentInformation
(i.e., its Interface)
-
-
Method Detail
-
addUrl
public void addUrl(URI url)
Adds a URL to the list ofURI
s that can be used to communicate with the component.- Parameters:
url
- the url to add
-
getUrlsForProtocol
public List<URI> getUrlsForProtocol(String... protocols)
Provides a list of URLs of a certain protocol/scheme.- Parameters:
protocols
- the list of protocols to be used linked by an "or" function- Returns:
- a list of
URI
s that can be used to communicate with the component
-
getMethodInterfaceDescriptions
public List<MethodInterfaceDescription> getMethodInterfaceDescriptions()
- Returns:
- the list of method interface descriptions for this PIP
-
setUrls
public void setUrls(@NonNull @NonNull List<URI> urls)
- Parameters:
urls
- : the list of urls to be set for this PIP. It can not be null.
-
setMethodInterfaceDescriptions
public void setMethodInterfaceDescriptions(@NonNull @NonNull List<MethodInterfaceDescription> methodInterfaceDescriptions)
- Parameters:
methodInterfaceDescriptions
-
-
-