public ParsingException error( String message, Throwable t ) { return new ParsingException(message, t, lineNumber, columnNumber); }
@Override public Repository getRepository(Map parameters) throws RepositoryException { String name = (String) parameters.get(org.modeshape.jcr.api.RepositoryFactory.REPOSITORY_NAME); logger.info("Accessing repository " + name); Map defaultParameters = getRepositoryConfiguration(name); defaultParameters.putAll(parameters); if (!engine.getRepositoryNames().contains(name)) { try { File configurationFile = new File(new File(applicationConfiguration.getBaseDir(), "conf"), (String) defaultParameters.get(org.modeshape.jcr.api.RepositoryFactory.URL)); engine.deploy(RepositoryConfiguration.read(configurationFile)); } catch (ParsingException e) { logger.error(e.getMessage(), e); } catch (FileNotFoundException e) { logger.error(e.getMessage(), e); } } return engine.getRepository(name); }
public ParsingException error( String message, Throwable t ) { return new ParsingException(message, t, lineNumber, columnNumber); }
public ParsingException error( String message ) { return new ParsingException(message, lineNumber, columnNumber); }
public ParsingException error( String message ) { return new ParsingException(message, lineNumber, columnNumber); }
/** * Read the JSON representation from supplied URL and construct the {@link Document} representation, using the * {@link Charset#defaultCharset() default character set}. * * @param url the URL to the JSON document; may not be null and must be resolvable * @return the in-memory {@link Document} representation * @throws ParsingException if there was a problem reading from the URL */ public Document read( URL url ) throws ParsingException { try { return read(url.openStream(), DEFAULT_INTROSPECT); } catch (IOException e) { throw new ParsingException(e.getMessage(), e, 0, 0); } }
/** * Read the JSON representation from supplied URL and construct the {@link Document} representation, using the * {@link Charset#defaultCharset() default character set}. * * @param url the URL to the JSON document; may not be null and must be resolvable * @return the in-memory {@link Document} representation * @throws ParsingException if there was a problem reading from the URL */ public Document read( URL url ) throws ParsingException { try { return read(url.openStream(), DEFAULT_INTROSPECT); } catch (IOException e) { throw new ParsingException(e.getMessage(), e, 0, 0); } }