use of eu.esdihumboldt.hale.io.xsd.constraint.XmlAppInfo in project hale by halestudio.
the class XmlSchemaReader method setMetadata.
/**
* Set the metadata for a definition
*
* @param definition the definition
* @param annotated the XML annotated object
* @param schemaLocation the schema location
*/
public static void setMetadata(AbstractDefinition<?> definition, XmlSchemaAnnotated annotated, String schemaLocation) {
definition.setDescription(XMLSchemaIO.getDescription(annotated));
List<XmlSchemaAppInfo> appInfo = XMLSchemaIO.getAppInfo(annotated);
if (appInfo != null) {
XmlAppInfo constraint = new XmlAppInfo(appInfo);
if (definition instanceof DefaultPropertyDefinition) {
((DefaultPropertyDefinition) definition).setConstraint(constraint);
} else if (definition instanceof DefaultGroupPropertyDefinition) {
((DefaultGroupPropertyDefinition) definition).setConstraint(constraint);
} else if (definition instanceof DefaultTypeDefinition) {
((DefaultTypeDefinition) definition).setConstraint(constraint);
}
}
definition.setLocation(createLocationURI(schemaLocation, annotated));
}
Aggregations