Examples of Refinement


Examples of org.apache.directory.api.ldap.model.subtree.Refinement

    public void testSpecWithRefinement() throws Exception
    {
        SubtreeSpecification ss = parser.parse( SPEC_WITH_REFINEMENT );

        // The items
        Refinement topItem = new ItemRefinement( TOP_OC );
        Refinement aliasItem = new ItemRefinement( ALIAS_OC );
        Refinement personItem = new ItemRefinement( PERSON_OC );
        Refinement countryItem = new ItemRefinement( COUNTRY_OC );

        // The inner OR refinement or:{item:2.5.6.1, item:person}
        List<Refinement> orList = new ArrayList<Refinement>();
        orList.add( aliasItem );
        orList.add( personItem );

        Refinement orRefinement = new OrRefinement( orList );

        // The inner AND refinement and:{ item:2.5.6.0, or:... }
        List<Refinement> innerAndList = new ArrayList<Refinement>();
        innerAndList.add( topItem );
        innerAndList.add( orRefinement );

        Refinement innerAndRefinement = new AndRefinement( innerAndList );

        // The NOT refinement not:item:2.5.6.2
        Refinement notRefinement = new NotRefinement( countryItem );

        // The outer AND refinement and:{and:..., not:...}
        List<Refinement> outerAndList = new ArrayList<Refinement>();
        outerAndList.add( innerAndRefinement );
        outerAndList.add( notRefinement );
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.subtree.Refinement

    public void testSpecWithRefinement() throws Exception
    {
        SubtreeSpecification ss = parser.parse( SPEC_WITH_REFINEMENT );

        // The items
        Refinement topItem = new ItemRefinement( TOP_OC );
        Refinement aliasItem = new ItemRefinement( ALIAS_OC );
        Refinement personItem = new ItemRefinement( PERSON_OC );
        Refinement countryItem = new ItemRefinement( COUNTRY_OC );

        // The inner OR refinement or:{item:2.5.6.1, item:person}
        List<Refinement> orList = new ArrayList<Refinement>();
        orList.add( aliasItem );
        orList.add( personItem );

        Refinement orRefinement = new OrRefinement( orList );

        // The inner AND refinement and:{ item:2.5.6.0, or:... }
        List<Refinement> innerAndList = new ArrayList<Refinement>();
        innerAndList.add( topItem );
        innerAndList.add( orRefinement );

        Refinement innerAndRefinement = new AndRefinement( innerAndList );

        // The NOT refinement not:item:2.5.6.2
        Refinement notRefinement = new NotRefinement( countryItem );

        // The outer AND refinement and:{and:..., not:...}
        List<Refinement> outerAndList = new ArrayList<Refinement>();
        outerAndList.add( innerAndRefinement );
        outerAndList.add( notRefinement );
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.subtree.Refinement

    public void testSpecWithRefinement() throws Exception
    {
        SubtreeSpecification ss = parser.parse( SPEC_WITH_REFINEMENT );

        // The items
        Refinement topItem = new ItemRefinement( TOP_OC );
        Refinement aliasItem = new ItemRefinement( ALIAS_OC );
        Refinement personItem = new ItemRefinement( PERSON_OC );
        Refinement countryItem = new ItemRefinement( COUNTRY_OC );

        // The inner OR refinement or:{item:2.5.6.1, item:person}
        List<Refinement> orList = new ArrayList<Refinement>();
        orList.add( aliasItem );
        orList.add( personItem );

        Refinement orRefinement = new OrRefinement( orList );

        // The inner AND refinement and:{ item:2.5.6.0, or:... }
        List<Refinement> innerAndList = new ArrayList<Refinement>();
        innerAndList.add( topItem );
        innerAndList.add( orRefinement );

        Refinement innerAndRefinement = new AndRefinement( innerAndList );

        // The NOT refinement not:item:2.5.6.2
        Refinement notRefinement = new NotRefinement( countryItem );

        // The outer AND refinement and:{and:..., not:...}
        List<Refinement> outerAndList = new ArrayList<Refinement>();
        outerAndList.add( innerAndRefinement );
        outerAndList.add( notRefinement );
View Full Code Here

Examples of ptolemy.actor.lib.hoc.Refinement

        _tabbedPane.addChangeListener(this);
        Iterator cases = ((Case) entity).entityList(Refinement.class)
                .iterator();
        boolean first = true;
        while (cases.hasNext()) {
            Refinement refinement = (Refinement) cases.next();
            JGraph jgraph = _addTabbedPane(refinement, false);
            // The first JGraph is the one with the focus.
            if (first) {
                first = false;
                setJGraph(jgraph);
View Full Code Here

Examples of ptolemy.actor.lib.hoc.Refinement

                        // Mirror the ports of the container in the refinement.
                        // Note that this is done here rather than as part of
                        // the MoML because we have set protected variables
                        // in the refinement to prevent it from trying to again
                        // mirror the changes in the container.
                        Refinement entity = (Refinement) _case
                                .getEntity(pattern);

                        // Get the initial port configuration from the container.
                        Iterator ports = _case.portList().iterator();

                        while (ports.hasNext()) {
                            Port port = (Port) ports.next();
                            // No need to mirror the control port, as it's a PortParameter.
                            // Hence, its value is available as a parameter.
                            if (port == _case.control.getPort()) {
                                continue;
                            }

                            try {
                                entity.setMirrorDisable(true);
                                Port newPort = entity.newPort(port.getName());
                                if (newPort instanceof RefinementPort
                                        && port instanceof IOPort) {
                                    try {
                                        ((RefinementPort) newPort)
                                                .setMirrorDisable(true);

                                        if (((IOPort) port).isInput()) {
                                            ((RefinementPort) newPort)
                                                    .setInput(true);
                                        }

                                        if (((IOPort) port).isOutput()) {
                                            ((RefinementPort) newPort)
                                                    .setOutput(true);
                                        }

                                        if (((IOPort) port).isMultiport()) {
                                            ((RefinementPort) newPort)
                                                    .setMultiport(true);
                                        }
                                    } finally {
                                        ((RefinementPort) newPort)
                                                .setMirrorDisable(false);
                                    }
                                }
                            } finally {
                                entity.setMirrorDisable(false);
                            }
                        }
                        _addTabbedPane(entity, true);
                    }
                };
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.