Examples of denotesName()


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

     */
    private PropertyEntry resolveRelativePropertyPath(String relPath) throws RepositoryException {
        PropertyEntry targetEntry = null;
        try {
            Path rp = session.getPathResolver().getQPath(relPath);
            if (rp.getLength() == 1 && rp.denotesName()) {
                // a single path element must always denote a name. '.' and '..'
                // will never point to a property. If the NodeEntry does not
                // contain such a property entry, the targetEntry is 'null;
                Name propName = rp.getName();
                // check if property entry exists
View Full Code Here

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

     */
    private PropertyEntry resolveRelativePropertyPath(String relPath) throws RepositoryException {
        PropertyEntry targetEntry = null;
        try {
            Path rp = session.getPathResolver().getQPath(relPath);
            if (rp.getLength() == 1 && rp.denotesName()) {
                // a single path element must always denote a name. '.' and '..'
                // will never point to a property. If the NodeEntry does not
                // contain such a property entry, the targetEntry is 'null;
                Name propName = rp.getName();
                // check if property entry exists
View Full Code Here

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

                    "Failed to resolve path " + relPath
                    + " relative to " + node, e);
        }

        // Check that the last path element is a simple name
        if (!path.denotesName() || path.getIndex() != Path.INDEX_UNDEFINED) {
            throw new RepositoryException(
                    "Invalid last path element for adding node "
                    + relPath + " relative to " + node);
        }
View Full Code Here

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

     */
    private PropertyEntry resolveRelativePropertyPath(String relPath) throws RepositoryException {
        PropertyEntry targetEntry = null;
        try {
            Path rp = session.getPathResolver().getQPath(relPath);
            if (rp.getLength() == 1 && rp.denotesName()) {
                // a single path element must always denote a name. '.' and '..'
                // will never point to a property. If the NodeEntry does not
                // contain such a property entry, the targetEntry is 'null;
                Name propName = rp.getName();
                // check if property entry exists
View Full Code Here

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

    public final boolean equals(Object that) {
        if (this == that) {
            return true;
        } else if (that instanceof Path) {
            Path path = (Path) that;
            return path.denotesName()
                && name.equals(path.getName())
                && getNormalizedIndex() == path.getNormalizedIndex()
                && super.equals(that);
        } else {
            return false;
View Full Code Here

Examples of org.apache.jackrabbit.spi.Path.Element.denotesName()

    public void testIndexedNameElement() {
        Element element = new NamePath(null, createName("test"), 123);
        assertFalse(element.denotesCurrent());
        assertFalse(element.denotesIdentifier());
        assertTrue(element.denotesName());
        assertFalse(element.denotesParent());
        assertFalse(element.denotesRoot());
        assertEquals(createName("test"), element.getName());
        assertEquals(123, element.getIndex());
        assertEquals(123, element.getNormalizedIndex());
View Full Code Here

Examples of org.apache.jackrabbit.spi.Path.Element.denotesName()

    public void testParentElement() {
        Element element = ParentPath.PARENT_PATH;
        assertFalse(element.denotesCurrent());
        assertFalse(element.denotesIdentifier());
        assertFalse(element.denotesName());
        assertTrue(element.denotesParent());
        assertFalse(element.denotesRoot());
        assertEquals(createName(".."), element.getName());
        assertEquals(Path.INDEX_UNDEFINED, element.getIndex());
        assertEquals(Path.INDEX_DEFAULT, element.getNormalizedIndex());
View Full Code Here

Examples of org.apache.jackrabbit.spi.Path.Element.denotesName()

    public void testRootElement() {
        Element element = RootPath.ROOT_PATH;
        assertFalse(element.denotesCurrent());
        assertFalse(element.denotesIdentifier());
        assertFalse(element.denotesName());
        assertFalse(element.denotesParent());
        assertTrue(element.denotesRoot());
        assertEquals(createName(""), element.getName());
        assertEquals(Path.INDEX_UNDEFINED, element.getIndex());
        assertEquals(Path.INDEX_DEFAULT, element.getNormalizedIndex());
View Full Code Here

Examples of org.apache.jackrabbit.spi.Path.Element.denotesName()

    public void testCurrentElement() {
        Element element = CurrentPath.CURRENT_PATH;
        assertTrue(element.denotesCurrent());
        assertFalse(element.denotesIdentifier());
        assertFalse(element.denotesName());
        assertFalse(element.denotesParent());
        assertFalse(element.denotesRoot());
        assertEquals(createName("."), element.getName());
        assertEquals(Path.INDEX_UNDEFINED, element.getIndex());
        assertEquals(Path.INDEX_DEFAULT, element.getNormalizedIndex());
View Full Code Here

Examples of org.apache.jackrabbit.spi.Path.Element.denotesName()

    public void testIdentifierElement() {
        Element element = new IdentifierPath("test");
        assertFalse(element.denotesCurrent());
        assertTrue(element.denotesIdentifier());
        assertFalse(element.denotesName());
        assertFalse(element.denotesParent());
        assertFalse(element.denotesRoot());
        assertNull(element.getName());
        assertEquals(Path.INDEX_UNDEFINED, element.getIndex());
        assertEquals(Path.INDEX_DEFAULT, element.getNormalizedIndex());
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.