Examples of PropertyException


Examples of javax.xml.bind.PropertyException

      return privateMap.get(pProperty);
    } else if (pProperty.equals(JAXME_DATATYPE_CONVERTER)) {
      return datatypeConverter;
    }

    throw new PropertyException("Unknown property: " + pProperty);
  }
View Full Code Here

Examples of javax.xml.bind.PropertyException

    } else if (Marshaller.JAXB_SCHEMA_LOCATION.equals(pName)) {
      setSchemaLocation((String) pValue);
    } else if (Marshaller.JAXB_NO_NAMESPACE_SCHEMA_LOCATION.equals(pName)) {
      setNoNSSchemaLocation((String) pValue);
    } else {
      throw new PropertyException("Unknown property name: " + pName);
    }
  }
View Full Code Here

Examples of javax.xml.bind.PropertyException

    } else if (Marshaller.JAXB_SCHEMA_LOCATION.equals(pName)) {
      return getSchemaLocation();
    } else if (Marshaller.JAXB_NO_NAMESPACE_SCHEMA_LOCATION.equals(pName)) {
      return getNoNSSchemaLocation();
    } else {
      throw new PropertyException("Unknown property name: " + pName);
    }
  }
View Full Code Here

Examples of javax.xml.bind.PropertyException

    */
   public void setProperty(String pName, Object pValue) throws PropertyException {
     if (pName == null) {
       throw new IllegalArgumentException("The property name must not be null.");
     } else {
       throw new PropertyException("Unsupported property name: " + pName);
     }
   }
View Full Code Here

Examples of javax.xml.bind.PropertyException

    */
   public Object getProperty(String pName) throws PropertyException {
     if (pName == null) {
       throw new IllegalArgumentException("The property name must not be null.");
     } else {
       throw new PropertyException("Unsupported property name: " + pName);
     }
   }
View Full Code Here

Examples of javax.xml.bind.PropertyException

    }
    else if (_properties.containsKey(name)) {
      return _properties.get(name);
    }
   
    throw new PropertyException(name);
  }
View Full Code Here

Examples of javax.xml.bind.PropertyException

                        copy = new HashMap<String,String>(4);
                        for (final String key : SCHEMA_KEYS) {
                            final Object schema = map.get(key);
                            if (schema != null) {
                                if (!(schema instanceof String)) {
                                    throw new PropertyException(Errors.format(Errors.Keys.IllegalPropertyClass_2,
                                            name + "[\"" + key + "\"]", value.getClass()));
                                }
                                copy.put(key, (String) schema);
                            }
                        }
                        copy = CollectionsExt.unmodifiableOrCopy(copy);
                    }
                    schemas = copy;
                    return;
                }
                else if (name.equals(XML.GML_VERSION)) {
                    gmlVersion = (value instanceof CharSequence) ? new Version(value.toString()) : (Version) value;
                    return;
                }
                else if (name.equals(XML.RESOLVER)) {
                    resolver = (ReferenceResolver) value;
                    return;
                }
                else if (name.equals(XML.CONVERTER)) {
                    converter = (ValueConverter) value;
                    return;
                }
                else if (name.equals(XML.STRING_SUBSTITUTES)) {
                    int mask = initialBitMasks();
                    if (value != null) {
                        for (final CharSequence substitute : (CharSequence[]) value) {
                            if (CharSequences.equalsIgnoreCase(substitute, "language")) {
                                mask |= Context.SUBSTITUTE_LANGUAGE;
                            } else if (CharSequences.equalsIgnoreCase(substitute, "country")) {
                                mask |= Context.SUBSTITUTE_COUNTRY;
                            }
                        }
                    }
                    bitMasks = mask;
                    return;
                }
                else if (name.equals(XML.WARNING_LISTENER)) {
                    warningListener = (WarningListener<?>) value;
                    return;
                }
            }
        } catch (RuntimeException e) { // (ClassCastException | IllegalArgumentException) on the JDK7 branch.
            throw new PropertyException(Errors.format(
                    Errors.Keys.IllegalPropertyClass_2, name, value.getClass()), e);
        }
        /*
         * If we reach this point, the given name is not a SIS property. Try to handle
         * it as a (un)marshaller-specific property, after saving the previous value.
View Full Code Here

Examples of javax.xml.bind.PropertyException

        if( name == null ) {
            throw new IllegalArgumentException(
                Messages.format( Messages.MUST_NOT_BE_NULL, "name" ) );
        }

        throw new PropertyException(name, value);
    }
View Full Code Here

Examples of javax.xml.bind.PropertyException

        if( name == null ) {
            throw new IllegalArgumentException(
                Messages.format( Messages.MUST_NOT_BE_NULL, "name" ) );
        }

        throw new PropertyException(name);
    }
View Full Code Here

Examples of javax.xml.bind.PropertyException

        if( JAXB_SCHEMA_LOCATION.equals(name) )
            return getSchemaLocation();
        if( JAXB_FRAGMENT.equals(name) )
            return isFragment()?Boolean.TRUE:Boolean.FALSE;

        throw new PropertyException(name);
    }
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.