@Override protected Map<?, ?> getContentDescriptionOptions() { return new ExtensibleURIConverterImpl.OptionsMap(ContentHandler.OPTION_REQUESTED_PROPERTIES, CONTENT_TYPE_REQUESTED_PROPERTIES, getLoadOptions()); } };
@Override protected Map<?, ?> getContentDescriptionOptions() { return new ExtensibleURIConverterImpl.OptionsMap(ContentHandler.OPTION_REQUESTED_PROPERTIES, CONTENT_TYPE_REQUESTED_PROPERTIES, getLoadOptions()); } };
/** * Loads the given resource. * It is called by {@link #demandLoadHelper(Resource) demandLoadHelper(Resource)} * to perform a demand load. * This implementation simply calls <code>resource.</code>{@link Resource#load(Map) load}({@link #getLoadOptions() getLoadOptions}()). * Clients may extend this as appropriate. * @param resource a resource that isn't loaded. * @exception IOException if there are serious problems loading the resource. * @see #getResource(URI, boolean) * @see #demandLoadHelper(Resource) */ protected void demandLoad(Resource resource) throws IOException { resource.load(getLoadOptions()); }
/** * Loads the given resource. * It is called by {@link #demandLoadHelper(Resource) demandLoadHelper(Resource)} * to perform a demand load. * This implementation simply calls <code>resource.</code>{@link Resource#load(Map) load}({@link #getLoadOptions() getLoadOptions}()). * Clients may extend this as appropriate. * @param resource a resource that isn't loaded. * @exception IOException if there are serious problems loading the resource. * @see #getResource(URI, boolean) * @see #demandLoadHelper(Resource) */ protected void demandLoad(Resource resource) throws IOException { resource.load(getLoadOptions()); }
private Resource getResource(URI uri) throws Exception { Resource resource; if (saveAndRestore) { resource = resourceSetImpl.getResource(uri, true); } else { // Workaround for java.lang.IllegalStateException: No instance data can be specified // thrown by org.eclipse.core.internal.runtime.DataArea.assertLocationInitialized // The DataArea.assertLocationInitialized is called by ResourceSetImpl.getResource(URI, // boolean) resource = resourceSetImpl.createResource(uri); resource.load(new URL(uri.toString()).openStream(), resourceSetImpl.getLoadOptions()); } return resource; }