code: public void add(final InputStream input, final String resource) throws JaxRxException {
          synchronized (resource) {
              try {
                  shred(input, resource);
              } catch (final TTException exce) {
                  throw new JaxRxException(exce);
              }
          }
  
      }
docs: This method is responsible to add a new XML document to a collection.
  
  @param input
  The new XML document packed in an {@link InputStream}.
  @param resource
  The name of the collection.
  @throws JaxRxException
  The exception occurred.