class LazyLoadingGrammarDocument implements GrammarDocument {

    @Override
    public String getDocument() {
        try {
            final GrammarDocument doc = retrieveDocument();
            return doc.getDocument();
        } catch (BadFetchError e) {
            LOGGER.warn(e.getMessage(), e);
            return null;
        }
    }

    public  LazyLoadingGrammarDocument(final String sessionId,
            final DocumentServer documentServer, 
            final URI source, final FetchAttributes attrs);

}