Examples of ArchMapperException


Examples of archmapper.main.exceptions.ArchMapperException

        fos.close();
     
      resource = StandaloneResourceProvider.instance()
          .acmeResourceForString(tmp.getPath());
    } catch (Exception e) {
      throw new ArchMapperException(e);
    } finally {
      if (tmp != null) {
        tmp.delete();
      }
    }
View Full Code Here

Examples of archmapper.main.exceptions.ArchMapperException

            getQualifiedName(rule.getParent()) + ": "+ rule.getName();
        System.out.println(violation);
        conf.getArchitectureRuleViolations().add(violation);
      }
    } catch (Exception e) {
      throw new ArchMapperException(e);
    }
  }
View Full Code Here

Examples of archmapper.main.exceptions.ArchMapperException

     
      if (property != null) {
        return (Element) property;
      }
    } catch (JDOMException e) {
      throw new ArchMapperException("Error searching in the config file: "+ e.getMessage(), e);
    }
   
    // If no property was found, create a new one...
   
    Element property = new Element("property", springBeansNamespace);
View Full Code Here

Examples of archmapper.main.exceptions.ArchMapperException

      xpath.addNamespace("spring", springBeansNamespace.getURI());
      Object beanNode = xpath.selectSingleNode(doc.getRootElement());
     
      return (Element) beanNode;
    } catch (JDOMException e) {
      throw new ArchMapperException("Error searching in the config file: "+ e.getMessage(), e);
    }
  }
View Full Code Here

Examples of archmapper.main.exceptions.ArchMapperException

          }
        }
       
        configFile.create(input, true, null);
      } catch (CoreException e) {
        throw new ArchMapperException(e);
      }
     
      Element root = new Element("beans");
      root.setNamespace(springBeansNamespace);
     
      Namespace schemaNS = Namespace.getNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance");
      root.addNamespaceDeclaration(schemaNS);
      root.setAttribute("schemaLocation", "http://www.springframework.org/schema/beans/spring-beans.xsd", schemaNS);
     
      doc.addContent(root);     
    } else {
      SAXBuilder builder = new SAXBuilder();
      try {
        doc = builder.build(configFile.getContents(true));
      } catch (Exception e) {
        throw new ArchMapperException("Error reading existing config file: "+ e.getMessage(), e);
      }
    }
   
    return doc;
  }
View Full Code Here

Examples of archmapper.main.exceptions.ArchMapperException

    XMLOutputter outp = new XMLOutputter(Format.getPrettyFormat());
    FileOutputStream out = null;
    try {
      out = new FileOutputStream(configFile.getLocation().toOSString());
    } catch (FileNotFoundException e) {
      throw new ArchMapperException("Could not write to config file: "+ e.getMessage(), e);
    }
   
    try {
      outp.output(doc, out);
      out.close();
    } catch (IOException e) {
      throw new ArchMapperException("Could not write to config file: "+ e.getMessage(), e);
    }
  }
View Full Code Here

Examples of archmapper.main.exceptions.ArchMapperException

      } else {
        mapping = (ArchitectureMapping) um.unmarshal(stream);
      }
     
    } catch (JAXBException e) {
      throw new ArchMapperException("Could not load architecture mapping file: "+
          e.getMessage());
    }
   
    return mapping;
  }
View Full Code Here

Examples of archmapper.main.exceptions.ArchMapperException

      JAXBContext jc = JAXBContext.newInstance(StyleMapping.class);
      Marshaller m = jc.createMarshaller();
      m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
          m.marshal(mapping, System.out);
    } catch (JAXBException e) {
      throw new ArchMapperException("Could not write style mapping file: "+
          e.getMessage());
    }
  }
View Full Code Here

Examples of archmapper.main.exceptions.ArchMapperException

      JAXBContext jc = JAXBContext.newInstance(StyleMapping.class);
      Unmarshaller um = jc.createUnmarshaller();
      mapping = (StyleMapping) um.unmarshal(new File(filename));
     
    } catch (JAXBException e) {
      throw new ArchMapperException("Could not read style mapping file: "+
          e.getMessage());
    }
   
    return mapping;
  }
View Full Code Here

Examples of archmapper.main.exceptions.ArchMapperException

      JAXBContext jc = JAXBContext.newInstance(StyleMapping.class);
      Unmarshaller um = jc.createUnmarshaller();
      mapping = (StyleMapping) um.unmarshal(fileInputStream);
     
    } catch (JAXBException e) {
      throw new ArchMapperException("Could not read style mapping file: "+
          e.getMessage());
    }
   
    return mapping;
 
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.