Examples of NameFactory


Examples of org.jboss.dna.graph.property.NameFactory

         *
         * @param propertyNames the names of the properties to be removed
         * @return the remove request object that should be used to specify the node from which the properties are to be removed.
         */
        public On<BatchConjunction> remove( String... propertyNames ) {
            NameFactory nameFactory = getContext().getValueFactories().getNameFactory();
            int number = propertyNames.length;
            final Name[] names = new Name[number];
            for (int i = 0; i != number; ++i) {
                names[i] = nameFactory.create(propertyNames[i]);
            }
            return new On<BatchConjunction>() {
                public BatchConjunction on( Location location ) {
                    requestQueue.removeProperties(location, getCurrentWorkspaceName(), names);
                    return nextRequests;
View Full Code Here

Examples of org.jboss.dna.graph.property.NameFactory

        public Create<T> and( String name,
                              Object... values ) {
            ExecutionContext context = getContext();
            PropertyFactory factory = context.getPropertyFactory();
            NameFactory nameFactory = context.getValueFactories().getNameFactory();
            Name propertyName = nameFactory.create(name);
            properties.put(propertyName, factory.create(propertyName, values));
            return this;
        }
View Full Code Here

Examples of org.jboss.dna.graph.property.NameFactory

            super(afterConjunction);
            this.parent = parent;
        }

        public CreateAction<T> nodeNamed( String name ) {
            NameFactory factory = getContext().getValueFactories().getNameFactory();
            Name nameObj = factory.create(name);
            return createWith(afterConjunction(), parent, nameObj);
        }
View Full Code Here

Examples of org.jboss.dna.graph.property.NameFactory

        return Collections.unmodifiableMap(this.properties);
    }

    public Property getProperty( ExecutionContext context,
                                 String name ) {
        NameFactory nameFactory = context.getValueFactories().getNameFactory();

        return getProperty(nameFactory.create(name));
    }
View Full Code Here

Examples of org.jboss.dna.graph.property.NameFactory

            public CreateAt<Graph> and( String name,
                                        Object... values ) {
                ExecutionContext context = getContext();
                PropertyFactory factory = context.getPropertyFactory();
                NameFactory nameFactory = context.getValueFactories().getNameFactory();
                properties.add(factory.create(nameFactory.create(name), values));
                return this;
            }

            public CreateAt<Graph> and( Name name,
                                        Object... values ) {
View Full Code Here

Examples of org.jboss.dna.graph.property.NameFactory

     *
     * @param parent the location of the parent
     * @return the object used to start creating a node
     */
    public CreateNode<Conjunction<Graph>> createUnder( final Location parent ) {
        final NameFactory nameFactory = getContext().getValueFactories().getNameFactory();
        CheckArg.isNotNull(parent, "parent");
        return new CreateNode<Conjunction<Graph>>() {
            public Conjunction<Graph> node( String name,
                                            Property... properties ) {
                Name child = nameFactory.create(name);
                requests.createNode(parent, getCurrentWorkspaceName(), child, properties);
                return nextGraph;
            }

            public Conjunction<Graph> node( String name,
                                            Iterator<Property> properties ) {
                Name child = nameFactory.create(name);
                requests.createNode(parent, getCurrentWorkspaceName(), child, properties);
                return nextGraph;
            }

            public Conjunction<Graph> node( String name,
                                            Iterable<Property> properties ) {
                Name child = nameFactory.create(name);
                requests.createNode(parent, getCurrentWorkspaceName(), child, properties.iterator());
                return nextGraph;
            }
        };
    }
View Full Code Here

Examples of org.jboss.dna.graph.property.NameFactory

     *
     * @param propertyNames the names of the properties to be removed
     * @return the remove request object that should be used to specify the node from which the properties are to be removed.
     */
    public On<Conjunction<Graph>> remove( final String... propertyNames ) {
        NameFactory nameFactory = getContext().getValueFactories().getNameFactory();
        int number = propertyNames.length;
        final Name[] names = new Name[number];
        for (int i = 0; i != number; ++i) {
            names[i] = nameFactory.create(propertyNames[i]);
        }
        return new On<Conjunction<Graph>>() {
            public Conjunction<Graph> on( Location location ) {
                requests.removeProperties(location, getCurrentWorkspaceName(), names);
                return nextGraph;
View Full Code Here

Examples of org.modeshape.jcr.value.NameFactory

    public void setRequiredPrimaryTypeNames( String[] requiredPrimaryTypes ) throws ConstraintViolationException {
        if (requiredPrimaryTypes == null) {
            throw new ConstraintViolationException(JcrI18n.badNodeTypeName.text("requiredPrimaryTypes"));
        }

        NameFactory nameFactory = getContext().getValueFactories().getNameFactory();
        Name[] rpts = new Name[requiredPrimaryTypes.length];
        for (int i = 0; i < requiredPrimaryTypes.length; i++) {
            try {
                rpts[i] = nameFactory.create(requiredPrimaryTypes[i]);
            } catch (ValueFormatException vfe) {
                throw new ConstraintViolationException(vfe);
            }
        }
View Full Code Here

Examples of org.opengis.util.NameFactory

     *
     * @throws JAXBException Should not happen.
     */
    @Test
    public void testLocalName() throws JAXBException {
        final NameFactory factory = DefaultFactories.NAMES;
        final LocalName name = factory.createLocalName(null, "An ordinary local name");
        assertEquals("An ordinary local name", name.toString());
        final String expected =
                "<gml:IO_IdentifiedObject>\n" +
                "  <gml:alias>\n" +
                "    <gco:LocalName>An ordinary local name</gco:LocalName>\n" +
View Full Code Here

Examples of org.opengis.util.NameFactory

     * @throws JAXBException Should not happen.
     */
    @Test
    @DependsOnMethod("testLocalName")
    public void testLocalNameWithAmp() throws JAXBException {
        final NameFactory factory = DefaultFactories.NAMES;
        final LocalName name = factory.createLocalName(null, "A name with & and > and <.");
        assertEquals("A name with & and > and <.", name.toString());
        final String expected =
                "<gml:IO_IdentifiedObject>\n" +
                "  <gml:alias>\n" +
                "    <gco:LocalName>A name with &amp; and &gt; and &lt;.</gco:LocalName>\n" +
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.