Examples of ModelItem


Examples of net.sf.jmd.metarepresentation.impl.ModelItem

     * Test method for
     * {@link de.dlr.sistec.modi.metarepresentation.impl.ModelItem#equals(java.
     * lang.Object)}.
     */
    public void testEquals() {
        ModelItem other = new ModelItem();

        assertFalse(modelItem.equals(null));
        assertTrue(modelItem.equals(modelItem));
        assertTrue(modelItem.equals(other));

        modelItem.setName("IModelItem");
        assertFalse(modelItem.equals(other));
        other.setName("IModelItem");
        assertTrue(modelItem.equals(other));

        modelItem.setNamespace("de.dlr.sistec.modi");
        assertFalse(modelItem.equals(other));
        other.setNamespace("de.dlr.sistec.modi");
        assertTrue(modelItem.equals(other));

        modelItem.setType("interface");
        assertFalse(modelItem.equals(other));
        other.setType("interface");
        assertTrue(modelItem.equals(other));

        modelItem.addExtendee(new ModelItem());
        assertFalse(modelItem.equals(other));
        other.addExtendee(new ModelItem());
        assertTrue(modelItem.equals(other));

        //operation
        Operation modelItemOperation = new Operation();
        modelItem.addMember(modelItemOperation);
        assertFalse(modelItem.equals(other));

        Operation othersOperation = new Operation();
        other.addMember(othersOperation);
        assertTrue(modelItem.equals(other));
       
        Parameter modelItemParameter = new Parameter();
        modelItemOperation.addParameter(modelItemParameter);
        assertFalse(modelItem.equals(other));
View Full Code Here

Examples of org.openhab.model.items.ModelItem

  public void unsetModelRepository(ModelRepository modelRepository) {
    this.modelRepository = null;
  }

  public String getIcon(String itemName) {
    ModelItem item = getItem(itemName);
    return item != null ? item.getIcon() : null;
  }
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.