Example usage for org.apache.commons.validator.routines ISSNValidator getInstance

List of usage examples for org.apache.commons.validator.routines ISSNValidator getInstance

Introduction

In this page you can find the example usage for org.apache.commons.validator.routines ISSNValidator getInstance.

Prototype

public static ISSNValidator getInstance() 

Source Link

Document

Return a singleton instance of the ISSN validator

Usage

From source file:us.askplatyp.kb.lucene.wikidata.mapping.ISSNStatementMapper.java

@Override
public Stream<Field> mapMainStringValue(StringValue value) throws InvalidWikibaseValueException {
    String ISSN = (String) ISSNValidator.getInstance().validate(value.getString());
    if (ISSN == null) {
        return Stream.empty();
    }/*  www . ja v a 2s.  c om*/
    return Stream.of(new StringField("issn", ISSN, Field.Store.YES));
}