001/* 002 * The contents of this file are subject to the license and copyright 003 * detailed in the LICENSE and NOTICE files at the root of the source 004 * tree. 005 */ 006package org.fcrepo.client.integration; 007 008import org.apache.jena.rdf.model.Model; 009import org.apache.jena.rdf.model.ModelFactory; 010import org.fcrepo.client.FcrepoResponse; 011 012/** 013 * @author bbpennel 014 */ 015public abstract class AbstractResourceIT { 016 017 protected static final int SERVER_PORT = Integer.parseInt(System 018 .getProperty("fcrepo.dynamic.test.port", "8080")); 019 020 protected static final String HOSTNAME = "localhost"; 021 022 protected static final String SERVER_ADDRESS = "http://" + HOSTNAME + ":" + 023 SERVER_PORT + "/fcrepo/rest/"; 024 025 protected Model getResponseModel(final FcrepoResponse resp) { 026 final Model model = ModelFactory.createDefaultModel(); 027 model.read(resp.getBody(), null, "text/turtle"); 028 return model; 029 } 030}