Package net.sf.jmd.metarepresentation

Examples of net.sf.jmd.metarepresentation.IModel


    public boolean equals(Object obj) {

        if (!(obj instanceof Model)) {
            return false;
        }
        IModel other = (IModel) obj;

        boolean result = false;

        boolean typeEquals = this.type.equals(other.getType());
        boolean authorEquals = this.author.equals(other.getAuthor());
        boolean revisionEquals = this.revision.equals(other.getRevision());

        boolean itemsSizeEquals = (this.getItems().size() == other.getItems()
                .size());
        boolean itemsContainsEquals = this.getItems().containsAll(
                other.getItems());
        boolean itemsEquals = (itemsSizeEquals && itemsContainsEquals);

        result = (typeEquals && authorEquals && revisionEquals && itemsEquals);

        return result;
View Full Code Here


        if (amFiles == null) {
            throw new MoDiException("We have no model files, call "
                    + "findArchitectsModelFiles(...) first.");
        }

        IModel amModel = new Model();
        amModel.setType(Model.Type.AM);
        amModel = transformModel(amFiles, language);
        metaRepresentation.setAmModel(amModel);
    }
View Full Code Here

        if (dmFiles == null) {
            throw new MoDiException("We have no model files, call "
                    + "findDevelopersModelFiles(...) first.");
        }

        IModel dmModel = new Model();
        dmModel.setType(Model.Type.DM);
        dmModel = transformModel(dmFiles, language);
        metaRepresentation.setDmModel(dmModel);
    }
View Full Code Here

    private IModel transformModel(List<File> modelFiles, MoDi.Language language)
            throws MoDiException {

        ITransformer transformer = TransformerFactory.create(language);
        IModel result = transformer.transform(modelFiles);
        return result;
    }
View Full Code Here

    public List<IDifference> getDifferences() {
        List<IDifference> results = new ArrayList<IDifference>();
        IMetaRepresentation rep = MetaRepresentation.getInstance();

        IModel am = rep.getAmModel();
        IModel dm = rep.getDmModel();

        List<IModelItem> amItems = am.getItems();
        List<IModelItem> dmItems = dm.getItems();

        // entering the comparision
        for (IModelItem amItem : amItems) {
            String amID = amItem.getIdentifier();
View Full Code Here

     */
    public List<IDifference> check(List<IDifference> currentDifferences) {
        List<IDifference> results = new ArrayList<IDifference>();
       
        IMetaRepresentation rep = MetaRepresentation.getInstance();
        IModel amModel = rep.getAmModel();
        IModel dmModel = rep.getDmModel();

        checkStarImports(amModel, amModel.getItems(), results);
        checkStarImports(dmModel, dmModel.getItems(), results);
       
        return results;
    }
View Full Code Here

    public void testToString(){
        assertNotNull(new Model().toString());
    }
   
    public void testSetItems(){
        IModel newModel = new Model();
        List<IModelItem> newItems = new ArrayList<IModelItem>();
        newModel.setItems(newItems);
        assertSame(newItems, newModel.getItems());
    }
View Full Code Here

        newModel.setItems(newItems);
        assertSame(newItems, newModel.getItems());
    }
   
    public void testAddModelItem(){
        IModel newModel = new Model();
        assertTrue(newModel.getItems().isEmpty());
        ModelItem newItem = new ModelItem();
        newModel.addModelItem(newItem);
        assertTrue(newModel.getItems().contains(newItem));
    }
View Full Code Here

    /**
     * <b>The equals method is reflexive:</b> for any reference value x,
     * x.equals(x) should return true.
     */
    public void testEqualsReflexive() {
        IModel x = new Model();
        assertTrue(x.equals(x));
    }
View Full Code Here

    /**
     * <b>The equals method is symmetric:</b> for any reference values x and y,
     * x.equals(y) should return true if and only if y.equals(x) returns true.
     */
    public void testEqualsSymmetric() {
        IModel x = new Model();
        IModel y = new Model();
        assertTrue(x.equals(y) && y.equals(x));
    }
View Full Code Here

TOP

Related Classes of net.sf.jmd.metarepresentation.IModel

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.