Examples of ResourceLocator


Examples of org.eclipse.emf.common.util.ResourceLocator

     * @return the message.
     * @since 2.4
     */
    protected String getString(String key, Object [] substitutions)
    {
      ResourceLocator resourceLocator = getResourceLocator();
      return substitutions == null ? resourceLocator.getString(key) : resourceLocator.getString(key, substitutions);
    }
View Full Code Here

Examples of org.geotools.styling.ResourceLocator

            // But avoid resolving external graphics to absolute file references
            if ( r == null || r.getType() == Type.UNDEFINED ){
                throw new IOException( "No such resource: " + s.getFilename());
            }
            // Force use of unmodified URI, avoiding absolute file references
            ResourceLocator locator = new ResourceLocator(){
                public URL locateResource(String spec) {
                    return null;
                }
            };           
            StyleHandler handler = Styles.handler(s.getFormat());
View Full Code Here

Examples of org.glassfish.hk2.classmodel.reflect.util.ResourceLocator

        lock.writeLock().lock();
        try {

            // now we need to visit all the types that got referenced but not visited
            final ResourceLocator locator = context.getLocator();
            if (locator!=null) {
                context.logger.info("visiting unvisited references");
             
                context.types.onNotVisitedEntries(new TypesCtr.ProxyTask() {
                    @Override
                    public void on(TypeProxy<?> proxy) {

                        String name = proxy.getName();
                        // make this name a resource name...
                        String resourceName = name.replaceAll("\\.", "/") + ".class";

                        InputStream is = null;
                        try {
                            is = locator.openResourceStream(resourceName);
                            if (null == is) {
                              return;
                            }

                            // now visit...
                            logger.log(Level.FINE, "Going to visit {0}", resourceName);
                            ClassReader cr = new ClassReader(is);
                            try {
                                URL url = locator.getResource(resourceName);
                                File file = getFilePath(url.getPath(), resourceName);
                                URI definingURI = getDefiningURI(file);
                                if (logger.isLoggable(Level.FINE)) {
                                    logger.fine("file=" + file + "; definingURI=" + definingURI);
                                }
View Full Code Here

Examples of org.jboss.resteasy.core.ResourceLocator

         {
            try
            {
               if (isLocator(method))
               {
                  ResourceLocator loc = segmentNode.locator;
                  segmentNode.locator = null;
                  return loc;
               }
               else
               {
View Full Code Here

Examples of org.jboss.resteasy.core.ResourceLocator

                  break;
               }
            }
            else
            {
               ResourceLocator locator = (ResourceLocator) invoker;
               if (locator.getMethod().equals(method))
               {
                  removed = locator;
                  break;
               }
View Full Code Here

Examples of org.jboss.resteasy.core.ResourceLocator

        if (invoker instanceof ResourceMethod)
        {
          methods.add(new MethodMetaData(this, (ResourceMethod) invoker));
        } else if(invoker instanceof ResourceLocator)
        {
          ResourceLocator locator = (ResourceLocator) invoker;
          Method method = locator.getMethod();
          Class<?> locatorType = method.getReturnType();
          Class<?> locatorResourceType = GetRestful.getSubResourceClass(locatorType);
          if (locatorResourceType == null)
          {
            // FIXME: we could generate an error for the client, which would be more informative than
View Full Code Here

Examples of org.jboss.security.xacml.locators.ResourceLocator

               this.attributeLocators.add(attribLocator);
            }
            else
               if(locator instanceof ResourceLocator)
               {
                  ResourceLocator resourceLocator = (ResourceLocator) locator;
                  this.resourceLocators.add(resourceLocator);
               }
      }
     
      //Since we do not have any policies in the config file, we need to specify
View Full Code Here

Examples of org.jconfig.utils.ResourceLocator

     * @throws ConfigurationManagerException thrown if the "_config.script" isn't found
     */
    public Configuration load(String configurationName) throws ConfigurationManagerException {
        String fileName = configurationName+"_config.script";
        try {
            ResourceLocator locator = new ResourceLocator(fileName);
            InputStream is = locator.findResource(fileName);
            BufferedReader nis = new BufferedReader(new InputStreamReader(is));           
            String line;
            Vector content = new Vector();
            while ((line=nis.readLine()) != null ) {
                content.add(line);
View Full Code Here

Examples of org.jconfig.utils.ResourceLocator

            uri = uri.substring(1);
        }
        uri += ".xml";
        try {
            //File file = new File(".", request.getUri());
            File file = new ResourceLocator(uri).getFile();
            if (file.exists()) {
                fis = new FileInputStream(file);
                int ch = fis.read(bytes, 0, BUFFER_SIZE);
                while (ch!=-1) {
                    output.write(bytes, 0, ch);
View Full Code Here

Examples of org.jconfig.utils.ResourceLocator

     *@throws  ConfigurationManagerException  if the file cannot be processed
     */
    public Configuration load(String configurationName,ConfigurationParser parser) throws ConfigurationManagerException {
    InputStream is = null;
        try {
            is = new ResourceLocator(filename).getInputStream();
            if ( is == null ) {
              ErrorReporter.getErrorHandler().reportError("File not found:"+filename);
                is = new ResourceLocator("config.xml").getInputStream();
            }
        } catch (IOException e) {
          ErrorReporter.getErrorHandler().reportError("Cannot load file:"+filename,e);
            throw new ConfigurationManagerException(e.getLocalizedMessage());
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.