org.lockss.ws.metadata.MetadataMonitorServiceImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of laaws-soap-service Show documentation
Show all versions of laaws-soap-service Show documentation
LOCKSS SOAP Compatibility Service
/*
Copyright (c) 2015-2019 Board of Trustees of Leland Stanford Jr. University,
all rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
STANFORD UNIVERSITY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Stanford University shall not
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from Stanford University.
*/
package org.lockss.ws.metadata;
import java.util.ArrayList;
import java.util.List;
import org.lockss.log.L4JLogger;
import org.lockss.ws.entities.AuMetadataWsResult;
import org.lockss.ws.entities.KeyIdNamePairListPair;
import org.lockss.ws.entities.KeyValueListPair;
import org.lockss.ws.entities.LockssWebServicesFault;
import org.lockss.ws.entities.MetadataItemWsResult;
import org.lockss.ws.entities.MismatchedMetadataChildWsResult;
import org.lockss.ws.entities.PkNamePairIdNamePairListPair;
import org.lockss.ws.entities.UnnamedItemWsResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;
/**
* The Metadata Monitor SOAP web service implementation.
*/
@Service
public class MetadataMonitorServiceImpl implements MetadataMonitorService {
private final static L4JLogger log = L4JLogger.getLogger();
@Autowired
private Environment env;
/**
* Provides the names of the publishers in the database.
*
* @return a {@code List} with the publisher names.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getPublisherNames() throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: END OF BLOCK TO BE REPLACED.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the DOI prefixes for the publishers in the database with multiple
* DOI prefixes.
*
* @return a {@code List} with the DOI prefixes keyed by the
* publisher name.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getPublishersWithMultipleDoiPrefixes()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the publisher names linked to DOI prefixes in the database that
* are linked to multiple publishers.
*
* @return a {@code List} with the publisher names keyed by
* the DOI prefixes to which they are linked.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getDoiPrefixesWithMultiplePublishers()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the DOI prefixes for the Archival Units in the database with
* multiple DOI prefixes.
*
* @return a {@code List} with the DOI prefixes keyed by the
* Archival Unit identifier.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getAuIdsWithMultipleDoiPrefixes()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the DOI prefixes for the Archival Units in the database with
* multiple DOI prefixes.
*
* @return a {@code List} with the DOI prefixes keyed by the
* Archival Unit name.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getAuNamesWithMultipleDoiPrefixes()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the ISBNs for the publications in the database with more than two
* ISBNS.
*
* @return a {@code List} with the ISBNs keyed by the
* publication name. The IdNamePair objects contain the ISBN as the
* identifier and the ISBN type as the name.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getPublicationsWithMoreThan2Isbns()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the ISSNs for the publications in the database with more than two
* ISSNS.
*
* @return a {@code List} with the ISSNs keyed by the
* publication name. The IdNamePair objects contain the ISSN as the
* identifier and the ISSN type as the name.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getPublicationsWithMoreThan2Issns()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the ISSNs for the publications in the database with more than two
* ISSNS.
*
* @return a {@code List} with the ISSNs keyed
* by the publication PK/name pair. The IdNamePair objects contain the
* ISSN as the identifier and the ISSN type as the name.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List
getIdPublicationsWithMoreThan2Issns() throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the publication names linked to ISBNs in the database that are
* linked to multiple publications.
*
* @return a {@code List} with the publication names keyed
* by the ISBNs to which they are linked.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getIsbnsWithMultiplePublications()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the publication names linked to ISSNs in the database that are
* linked to multiple publications.
*
* @return a {@code List} with the publication names keyed
* by the ISSNs to which they are linked.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getIssnsWithMultiplePublications()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the ISSNs for books in the database.
*
* @return a {@code List} with the ISSNs keyed by the
* publication name.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getBooksWithIssns()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the ISBNs for periodicals in the database.
*
* @return a {@code List} with the ISBNs keyed by the
* publication name.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getPeriodicalsWithIsbns()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the Archival Units in the database with an unknown provider.
*
* @return a {@code List} with the sorted Archival Unit names.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getUnknownProviderAuIds() throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the journal articles in the database whose parent is not a
* journal.
*
* @return a {@code List} with the mismatched journal
* articles sorted by Archival Unit, parent name and child name.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List
getMismatchedParentJournalArticles() throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the book chapters in the database whose parent is not a book or a
* book series.
*
* @return a {@code List} with the mismatched book
* chapters sorted by Archival Unit, parent name and child name.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getMismatchedParentBookChapters()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the book volumes in the database whose parent is not a book or a
* book series.
*
* @return a {@code List} with the mismatched book
* volumes sorted by Archival Unit, parent name and child name.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getMismatchedParentBookVolumes()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the publishers for the Archival Units in the database with
* multiple publishers.
*
* @return a {@code List} with the publishers keyed by the
* Archival Unit identifier.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getAuIdsWithMultiplePublishers()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the publishers for the Archival Units in the database with
* multiple publishers.
*
* @return a {@code List} with the publishers keyed by the
* Archival Unit name.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getAuNamesWithMultiplePublishers()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the metadata items in the database that do not have a name.
*
* @return a {@code List} with the unnamed metadata items
* sorted sorted by publisher, Archival Unit, parent type, parent name
* and item type.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getUnnamedItems()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the proprietary identifiers for the publications in the database
* with multiple proprietary identifiers.
*
* @return a {@code List} with the proprietary identifiers
* keyed by the publication name.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getPublicationsWithMultiplePids()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the non-parent metadata items in the database that have no DOI.
*
* @return a {@code List} with the non-parent metadata
* items that have no DOI sorted sorted by publisher, Archival Unit,
* parent type, parent name, item type and item name.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getNoDoiItems()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the non-parent metadata items in the database that have no Access
* URL.
*
* @return a {@code List} with the non-parent metadata
* items that have no Access URL sorted sorted by publisher, Archival
* Unit, parent type, parent name, item type and item name.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getNoAccessUrlItems()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the Archival Units in the database with no metadata items.
*
* @return a {@code List} with the sorted Archival Unit names.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getNoItemsAuIds() throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the metadata information of an archival unit in the system.
*
* @param auId A String with the identifier of the archival unit.
* @return an AuMetadataWsResult with the metadata information of the archival
* unit.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public AuMetadataWsResult getAuMetadata(String auId)
throws LockssWebServicesFault {
log.debug2("auId = {}", auId);
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
AuMetadataWsResult result = new AuMetadataWsResult();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("result = {}", result);
return result;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
/**
* Provides the Archival Units that exist in the database but that have been
* deleted from the daemon.
*
* @return a {@code List} with the Archival unit data.
* @throws LockssWebServicesFault if there are problems.
*/
@Override
public List getDbArchivalUnitsDeletedFromDaemon()
throws LockssWebServicesFault {
log.debug2("Invoked.");
try {
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
List results = new ArrayList<>();
// TODO: REPLACE THIS BLOCK WITH THE ACTUAL IMPLEMENTATION.
log.debug2("results = {}", results);
return results;
} catch (Exception e) {
throw new LockssWebServicesFault(e);
}
}
}