private String createUri(ID id) {
   if (id == null) {
     throw new IllegalStateException("id cannot be null");
   }
   try {
     return entityClass.getName() + "/" + URLEncoder.encode(id.toString(), "UTF-8") + EXTENSION;
   } catch (UnsupportedEncodingException e) {
     throw new MarkLogicInternalException(e);
   }
 }
  private void dropUnregisteredIndices() {
    final Set<String> indicesToDrop =
        new HashSet<String>(
            myPreviouslyRegistered != null
                ? myPreviouslyRegistered.registeredIndices
                : Collections.<String>emptyList());
    for (ID<?, ?> key : myIndices.keySet()) {
      indicesToDrop.remove(key.toString());
    }

    for (String s : indicesToDrop) {
      FileUtil.delete(IndexInfrastructure.getIndexRootDir(ID.create(s)));
    }
  }
예제 #3
0
 @Override
 public IcsCalendar getCalendar() {
   return calendar.Translator.loadEducatorCalendar(id.toString());
 }