Examples of FileResource


Examples of org.apache.derby.iapi.store.access.FileResource

    if (fid == null)
      throw StandardException.newException(SQLState.LANG_FILE_DOES_NOT_EXIST, sqlName,schemaName);

    long generationId = fid.getGenerationId();

    FileResource fr = af.getTransaction(ddc.getContextManager()).getFileHandler();

    String externalName = org.apache.derby.impl.sql.execute.JarDDL.mkExternalName(schemaName, sqlName, fr.getSeparatorChar());

    Object f = fr.getAsFile(externalName, generationId);
    if (f instanceof java.io.File)
      return f;

    try {
      return fr.getAsStream(externalName, generationId);
    } catch (java.io.IOException ioe) {
            throw StandardException.newException(SQLState.LANG_FILE_ERROR, ioe, ioe.toString());   
    }
  }
View Full Code Here

Examples of org.apache.devicemap.loader.resource.FileResource

        switch (option) {
            case JAR: {
                return new DDRLoader(new JarResource(path));
            }
            case FOLDER: {
                return new DDRLoader(new FileResource(path));
            }
            case URL: {
                return new DDRLoader(new URLResource(path));
            }
            case NOOP: {
View Full Code Here

Examples of org.apache.hivemind.util.FileResource

        File module = new File("./examples/src/descriptor/META-INF/panorama.startup.xml");
        if (!module.exists()) {
            module = new File("./src/descriptor/META-INF/panorama.startup.xml");
        }

        Resource r = new FileResource(module.getAbsolutePath());
        MessageFinder mf = new MessageFinderImpl(r);
        ThreadLocale tl = new ThreadLocaleImpl(Locale.getDefault());

        return new ModuleMessages(mf, tl);
    }
View Full Code Here

Examples of org.apache.hivemind.util.FileResource

            return;
        }

        String path = file.getPath().replace('\\', '/');

        Resource r = new FileResource(path);

        enqueue(r, definition);
    }
View Full Code Here

Examples of org.apache.hivemind.util.FileResource

    public Messages getMessages()
    {
        String projectRoot = System.getProperty("PROJECT_ROOT", ".");
        String path = projectRoot + "/examples/src/descriptor/META-INF/panorama.startup.xml";

        Resource r = new FileResource(path);
        MessageFinder mf = new MessageFinderImpl(r);
        ThreadLocale tl = new ThreadLocaleImpl(Locale.getDefault());

        return new ModuleMessages(mf, tl);
    }
View Full Code Here

Examples of org.apache.hivemind.util.FileResource

        ClassResolver resolver = new DefaultClassResolver();

        // Register the examples.xml file, which (given its non-standard name)
        // is not visible.
        ModuleDescriptorProvider provider = new XmlModuleDescriptorProvider(resolver,
                new FileResource(path));
        return buildRegistry(provider);
    }
View Full Code Here

Examples of org.apache.hivemind.util.FileResource

    {
        XmlResourceProcessor processor = new XmlResourceProcessor(getClassResolver(),
                new DefaultErrorHandler());

        Resource[] missingResources = new Resource[]
        { new FileResource("foo"), new URLResource(new URL("file://MissingFile")) };
        Class[] exceptionTypes = new Class[]
        { NullPointerException.class, UnknownHostException.class };

        for (int i = 0; i < missingResources.length; i++)
        {
View Full Code Here

Examples of org.apache.hivemind.util.FileResource

            return;
        }

        String path = file.getPath().replace('\\', '/');

        Resource r = new FileResource(path);

        enqueue(r);
    }
View Full Code Here

Examples of org.apache.ivy.plugins.repository.file.FileResource

        String path = artifact.getExtraAttribute(DefaultIvyDependencyPublisher.FILE_PATH_EXTRA_ATTRIBUTE);
        if (path == null) {           
            return null;
        }
        File file = new File(path);
        return new ResolvedResource(new FileResource(new FileRepository(), file), artifact.getId().getRevision());
    }
View Full Code Here

Examples of org.apache.ivy.plugins.repository.file.FileResource

                Message.verbose("Parent module doesn't exist on the filesystem: "
                        + file.getAbsolutePath());
                return null;
            }

            FileResource res = new FileResource(null, file);
            ModuleDescriptorParser parser = ModuleDescriptorParserRegistry.getInstance().getParser(
                res);
            return parser.parseDescriptor(getSettings(), file.toURL(), res, isValidate());
        }
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.