io.xlate.edi.internal.schema.SchemaReaderV2 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of staedi Show documentation
Show all versions of staedi Show documentation
Streaming API for EDI for Java
package io.xlate.edi.internal.schema;
import static io.xlate.edi.internal.schema.StaEDISchemaFactory.unexpectedElement;
import java.util.Map;
import javax.xml.stream.XMLStreamReader;
import io.xlate.edi.schema.EDISchemaException;
import io.xlate.edi.schema.EDIType;
class SchemaReaderV2 extends SchemaReaderBase implements SchemaReader {
public SchemaReaderV2(XMLStreamReader reader, Map properties) {
super(StaEDISchemaFactory.XMLNS_V2, reader, properties);
}
@Override
protected void readInclude(XMLStreamReader reader, Map types) throws EDISchemaException {
// Included schema not supported in V2 Schema
throw unexpectedElement(reader.getName(), reader);
}
@Override
protected void readImplementation(XMLStreamReader reader, Map types) {
// Implementations not supported in V2 Schema
}
@Override
protected String readReferencedId(XMLStreamReader reader) {
return reader.getAttributeValue(null, "ref");
}
}