Package gluebooster.basic.resources

Examples of gluebooster.basic.resources.ClassResourceIterator


    *
    * @param mainResourceGettingClass the preferred class for resource getting. Usefule, when multiple jars have the same resource
    */
   public ConfigurationPropertiesReader(){
    
     ClassResourceIterator iterator = new ClassResourceIterator(ConfigurationPropertiesReader.class, APPLICATION_PROPERTIES_RELATIVE_PATH, true);
     iterator.setCheckHasNext(true);
     propertiesFileReader = iterator;
   }
View Full Code Here


         throw new UnsupportedOperationException("metadata " + metadata + " not supported");
     
   }

   private ClassResourceIterator getGraphResourceGetter() throws Exception{
     ClassResourceIterator resourceGetter = new ClassResourceIterator(NavigationConfiguration.class, "/" + getPropertiesReader().getConfigurationDirectory()+ GRAPH_RELATIVE_PATH, true);
     resourceGetter.setCheckHasNext(true);
     return resourceGetter;
   }
View Full Code Here

   }
  
   @SuppressWarnings({ "unchecked" })
public Navigation getNavigation() throws Exception
   {
      ClassResourceIterator resourceGetter = getGraphResourceGetter();

      InputStreamReader graphReader = new InputStreamReader(resourceGetter.next());
     
     
      GraphMLReader2 graphFactory = new GraphMLReader2(graphReader, this, this, this, this);
     
      return new Navigation( graphFactory.readGraph());
View Full Code Here

         BookUtils.createText(div, "The resource path is the connection between the configurationDirectory of a ConfigurationPropertiesReader '" + getPropertiesReader().getConfigurationDirectory() + "' and the static path '" + GRAPH_RELATIVE_PATH +"'");
         getPropertiesReader().fillDocumentation(type, div, context);
       } else if (DocumentationResourecesId.DOCUMENTATION_DEVELOPER.equals(type)){
         propertiesReader.fillDocumentation(type, documentationParent, context);
         try {
           ClassResourceIterator getter = getGraphResourceGetter();
        BoostedNode chapter = BookUtils.createDiv(documentationParent, "The navigation is defined in " + getter.getResourcePath() + ". ");
           if (! getter.hasNext()){
             BookUtils.createText(chapter, "The file is (probably) not implemented yet.");
           }
         } catch (Exception ex){
           BookUtils.createText(documentationParent, "The navigation documentation could not be created. Cause is " + ex.getMessage());
          
View Full Code Here

TOP

Related Classes of gluebooster.basic.resources.ClassResourceIterator

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.