Package org.apache.jackrabbit.core.id

Examples of org.apache.jackrabbit.core.id.PropertyId


    /**
     * {@inheritDoc}
     */
    public PropertyId readPropertyId() throws JournalException {
        return new PropertyId(readNodeId(), readQName());
    }
View Full Code Here


            throws IOException {
        // references
        Collection<PropertyId> c = state.getReferences();
        out.writeInt(c.size() | (VERSION_CURRENT << 24)); // count
        for (Iterator<PropertyId> iter = c.iterator(); iter.hasNext();) {
            PropertyId propId = iter.next();
            writePropertyId(out, propId);
        }
    }
View Full Code Here

     * @throws IOException in an I/O error occurs.
     */
    public PropertyId readPropertyId(DataInputStream in) throws IOException {
        NodeId id = readNodeId(in);
        Name name = readQName(in);
        return new PropertyId(id, name);
    }
View Full Code Here

                Document doc = reader.document(i.doc - starts[idx], FieldSelectors.UUID);
                String uuid = doc.get(FieldNames.UUID);
                Path path = hmgr.getPath(new NodeId(UUID.fromString(uuid)));
                PathBuilder builder = new PathBuilder(path);
                builder.addAll(relPath.getElements());
                PropertyId id = hmgr.resolvePropertyPath(builder.getPath());
                if (id == null) {
                    return null;
                }
                PropertyState state = (PropertyState) ism.getItemState(id);
                if (state == null) {
View Full Code Here

            // unknown uri<->prefix mappings
        }

        Set<Name> props = node.getPropertyNames();
        for (Name propName : props) {
            PropertyId id = new PropertyId(node.getNodeId(), propName);
            try {
                PropertyState propState = (PropertyState) stateProvider.getItemState(id);

                // add each property to the _PROPERTIES_SET for searching
                // beginning with V2
View Full Code Here

     * @return value of the named property, or <code>null</code>
     * @throws ItemStateException if the property can not be accessed
     */
    protected InternalValue getValue(Name name) throws ItemStateException {
        try {
            PropertyId id = new PropertyId(node.getNodeId(), name);
            PropertyState property =
                (PropertyState) stateProvider.getItemState(id);
            InternalValue[] values = property.getValues();
            if (values.length > 0) {
                return values[0];
View Full Code Here

    /**
     * Add an item state and then delete it. Make sure there is no
     * entry in either the added nor the removed states
     */
    public void testAddDelete() throws Exception {
        PropertyId id = new PropertyId(
                new NodeId(UUID.randomUUID()), factory.create("", "a"));
        ItemState state = new PropertyState(id, ItemState.STATUS_NEW, false);

        ChangeLog log = new ChangeLog();

View Full Code Here

    /**
     * Add an item state and then modify it. Make sure the entry is still
     * in the added states.
     */
    public void testAddModify() throws Exception {
        PropertyId id = new PropertyId(
                new NodeId(UUID.randomUUID()), factory.create("", "a"));
        ItemState state = new PropertyState(id, ItemState.STATUS_NEW, false);

        ChangeLog log = new ChangeLog();

View Full Code Here

     * preserved.
     */
    public void testPreserveOrder() throws Exception {
        ItemState[] states = new ItemState[10];
        for (int i = 0; i < states.length; i++) {
            PropertyId id = new PropertyId(
                    new NodeId(UUID.randomUUID()), factory.create("", "a" + i));
            states[i] = new PropertyState(id, ItemState.STATUS_NEW, false);
        }

        ChangeLog log = new ChangeLog();
View Full Code Here

         * @param parent parent node
         * @param name property name
         * @return new property
         */
        public PropertyState addProperty(NodeState parent, String name) {
            PropertyId id = new PropertyId(parent.getNodeId(), toName(name));
            PropertyState child = new PropertyState(id,
                    PropertyState.STATUS_EXISTING, false);
            if (listener != null) {
                child.setContainer(listener);
            }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.id.PropertyId

Copyright © 2018 www.massapicom. 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.