protected void init() { setDefault(GROUP_ID, "de.tudarmstadt.ukp.dkpro.core"); setDefault(ARTIFACT_URI, "mvn:${" + GROUP_ID + "}:${" + ARTIFACT_ID + "}:${" + VERSION + "}"); }
/** * Set a class which can be used to try finding a Maven POM from which resource version * information could be extracted. * * @param aClass * a context class, usually the class creating the provider. */ public void setContextClass(Class<?> aClass) { contextClass = aClass; setDefault(PACKAGE, contextClass.getPackage().getName().replace('.', '/')); }
/** * Set an object which can be used to try finding a Maven POM from which resource version * information could be extracted. * * @param aObject * a context object, usually the object creating the provider. */ public void setContextObject(Object aObject) { setContextClass(aObject.getClass()); // Experimental: allow forcing any resource provider to allow sharing its resource // Enable sharing the model between multiple instances of this AE. This is an experimental // parameter for advanced users. Sharing the model can lead to unexpected results because // some parameters affect the model when it is initialized. Thus, only the settings from the // first instance using the model will initialize the model, but not the next instance which // finds the already-loaded model and simply reuses it. Sharing models can also lead to // unexpected results or crashes in multi-threaded environments. // Allowed values: "true" and "false" String key = "dkpro.core.resourceprovider.sharable." + aObject.getClass().getName(); if (System.getProperty(key) != null) { setDefault(SHARABLE, System.getProperty(key)); } }