Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.NameFactory.create()


        NameFactory nf = NameFactoryImpl.getInstance();
        Name test = nf.create(Name.NS_DEFAULT_URI, "test");
        Name test2 = nf.create(Name.NS_DEFAULT_URI, "test2");
        Name test3 = nf.create(Name.NS_DEFAULT_URI, "test3");
        Name test4 = nf.create(Name.NS_DEFAULT_URI, "test4");
        Name test5 = nf.create(Name.NS_DEFAULT_URI, "test5");
        Name test6 = nf.create(Name.NS_DEFAULT_URI, "test6");

        OutputStream out = resource.getOutputStream();
        try {
View Full Code Here


        NameFactory nf = NameFactoryImpl.getInstance();
        Name test = nf.create(Name.NS_DEFAULT_URI, "test");
        Name test2 = nf.create(Name.NS_DEFAULT_URI, "test2");
        Name test3 = nf.create(Name.NS_DEFAULT_URI, "test3");
        Name test4 = nf.create(Name.NS_DEFAULT_URI, "test4");
        Name test5 = nf.create(Name.NS_DEFAULT_URI, "test5");
        Name test6 = nf.create(Name.NS_DEFAULT_URI, "test6");

        OutputStream out = resource.getOutputStream();
        try {
            List<PrivilegeDefinition> defs = new ArrayList<PrivilegeDefinition>();
View Full Code Here

        Name test = nf.create(Name.NS_DEFAULT_URI, "test");
        Name test2 = nf.create(Name.NS_DEFAULT_URI, "test2");
        Name test3 = nf.create(Name.NS_DEFAULT_URI, "test3");
        Name test4 = nf.create(Name.NS_DEFAULT_URI, "test4");
        Name test5 = nf.create(Name.NS_DEFAULT_URI, "test5");
        Name test6 = nf.create(Name.NS_DEFAULT_URI, "test6");

        OutputStream out = resource.getOutputStream();
        try {
            List<PrivilegeDefinition> defs = new ArrayList<PrivilegeDefinition>();
            defs.add(new PrivilegeDefinitionImpl(test, false, createNameSet(test2, test3)));
View Full Code Here

                        || propertyDef.getRequiredType() == PropertyType.WEAKREFERENCE) {
                    QValueConstraint[] ca = propertyDef.getValueConstraints();
                    if (ca != null) {
                        for (QValueConstraint aCa : ca) {
                            NameFactory factory = NameFactoryImpl.getInstance();
                            Name ntName = factory.create(aCa.getString());
                            if (!name.equals(ntName)) {
                                deps.add(ntName);
                            }
                        }
                    }
View Full Code Here

        }

        NameFactory factory = NameFactoryImpl.getInstance();
        int pos = elementString.indexOf('[');
        if (pos == -1) {
            Name name = factory.create(elementString);
            return new NamePath(null, name, Path.INDEX_UNDEFINED);
        }
        Name name = factory.create(elementString.substring(0, pos));
        int pos1 = elementString.indexOf(']');
        if (pos1 == -1) {
View Full Code Here

        int pos = elementString.indexOf('[');
        if (pos == -1) {
            Name name = factory.create(elementString);
            return new NamePath(null, name, Path.INDEX_UNDEFINED);
        }
        Name name = factory.create(elementString.substring(0, pos));
        int pos1 = elementString.indexOf(']');
        if (pos1 == -1) {
            throw new IllegalArgumentException("invalid PathElement literal: " + elementString + " (missing ']')");
        }
        try {
View Full Code Here

                final NodePropBundle bundle = getBundle(nodeId);
                final NodePropBundle lfBundle = getBundle(lostNFoundId);

                final String nodeName = nodeId + "-" + System.currentTimeMillis();
                final NameFactory nameFactory = NameFactoryImpl.getInstance();
                lfBundle.addChildNodeEntry(nameFactory.create("", nodeName), nodeId);
                bundle.setParentId(lostNFoundId);

                saveBundle(bundle);
                saveBundle(lfBundle);
View Full Code Here

        private Name createNodeName() {
            int n = (int) System.currentTimeMillis() + new Random().nextInt();
            final String localName = Integer.toHexString(n);
            final NameFactory nameFactory = NameFactoryImpl.getInstance();
            return nameFactory.create("{}" + localName);
        }

        @Override
        boolean doubleCheck() throws ItemStateException {
            final NodePropBundle parentBundle = pm.loadBundle(parentNodeId);
View Full Code Here

    @Override
    public FieldComparator newComparator(String fieldname, int numHits, int sortPos, boolean reversed) throws IOException {
        NameFactory factory = NameFactoryImpl.getInstance();
        try {
            return new SimpleFieldComparator(nsMappings.translateName(factory.create(fieldname)), FieldNames.PROPERTY_LENGTHS, numHits);
        }
        catch (IllegalNameException e) {
            throw Util.createIOException(e);
        }
    }
View Full Code Here

                                            String fieldname)
            throws IOException {
        NameFactory factory = NameFactoryImpl.getInstance();
        try {
            return new Comparator(reader,
                    nsMappings.translateName(factory.create(fieldname)));
        } catch (IllegalNameException e) {
            throw Util.createIOException(e);
        }
    }
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.