Package org.sintef.umt.transgen

Examples of org.sintef.umt.transgen.Validator


  private void doValidateModel(){
   
    pimviewer.clearLineColors();

    output.addLine("Validation : initializing");
    Validator theValidator = new Validator(output);
    XmiSchema theSchema = new DOMXmiSchema(UMTMain.resource_dir + "extxmi.xsd");
    PropertyGroup theProfile = profileeditor.getChosenProfile();
    Profile2XSD transformer = new Profile2XSD();

    try{
      DocumentBuilderFactory theFact = DocumentBuilderFactory.newInstance();   
      DocumentBuilder bobTheBuilder = theFact.newDocumentBuilder();
     
      InputSource toParse = new InputSource(new StringReader(pimviewer.getHutnBuffer()));
         
      Document theModel = bobTheBuilder.parse(toParse);
   
      theSchema = transformer.doTransformation(theProfile,theModel);
      String theProfileName = "No profile selected.";
      if (theProfile != null)
        theProfileName = theProfile.getName();
      if (theProfileName == null || theProfileName.equals(""))
        theProfileName = "(no profile)";
      output.addLine("Validation : starting validation. Profile = " + theProfileName);
      theValidator.validateAgainstSchema(theModel,theSchema);
      output.addLine("Validation : validation done")      ;
     
      Iterator it = output.getErrorLines().iterator();
      while (it.hasNext())
        pimviewer.colorTextLine(((Integer)it.next()).intValue());
View Full Code Here

TOP

Related Classes of org.sintef.umt.transgen.Validator

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.