/** * Set authority controlled fields */ private static void setAuthorizedMetadataFields() { authorityControlled = new HashSet<String>(); Enumeration propertyNames = ConfigurationManager.getProperties().propertyNames(); while (propertyNames.hasMoreElements()) { String key = ((String) propertyNames.nextElement()).trim(); if (key.startsWith(AC_PREFIX) && ConfigurationManager.getBooleanProperty(key, false)) { authorityControlled.add(key.substring(AC_PREFIX.length())); } } }
/** * Factory method for the default results pruner configuration using * dspace.cfg * * @param context Context * @return a ResultsPruner that represent the default retention policy */ public static ResultsPruner getDefaultPruner(Context context) { try { return getPruner(context, ConfigurationManager.getProperties()); } catch (FileNotFoundException e) { throw new IllegalStateException( "VeryExceptionalException - config file not there! ", e); } }
protected void loadMetadataMaps() { if (this.dcMap == null) { // we should load our DC map from configuration this.dcMap = new HashMap<>(); Properties props = ConfigurationManager .getProperties("swordv2-server"); for (Object key : props.keySet()) { String keyString = (String) key; if (keyString.startsWith("simpledc.")) { String k = keyString.substring("simpledc.".length()); String v = (String) props.get(key); this.dcMap.put(k, v); } } } if (this.atomMap == null) { this.atomMap = new HashMap<>(); Properties props = ConfigurationManager .getProperties("swordv2-server"); for (Object key : props.keySet()) { String keyString = (String) key; if (keyString.startsWith("atom.")) { String k = keyString.substring("atom.".length()); String v = (String) props.get(key); this.atomMap.put(k, v); } } } }
Properties props = ConfigurationManager.getProperties("sword-server"); Set keyset = props.keySet(); for (Object keyObj : keyset)