Tabnine Logo
Property.setDefaultValue
Code IndexAdd Tabnine to your IDE (free)

How to use
setDefaultValue
method
in
org.fabric3.api.model.type.component.Property

Best Java code snippets using org.fabric3.api.model.type.component.Property.setDefaultValue (Showing top 1 results out of 315)

origin: org.fabric3/fabric3-model-api

/**
 * Adds a property to the composite parsed from the XML source.
 *
 * @param name   the property name
 * @param source the XML source
 * @return the builder
 * @throws ModelBuilderException if an error reading the source occurs
 */
public CompositeBuilder property(String name, URL source) {
  checkState();
  try {
    Document document = DOCUMENT_FACTORY.newDocumentBuilder().parse(source.openStream());
    // all properties have a root <values> element, append the existing root to it. The existing root will be taken as a property <value>.
    Element oldRoot = document.getDocumentElement();
    Element newRoot = document.createElement("values");
    document.removeChild(oldRoot);
    document.appendChild(newRoot);
    newRoot.appendChild(oldRoot);
    Property property = new Property(name);
    property.setDefaultValue(document);
    composite.add(property);
  } catch (IOException | ParserConfigurationException | SAXException e) {
    throw new ModelBuilderException(e);
  }
  return this;
}
org.fabric3.api.model.type.componentPropertysetDefaultValue

Javadoc

Sets the default property values.

Popular methods of Property

  • <init>
  • getName
    Returns the name of the property.
  • getType
    Returns the property XSD type or null if it is not an XSD type.
  • setMany
    Sets whether the property is many-valued or single-valued.
  • setRequired
    Sets whether the component definition must supply a value for this property.
  • getDefaultValue
    Returns the default property value as a DOM.
  • getNamespaces
  • getSource
    Returns the property source
  • isMany
    Returns whether the property is many-valued or single-valued.
  • isRequired
    Returns whether the component definition must supply a value for this property.
  • setType
    Sets the XSD type
  • addNamespace
    Adds a namespace used to resolve a property source.
  • setType,
  • addNamespace,
  • setParent,
  • setSource

Popular in Java

  • Making http requests using okhttp
  • addToBackStack (FragmentTransaction)
  • setScale (BigDecimal)
  • putExtra (Intent)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JButton (javax.swing)
  • Top plugins for Android Studio
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