All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hi3project.broccoli.bsdf.impl.deployment.bd.LoadedServiceVO Maven / Gradle / Ivy

Go to download

Specification for BSDL, BSDM and basic BSDF. Interfaces and XML descriptors. XML Schema for BSDL.

The newest version!
/*******************************************************************************
 *
 * Copyright (C) 2015 Mytech Ingenieria Aplicada 
 * Copyright (C) 2015 Alejandro Paz 
 *
 * This file is part of Broccoli.
 *
 * Broccoli is free software: you can redistribute it and/or modify it under the
 * terms of the GNU Affero General Public License as published by the Free
 * Software Foundation, either version 3 of the License, or (at your option) any
 * later version.
 *
 * Broccoli is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with Broccoli. If not, see .
 *
 ******************************************************************************/

package com.hi3project.broccoli.bsdf.impl.deployment.bd;

import com.hi3project.broccoli.bsdl.api.ISemanticIdentifier;
import com.hi3project.broccoli.bsdf.impl.deployment.ServiceLocatorsVO;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * 

Description:

* * *

Creation date: * 15-05-2014

* *

Changelog:

*
    *
  • 1 , 15-05-2014 - Initial release
  • *
* * @version 1 */ public class LoadedServiceVO { private int id; private Collection ontologies; private Collection services; private List> loadedClasses; private ServiceLocatorsVO serviceLocators; private boolean unregistered; public LoadedServiceVO() { this(-1); } public LoadedServiceVO(int id) { this.id = id; this.unregistered = false; this.ontologies = new ArrayList(); this.services = new ArrayList(); this.loadedClasses = new ArrayList>(); this.serviceLocators = new ServiceLocatorsVO(); } public int getId() { return id; } public String getIdSt() { return String.valueOf(id); } public void setId(int id) { this.id = id; } public boolean hasBeenUnregistered() { return this.unregistered; } public ServiceLocatorsVO getServiceLocators() { return this.serviceLocators; } public void setServiceLocators(ServiceLocatorsVO serviceLocators) { this.serviceLocators = serviceLocators; } public Collection getOntologies() { return ontologies; } public void setOntologies(Collection ontologies) { this.ontologies = ontologies; } public Collection getServices() { return services; } public void setServices(Collection services) { this.services = services; } public List> getLoadedClasses() { return loadedClasses; } public void setLoadedClasses(List> loadedClasses) { this.loadedClasses = loadedClasses; } public boolean removeService(ISemanticIdentifier serviceIdentifier) { boolean remove = this.getServices().remove(serviceIdentifier); if (this.getServices().isEmpty()) { this.unregistered = true; } return remove; } @Override public int hashCode() { int hash = 3; hash = 79 * hash + this.id; return hash; } @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final LoadedServiceVO other = (LoadedServiceVO) obj; return this.id == other.id; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy