Package org.milyn.resource

Examples of org.milyn.resource.URIResourceLocator$ResolvedURI


     * @param importBaseURI The base URI for loading imports.
   */
    public EDIConfigDigester(URI modelURI, URI importBaseURI) {
    AssertArgument.isNotNull(importBaseURI, "importBaseURI");
    this.modelURI = modelURI;
      importLocator = new URIResourceLocator();
      importLocator.setBaseURI(importBaseURI);
    }
View Full Code Here


            importedSegments = getImportedSegments(importUri);
            if(importedSegments == null) {
                EDIConfigDigester digester = new EDIConfigDigester(importUri, URIResourceLocator.extractBaseURI(importUri));

                importedEdimap = digester.digestEDIConfig(new URIResourceLocator().getResource(importUri.toString()));
                importFiles(child, importedEdimap, tree);
                importedSegments = createImportMap(importedEdimap);
            }

            applyImportOnSegments(edimap.getSegments().getSegments(), imp, importedSegments);           
View Full Code Here

            properties = new Properties();
        }

        if(propertiesFile != null) {
            try {
                URIResourceLocator locator = new URIResourceLocator();
                properties.load(locator.getResource(propertiesFile));
            } catch (IOException e) {
                throw new SmooksConfigurationException("Failed to read JMS JNDI properties file '" + propertiesFile + "'.", e);
            }
        }
View Full Code Here

        } else {
            throw new EDIConfigurationException("Invalid mapping model configuration '" + mappingConfig + "'.  Must contain either 1 or 3 tokens.");
        }

        if(isValidURI(ediMappingModel)) {
            URIResourceLocator resourceLocator = new URIResourceLocator();
            URI importBaseURI;

        resourceLocator.setBaseURI(baseURI);       
        URI resourceURI = resourceLocator.resolveURI(ediMappingModel);
      importBaseURI = URIResourceLocator.extractBaseURI(resourceURI);
       
        return parseMappingModel(getMappingConfigData(resourceLocator, ediMappingModel), mappingDescription, resourceURI, importBaseURI);
      } else {
        return parseMappingModel(new StringReader(ediMappingModel), mappingDescription, null, baseURI);
View Full Code Here

        InputStream ruleStream;

        // Get the input stream...
        try {
            ruleStream = new URIResourceLocator().getResource(src);
        }
        catch (final IOException e) {
            throw new SmooksException("Failed to open rule file '" + src + "'.", e);
        }
View Full Code Here

        InputStream ruleStream;

        // Get the input stream...
        try
        {
            ruleStream = new URIResourceLocator().getResource(ruleFile);
        }
        catch (final IOException e)
        {
            throw new SmooksException("Failed to open rule file '" + ruleFile + "'.", e);
        }
View Full Code Here

        }
    }

    private void digestImport(Element importElement, URI baseURI) throws SAXException, URISyntaxException, SmooksConfigurationException {
        String file = DomUtils.getAttributeValue(importElement, "file");
        URIResourceLocator resourceLocator;
        InputStream resourceStream;

        if (file == null) {
            throw new IllegalStateException("Invalid resource import.  'file' attribute must be specified.");
        }

        resourceLocator = new URIResourceLocator();
        resourceLocator.setBaseURI(baseURI);

        try {
            URI fileURI = resourceLocator.resolveURI(file);

            // Add the resource URI to the list.  Will fail if it was already loaded
            pushConfig(file, fileURI);
            try {
                if (logger.isDebugEnabled()) {
                    logger.debug("Importing resource configuration '" + file + "' from inside '" + configStack.peek().configFile + "'.");
                }

                resourceStream = resourceLocator.getResource(file);
                try {
                    List<Element> importParams = DomUtils.getElements(importElement, "param", null);
                    if(!importParams.isEmpty()) {
                        // Inject parameters into import config...
                        String importConfig = StreamUtils.readStreamAsString(resourceStream);
View Full Code Here

    /**
     * Private constructor.
     */
    private StandaloneApplicationContext() {
        resourceLocator = new URIResourceLocator();
        ((URIResourceLocator)resourceLocator).setBaseURI(URI.create(URIResourceLocator.SCHEME_CLASSPATH + ":/"));
    }
View Full Code Here

TOP

Related Classes of org.milyn.resource.URIResourceLocator$ResolvedURI

Copyright © 2018 www.massapicom. 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.