Package org.modeshape.jcr.value

Examples of org.modeshape.jcr.value.StringFactory.create()


                                      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


        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

        }
        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));
            }
        }
    }

    protected Set<Operator> operatorsFor( JcrPropertyDefinition defn ) {
View Full Code Here

            }
            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

                                         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

        // 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();
View Full Code Here

                    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);
            }
View Full Code Here

            // 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

                                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(',');
View Full Code Here

                                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));
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.