* Returns when condition
*
* If when condition is present node defined by the parent data definition
- * statement is only valid when the returned XPath
- * expression conceptually evaluates to "true"
- * for a particular instance, then the node defined by the parent data
- * definition statement is valid; otherwise, it is not.
- *
+ * statement is only valid when the returned XPath expression conceptually
+ * evaluates to "true" for a particular instance, then the node defined by
+ * the parent data definition statement is valid; otherwise, it is not.
*
- * @return
+ * @return when condition as string
*/
String getWhenCondition();
*
* This constraint has meaning only if associated node is list or leaf-list.
*
- * @param minElements
+ * @param maxElements
* number of maximum required elements.
*/
void setMaxElements(Integer maxElements);
/**
* Build constraint definition
*
- * @return
+ * @return instance of ConstraintDefinition created from this builder
*/
ConstraintDefinition toInstance();
*
* This constraint has meaning only if associated node is list or leaf-list.
*
- * @param minElements number of maximum required elements.
+ * @param maxElements number of maximum required elements.
*/
void setMaxElements(Integer maxElements);
List<PatternConstraint> getPatterns();
/**
- * Set length restrictions for resulting type definition.
+ * Set pattern restrictions for resulting type definition.
*
- * @param lengths
- * Length restrictions of resulting type definition.
+ * @param patterns
+ * patterns restrictions of resulting type definition.
*/
void setPatterns(List<PatternConstraint> patterns);
Integer getFractionDigits();
/**
- *
- * Sets fractions digits of resulting type if it is derived
- * from <code>decimal</code> built-in type.
- *
- * @return fractions digits of resulting type
+ * Sets fractions digits of resulting type if it is derived from
+ * <code>decimal</code> built-in type.
*/
void setFractionDigits(Integer fractionDigits);
/**
* Sets extension builder, which declares this unknown node
- * @param extensionBuilder extension definition, which declares this unknown node
+ *
+ * @param extension
+ * extension builder, which declares this unknown node
*/
void setExtensionBuilder(ExtensionBuilder extension);
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
public final class BuilderUtils {
- private static final DateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
private static final Logger LOG = LoggerFactory.getLogger(BuilderUtils.class);
- private static final Splitter SLASH_SPLITTER = Splitter.on('/').omitEmptyStrings();
private static final Splitter COLON_SPLITTER = Splitter.on(':');
private static final Date NULL_DATE = new Date(0L);
private static final String INPUT = "input";
* Class to be checked
* @param optional
* Original value
- * @return
+ * @return Optional object with type argument casted as cls
*/
private static <T> Optional<T> castOptional(final Class<T> cls, final Optional<?> optional) {
if (optional.isPresent()) {
* Find augment target node and perform augmentation.
*
* @param augment
+ * augment builder to process
* @param firstNodeParent
* parent of first node in path
- * @param path
- * path to augment target
* @return true if augmentation process succeed, false otherwise
*/
public static boolean processAugmentation(final AugmentationSchemaBuilder augment,
* type body context
* @param actualPath
* current path in schema
- * @param namespace
- * current namespace
- * @param revision
- * current revision
- * @param prefix
- * current prefix
+ * @param moduleQName
+ * current module qname
* @param parent
* parent builder
* @return TypeDefinition object based on parsed values.
* Create a new instance.
*
* FIXME: the resulting type needs to be extracted, such that we can reuse
- * the "BaseListener" aspect, which need not be exposed to the user.
- * Maybe factor out a base class into repo.spi?
+ * the "BaseListener" aspect, which need not be exposed to the user. Maybe
+ * factor out a base class into repo.spi?
*
* @param namespaceContext
* @param sourcePath
* @param walker
* @param tree
- * @return
+ * @return new instance of YangParserListenerImpl
*/
public static YangParserListenerImpl create(final Map<String, TreeMap<Date, URI>> namespaceContext,
final String sourcePath, final ParseTreeWalker walker, final ParseTree tree) {