Tabnine Logo
Tag.fromDTO
Code IndexAdd Tabnine to your IDE (free)

How to use
fromDTO
method
in
aQute.lib.tag.Tag

Best Java code snippets using aQute.lib.tag.Tag.fromDTO (Showing top 3 results out of 315)

origin: biz.aQute.bnd/biz.aQute.bndlib

  return convertDTO(rootName, arrayElementName, dto, true);
} else {
  return fromDTO(rootName, dto);
origin: biz.aQute.bnd/biz.aQute.bnd

  return convertDTO(rootName, arrayElementName, dto, true);
} else {
  return fromDTO(rootName, dto);
origin: biz.aQute.bnd/biz.aQute.repository

  return convertDTO(rootName, arrayElementName, dto, true);
} else {
  return fromDTO(rootName, dto);
aQute.lib.tagTagfromDTO

Javadoc

Convert the DTO object in arguments to a Tag object with rootNameas name.

Keys in Map and public fields' name are used to name tags.
Objects in Collection or array are converted to XML elements and tags names are computed as follow:

  • If the parent element tag does not have a defined name, "element" will be used.
  • If the parent element tag name ends with a 's' or 'S', the depluralized version will be used.
  • Otherwise, the first letter of "element" is capitalized and appended to the parent element tag name to name the tag (If the parent element tag name does not end with a lowercase letter, "element" is entirely capitalized and an '_' is first appended to to it)

Example:

 
fromDTO("things", "element", `[{"FRIEND": ["Amy"]},{"children": ["Emily"]},["Bob", "Bill"]]`) 
gives
 

null values are ignored.

Popular methods of Tag

  • <init>
    Construct a new Tag with a name and a set of attributes. The attributes are given as ( name, value )
  • addAttribute
  • addContent
    Add a new content string.
  • print
  • escape
    Escape a string, do entity conversion.
  • findRecursiveAttribute
  • getAttribute
    Return the attribute value or a default if not defined.
  • getContentsAsString
    convenient method to get the contents in a StringBuilder.
  • getName
    Return the name of the tag.
  • getNameSpace
  • match
  • select
  • match,
  • select,
  • spaces,
  • formatted,
  • computeArrayElementName,
  • convertDTO,
  • getFields,
  • getPath,
  • invalid

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onRequestPermissionsResult (Fragment)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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