Tabnine Logo
ArchiveMetadata.getDecorations
Code IndexAdd Tabnine to your IDE (free)

How to use
getDecorations
method
in
org.jboss.windup.metadata.type.archive.ArchiveMetadata

Best Java code snippets using org.jboss.windup.metadata.type.archive.ArchiveMetadata.getDecorations (Showing top 10 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew ArrayList()
  • Codota Iconnew LinkedList()
  • Smart code suggestions by Tabnine
}
origin: org.jboss.windup/windup-reporting

protected boolean buildVendorResult(ArchiveMetadata meta) {
  for (AbstractDecoration result : meta.getDecorations()) {
    if (result instanceof VendorResult) {
      return true;
    }
  }
  return false;
}

origin: org.jboss.windup/windup-engine

protected boolean isActive(XmlMetadata file) {
  for (AbstractDecoration dr : file.getArchiveMeta().getDecorations()) {
    if (dr instanceof PomVersion) {
      LOG.debug("Already has version result: " + dr.toString());
      return false;
    }
  }
  return true;
}
origin: org.jboss.windup/windup-engine

@Override
public void processMeta(XmlMetadata file) {
  Document doc = file.getParsedDocument();
  try {
    String description = extractStringValue(xPath, doc);
    if (StringUtils.isNotBlank(description)) {
      Summary result = new Summary();
      result.setDescription(description);
      // add the link to the archive.
      file.getArchiveMeta().getDecorations().add(result);
    }
  }
  catch (XPathExpressionException e) {
    LOG.error("Exception running xpath expression.", e);
  }
}
origin: org.jboss.windup/windup-engine

@Override
public void processMeta(XmlMetadata file) {
  Document doc = file.getParsedDocument();
  try {
    String link = extractStringValue(linkXPath, doc);
    if (StringUtils.isNotBlank(link)) {
      Link result = new Link();
      result.setLink(link);
      result.setDescription("Project Site");
      // add the link to the archive.
      file.getArchiveMeta().getDecorations().add(result);
    }
  }
  catch (XPathExpressionException e) {
    LOG.error("Exception running xpath expression.", e);
  }
}
origin: org.jboss.windup/windup-engine

@Override
public void processMeta(ManifestMetadata file) {
  // Look for default description information.
  String description = extractValue(file.getManifest(), descriptionPriority);
  if (description == null) {
    return;
  }
  // if it exists, cleanse it.
  description = cleanseValue(description);
  if (StringUtils.isNotBlank(description)) {
    Summary vr = new Summary();
    vr.setDescription(description);
    file.getArchiveMeta().getDecorations().add(vr);
    return;
  }
}
origin: org.jboss.windup/windup-engine

@Override
public void processMeta(ManifestMetadata file) {
  // Look for default description information.
  String link = extractValue(file.getManifest(), linkPriority);
  if (link == null) {
    return;
  }
  // if it exists, cleanse it.
  link = cleanseValue(link);
  if (StringUtils.isNotBlank(link)) {
    Link vr = new Link();
    vr.setDescription("Project Site");
    vr.setLink(link);
    file.getArchiveMeta().getDecorations().add(vr);
    return;
  }
}
origin: org.jboss.windup/windup-engine

@Override
public void processMeta(ManifestMetadata file) {
  // check to see if a version already exists. Only process if no version exists..
  for (AbstractDecoration dr : file.getArchiveMeta().getDecorations()) {
    if (dr instanceof PomVersion) {
      LOG.debug("Already has version result: " + dr.toString());
      return;
    }
  }
  // Otherwise look for default version information.
  String name = null;
  String version = extractValue(file.getManifest(), versionPriority);
  version = cleanseValue(version);
  if (version != null) {
    name = extractValue(file.getManifest(), namePriority);
    name = cleanseValue(name);
    // otherwise, guess the name from the archive name...
    // first, look for "-[0-9]" ane substring before that.
    if (StringUtils.isBlank(name)) {
      name = extractNameFromArchiveName(file.getArchiveMeta().getName());
    }
  }
  if (StringUtils.isNotBlank(name) && StringUtils.isNotBlank(version)) {
    Version vr = new Version();
    vr.setName(name);
    vr.setVersion(version);
    file.getArchiveMeta().getDecorations().add(vr);
    return;
  }
}
origin: org.jboss.windup/windup-engine

protected void createVersionResult(XmlMetadata file, String groupId, String artifactId, String versionId, String name) {
  PomVersion vr = new PomVersion();
  // default to artifact ID if name isn't provided.
  if (StringUtils.isBlank(name)) {
    name = artifactId;
  }
  vr.setName(name);
  vr.setVersion(versionId);
  vr.setArchetypeId(artifactId);
  vr.setGroupId(groupId);
  file.getArchiveMeta().getDecorations().add(vr);
  
  if(file.getArchiveMeta() instanceof ZipMetadata) {
    ZipMetadata zip = (ZipMetadata)file.getArchiveMeta();
    knownArchiveProfiler.isKnownVendor(zip, groupId);
  }
  
  
}
origin: org.jboss.windup/windup-reporting

for (AbstractDecoration dr : result.getDecorations()) {
  if (dr instanceof Version)
origin: org.jboss.windup/windup-engine

@Override
public void processMeta(ManifestMetadata file) {
  if (matchesAll(file.getManifest())) {
    Version vr = new Version();
    if (StringUtils.isNotBlank(matchName)) {
      vr.setName(matchName);
    }
    else {
      String name = extractValue(file.getManifest(), namePriority);
      name = cleanseValue(name);
      vr.setName(name);
    }
    if (StringUtils.isNotBlank(matchVersion)) {
      vr.setVersion(matchVersion);
    }
    else {
      String version = extractValue(file.getManifest(), versionPriority);
      version = cleanseValue(version);
      vr.setVersion(version);
    }
    file.getArchiveMeta().getDecorations().add(vr);
  }
}
org.jboss.windup.metadata.type.archiveArchiveMetadatagetDecorations

Popular methods of ArchiveMetadata

  • getEntries
  • getName
  • getFilePointer
  • getNestedArchives
  • getRelativePath

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • getContentResolver (Context)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Permission (java.security)
    Legacy security code; do not use.
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Top 25 Plugins for Webstorm
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