/** * Creates a new Schema based on the namespaces of the Configuration wrapped by the specified Model. * @param model the Model * @return the new Schema * @see #getSchema(Configuration) * @see #getSchema(Set) */ public static Schema getSchema(Model model) { if (model != null) { Descriptor desc = model.getModelDescriptor(); if (desc != null) { return desc.getSchema(model.getModelConfiguration()); } } return null; }
/** * Creates a new Schema based on the namespaces of the Configuration wrapped by the specified Model. * @param model the Model * @return the new Schema * @see #getSchema(Configuration) * @see #getSchema(Set) */ public static Schema getSchema(Model model) { if (model != null) { Descriptor desc = model.getModelDescriptor(); if (desc != null) { return desc.getSchema(model.getModelConfiguration()); } } return null; }
/** * Lazily gets (and possibly creating and caching) a Marshaller based on the namespace of the wrapped Configuration of the specified Model. * @param model the Model * @return the appropriate Marshaller to use * @see #getMarshaller(Configuration) * @see #getMarshaller(String) */ public static Marshaller getMarshaller(Model model) { if (model != null) { Descriptor desc = model.getModelDescriptor(); if (desc != null) { return desc.getMarshaller(model.getModelConfiguration()); } } return null; }
/** * Lazily gets (and possibly creating and caching) a Marshaller based on the namespace of the wrapped Configuration of the specified Model. * @param model the Model * @return the appropriate Marshaller to use * @see #getMarshaller(Configuration) * @see #getMarshaller(String) */ public static Marshaller getMarshaller(Model model) { if (model != null) { Descriptor desc = model.getModelDescriptor(); if (desc != null) { return desc.getMarshaller(model.getModelConfiguration()); } } return null; }