Skip to content

Commit

Permalink
Refactor: make Fedora packages more clear
Browse files Browse the repository at this point in the history
  • Loading branch information
petrpodsed committed Dec 16, 2024
1 parent 3cbad29 commit 9659505
Show file tree
Hide file tree
Showing 205 changed files with 1,032 additions and 1,103 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.google.inject.AbstractModule;
import com.google.inject.Scopes;
import com.google.inject.name.Names;
import cz.incad.kramerius.RepositoryAccess;
import cz.incad.kramerius.fedora.RepositoryAccess;

public class CDKRepoModule extends AbstractModule {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
import com.google.inject.Provider;
import com.google.inject.name.Named;
import com.sun.jersey.api.client.Client;
import cz.incad.kramerius.RepositoryAccess;
import cz.incad.kramerius.fedora.RepositoryAccess;
import cz.incad.kramerius.SolrAccess;
import cz.incad.kramerius.StreamHeadersObserver;
import cz.incad.kramerius.fedora.AbstractRepositoryAccess;
import cz.incad.kramerius.fedora.om.AkubraRepository;
import cz.incad.kramerius.fedora.om.RepositoryException;
import cz.incad.kramerius.fedora.om.repository.AkubraRepository;
import cz.incad.kramerius.fedora.om.repository.RepositoryException;
import cz.incad.kramerius.statistics.accesslogs.AggregatedAccessLogs;
import cz.incad.kramerius.utils.pid.LexerException;
import cz.incad.kramerius.virtualcollections.CollectionException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import com.sun.jersey.api.client.UniformInterfaceException;
import com.sun.jersey.api.client.WebResource;
import cz.incad.kramerius.SolrAccess;
import cz.incad.kramerius.fedora.om.AkubraRepository;
import cz.incad.kramerius.fedora.om.RepositoryException;
import cz.incad.kramerius.fedora.om.repository.AkubraRepository;
import cz.incad.kramerius.fedora.om.repository.RepositoryException;
import cz.incad.kramerius.fedora.utils.CDKUtils;
import cz.incad.kramerius.utils.BasicAuthenticationClientFilter;
import cz.incad.kramerius.utils.StringUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cz.incad.kramerius.fedora.impl;

import cz.incad.kramerius.SolrAccess;
import cz.incad.kramerius.fedora.om.AkubraRepository;
import cz.incad.kramerius.fedora.om.RepositoryException;
import cz.incad.kramerius.fedora.om.repository.AkubraRepository;
import cz.incad.kramerius.fedora.om.repository.RepositoryException;
import cz.incad.kramerius.service.MigrateSolrIndexException;
import cz.incad.kramerius.services.cdk.K7SearchIndexChildrenSupport;
import cz.incad.kramerius.utils.java.Pair;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import com.sun.jersey.api.client.WebResource;
import cz.incad.kramerius.ObjectPidsPath;
import cz.incad.kramerius.SolrAccess;
import cz.incad.kramerius.fedora.om.AkubraRepository;
import cz.incad.kramerius.fedora.om.RepositoryException;
import cz.incad.kramerius.fedora.om.repository.AkubraRepository;
import cz.incad.kramerius.fedora.om.repository.RepositoryException;
import cz.incad.kramerius.fedora.utils.CDKUtils;
import cz.incad.kramerius.utils.BasicAuthenticationClientFilter;
import cz.incad.kramerius.utils.StringUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.WebResource;

import cz.incad.kramerius.RepositoryAccess;
import cz.incad.kramerius.fedora.RepositoryAccess;
import cz.incad.kramerius.FedoraNamespaces;
import cz.incad.kramerius.fedora.RepoModule;
import cz.incad.kramerius.resourceindex.ProcessingIndexFeeder;
import cz.incad.kramerius.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.fedora.om.resourceindex.ProcessingIndexFeeder;
import cz.incad.kramerius.fedora.om.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.service.SortingService;
import cz.incad.kramerius.solr.SolrModule;
import cz.incad.kramerius.statistics.NullStatisticsModule;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
package org.kramerius.replications;

import com.google.inject.Guice;
import com.google.inject.Injector;
import cz.incad.kramerius.fedora.RepoModule;
import cz.incad.kramerius.resourceindex.ProcessingIndexFeeder;
import cz.incad.kramerius.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.service.impl.IndexerProcessStarter;
import cz.incad.kramerius.solr.SolrModule;
import cz.incad.kramerius.statistics.NullStatisticsModule;
import cz.incad.kramerius.utils.conf.KConfiguration;
import org.apache.solr.client.solrj.SolrServerException;

import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collectors;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@

import cz.incad.kramerius.ProcessHelper.PidsOfDescendantsProducer;
import cz.incad.kramerius.fedora.RepoModule;
import cz.incad.kramerius.fedora.om.RepositoryException;
import cz.incad.kramerius.fedora.om.impl.AkubraDOManager;
import cz.incad.kramerius.fedora.RepositoryAccess;
import cz.incad.kramerius.fedora.om.repository.RepositoryException;
import cz.incad.kramerius.fedora.om.repository.impl.AkubraDOManager;
import cz.incad.kramerius.impl.SolrAccessImplNewIndex;
import cz.incad.kramerius.processes.WarningException;
import cz.incad.kramerius.processes.starter.ProcessStarter;
import cz.incad.kramerius.processes.utils.ProcessUtils;
import cz.incad.kramerius.resourceindex.ResourceIndexException;
import cz.incad.kramerius.fedora.om.resourceindex.ResourceIndexException;
import cz.incad.kramerius.utils.Dom4jUtils;
import cz.incad.kramerius.utils.RelsExtHelper;
import cz.incad.kramerius.utils.conf.KConfiguration;
import cz.kramerius.adapters.ProcessingIndex;
import cz.incad.kramerius.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.fedora.om.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.solr.SolrModule;
import cz.incad.kramerius.statistics.NullStatisticsModule;
import cz.kramerius.searchIndex.indexer.SolrConfig;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cz.incad.kramerius;

import cz.incad.kramerius.fedora.om.RepositoryException;
import cz.incad.kramerius.fedora.om.impl.AkubraDOManager;
import cz.incad.kramerius.resourceindex.ResourceIndexException;
import cz.incad.kramerius.fedora.om.repository.RepositoryException;
import cz.incad.kramerius.fedora.om.repository.impl.AkubraDOManager;
import cz.incad.kramerius.fedora.om.resourceindex.ResourceIndexException;
import cz.incad.kramerius.utils.Dom4jUtils;
import cz.kramerius.adapters.ProcessingIndex;
import org.dom4j.Document;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
import com.google.inject.Key;
import cz.incad.kramerius.ProcessHelper.PidsOfDescendantsProducer;
import cz.incad.kramerius.fedora.RepoModule;
import cz.incad.kramerius.fedora.om.RepositoryException;
import cz.incad.kramerius.fedora.om.impl.AkubraDOManager;
import cz.incad.kramerius.fedora.om.repository.RepositoryException;
import cz.incad.kramerius.fedora.om.repository.impl.AkubraDOManager;
import cz.incad.kramerius.impl.SolrAccessImplNewIndex;
import cz.incad.kramerius.processes.new_api.ProcessScheduler;
import cz.incad.kramerius.processes.starter.ProcessStarter;
import cz.incad.kramerius.processes.utils.ProcessUtils;
import cz.incad.kramerius.resourceindex.ResourceIndexException;
import cz.incad.kramerius.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.fedora.om.resourceindex.ResourceIndexException;
import cz.incad.kramerius.fedora.om.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.solr.SolrModule;
import cz.incad.kramerius.statistics.NullStatisticsModule;
import cz.incad.kramerius.utils.Dom4jUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import com.google.inject.Key;
import com.google.inject.name.Names;
import com.qbizm.kramerius.imp.jaxb.DigitalObject;
import cz.incad.kramerius.RepositoryAccess;
import cz.incad.kramerius.fedora.RepositoryAccess;
import cz.incad.kramerius.fedora.RepoModule;
import cz.incad.kramerius.fedora.om.RepositoryException;
import cz.incad.kramerius.fedora.om.repository.RepositoryException;
import cz.incad.kramerius.processes.starter.ProcessStarter;
import cz.incad.kramerius.resourceindex.ProcessingIndexFeeder;
import cz.incad.kramerius.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.fedora.om.resourceindex.ProcessingIndexFeeder;
import cz.incad.kramerius.fedora.om.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.service.FOXMLAppendLicenseService;
import cz.incad.kramerius.service.SortingService;
import cz.incad.kramerius.solr.SolrModule;
Expand Down
8 changes: 4 additions & 4 deletions processes/import/src/main/java/org/kramerius/Convert.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.name.Names;
import cz.incad.kramerius.RepositoryAccess;
import cz.incad.kramerius.fedora.RepositoryAccess;
import cz.incad.kramerius.fedora.RepoModule;
import cz.incad.kramerius.fedora.om.RepositoryException;
import cz.incad.kramerius.resourceindex.ProcessingIndexFeeder;
import cz.incad.kramerius.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.fedora.om.repository.RepositoryException;
import cz.incad.kramerius.fedora.om.resourceindex.ProcessingIndexFeeder;
import cz.incad.kramerius.fedora.om.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.service.SortingService;
import cz.incad.kramerius.solr.SolrModule;
import cz.incad.kramerius.statistics.NullStatisticsModule;
Expand Down
6 changes: 3 additions & 3 deletions processes/import/src/main/java/org/kramerius/Download.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import com.qbizm.kramerius.imptool.poc.Main;
import com.qbizm.kramerius.imptool.poc.valueobj.ServiceException;

import cz.incad.kramerius.RepositoryAccess;
import cz.incad.kramerius.fedora.RepositoryAccess;
import cz.incad.kramerius.fedora.RepoModule;
import cz.incad.kramerius.resourceindex.ProcessingIndexFeeder;
import cz.incad.kramerius.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.fedora.om.resourceindex.ProcessingIndexFeeder;
import cz.incad.kramerius.fedora.om.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.service.SortingService;
import cz.incad.kramerius.service.impl.IndexerProcessStarter;
import cz.incad.kramerius.solr.SolrModule;
Expand Down
20 changes: 10 additions & 10 deletions processes/import/src/main/java/org/kramerius/Import.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource;

import cz.incad.kramerius.RepositoryAccess;
import cz.incad.kramerius.fedora.RepositoryAccess;
import cz.incad.kramerius.FedoraNamespaces;
import cz.incad.kramerius.fedora.RepoModule;
import cz.incad.kramerius.fedora.om.AkubraRepository;
import cz.incad.kramerius.fedora.om.RepositoryDatastream;
import cz.incad.kramerius.fedora.om.RepositoryException;
import cz.incad.kramerius.fedora.om.RepositoryObject;
import cz.incad.kramerius.fedora.om.impl.AkubraDOManager;
import cz.incad.kramerius.fedora.om.repository.AkubraRepository;
import cz.incad.kramerius.fedora.om.repository.RepositoryDatastream;
import cz.incad.kramerius.fedora.om.repository.RepositoryException;
import cz.incad.kramerius.fedora.om.repository.RepositoryObject;
import cz.incad.kramerius.fedora.om.repository.impl.AkubraDOManager;
import cz.incad.kramerius.processes.new_api.ProcessScheduler;
import cz.incad.kramerius.processes.starter.ProcessStarter;
import cz.incad.kramerius.resourceindex.ProcessingIndexFeeder;
import cz.incad.kramerius.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.fedora.om.resourceindex.ProcessingIndexFeeder;
import cz.incad.kramerius.fedora.om.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.service.FOXMLAppendLicenseService;
import cz.incad.kramerius.service.SortingService;
import cz.incad.kramerius.solr.SolrModule;
Expand Down Expand Up @@ -570,7 +570,7 @@ public static void ingest(AkubraRepository repo, InputStream is, String filename
Lock writeLock = AkubraDOManager.getWriteLock(pid);
try {
repo.ingestObject(obj);
} catch (cz.incad.kramerius.fedora.om.RepositoryException sfex) {
} catch (RepositoryException sfex) {
if (objectExists(repo, pid)) {
if (updateExisting) {
log.info("Replacing existing object " + pid);
Expand All @@ -586,7 +586,7 @@ public static void ingest(AkubraRepository repo, InputStream is, String filename
repo.ingestObject(obj);
}
log.info("Ingested new object " + pid);
} catch (cz.incad.kramerius.fedora.om.RepositoryException rsfex) {
} catch (RepositoryException rsfex) {
log.severe("Replace ingest SOAP fault:" + rsfex);
throw new RuntimeException(rsfex);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
import com.google.inject.name.Names;
import cz.incad.kramerius.FedoraNamespaces;
import cz.incad.kramerius.fedora.RepoModule;
import cz.incad.kramerius.fedora.om.RepositoryException;
import cz.incad.kramerius.fedora.om.repository.RepositoryException;
import cz.incad.kramerius.fedora.utils.Fedora4Utils;
import cz.incad.kramerius.resourceindex.ProcessingIndexFeeder;
import cz.incad.kramerius.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.fedora.om.resourceindex.ProcessingIndexFeeder;
import cz.incad.kramerius.fedora.om.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.solr.SolrModule;
import cz.incad.kramerius.statistics.NullStatisticsModule;
import org.apache.commons.lang3.tuple.Triple;
Expand All @@ -45,7 +45,7 @@
import com.qbizm.kramerius.imp.jaxb.DigitalObject;
import com.qbizm.kramerius.imp.jaxb.XmlContentType;

import cz.incad.kramerius.RepositoryAccess;
import cz.incad.kramerius.fedora.RepositoryAccess;
import cz.incad.kramerius.utils.conf.KConfiguration;

//FIXME: looks like duplicate of org.kramerius.Import, is it still used or can we remove it? Also not correctly indexing Convolutes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

import com.google.inject.name.Named;
import cz.incad.kramerius.fedora.RepoModule;
import cz.incad.kramerius.fedora.om.RepositoryException;
import cz.incad.kramerius.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.fedora.om.repository.RepositoryException;
import cz.incad.kramerius.fedora.om.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.solr.SolrModule;
import cz.incad.kramerius.statistics.*;

Expand All @@ -38,7 +38,7 @@
import com.google.inject.Inject;
import com.google.inject.Injector;

import cz.incad.kramerius.RepositoryAccess;
import cz.incad.kramerius.fedora.RepositoryAccess;
import cz.incad.kramerius.ObjectPidsPath;
import cz.incad.kramerius.ProcessSubtreeException;
import cz.incad.kramerius.TreeNodeProcessStackAware;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import javax.xml.bind.JAXBException;

import cz.incad.kramerius.fedora.om.RepositoryException;
import cz.incad.kramerius.fedora.om.repository.RepositoryException;
import org.apache.solr.client.solrj.SolrServerException;
import org.kramerius.Convert;
import org.xml.sax.SAXException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
import com.google.inject.name.Names;
import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.WebResource;
import cz.incad.kramerius.RepositoryAccess;
import cz.incad.kramerius.fedora.RepositoryAccess;
import cz.incad.kramerius.FedoraNamespaceContext;
import cz.incad.kramerius.fedora.RepoModule;
import cz.incad.kramerius.fedora.om.RepositoryException;
import cz.incad.kramerius.resourceindex.ProcessingIndexFeeder;
import cz.incad.kramerius.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.fedora.om.repository.RepositoryException;
import cz.incad.kramerius.fedora.om.resourceindex.ProcessingIndexFeeder;
import cz.incad.kramerius.fedora.om.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.solr.SolrModule;
import cz.incad.kramerius.statistics.NullStatisticsModule;
import cz.incad.kramerius.utils.BasicAuthenticationClientFilter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;

import cz.incad.kramerius.fedora.RepoModule;
import cz.incad.kramerius.fedora.om.RepositoryException;
import cz.incad.kramerius.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.fedora.om.repository.RepositoryException;
import cz.incad.kramerius.fedora.om.resourceindex.ResourceIndexModule;
import cz.incad.kramerius.solr.SolrModule;
import cz.incad.kramerius.statistics.NullStatisticsModule;
import cz.incad.kramerius.utils.conf.KConfiguration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
import com.google.inject.Provides;
import com.google.inject.name.Named;
import cz.incad.kramerius.fedora.impl.RepositoryAccessImpl;
import cz.incad.kramerius.fedora.om.RepositoryException;
import cz.incad.kramerius.fedora.om.impl.HazelcastServerNode;
import cz.incad.kramerius.resourceindex.ProcessingIndexFeeder;
import cz.incad.kramerius.fedora.om.repository.RepositoryException;
import cz.incad.kramerius.fedora.om.repository.impl.HazelcastServerNode;
import cz.incad.kramerius.fedora.om.resourceindex.ProcessingIndexFeeder;
import cz.incad.kramerius.statistics.accesslogs.AggregatedAccessLogs;
import junit.framework.Assert;

Expand All @@ -53,7 +53,7 @@
import com.google.inject.Guice;
import com.google.inject.Injector;

import cz.incad.kramerius.RepositoryAccess;
import cz.incad.kramerius.fedora.RepositoryAccess;
import cz.incad.kramerius.ObjectPidsPath;
import cz.incad.kramerius.ProcessSubtreeException;
import cz.incad.kramerius.SolrAccess;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;

import cz.incad.kramerius.RepositoryAccess;
import cz.incad.kramerius.fedora.RepositoryAccess;
import cz.incad.kramerius.ObjectPidsPath;
import cz.incad.kramerius.utils.IOUtils;
import cz.incad.kramerius.utils.XMLUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package cz.incad.kramerius.indexer;

import cz.incad.kramerius.RepositoryAccess;
import cz.incad.kramerius.fedora.RepositoryAccess;
import cz.incad.kramerius.FedoraNamespaceContext;
import cz.incad.kramerius.indexer.date.BiblioModsDateParser;
import cz.incad.kramerius.indexer.date.DateQuintet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import com.google.inject.Key;
import com.google.inject.name.Named;
import com.google.inject.name.Names;
import cz.incad.kramerius.RepositoryAccess;
import cz.incad.kramerius.fedora.RepositoryAccess;
import cz.incad.kramerius.FedoraNamespaces;
import cz.incad.kramerius.indexer.guice.GuiceModelInjector;
import cz.incad.kramerius.resourceindex.IResourceIndex;
import cz.incad.kramerius.fedora.om.resourceindex.IResourceIndex;
import cz.incad.kramerius.utils.FedoraUtils;
import cz.incad.kramerius.utils.UTFSort;
import cz.incad.kramerius.utils.XMLUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

import com.google.inject.name.Named;
import cz.incad.kramerius.*;
import cz.incad.kramerius.resourceindex.IResourceIndex;
import cz.incad.kramerius.resourceindex.ResourceIndexException;
import cz.incad.kramerius.resourceindex.ResourceIndexService;
import cz.incad.kramerius.fedora.RepositoryAccess;
import cz.incad.kramerius.fedora.om.resourceindex.IResourceIndex;
import cz.incad.kramerius.fedora.om.resourceindex.ResourceIndexException;
import cz.incad.kramerius.fedora.om.resourceindex.ResourceIndexService;
import cz.incad.kramerius.utils.RESTHelper;
import cz.incad.kramerius.utils.XMLUtils;
import cz.incad.kramerius.utils.conf.KConfiguration;
Expand Down
Loading

0 comments on commit 9659505

Please sign in to comment.