Package org.jboss.dna.graph.connector.federation

Examples of org.jboss.dna.graph.connector.federation.Projection$Rule


            String segment = currTextSegment.toString();
            List<Rule> parentMatches = getMatches().peek();
            int len = parentMatches.size();
            for ( int i = 0; i < len; ++i )
            {
                Rule r = parentMatches.get( i );
                if ( r instanceof TextSegmentHandler )
                {
                    TextSegmentHandler h = (TextSegmentHandler) r;
                    try
                    {
View Full Code Here


    {

        @Override
        protected void configure()
        {
            forPattern( "bar" ).addRule( new Rule()
            {

                @Override
                public void body( String namespace, String name, String text )
                    throws Exception
View Full Code Here

            Log log = getDigester().getLogger();
            boolean debug = log.isDebugEnabled();
            for ( int i = 0; i < rules.size(); i++ )
            {
                int j = ( rules.size() - i ) - 1;
                Rule rule = rules.get( j );
                if ( debug )
                {
                    log.debug( "  Fire end() for " + rule );
                }
                try
                {
                    rule.end( namespaceURI, name );
                }
                catch ( Exception e )
                {
                    throw getDigester().createSAXException( e );
                }
View Full Code Here

        // Create the projection for the system repository ...
        ProjectionParser projectionParser = ProjectionParser.getInstance();
        String rule = "/jcr:system => /jcr:system";
        Projection.Rule[] systemProjectionRules = projectionParser.rulesFromString(this.executionContext, rule);
        this.systemSourceProjection = new Projection(systemSourceName, systemWorkspaceName, true, systemProjectionRules);

        // Define the federated repository source. Use the same name as the repository, since this federated source
        // will not be in the connection factory ...
        this.federatedSource = new FederatedRepositorySource();
        this.federatedSource.setName("JCR " + repositorySourceName);
View Full Code Here

            if (!this.federatedSource.hasWorkspace(workspaceName)) {
                // Add the workspace to the federated source ...
                ProjectionParser projectionParser = ProjectionParser.getInstance();
                Projection.Rule[] mirrorRules = projectionParser.rulesFromString(this.executionContext, "/ => /");
                List<Projection> projections = new ArrayList<Projection>(2);
                projections.add(new Projection(sourceName, workspaceName, false, mirrorRules));
                projections.add(this.systemSourceProjection);
                this.federatedSource.addWorkspace(workspaceName, projections, isDefault);
            }
        }
View Full Code Here

            // Create the projection for the system repository ...
            ProjectionParser projectionParser = ProjectionParser.getInstance();
            String rule = "/jcr:system => /jcr:system";
            Projection.Rule[] systemProjectionRules = projectionParser.rulesFromString(this.executionContext, rule);
            this.systemSourceProjection = new Projection(systemSourceName, systemWorkspaceName, true, systemProjectionRules);

            // Define the federated repository source. Use the same name as the repository, since this federated source
            // will not be in the connection factory ...
            this.federatedSource = new FederatedRepositorySource();
            this.federatedSource.setName("JCR " + repositorySourceName);
View Full Code Here

                if (!this.federatedSource.hasWorkspace(workspaceName)) {
                    // Add the workspace to the federated source ...
                    ProjectionParser projectionParser = ProjectionParser.getInstance();
                    Projection.Rule[] mirrorRules = projectionParser.rulesFromString(this.executionContext, "/ => /");
                    List<Projection> projections = new ArrayList<Projection>(2);
                    projections.add(new Projection(sourceName, workspaceName, false, mirrorRules));
                    projections.add(this.systemSourceProjection);
                    this.federatedSource.addWorkspace(workspaceName, projections, isDefault);
                }
            }
        } else {
View Full Code Here

   */
  public String graph() throws Exception {
    StringBuffer text = new StringBuffer();
   
    text.append("digraph M5Tree {\n");
    Rule temp = (Rule)m_ruleSet.elementAt(0);
    temp.topOfTree().graph(text);
    text.append("}\n");
    return text.toString();
  }
View Full Code Here

TOP

Related Classes of org.jboss.dna.graph.connector.federation.Projection$Rule

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.