Skip to content

Commit

Permalink
Merge pull request #612 from fcrepo4/80959252
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Woods committed Oct 30, 2014
2 parents 4c5a5ed + ea63ee0 commit e619ab4
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 218 deletions.

This file was deleted.

Expand Up @@ -20,13 +20,15 @@
import static com.google.common.base.Preconditions.checkArgument;

import org.slf4j.Logger;

import com.codahale.metrics.annotation.Timed;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.net.URI;

import org.w3c.dom.Document;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.xpath.XPathException;
Expand All @@ -42,11 +44,11 @@
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.http.util.EntityUtils;

import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.fcrepo.kernel.identifiers.PidMinter;


/**
Expand All @@ -55,7 +57,7 @@
* @author escowles
* @since 04/28/2014
*/
public class HttpPidMinter extends BasePidMinter {
public class HttpPidMinter implements PidMinter {

private static final Logger log = getLogger(HttpPidMinter.class);
protected final String url;
Expand Down
Expand Up @@ -19,6 +19,8 @@
import static com.google.common.base.Joiner.on;
import static com.google.common.base.Splitter.fixedLength;
import static java.util.UUID.randomUUID;

import org.fcrepo.kernel.identifiers.PidMinter;
import org.fcrepo.metrics.RegistryService;

import com.codahale.metrics.Timer;
Expand All @@ -28,7 +30,7 @@
*
* @author awoods
*/
public class UUIDPathMinter extends BasePidMinter {
public class UUIDPathMinter implements PidMinter {

static final Timer timer = RegistryService.getInstance().getMetrics().timer(
name(UUIDPathMinter.class, "mint"));
Expand Down

This file was deleted.

Expand Up @@ -55,8 +55,6 @@ public abstract class PersistingRdfStreamConsumer implements RdfStreamConsumer {

private final IdentifierConverter<Resource, FedoraResource> idTranslator;

private final Session session;

// if it's not about a Fedora resource, we don't care.
protected final Predicate<Triple> isFedoraSubjectTriple;

Expand Down Expand Up @@ -100,7 +98,6 @@ public boolean apply(final Triple t) {
// we knock out non-Fedora RDF
this.stream =
stream.withThisContext(stream.filter(isFedoraSubjectTriple));
this.session = session;

this.exceptions = new ArrayList<>();
}
Expand Down Expand Up @@ -190,14 +187,6 @@ public IdentifierConverter<Resource,FedoraResource> translator() {
}


/**
* @return the session
*/
public Session session() {
return session;
}


/**
* @return the jcrRdfTools
*/
Expand Down
Expand Up @@ -22,7 +22,6 @@

import org.fcrepo.kernel.models.FedoraResource;
import org.fcrepo.kernel.identifiers.IdentifierConverter;
import org.fcrepo.kernel.impl.rdf.JcrRdfTools;
import org.fcrepo.kernel.utils.iterators.RdfStream;
import org.slf4j.Logger;

Expand All @@ -41,8 +40,6 @@ public class RdfAdder extends PersistingRdfStreamConsumer {

private static final Logger LOGGER = getLogger(RdfAdder.class);

private final JcrRdfTools jcrRdfTools;

/**
* Ordinary constructor.
*
Expand All @@ -53,13 +50,12 @@ public class RdfAdder extends PersistingRdfStreamConsumer {
public RdfAdder(final IdentifierConverter<Resource, FedoraResource> idTranslator, final Session session,
final RdfStream stream) {
super(idTranslator, session, stream);
jcrRdfTools = new JcrRdfTools(idTranslator, session);
}

@Override
protected void operateOnMixin(final Resource mixinResource, final FedoraResource resource)
throws RepositoryException {
jcrRdfTools.addMixin(resource, mixinResource, stream().namespaces());
jcrRdfTools().addMixin(resource, mixinResource, stream().namespaces());
}


Expand All @@ -68,6 +64,6 @@ protected void operateOnProperty(final Statement t, final FedoraResource resourc
LOGGER.debug("Adding property from triple: {} to resource: {}.", t, resource
.getPath());

jcrRdfTools.addProperty(resource, t.getPredicate(), t.getObject(), stream().namespaces());
jcrRdfTools().addProperty(resource, t.getPredicate(), t.getObject(), stream().namespaces());
}
}

This file was deleted.

Expand Up @@ -67,7 +67,9 @@ public final class RdfLexicon {
* Fedora configuration namespace "fedora-config", used for user-settable
* configuration properties.
**/
public static final String FEDORA_CONFIG_NAMESPACE =
// TODO from UCDetector: Constant "RdfLexicon.FEDORA_CONFIG_NAMESPACE" has 0 references
// should be referenced again when versioning is back in REST api
public static final String FEDORA_CONFIG_NAMESPACE = // NO_UCD (unused code)
"http://fedora.info/definitions/v4/config#";

/**
Expand Down
Expand Up @@ -15,8 +15,6 @@
*/
package org.fcrepo.kernel.identifiers;

import com.google.common.base.Function;

/**
* Defines the behavior of a component that can accept responsibility
* for the creation of Fedora PIDs. Do not implement this interface directly.
Expand All @@ -34,9 +32,4 @@ public interface PidMinter {
*/
String mintPid();

/**
* Provide a helpful function to mint any number of PIDs
* @return a function for minting new identifiers
*/
Function<Object, String> makePid();
}
Expand Up @@ -47,8 +47,6 @@
*/
public class FedoraEvent {

public static final String NODE_TYPE_KEY = "fedora:nodeTypeKey";

private Event e;

private Set<Integer> eventTypes = new HashSet<>();
Expand Down

0 comments on commit e619ab4

Please sign in to comment.