use of org.xwiki.filter.xar.internal.input.ClassPropertyReader.WikiClassProperty in project xwiki-platform by xwiki.
the class AbstractWikiObjectPropertyReader method readObjectProperty.
public WikiObjectProperty readObjectProperty(XMLStreamReader xmlReader, XARInputProperties properties, WikiClass wikiClass) throws XMLStreamException, FilterException {
xmlReader.nextTag();
WikiObjectProperty property = new WikiObjectProperty();
property.name = xmlReader.getLocalName();
String type;
if (wikiClass != null) {
WikiClassProperty classProperty = wikiClass.properties.get(property.name);
type = classProperty != null ? classProperty.type : null;
} else {
type = properties.getObjectPropertyType();
}
try {
property.value = this.propertySerializerManager.getPropertySerializer(type).read(xmlReader);
} catch (ComponentLookupException e) {
throw new FilterException("Failed to get a property parser", e);
}
property.parameters.put(WikiObjectPropertyFilter.PARAMETER_TYPE, type);
xmlReader.nextTag();
return property;
}
Aggregations