ByteArrayInputStream bytes = new ByteArrayInputStream(src.getBytes("UTF-8")); DOTranslationUtility trans = new DOTranslationUtility.Impl(testingTranslationProperties(),true); FOXML1_1DODeserializer deser = new FOXML1_1DODeserializer(trans); deser.deserialize(bytes, recv, "UTF-8", DOTranslationUtility.DESERIALIZE_INSTANCE);
@Before public void setUp() { Properties transProps = new Properties(System.getProperties()); if (transProps.getProperty("fedora.hostname") == null) { transProps.setProperty("fedora.hostname","localhost"); } if (transProps.getProperty("fedora.port") == null) { transProps.setProperty("fedora.port","1024"); } if (transProps.getProperty("fedora.appServerContext") == null) { transProps.setProperty("fedora.appServerContext","fedora"); } appContext = transProps.getProperty("fedora.appServerContext","fedora"); subject = new DOTranslationUtility.Impl(transProps,true); String propertyUrl = "http://" + transProps.getProperty("fedora.hostname") + ":" + transProps.getProperty("fedora.port") + "/" + appContext; baseURL = System.getProperty("fedora.baseURL", propertyUrl); } /**
protected static DOTranslationUtility translationUtility() { Properties transProps = new Properties(System.getProperties()); if (transProps.getProperty("fedora.hostname") == null) { transProps.setProperty("fedora.hostname","localhost"); } if (transProps.getProperty("fedora.port") == null) { transProps.setProperty("fedora.port","1024"); } if (transProps.getProperty("fedora.appServerContext") == null) { transProps.setProperty("fedora.appServerContext","fedora"); } return new DOTranslationUtility.Impl(transProps, true); } protected static DigitalObject createTestObject(URIReference... contentModelURIs) {
public static DOTranslationUtility get(File serverHome) { return new Impl(Server.getConfig(serverHome)); }
public static DOTranslationUtility get(Properties properties) { return new Impl(properties, true); } /**
public static DOTranslationUtility get(File serverHome) { return new Impl(Server.getConfig(serverHome)); }
public static DOTranslationUtility get(Properties properties) { return new Impl(properties, true); } /**
public static DOTranslationUtility defaultInstance() { return (s_defaultInstance == null) ? defaultInstance(new Impl(System.getProperties(),true)) : s_defaultInstance; }
public static DOTranslationUtility defaultInstance() { return (s_defaultInstance == null) ? defaultInstance(new Impl(System.getProperties(),true)) : s_defaultInstance; }