Attributes getValue - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Attributes getValue method.

This code example shows how to use the following methods:getValue
  { 
    super.startParsing(attrs);
     
    int instanceNum;
    try{ 
      instanceNum = Integer.parseInt(attrs.getValue(getUri(), "instanceNum"));
    } 
    catch(Exception e){
      instanceNum = 1;
    } 
     
    filter = new OpenERPFilterInfo(
        attrs.getValue(getUri(), "modelPath"), 
        instanceNum, 
    		attrs.getValue(getUri(), "operator"), 
    		attrs.getValue(getUri(), "fieldName"), 
    		attrs.getValue(getUri(), "comparator"),
    		attrs.getValue(getUri(), "value"));
  } 
   

7
CodeRank
This code example shows how to use the following methods:getValue
     * does not bundle any extensions 
     */ 
    private ArrayList getAvailableExtensions(Manifest manifest) {
 
        Attributes attributes = manifest.getMainAttributes();
        String name = attributes.getValue("Extension-Name");
        if (name == null)
            return null; 
 
        ArrayList extensionList = new ArrayList();
 
        Extension extension = new Extension();
        extension.setExtensionName(name);
        extension.setImplementationURL(
            attributes.getValue("Implementation-URL"));
        extension.setImplementationVendor(
            attributes.getValue("Implementation-Vendor"));
        extension.setImplementationVendorId(
            attributes.getValue("Implementation-Vendor-Id"));
        extension.setImplementationVersion(

7
CodeRank
This code example shows how to use the following methods:getValue
   * @param attrs the attributes. 
   * @throws SAXException if there is a parsing error. 
   */ 
  protected void startParsing(final Attributes attrs) throws SAXException
  { 
    color = ColorConverter.getObject(attrs.getValue(getUri(), "color"));
    final float width = ParserUtil.parseFloat(attrs.getValue(getUri(), "width"), "Failed to parse numeric value", getLocator());
    final float miterLimit = ParserUtil.parseFloat(attrs.getValue(getUri(), "miterlimit"), "Failed to parse numeric value", getLocator());
    final float dashPhase = ParserUtil.parseFloat(attrs.getValue(getUri(), "dashPhase"), "Failed to parse numeric value", getLocator());
    final int cap = ParserUtil.parseInt(attrs.getValue(getUri(), "cap"), "Failed to parse numeric value", getLocator());
    final int join = ParserUtil.parseInt(attrs.getValue(getUri(), "join"), "Failed to parse numeric value", getLocator());
    final String dashType = attrs.getValue(getUri(), "dash");
 
    float[] dash;
    if ("DOTTED".equals(dashType))
    { 
      dash = getDotted(width);
    } 
    else if ("DASHED".equals(dashType))
    { 
7
CodeRank
This code example shows how to use the following methods:getValue
   * @param attrs the attributes. 
   * @throws SAXException if there is a parsing error. 
   */ 
  protected void startParsing(final Attributes attrs) throws SAXException
  { 
    userName = attrs.getValue(getUri(), "userName");
    password = attrs.getValue(getUri(), "password");
    driverClass = attrs.getValue(getUri(), "driverClass");
    sqlQuery = attrs.getValue(getUri(), "sqlQuery");
    connectionString = attrs.getValue(getUri(), "connectionString");
  } 
 
  /** 
   * Returns the handler for a child element. 
   * 
   * @param uri     the URI of the namespace of the current element. 
   * @param tagName the tag name. 
   * @param atts    the attributes. 
   * @return the handler or null, if the tagname is invalid. 
   * @throws SAXException if there is a parsing error. 
7
CodeRank
This code example shows how to use the following methods:getValue
    		String articleCount = atts.getValue("total_articles");
    		if(!TextUtils.isEmpty(articleCount)) {
    			mArticleCount = Integer.parseInt(articleCount);
    		}   		 
    	} else if (name.equals("article")) {
            mCurrentDrink = new Drink(Integer.parseInt(atts.getValue("id").trim()));
        } else if (name.equals("supplier") && !TextUtils.isEmpty(atts.getValue("url").trim())) {
            mCurrentDrink.setSupplierUrl(atts.getValue("url").trim());
        } else if (name.equals("volume")) {
            mCurrentVolume = new Volume();
            String articleId = atts.getValue("sb_article_id").trim();
            if (!TextUtils.isEmpty(articleId)) {
                mCurrentVolume.setArticleId(Integer.parseInt(articleId));
            } 
            mCurrentVolume.setPriceSek(atts.getValue("price").trim());
            mCurrentVolume.setRetired(Integer.parseInt(atts.getValue("retired").trim()));
        } else if (name.equals("tag")) {
        	mCurrentTag = new Tag();
        	mCurrentTag.setId(Integer.parseInt(atts.getValue("id")));
        	mCurrentTag.setType(atts.getValue("type"));

7
CodeRank
This code example shows how to use the following methods:getValue
   * @param attrs the attributes. 
   * @throws SAXException if there is a parsing error. 
   */ 
  protected void startParsing(final Attributes attrs) throws SAXException
  { 
    name = attrs.getValue(getUri(), "name"); // NON-NLS
    if (name == null)
    { 
      throw new ParseException("Attribute 'name' is undefined.", getLocator()); // NON-NLS 
    } 
    bundleName = attrs.getValue(getUri(), "bundle-name"); // NON-NLS
    if (bundleName == null)
    { 
      throw new ParseException("Attribute 'bundle-name' is undefined.", getLocator()); // NON-NLS 
    } 
    expert = "true".equals(attrs.getValue(getUri(), "expert")); // NON-NLS
    hidden = "true".equals(attrs.getValue(getUri(), "hidden")); // NON-NLS
    preferred = "true".equals(attrs.getValue(getUri(), "preferred")); // NON-NLS
    deprecated = "true".equals(attrs.getValue(getUri(), "deprecated")); // NON-NLS
 

7
CodeRank
This code example shows how to use the following methods:getValue
     *  
     * @param attrs the attributes from which version properties will be drawn 
     */ 
 
    VeecheckVersion(Attributes attrs) {
        packageName = emptyToNull(attrs.getValue("packageName"));
        versionCode = emptyToNull(attrs.getValue("versionCode"));
        versionName = emptyToNull(attrs.getValue("versionName"));
        buildBrand = emptyToNull(attrs.getValue("buildBrand"));
        buildId = emptyToNull(attrs.getValue("buildId"));
        buildModel = emptyToNull(attrs.getValue("buildModel"));
    } 
 
 
    /** 
     * Replaces tokens of the form <tt>${name}</tt> with version properties in a supplied URL. 
     *  
     * @param url the URL into which properties should be substituted 
     * @return the resulting URL, unchanged if no tokens were present 
     */ 
7
CodeRank
This code example shows how to use the following methods:getValue
   * @param attrs the attributes. 
   * @throws org.xml.sax.SAXException if there is a parsing error. 
   */ 
  protected void startParsing(final Attributes attrs) throws SAXException
  { 
    final String name = attrs.getValue(getUri(), "name");// NON-NLS
    parameter = new Parameter(name);
    parameter.setMandatory("true".equals(attrs.getValue(getUri(), "is-mandatory")));// NON-NLS
    parameter.setStrict("true".equals(attrs.getValue(getUri(), "is-strict")));// NON-NLS
    parameter.setMultiSelect("true".equals(attrs.getValue(getUri(), "is-multi-select")));// NON-NLS
    parameter.setType(attrs.getValue(getUri(), "type"));// NON-NLS
    parameter.setTimezoneHint(attrs.getValue(getUri(), "timezone-hint"));// NON-NLS
  } 
 
  /** 
   * Returns the handler for a child element. 
   * 
   * @param uri     the URI of the namespace of the current element. 
   * @param tagName the tag name. 
   * @param atts    the attributes. 
7
CodeRank
This code example shows how to use the following methods:getValue
    return ex;
  } 
 
  /** Create RemoteException from attributes */ 
  public static RemoteException valueOf(Attributes attrs) {
    return new RemoteException(attrs.getValue("class"),
        attrs.getValue("message")); 
  } 
 
  @Override 
  public String toString() {
    return getClass().getName() + "(" + className + "): " + getMessage();
  } 
} 
7
CodeRank
This code example shows how to use the following methods:getValue
 
	@SuppressWarnings("unchecked") 
    public Object start(final String uri, final String localName,
			            final Attributes attrs, final ExtensibleXmlParser parser)
			throws SAXException {
		parser.startElementBuilder(localName, attrs);
 
		String id = attrs.getValue("id");
		String name = attrs.getValue("name");
		String structureRef = attrs.getValue("structureRef");
 
        ProcessBuildData buildData = (ProcessBuildData) parser.getData();
        Map<String, Signal> signals = (Map<String, Signal>) buildData.getMetaData("Signals");
        if (signals == null) {
            signals = new HashMap<String, Signal>();
            buildData.setMetaData("Signals", signals);
        } 
         
        Signal s = new Signal(id, structureRef, name);
        signals.put(id, s);
7
CodeRank

Related Attributes getValue Questions & Answers:

getValue Method Overview
Look up an attribute's value by XML qualified (prefixed) name.
See Code Examples for other Java 8 Attributes Methods: