Esempio n. 1
0
 /**
  * Add topic id-value pairs to idMap.
  *
  * @param id id
  * @param value value
  */
 public void addId(final URI id, final String value) {
   if (id != null && value != null) {
     final URI localId = id.normalize();
     final String localValue = value.trim();
     idMap.put(localId, localValue);
   }
 }
Esempio n. 2
0
 /**
  * Add topic id to the idMap.
  *
  * @param id topic id
  * @return updated topic id
  */
 public String addId(final URI id) {
   if (id == null) {
     return null;
   }
   final URI localId = id.normalize();
   index++;
   final String newId = PREFIX + Integer.toString(index);
   idMap.put(localId, newId);
   return newId;
 }