Skip to content

Commit

Permalink
docs: update javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
berezovskyi committed Oct 1, 2024
1 parent 8317ffc commit dfb4af6
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private synchronized void initializeRdf() {
}
if(infoResource == null) {
// TODO: also check for oslc:nextPage before giving up
throw new IllegalStateException("Multiple ResponseInfo objects found; neither matches the Query URI");
throw new IllegalStateException("Failed to find an appropriate ResponseInfo object");
}

membersResource = rdfModel.getResource(query.getCapabilityUrl());
Expand All @@ -148,7 +148,8 @@ private synchronized void initializeRdf() {
/**
* Extracts a ResourceInfo resource if one and only one has the same prefix as the query URI.
* @param responseInfos from OSLC Query results
* @return a ResourceInfo resource if one satisfies the conditions; null otherwise
* @return a ResourceInfo resource if one satisfies the conditions; null if none satisfy
* @throws IllegalStateException if multiple resources satisfy the same condition
*/
private Resource tryFindPrefixedResponseInfoUri(List<Resource> responseInfos) {
List<Resource> filteredObjects = responseInfos.stream().filter(ri -> ri.getURI().startsWith(query.getQueryUrl())).toList();
Expand All @@ -163,7 +164,8 @@ private Resource tryFindPrefixedResponseInfoUri(List<Resource> responseInfos) {
/**
* Extracts a ResourceInfo resource if one and only one has exactly the same URI as the query URI.
* @param responseInfos from OSLC Query results
* @return a ResourceInfo resource if one satisfies the conditions; null otherwise
* @return a ResourceInfo resource if one satisfies the conditions; null if none satisfy
* @throws IllegalStateException if multiple resources satisfy the same condition
*/
private Resource tryFindExactResponseInfoUri(List<Resource> responseInfos) {
List<Resource> filteredObjects = responseInfos.stream().filter(ri -> ri.getURI().equals(query.getQueryUrl())).toList();
Expand All @@ -178,7 +180,7 @@ private Resource tryFindExactResponseInfoUri(List<Resource> responseInfos) {
/**
* Extracts a ResourceInfo resource if one and only one exists in the results.
* @param responseInfos from OSLC Query results
* @return a ResourceInfo resource if one satisfies the conditions; null otherwise
* @return a ResourceInfo resource if one satisfies the conditions; null if none satisfy
*/
private Resource tryFindOnlyResponseInfo(List<Resource> responseInfos) {
if (responseInfos.size() == 1) {
Expand Down

0 comments on commit dfb4af6

Please sign in to comment.