Examples of nextProperty()


Examples of javax.jcr.PropertyIterator.nextProperty()

    void readFully() {
        if (!fullyRead) {
            try {
                final PropertyIterator pi = node.getProperties();
                while (pi.hasNext()) {
                    final Property prop = pi.nextProperty();
                    this.cacheProperty(prop);
                }
                fullyRead = true;
            } catch (final RepositoryException re) {
                throw new IllegalArgumentException(re);
View Full Code Here

Examples of javax.jcr.PropertyIterator.nextProperty()

     */
    @SuppressWarnings("unchecked")
    protected void readPreferences(PreferencesImpl prefs, Session session, Node node) throws RepositoryException {
        final PropertyIterator iterator = node.getProperties();
        while ( iterator.hasNext() ) {
            final Property prop = iterator.nextProperty();
            if ( prop.getName().startsWith(this.namespacePrefixSep) ) {
                prefs.getProperties().put(prop.getName(), prop.getString());
            }
        }
    }
View Full Code Here

Examples of javax.jcr.PropertyIterator.nextProperty()

        Node node = session.getNode(getPath());
        HashMap<String, Object> map = new HashMap<String, Object>();

        PropertyIterator properties = node.getProperties();
        while (properties.hasNext()) {
          Property p = properties.nextProperty();
          if (p.getType() == PropertyType.BOOLEAN) {
            map.put(p.getName(), p.getBoolean());
          } else if (p.getType() == PropertyType.STRING) {
            map.put(p.getName(), p.getString());
          } else if (p.getType() == PropertyType.DATE) {
View Full Code Here

Examples of javax.jcr.PropertyIterator.nextProperty()

          try {
            final Node node = session.getNode(getPath());
            final PropertyIterator pi = node.getProperties();
            final Set<String> result = new HashSet<String>();
            while(pi.hasNext()) {
              final Property p = pi.nextProperty();
              result.add(p.getName());
            }
            return result;
          } catch (RepositoryException e) {
            throw new RuntimeException(e);
View Full Code Here

Examples of javax.jcr.PropertyIterator.nextProperty()

                Node node = session.getNode(getPath());
                HashMap<String, Object> map = new HashMap<String, Object>();

                PropertyIterator properties = node.getProperties();
                while (properties.hasNext()) {
                    Property p = properties.nextProperty();
                    List valuesList;
                    if (p.isMultiple()) {
                        switch (p.getType()) {
                            case PropertyType.STRING:
                                valuesList = new ArrayList<String>();
View Full Code Here

Examples of javax.jcr.PropertyIterator.nextProperty()

                    try {
                        final Node node = session.getNode(getPath());
                        final PropertyIterator pi = node.getProperties();
                        final Set<String> result = new HashSet<String>();
                        while (pi.hasNext()) {
                            final Property p = pi.nextProperty();
                            result.add(p.getName());
                        }
                        return result;
                    } catch (RepositoryException e) {
                        throw new RuntimeException(e);
View Full Code Here

Examples of javax.jcr.PropertyIterator.nextProperty()

    /** Load properties of n into d */
    protected void loadProperties(Dictionary<String, Object> d, Node n) throws RepositoryException {
        final PropertyIterator pi = n.getProperties();
        while(pi.hasNext()) {
            final Property p = pi.nextProperty();
            final String name = p.getName();

            // ignore jcr: and similar properties
            if(name.contains(":")) {
                continue;
View Full Code Here

Examples of javax.jcr.PropertyIterator.nextProperty()

            } else if (JcrConstants.JCR_GET_BY_ID.equals(operation)) {
                Node node = session.getNodeByIdentifier(exchange.getIn()
                        .getMandatoryBody(String.class));
                PropertyIterator properties = node.getProperties();
                while (properties.hasNext()) {
                    Property property = properties.nextProperty();
                    Class<?> aClass = classForJCRType(property);
                    Object value;
                    if (property.isMultiple()) {
                        value = converter.convertTo(aClass, exchange, property.getValues());
                    } else {
View Full Code Here

Examples of javax.jcr.PropertyIterator.nextProperty()

    StringBuffer buffer = new StringBuffer();
    buffer.append(node.getPath());

    PropertyIterator properties = node.getProperties();
    while (properties.hasNext()) {
      Property property = properties.nextProperty();
      buffer.append(property.getPath() + "=");
      if (property.getDefinition().isMultiple()) {
        Value[] values = property.getValues();
        for (int i = 0; i < values.length; i++) {
          if (i > 0) {
View Full Code Here

Examples of javax.jcr.PropertyIterator.nextProperty()

        node.getProperty("intProp").remove();      // transiently removed...
        node.setProperty("intProp", 42);           // ...and added again
        PropertyIterator properties = node.getProperties();
        assertEquals(4, properties.getSize());
        while (properties.hasNext()) {
            Property p = properties.nextProperty();
            if (JcrConstants.JCR_PRIMARYTYPE.equals(p.getName())) {
                continue;
            }
            assertTrue(propertyNames.remove(p.getName()));
            if (p.isMultiple()) {
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.