Package javax.jcr

Examples of javax.jcr.ValueFormatException


        return obj instanceof Element && XML_VALUE.equals(((Element)obj).getLocalName());
    }

    private void checkPropertyName(DavPropertyName reqName) throws ValueFormatException {
        if (!reqName.equals(getName())) {
            throw new ValueFormatException("Attempt to retrieve mulitple values from single property '" + getName() + "'.");
        }
    }
View Full Code Here


        }
    }

    private Value internalGetValue() throws ValueFormatException {
        if (this.itemData.getValues().length > 1) {
            throw new ValueFormatException(this
                    + " is a multi-valued property, so it's values can only be retrieved as an array");
        } else {
            return this.itemData.getValues()[0];
        }
    }
View Full Code Here

        this.name = name;
    }

    public boolean getBoolean() throws ValueFormatException, RepositoryException {
        if (values.length > 1) {
            throw new ValueFormatException();
        }
        return values[0].getBoolean();
    }
View Full Code Here

        return values[0].getBoolean();
    }

    public Calendar getDate() throws ValueFormatException, RepositoryException {
        if (values.length > 1) {
            throw new ValueFormatException();
        }
        return values[0].getDate();
    }
View Full Code Here

        return new MockPropertyDefinition(values.length > 1);
    }

    public double getDouble() throws ValueFormatException, RepositoryException {
        if (values.length > 1) {
            throw new ValueFormatException();
        }
        return values[0].getDouble();
    }
View Full Code Here

        return null;
    }

    public long getLong() throws ValueFormatException, RepositoryException {
        if (values.length > 1) {
            throw new ValueFormatException();
        }
        return values[0].getLong();
    }
View Full Code Here

        return null;
    }

    public InputStream getStream() throws ValueFormatException, RepositoryException {
        if (values.length > 1) {
            throw new ValueFormatException();
        }
        return values[0].getStream();
    }
View Full Code Here

        return PropertyType.STRING;
    }

    public Value getValue() throws ValueFormatException, RepositoryException {
        if (values.length > 1) {
            throw new ValueFormatException();
        }
        return values[0];
    }
View Full Code Here

        }

        try {
            createTemplate().execute(new JcrCallback() {
                public Object doInJcr(Session session) throws RepositoryException {
                    throw new ValueFormatException();
                }
            });
            fail("Should have thrown InvalidDataAccessApiUsageException");
        } catch (InvalidDataAccessApiUsageException ex) {
            // expected
View Full Code Here

            + nodeData().getQPath().getAsString());
      }

      if (!existed.isMultiValued())
      {
         throw new ValueFormatException("An existed property is single-valued " + name.getAsString());
      }

      TransientPropertyData tdata =
         new TransientPropertyData(QPath.makeChildPath(getInternalPath(), name), existed.getIdentifier(),
            existed.getPersistedVersion(), existed.getType(), existed.getParentIdentifier(), existed.isMultiValued(),
View Full Code Here

TOP

Related Classes of javax.jcr.ValueFormatException

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.