com.sap.psr.vulas.cia.model.mavenCentral.MavenSearchResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rest-lib-utils Show documentation
Show all versions of rest-lib-utils Show documentation
Provides RESTful APIs to discover, analyze and difference Maven artifacts, Java archives
as well as Java source and byte code.
/**
* This file is part of Eclipse Steady.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*/
package com.sap.psr.vulas.cia.model.mavenCentral;
import java.util.Collection;
import java.util.TreeSet;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
/**
* Corresponds to the JSON object structure returned by the RESTful search of the Maven Central.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class MavenSearchResponse {
private long numFound;
private Collection docs;
/**
* Constructor for MavenSearchResponse.
*/
public MavenSearchResponse() {}
/**
* Getter for the field numFound
.
*
* @return a long.
*/
public long getNumFound() { return numFound; }
/**
* Setter for the field numFound
.
*
* @param numFound a long.
*/
public void setNumFound(long numFound) { this.numFound = numFound; }
/**
* Getter for the field docs
.
*
* @return a {@link java.util.Collection} object.
*/
public Collection getDocs() { return docs; }
/**
* Setter for the field docs
.
*
* @param docs a {@link java.util.Collection} object.
*/
public void setDocs(Collection docs) { this.docs = docs; }
/**
* getSortedDocs.
*
* @return a {@link java.util.TreeSet} object.
*/
@JsonIgnore
public TreeSet getSortedDocs() {
final TreeSet set = new TreeSet();
set.addAll(this.getDocs());
return set;
}
}