use of com.webcohesion.enunciate.modules.jaxb.model.ElementRef in project enunciate by stoicflame.
the class PHPXMLClientModule method usesUnmappableElements.
protected boolean usesUnmappableElements() {
boolean usesUnmappableElements = false;
if (this.jaxbModule != null && this.jaxbModule.getJaxbContext() != null && !this.jaxbModule.getJaxbContext().getSchemas().isEmpty()) {
for (SchemaInfo schemaInfo : this.jaxbModule.getJaxbContext().getSchemas().values()) {
for (TypeDefinition complexType : schemaInfo.getTypeDefinitions()) {
if (!Character.isUpperCase(complexType.getClientSimpleName().charAt(0))) {
warn("%s: PHP requires your class name to be upper-case. Please rename the class or apply the @org.codehaus.enunciate.ClientName annotation to the class.", positionOf(complexType));
usesUnmappableElements = true;
}
for (Element element : complexType.getElements()) {
if (element instanceof ElementRef && element.isElementRefs()) {
info("%s: The PHP client library doesn't fully support the @XmlElementRefs annotation. The items in the collection will be read-only and will only be available to PHP clients in the form of a Hash. Consider redesigning using a collection of a single type.", positionOf(element));
} else if (element.getAnnotation(XmlElements.class) != null) {
info("%s: The PHP client library doesn't fully support the @XmlElements annotation. The items in the collection will be read-only and will only be available to PHP clients in the form of a Hash. Consider redesigning using a collection of a single type.", positionOf(element));
}
}
}
}
}
return usesUnmappableElements;
}
Aggregations