Tabnine Logo
TagModel.getDesignatedByTags
Code IndexAdd Tabnine to your IDE (free)

How to use
getDesignatedByTags
method
in
org.jboss.windup.reporting.model.TagModel

Best Java code snippets using org.jboss.windup.reporting.model.TagModel.getDesignatedByTags (Showing top 6 results out of 315)

origin: org.jboss.windup.reporting/windup-reporting-api

  /**
   * Returns a single parent of the given tag. If there are multiple parents, throws a WindupException.
   */
  public static TagModel getSingleParent(TagModel tag)
  {
    final Iterator<TagModel> parents = tag.getDesignatedByTags().iterator();
    if (!parents.hasNext())
      throw new WindupException("Tag is not designated by any tags: " + tag);

    final TagModel maybeOnlyParent = parents.next();

    if (parents.hasNext()) {
      StringBuilder sb = new StringBuilder();
      tag.getDesignatedByTags().iterator().forEachRemaining(x -> sb.append(x).append(", "));
      throw new WindupException(String.format("Tag %s is designated by multiple tags: %s", tag, sb.toString()));
    }

    return maybeOnlyParent;
  }
}
origin: windup/windup

  /**
   * Returns a single parent of the given tag. If there are multiple parents, throws a WindupException.
   */
  public static TagModel getSingleParent(TagModel tag)
  {
    final Iterator<TagModel> parents = tag.getDesignatedByTags().iterator();
    if (!parents.hasNext())
      throw new WindupException("Tag is not designated by any tags: " + tag);

    final TagModel maybeOnlyParent = parents.next();

    if (parents.hasNext()) {
      StringBuilder sb = new StringBuilder();
      tag.getDesignatedByTags().iterator().forEachRemaining(x -> sb.append(x).append(", "));
      throw new WindupException(String.format("Tag %s is designated by multiple tags: %s", tag, sb.toString()));
    }

    return maybeOnlyParent;
  }
}
origin: windup/windup

for (TagModel currentTag : currentSet)
  for (TagModel parent : currentTag.getDesignatedByTags()) {
    if (superTag.equals(parent))
      return true;
origin: org.jboss.windup.reporting/windup-reporting-api

for (TagModel currentTag : currentSet)
  for (TagModel parent : currentTag.getDesignatedByTags()) {
    if (superTag.equals(parent))
      return true;
origin: windup/windup

private static TagModel getNonPlaceParent(TagGraphService tagService, TagModel tag)
{
  if (tag == null)
    return null;
  final TagModel placeRoot = tagService.getTagByName(MAPPING_OF_PLACEMENT_NAMES);
  final Iterator<TagModel> parents = tag.getDesignatedByTags().iterator();
  if (!parents.hasNext())
    throw new WindupException("Tag is not designated by any tags: " + tag);
  TagModel nonPlaceParent = null;
  while (parents.hasNext())
  {
    TagModel parentTag = parents.next();
    if (TagGraphService.isTagUnderTagOrSame(parentTag, placeRoot))
      continue;
    if (nonPlaceParent != null)
      throw new WindupException(
            String.format("Tag %s has more than one non-placement parent: %s, %s", tag.getName(), nonPlaceParent, parentTag));
    nonPlaceParent = parentTag;
  }
  return nonPlaceParent;
}
origin: org.jboss.windup.reporting/windup-reporting-impl

private static TagModel getNonPlaceParent(TagGraphService tagService, TagModel tag)
{
  if (tag == null)
    return null;
  final TagModel placeRoot = tagService.getTagByName(MAPPING_OF_PLACEMENT_NAMES);
  final Iterator<TagModel> parents = tag.getDesignatedByTags().iterator();
  if (!parents.hasNext())
    throw new WindupException("Tag is not designated by any tags: " + tag);
  TagModel nonPlaceParent = null;
  while (parents.hasNext())
  {
    TagModel parentTag = parents.next();
    if (TagGraphService.isTagUnderTagOrSame(parentTag, placeRoot))
      continue;
    if (nonPlaceParent != null)
      throw new WindupException(
            String.format("Tag %s has more than one non-placement parent: %s, %s", tag.getName(), nonPlaceParent, parentTag));
    nonPlaceParent = parentTag;
  }
  return nonPlaceParent;
}
org.jboss.windup.reporting.modelTagModelgetDesignatedByTags

Javadoc

Which tags is this tag designated by; for instance, "seam" is designated by "web" and "framework:".

Popular methods of TagModel

  • getDesignatedTags
    Which tags this designates; for instance, "java-ee" designates "ejb" and "jms".
  • getName
    Tag name (ID), preferably kebab-style, e.g "java-ee-6".
  • addDesignatedTag
  • getTitle
    Human readable title of technology this tag represents, e.g "Java EE 6".
  • putAllTraits
    A map of traits - custom tag key-value pairs.
  • setColor
  • setName
  • setPseudo
  • setRoot
  • setTitle

Popular in Java

  • Creating JSON documents from java classes using gson
  • setContentView (Activity)
  • scheduleAtFixedRate (Timer)
  • compareTo (BigDecimal)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Path (java.nio.file)
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JFrame (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now