public static void purgeOneEmptyObject(FedoraClient client, String pid) throws Exception { System.out.println("Purging test object: " + pid); client.getAPIMMTOM().purgeObject(pid, "", false); }
private void removeObjectSpecificPolicies() { try { admin.getAPIMMTOM().purgeObject("demo:ObjSpecificTest", "", false); } catch (Exception e) { throw new RuntimeException("Failure removing object-specific " + "policies", e); } }
private void removeTestObject(String pid) { try { admin.getAPIMMTOM().purgeObject(pid, "", false); } catch (Exception e) { throw new RuntimeException("Failure removing test object: " + pid, e); } }
private boolean canWrite(FedoraClient client, String pid, String logMessage) throws Exception { FedoraAPIMMTOM apim = client.getAPIMMTOM(); try { apim.modifyObject(pid, null, null, null, logMessage); return true; } catch (Exception e) { e.printStackTrace(); return false; } }
/** * @throws java.lang.Exception */ @Before public void setUp() throws Exception { abdera = Abdera.getInstance(); apim = s_client.getAPIMMTOM(); System.setProperty("fedoraServerHost", "localhost"); System.setProperty("fedoraServerPort", "8080"); }
public static void purgeDemoObjects(FedoraClient client) throws Exception { FedoraAPIMMTOM apim = client.getAPIMMTOM(); for (String pid : getDemoObjects(client)) { AutoPurger.purge(apim, pid, null); } }
@Before public void setUp() throws Exception { apia = s_client.getAPIAMTOM(); apim = s_client.getAPIMMTOM(); }
public static void ingestDemoObjects(FedoraClient client, String... paths) throws Exception { FedoraAPIAMTOM apia = client.getAPIAMTOM(); FedoraAPIMMTOM apim = client.getAPIMMTOM(); ingestDemoObjects(apia, apim, paths); }
public static void ingestOneEmptyObject(FedoraClient client, String pid) throws Exception { System.out.println("Ingesting test object: " + pid); client.getAPIMMTOM() .ingest(TypeUtility.convertBytesToDataHandler( getTestObjectBytes(pid)), FOXML1_1.uri, ""); }
@After public void tearDown() throws Exception { m_client.getAPIMMTOM().purgeObject(PID, "Cleanup", false); m_client.shutdown(); }
@BeforeClass public static void bootStrap() throws Exception { apim = TestRESTAPI.initClient().getAPIMMTOM(); rest = new TestRESTAPI(); }
/** * @throws java.lang.Exception */ @Before public void setUp() throws Exception { osName = System.getProperty("os.name"); if (!isTomcatRunning()) { startTomcat(); } apim = FedoraTestCase.getFedoraClient().getAPIMMTOM(); }
@BeforeClass public static void bootStrap() throws Exception { s_client = getFedoraClient(); ingestSimpleImageDemoObjects(s_client); ingestImageCollectionDemoObjects(s_client); ri_impl = getRIImplementation(); // clone some demo objects to managed-content equivalents for reserved datastreams (RELS-*, DC) ManagedContentTranslator.createManagedClone(s_client.getAPIMMTOM(), "demo:SmileyPens", "demo:SmileyPens_M"); ManagedContentTranslator.createManagedClone(s_client.getAPIMMTOM(), "demo:SmileyBeerGlass", "demo:SmileyBeerGlass_M"); }
@Before public void setUp() throws Exception { FedoraClient client = getFedoraClient(); apia = client.getAPIAMTOM(); apim = client.getAPIMMTOM(); client.shutdown(); }
@Before public void setUp() throws Exception { apia = s_client.getAPIAMTOM(); apim = s_client.getAPIMMTOM(); apim.ingest(TypeUtility.convertBytesToDataHandler(DEMO_REST_FOXML), FOXML1_1.uri, "TestRESTAPI.setUp: ingesting new foxml object " + DEMO_REST_PID); }
@Before public void setUp() throws Exception { apim = s_client.getAPIMMTOM(); apia = s_client.getAPIAMTOM(); // clone some demo objects to managed-content equivalents for reserved datastreams (RELS-*, DC) ManagedContentTranslator.createManagedClone(apim, PENS_PID, MANAGED_PENS_PID); ManagedContentTranslator.createManagedClone(apim, GLASS_PID, MANAGED_GLASS_PID); }
@Test public void testListMethodsWithoutSDeps() throws Exception { FedoraAPIMMTOM apim = s_client.getAPIMMTOM(); AutoPurger.purge(apim, SDEP_1_PID, null); AutoPurger.purge(apim, SDEP_2_PID, null); try { testListMethods(); } finally { Util.ingestTestObjects(s_client, SIMPLE_DEPLOYMENT_DEPLOYMENTS); } }
@BeforeClass public static void bootStrap() throws Exception { s_client = getFedoraClient(getBaseURL(), getUsername(), getPassword()); apim = s_client.getAPIMMTOM(); }
public RemoteObjectSource(ServiceInfo serviceInfo) throws ServiceException, IOException { FedoraClient fc = new FedoraClient(serviceInfo.getBaseUrlString(), serviceInfo.getUsername(), serviceInfo.getPassword()); apia = fc.getAPIAMTOM(); apim = fc.getAPIMMTOM(); fc.shutdown(); }
@BeforeClass public static void bootstrap() throws Exception { s_client = getFedoraClient(); APIM = s_client.getAPIMMTOM(); APIM.ingest(TypeUtility.convertBytesToDataHandler(getCModelObject()), FOXML_FORMAT, ""); APIM.ingest(TypeUtility.convertBytesToDataHandler(getSDefObject()), FOXML_FORMAT, ""); APIM.ingest(TypeUtility.convertBytesToDataHandler(getSDepObject()), FOXML_FORMAT, ""); APIM.ingest(TypeUtility.convertBytesToDataHandler(getDataObject()), FOXML_FORMAT, ""); }