/** * Get the indicated datastream from VITAL. This method pre-supposes that * the datastream does in fact exist. Call datastreamExists() first to * confirm. * * @param fedora An instantiated fedora client * @param vitalPid The VITAL PID to use * @param dsPid The datastream ID on the object * @returns Datastream The datastream requested, null if not found */ private Datastream getDatastream(FedoraClient fedora, String vitalPid, String dsPid) { try { return fedora.getAPIM().getDatastream(vitalPid, dsPid, null); } catch (Exception ex) { log.error("API Query error: ", ex); return null; } }
/** * @throws java.lang.Exception */ @Before public void setUp() throws Exception { apim = s_client.getAPIM(); apia = s_client.getAPIA(); System.setProperty("fedoraServerHost", "localhost"); System.setProperty("fedoraServerPort", "8080"); }
String vitalPid = fedora.getAPIM().ingest(template, Strings.FOXML_VERSION, "ReDBox creating new object: '" + oid + "'");
@Before public void setUp() throws Exception { apim = s_client.getAPIM(); apia = s_client.getAPIA(); Map<String, String> nsMap = new HashMap<String, String>(); nsMap.put("oai_dc", "http://www.openarchives.org/OAI/2.0/oai_dc/"); nsMap.put("dc", "http://purl.org/dc/elements/1.1/"); nsMap.put("foxml", "info:fedora/fedora-system:def/foxml#"); NamespaceContext ctx = new SimpleNamespaceContext(nsMap); XMLUnit.setXpathNamespaceContext(ctx); // not really necessary, but will cope with any junk left from other tests purgeDemoObjects(s_client); }
FedoraAPIM apim = fedora.getAPIM(); if (firstConnection) { log.info("API-M access testing... {} second timeout",
cutTitle = cutTitle.substring(0, 250) + "..."; fedora.getAPIM().modifyObject(vitalPid, "A", cutTitle, null, "ReDBox activating object: '" + oid + "'");