<commit_before>package de.nrw.hbz.edoweb2.api;

import static de.nrw.hbz.edoweb2.api.Vocabulary.HAS_VERSION;
import static de.nrw.hbz.edoweb2.api.Vocabulary.HAS_VOLUME;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Path("/objects")
public class ObjectResource
{

	final static Logger logger = LoggerFactory.getLogger(ObjectResource.class);

	String namespace = "edoweb";

	Actions actions = new Actions();

	@GET
	@Path("/{pid}/data")
	@Produces({ "application/*" })
	public Response readData(@PathParam("pid") String pid)
	{
		return actions.readData(pid);
	}

	// @GET
	// @Path("/{pid}/volume/{volumePid}")
	// @Produces({ "application/*" })
	// public StatusBean readVolume(@PathParam("pid") String pid,
	// @PathParam("volumePid") String volumePid)
	// {
	// String volumePid = null;
	// String query = EJournal.getVolumeQuery(volumePid, pid);
	// volumePid = actions.findSubject(query);
	//
	// return actions.read(volumePid);
	// }

	@GET
	@Path("/{pid}/volume/{volumePid}")
	@Produces({ "application/json", "application/xml", MediaType.TEXT_HTML })
	public View getVolumeView(@PathParam("pid") String pid,
			@PathParam("volumePid") String volumePid)
	{
		// String volumePid = null;
		// String query = EJournal.getVolumeQuery(volumePid, pid);
		// volumePid = actions.findSubject(query);
		return actions.getView(volumePid, ObjectType.ejournalVolume);
	}

	@GET
	@Path("/{pid}/volume/{volumePid}/data")
	@Produces({ "application/*" })
	public Response readVolumeData(@PathParam("pid") String pid,
			@PathParam("volumePid") String volumePid)
	{
		// String volumePid = null;
		// String query = EJournal.getVolumeQuery(volumePid, pid);
		// volumePid = actions.findSubject(query);

		return actions.readData(volumePid);
	}

	@GET
	@Produces({ "application/json", "application/xml" })
	public ObjectList getAll()
	{
		return new ObjectList(actions.getAll());
	}

	@GET
	@Path("/{pid}")
	@Produces({ "application/json", "application/xml", MediaType.TEXT_HTML })
	public View getView(@PathParam("pid") String pid)
	{
		return actions.getView(pid);
	}
<commit_msg>all types are equally under the same namespace<commit_after>package de.nrw.hbz.edoweb2.api;

import static de.nrw.hbz.edoweb2.api.Vocabulary.HAS_VERSION;
import static de.nrw.hbz.edoweb2.api.Vocabulary.HAS_VOLUME;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Path("/objects")
public class ObjectResource
{

	final static Logger logger = LoggerFactory.getLogger(ObjectResource.class);

	String namespace = "edoweb";

	Actions actions = new Actions();

	@GET
	@Path("/{pid}/data")
	@Produces({ "application/*" })
	public Response readData(@PathParam("pid") String pid)
	{
		return actions.readData(pid);
	}

	// @GET
	// @Path("/{pid}/volume/{volumePid}")
	// @Produces({ "application/*" })
	// public StatusBean readVolume(@PathParam("pid") String pid,
	// @PathParam("volumePid") String volumePid)
	// {
	// String volumePid = null;
	// String query = EJournal.getVolumeQuery(volumePid, pid);
	// volumePid = actions.findSubject(query);
	//
	// return actions.read(volumePid);
	// }

	@GET
	@Path("/{pid}/volume/{volumePid}")
	@Produces({ "application/json", "application/xml", MediaType.TEXT_HTML })
	public View getVolumeView(@PathParam("pid") String pid,
			@PathParam("volumePid") String volumePid)
	{
		// String volumePid = null;
		// String query = EJournal.getVolumeQuery(volumePid, pid);
		// volumePid = actions.findSubject(query);
		return actions.getView(volumePid, ObjectType.ejournalVolume);
	}

	@GET
	@Path("/{pid}/volume/{volumePid}/data")
	@Produces({ "application/*" })
	public Response readVolumeData(@PathParam("pid") String pid,
			@PathParam("volumePid") String volumePid)
	{
		// String volumePid = null;
		// String query = EJournal.getVolumeQuery(volumePid, pid);
		// volumePid = actions.findSubject(query);

		return actions.readData(volumePid);
	}

	@GET
	@Produces({ "application/json", "application/xml" })
	public ObjectList getAll()
	{
		return new ObjectList(actions.getAll());
	}

	@GET
	@Path("/{pid}")
	@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML,
			MediaType.APPLICATION_XHTML_XML })
	public View getView(@PathParam("pid") String pid)
	{
		return actions.getView(pid);
	}

{'fraction_non_alphanumeric': 0.16129032258064516, 'fraction_numerical': 0.002179598953792502, 'mean_word_length': 4.700621118012422, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 5}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4045175', 'n_tokens_mistral': 1653, 'n_tokens_neox': 1609, 'n_words': 299}