Examples of PatternObjectAttribute


Examples of ptolemy.actor.gt.PatternObjectAttribute

                                + "transformation rule.";
                        _showTableError(message, row, column, previousString);
                        return;
                    }

                    PatternObjectAttribute attribute = GTTools
                            .getPatternObjectAttribute(replacementObject);
                    if (attribute == null) {
                        try {
                            attribute = new PatternObjectAttribute(
                                    replacementObject, "patternObject");
                        } catch (KernelException e) {
                            throw new KernelRuntimeException(e, "Unable to "
                                    + "create patternObject attribute.");
                        }
                    }
                    if (!attribute.getExpression().equals(patternObjectName)) {
                        _setPatternObject(replacementObject, patternObjectName,
                                false);
                    }
                }

            } else if (column == 2) {
                String replacementObjectName = newValue;
                if (replacementObjectName.length() > 0) {
                    NamedObj replacementObject = replacement
                            .getEntity(replacementObjectName);
                    if (replacementObject == null) {
                        replacementObject = replacement
                                .getRelation(replacementObjectName);
                    }

                    if (replacementObject == null) {
                        String message = "Entity or relation with name \""
                                + replacementObjectName
                                + "\" cannot be found in the replacement of the "
                                + "transformation rule.";
                        _showTableError(message, row, column, previousString);
                        return;
                    }

                    PatternObjectAttribute attribute = GTTools
                            .getPatternObjectAttribute(replacementObject);
                    if (attribute == null) {
                        String message = "Entity or relation with name \""
                                + replacementObject
                                + "\" in the replacement part of the "
View Full Code Here

Examples of ptolemy.actor.gt.PatternObjectAttribute

        Collection<?> objectCollection = new CombinedCollection<Object>(
                new Collection<?>[] { container.entityList(),
                        container.relationList() });
        for (Object entityObject : objectCollection) {
            NamedObj object = (NamedObj) entityObject;
            PatternObjectAttribute attribute = GTTools
                    .getPatternObjectAttribute(object);
            if (attribute != null) {
                attribute.addValueListener(this);
                String patternObject = attribute.getExpression();
                if (patternObject.length() != 0) {
                    String name = _getNameWithinContainer(object, replacement);
                    topLevelFrame._tableModel.addRow(new Object[] {
                            _createCellPanel(Integer.toString(index++)),
                            _createCellPanel(patternObject),
View Full Code Here

Examples of ptolemy.actor.gt.PatternObjectAttribute

            } else {
                objectCollection = filter;
            }
            for (Object objectObject : objectCollection) {
                NamedObj object = (NamedObj) objectObject;
                PatternObjectAttribute patternObject = GTTools
                        .getPatternObjectAttribute(object);
                if (isSet) {
                    if (patternObject == null) {
                        patternObject = new PatternObjectAttribute(object,
                                "patternObject");
                    }
                    String name = _getNameWithinContainer(object,
                            getFrameController().getTransformationRule()
                            .getPattern());
                    patternObject.setPersistent(true);
                    patternObject.setExpression(name);
                } else if (patternObject != null) {
                    patternObject.setPersistent(false);
                    patternObject.setExpression("");
                }
                if (object instanceof CompositeEntity) {
                    _setOrClearPatternObjectAttributes(
                            (CompositeEntity) object, isSet, 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.