X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-parser-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fparser%2Fbuilder%2Fapi%2FTypeDefinitionBuilder.java;h=e6b6499f913a4a615050105653be2e12429790c5;hb=42abb28b99a02f9580f4676ce5c315628e5bcd24;hp=acdec6621219fa07ebb8b5de7b1cc57cc8d2d4af;hpb=36368e8e6f9a791c355a7e61010a04e6a4f347d4;p=yangtools.git diff --git a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/TypeDefinitionBuilder.java b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/TypeDefinitionBuilder.java index acdec66212..e6b6499f91 100644 --- a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/TypeDefinitionBuilder.java +++ b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/builder/api/TypeDefinitionBuilder.java @@ -1,51 +1,130 @@ -/* - * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.yangtools.yang.parser.builder.api; - -import java.util.List; - -import org.opendaylight.yangtools.yang.common.QName; -import org.opendaylight.yangtools.yang.model.api.TypeDefinition; -import org.opendaylight.yangtools.yang.model.api.type.LengthConstraint; -import org.opendaylight.yangtools.yang.model.api.type.PatternConstraint; -import org.opendaylight.yangtools.yang.model.api.type.RangeConstraint; - -/** - * Interface for builders of 'typedef' statement. - */ -public interface TypeDefinitionBuilder extends TypeAwareBuilder, SchemaNodeBuilder, GroupingMember { - - void setQName(QName qname); - - TypeDefinition build(); - - List getRanges(); - - void setRanges(List ranges); - - List getLengths(); - - void setLengths(List lengths); - - List getPatterns(); - - void setPatterns(List patterns); - - Integer getFractionDigits(); - - void setFractionDigits(Integer fractionDigits); - - Object getDefaultValue(); - - void setDefaultValue(Object defaultValue); - - String getUnits(); - - void setUnits(String units); - -} +/* + * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.yangtools.yang.parser.builder.api; + +import java.util.List; +import org.opendaylight.yangtools.yang.common.QName; +import org.opendaylight.yangtools.yang.model.api.TypeDefinition; +import org.opendaylight.yangtools.yang.model.api.type.LengthConstraint; +import org.opendaylight.yangtools.yang.model.api.type.PatternConstraint; +import org.opendaylight.yangtools.yang.model.api.type.RangeConstraint; + +/** + * Interface for builders of 'typedef' statement. + * + * @deprecated Pre-Beryllium implementation, scheduled for removal. + */ +@Deprecated +public interface TypeDefinitionBuilder extends TypeAwareBuilder, SchemaNodeBuilder, GroupingMember { + + /** + * Sets QName for resulting type definition. + * + * @param qname QName of resulting type + */ + void setQName(QName qname); + + @Override + TypeDefinition build(); + + /** + * + * Returns range restrictions of resulting type definition. + * + * @return range restrictions of resulting type definition. + */ + List getRanges(); + + /** + * Set Range restrictions for resulting type definition. + * + * @param ranges + * Range restrictions of resulting type definition. + */ + void setRanges(List ranges); + + /** + * + * Returns length restrictions of resulting type definition. + * + * @return length restrictions of resulting type definition. + */ + List getLengths(); + + /** + * Set length restrictions for resulting type definition. + * + * @param lengths + * Length restrictions of resulting type definition. + */ + void setLengths(List lengths); + + /** + * + * Returns pattern restrictions of resulting type definition. + * + * @return range restrictions of resulting type definition. + */ + List getPatterns(); + + /** + * Set pattern restrictions for resulting type definition. + * + * @param patterns + * patterns restrictions of resulting type definition. + */ + void setPatterns(List patterns); + + /** + * + * Returns fractions digits of resulting type if it is derived + * from decimal built-in type. + * + * @return fractions digits of resulting type + */ + Integer getFractionDigits(); + + /** + * Sets fractions digits of resulting type if it is derived from + * decimal built-in type. + * + * @param fractionDigits fraction digits + */ + void setFractionDigits(Integer fractionDigits); + + /** + * + * Returns default value of resulting type + * + * @return default value of resulting type + */ + Object getDefaultValue(); + + /** + * + * Sets default value of resulting type + * + * @param defaultValue Default value of resulting type + */ + void setDefaultValue(Object defaultValue); + + /** + * Gets unit definition for resulting type + * + * @return unit definition for resulting type + */ + String getUnits(); + + /** + * Sets units definition for resulting type + * + * @param units units definition for resulting type + */ + void setUnits(String units); + +}