Package javax.jcr

Examples of javax.jcr.ValueFormatException


      {
         return getValue().getDouble();
      }
      catch (IllegalStateException e)
      {
         throw new ValueFormatException("PropertyImpl.getDouble() failed: " + e);
      }
   }
View Full Code Here


      {
         return getValue().getLong();
      }
      catch (IllegalStateException e)
      {
         throw new ValueFormatException("PropertyImpl.getLong() failed: " + e);
      }
   }
View Full Code Here

      {
         return getValue().getStream();
      }
      catch (IllegalStateException e)
      {
         throw new ValueFormatException("PropertyImpl.getStream() failed: " + e);
      }
   }
View Full Code Here

      {
         return getValue().getDate();
      }
      catch (IllegalStateException e)
      {
         throw new ValueFormatException("PropertyImpl.getDate() failed: " + e);
      }
   }
View Full Code Here

      {
         return getValue().getBoolean();
      }
      catch (IllegalStateException e)
      {
         throw new ValueFormatException("PropertyImpl.getBoolean() failed: " + e);
      }
   }
View Full Code Here

         String identifier = ((BaseValue)getValue()).getReference();
         return session.getNodeByUUID(identifier);
      }
      catch (IllegalStateException e)
      {
         throw new ValueFormatException("PropertyImpl.getNode() failed: " + e);
      }
   }
View Full Code Here

                     path = locationFactory.parseRelPath(value);
                  return createValue(path);
               }
               catch (RepositoryException e)
               {
                  throw new ValueFormatException("Path '" + value + "' is invalid");
               }
            case PropertyType.NAME :
               try
               {
                  JCRName name = locationFactory.parseJCRName(value);
                  return createValue(name);
               }
               catch (RepositoryException e)
               {
                  throw new ValueFormatException("Name '" + value + "' is invalid", e);
               }
            case PropertyType.REFERENCE :
               return createValue(new Identifier(value));
            case ExtendedPropertyType.PERMISSION :
               try
               {
                  return PermissionValue.parseValue(value);
               }
               catch (IOException e)
               {
                  new ValueFormatException("Cant create PermissionValue " + e);
               }
            default :
               throw new ValueFormatException("unknown type " + type);
         }
      }
      catch (IllegalArgumentException e)
      { // NumberFormatException
         throw new ValueFormatException("Cant create value from string '" + value + "' for type "
            + PropertyType.nameFromValue(type));
      }
   }
View Full Code Here

   public Value createValue(Node value) throws RepositoryException
   {
      if (value == null)
         return null;
      if (!value.isNodeType("mix:referenceable"))
         throw new ValueFormatException("Node " + value.getPath() + " is not referenceable");
      try
      {
         if (value instanceof NodeImpl)
         {
            String jcrUuid = ((NodeImpl)value).getInternalIdentifier();
View Full Code Here

            case PropertyType.UNDEFINED :
               return null;
            case ExtendedPropertyType.PERMISSION :
               return new PermissionValue(data);
            default :
               throw new ValueFormatException("unknown type " + type);
         }
      }
      catch (IOException e)
      {
         throw new RepositoryException(e);
View Full Code Here

      if (date != null)
      {
         return JCRDateFormat.format(date);
      }

      throw new ValueFormatException("empty value");
   }
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.