Package org.apache.jackrabbit.spi

Examples of org.apache.jackrabbit.spi.Path.denotesIdentifier()


            } catch (MalformedPathException e) {
                // success: cannot parse identifier path if idResolver is missing.
            }

            Path p = PathParser.parse(jcrPath, resolver, idResolver, factory, true);
            assertFalse(p.denotesIdentifier());

            p = PathParser.parse(jcrPath, resolver, idResolver, factory, false);
            assertTrue(p.denotesIdentifier());

            try {
View Full Code Here


            Path p = PathParser.parse(jcrPath, resolver, idResolver, factory, true);
            assertFalse(p.denotesIdentifier());

            p = PathParser.parse(jcrPath, resolver, idResolver, factory, false);
            assertTrue(p.denotesIdentifier());

            try {
                PathParser.parse(factory.getRootPath(), jcrPath, resolver, idResolver, factory);
                fail("Cannot parser an identifier-based path to a relative path.");
            } catch (MalformedPathException e) {
View Full Code Here

        assertNotNull(elem.getString());
        assertEquals(Path.INDEX_UNDEFINED, elem.getIndex());
        assertEquals(Path.INDEX_DEFAULT, elem.getNormalizedIndex());

        Path p = factory.create(new Path.Element[] {elem});
        assertTrue(p.denotesIdentifier());
        assertTrue(p.isAbsolute());

        assertFalse(p.denotesRoot());
        assertFalse(p.isCanonical());
        assertFalse(p.isNormalized());
View Full Code Here

        assertEquals(1, p.getLength());
        assertEquals(0, p.getAncestorCount());

        Path lastElem = p.getLastElement();
        assertNotNull(lastElem);
        assertTrue(lastElem.denotesIdentifier());

        assertEquals(1, p.getElements().length);

        assertEquals(0, p.getDepth());
View Full Code Here

    public final boolean equals(Object that) {
        if (this == that) {
            return true;
        } else if (that instanceof Path) {
            Path path = (Path) that;
            return path.denotesIdentifier()
                && identifier.equals(path.getIdentifier());
        } else {
            return false;
        }
    }
View Full Code Here

            } catch (MalformedPathException e) {
                // success: cannot parse identifier path if idResolver is missing.
            }

            Path p = PathParser.parse(jcrPath, resolver, idResolver, factory, true);
            assertFalse(p.denotesIdentifier());

            p = PathParser.parse(jcrPath, resolver, idResolver, factory, false);
            assertTrue(p.denotesIdentifier());

            try {
View Full Code Here

            Path p = PathParser.parse(jcrPath, resolver, idResolver, factory, true);
            assertFalse(p.denotesIdentifier());

            p = PathParser.parse(jcrPath, resolver, idResolver, factory, false);
            assertTrue(p.denotesIdentifier());

            try {
                PathParser.parse(factory.getRootPath(), jcrPath, resolver, idResolver, factory);
                fail("Cannot parser an identifier-based path to a relative path.");
            } catch (MalformedPathException e) {
View Full Code Here

        assertNotNull(elem.getString());
        assertEquals(Path.INDEX_UNDEFINED, elem.getIndex());
        assertEquals(Path.INDEX_DEFAULT, elem.getNormalizedIndex());

        Path p = factory.create(new Path.Element[] {elem});
        assertTrue(p.denotesIdentifier());
        assertTrue(p.isAbsolute());

        assertFalse(p.denotesRoot());
        assertFalse(p.isCanonical());
        assertFalse(p.isNormalized());
View Full Code Here

    public void testValidIdentifierPaths() throws MalformedPathException, IllegalNameException, NamespaceException {
        for (Iterator it = idResolver.getValidIdentifiers().iterator(); it.hasNext();) {
            String jcrPath = "[" + it.next().toString() + "]";

            Path p = resolverV2.getQPath(jcrPath, true);
            assertFalse(p.denotesIdentifier());
            assertTrue(p.isAbsolute());
            assertTrue(p.isNormalized());
            assertTrue(p.isCanonical());
            assertEquals(DummyIdentifierResolver.JCR_PATH, resolverV2.getJCRPath(p));
View Full Code Here

            assertTrue(p.isNormalized());
            assertTrue(p.isCanonical());
            assertEquals(DummyIdentifierResolver.JCR_PATH, resolverV2.getJCRPath(p));

            p = resolverV2.getQPath(jcrPath, false);
            assertTrue(p.denotesIdentifier());
            assertEquals(1, p.getLength());
            assertTrue(p.isAbsolute());
            assertFalse(p.isNormalized());
            assertFalse(p.isCanonical());
            assertEquals(jcrPath, resolverV2.getJCRPath(p));
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.