Examples of StringFactory


Examples of com.volantis.mcs.wbsax.StringFactory

             = SessionIdentifierSearcherFactory.create();           
        SessionIdentifierURL splitURL
             = searcher.getJSessionId(dopaque.getString());
           
        // Add the part of the url before the jsessionid as an inline string
        StringFactory strings = outputReferences.getStringFactory();
        WBSAXString prefix = strings.create(splitURL.getPrefix());
        visitString(prefix);
           
        // If present, add jsessionid to the string table  
        if (splitURL.hasJsessionid()) {
            StringReference jsessionid
                 = outputReferences.createReference(splitURL.getJsessionid());
            visitReference(jsessionid);
        }
           
        // If present, add the part of the url after the jsessionid as an
        // inline string
        if (splitURL.hasSuffix())  {
            WBSAXString suffix = strings.create(splitURL.getSuffix());
            visitString(suffix);                  
        }
    }
View Full Code Here

Examples of com.volantis.mcs.wbsax.StringFactory

        // Create the shared context that all the objects which participate
        // in serialising the MCSDOM use.
        Codec codec = new Codec(charsetCode);
        StringTable stringTable = new StringTable();
        StringFactory strings = new StringFactory(codec);
        StringReferenceFactory references =
            new StringReferenceFactory(stringTable, strings);
        WBSAXProcessorContext processorContext =
            new WBSAXProcessorContext(
                wmlConfiguration.getElementNameFactory(),
View Full Code Here

Examples of org.modeshape.jcr.value.StringFactory

    }

    protected static String asString( Object[] values,
                                      ExecutionContext context ) {
        if (values.length == 0) return "[]";
        StringFactory strings = context.getValueFactories().getStringFactory();
        StringBuilder sb = new StringBuilder();
        sb.append('[');
        sb.append(strings.create(values[0]));
        for (int i = 1; i != values.length; ++i) {
            sb.append(',');
            sb.append(strings.create(values[0]));
        }
        return sb.toString();
    }
View Full Code Here

Examples of org.modeshape.jcr.value.StringFactory

                    builder.excludeFromSelectStar(tableName, columnName);
                }
            }
        }
        if (keyPropertyNames != null) {
            StringFactory strings = context.getValueFactories().getStringFactory();
            for (Name name : keyPropertyNames) {
                // Add a key for each key property ...
                builder.addKey(tableName, strings.create(name));
            }
        }
    }
View Full Code Here

Examples of org.modeshape.jcr.value.StringFactory

                }
            }
            String idStr = (String)index.getParameters().get(IndexPlanners.ID_PARAMETER);
            if (idStr != null) {
                if (IndexPlanners.NODE_BY_ID_INDEX_NAME.equals(name)) {
                    StringFactory string = context.getExecutionContext().getValueFactories().getStringFactory();
                    String id = string.create(idStr);
                    final String workspaceName = context.getWorkspaceNames().iterator().next();
                    return sources.singleNode(workspaceName, id, 1.0f);
                }
            }
        }
View Full Code Here

Examples of org.modeshape.jcr.value.StringFactory

                private void addLiteral( StaticOperand operand,
                                         Set<String> collector ) {
                    if (operand instanceof Literal) {
                        // Get the literal value, which should be a node type ...
                        Literal literal = (Literal)operand;
                        StringFactory strings = context.getExecutionContext().getValueFactories().getStringFactory();
                        nodeTypeNames.add(strings.create(literal.value()));
                    }
                }
            });
            if (!constraints.isEmpty() || !joinConditions.isEmpty()) {
                // Get the selector name. The plan's selectors will contain an alias if one is used, so we have to find
View Full Code Here

Examples of org.modeshape.jcr.value.StringFactory

        }
        // Refresh the index definitions ...
        RepositoryIndexes indexes = readIndexDefinitions();

        // And notify the affected providers ...
        StringFactory strings = context.getValueFactories().getStringFactory();
        ScanningTasks feedback = new ScanningTasks();
        for (Map.Entry<Name, IndexChangeInfo> entry : changesByProviderName.get().entrySet()) {
            String providerName = strings.create(entry.getKey());
            IndexProvider provider = providers.get(providerName);
            if (provider == null) continue;

            IndexChanges changes = new IndexChanges();
            IndexChangeInfo info = entry.getValue();
            if (info.removedAll) {
                // Get all of the definitions for this provider ...
                for (IndexDefinition defn : indexes.getIndexDefinitions().values()) {
                    if (defn.getProviderName().equals(providerName)) changes.remove(defn.getName());
                }
            }
            // Others might have been added or changed after the existing ones were removed ...
            for (Name name : info.removedIndexes) {
                changes.remove(strings.create(name));
            }
            for (Name name : info.changedIndexes) {
                IndexDefinition defn = indexes.getIndexDefinitions().get(strings.create(name));
                if (defn != null) changes.change(defn);
            }
            // Notify the provider ...
            try {
                provider.notify(changes, repository.changeBus(), repository.nodeTypeManager(), repository.repositoryCache()
View Full Code Here

Examples of org.modeshape.jcr.value.StringFactory

                                Set<Name> parentMixinTypes,
                                Path parentPath,
                                String workspaceName,
                                String repositoryName,
                                ExecutionContext context ) {
            StringFactory strings = context.getValueFactories().getStringFactory();
            this.childName = strings.create(childName);
            this.childPrimaryType = strings.create(childPrimaryType);
            this.parentPrimaryType = strings.create(parentPrimaryType);
            StringBuilder parentMixinTypesStr = new StringBuilder('{');
            for (Name mixin : parentMixinTypes) {
                if (parentMixinTypesStr.length() > 1) parentMixinTypesStr.append(',');
                parentMixinTypesStr.append(strings.create(mixin));
            }
            parentMixinTypesStr.append('}');
            this.parentMixinTypes = parentMixinTypesStr.toString();
            this.parentPath = strings.create(parentPath);
            this.workspaceName = workspaceName;
            this.repositoryName = repositoryName;
        }
View Full Code Here

Examples of org.modeshape.jcr.value.StringFactory

                                                Set<Name> parentMixinTypes,
                                                Path parentPath,
                                                String workspaceName,
                                                String repositoryName,
                                                ExecutionContext context ) throws ConstraintViolationException {
            StringFactory strings = context.getValueFactories().getStringFactory();
            String parentType = strings.create(parentPrimaryType);
            StringBuilder parentMixinTypesStr = new StringBuilder('{');
            for (Name mixin : parentMixinTypes) {
                if (parentMixinTypesStr.length() > 1) parentMixinTypesStr.append(',');
                parentMixinTypesStr.append(strings.create(mixin));
            }
            parentMixinTypesStr.append('}');
            throw new ConstraintViolationException(JcrI18n.noChildNodeDefinitions.text(parentPath, parentType,
                                                                                       parentMixinTypesStr));
        }
View Full Code Here

Examples of org.sonatype.maven.polyglot.groovy.builder.factory.StringFactory

        return new ChildFactory(name, type);
    }

    private void registerStringFactory(final String name) {
        registerFactory(new StringFactory(name));
    }
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.