Skip to content

Commit

Permalink
xsd-parser-version set to 1.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
fugerit79 committed Feb 19, 2024
1 parent f19ccc9 commit e7c4736
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.fugerit.java.doc.lib.autodoc.parser.model;

import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

Expand All @@ -8,6 +9,7 @@
import org.xmlet.xsdparser.xsdelements.XsdAttribute;
import org.xmlet.xsdparser.xsdelements.XsdRestriction;
import org.xmlet.xsdparser.xsdelements.xsdrestrictions.XsdEnumeration;
import org.xmlet.xsdparser.xsdelements.xsdrestrictions.XsdPattern;

public class AutodocAttribute {

Expand Down Expand Up @@ -90,9 +92,10 @@ private void handleMinMaxExclusiveRestrictions( StringBuilder builder, XsdRestri
}

private void handlePatternRestriction( StringBuilder builder, XsdRestriction xsdRestriction ) {
if ( xsdRestriction.getPattern() != null ) {
List<XsdPattern> patterns = xsdRestriction.getPattern();
if ( patterns != null && !patterns.isEmpty() ) {
builder.append( " , pattern : " );
builder.append( xsdRestriction.getPattern().getValue() );
builder.append( StringUtils.concat( ", ", patterns.stream().map( xp -> xp.getValue() ).collect( Collectors.toList() ) ) );
}
}

Expand Down

0 comments on commit e7c4736

Please sign in to comment.