Package org.dmd.dmc.types

Examples of org.dmd.dmc.types.StringToString


   
    @Override
    // org.dmd.dms.util.GenUtility.dumpMVType(GenUtility.java:2363)
    public StringToString add(Object v) throws DmcValueException {
        synchronized(this){
            StringToString rc = typeCheck(v);
            if (value == null)
                value = new ArrayList<StringToString>();
            value.add(rc);
            return(rc);
        }
View Full Code Here


    public StringToString del(Object v){
        synchronized(this){
            if (value == null)
                return(null);
   
            StringToString key = null;
            StringToString rc = null;
            try {
                key = typeCheck(v);
            } catch (DmcValueException e) {
                throw(new IllegalStateException("Incompatible type passed to del():" + getName(),e));
            }
View Full Code Here

                throw(new IllegalStateException("Attribute: " + getAttributeInfo().name + " is not indexed. You can't use setMVnth()."));
           
            if ( (index < 0) || (index >= getAttributeInfo().indexSize))
                throw(new IllegalStateException("Index " + index + " for attribute: " + getAttributeInfo().name + " is out of range: 0 <= index < " + getAttributeInfo().indexSize));
           
            StringToString rc = null;
           
            if (v != null)
                rc = typeCheck(v);
           
            if (value == null){
View Full Code Here

        synchronized(this){
            if (value == null)
                return(false);

            try {
                StringToString val = typeCheck(v);
                return(value.contains(val));
            } catch (DmcValueException e) {
                return(false);
            }
        }
View Full Code Here

    if (dmwToPackageMapping == null){
      dmwToPackageMapping = new TreeMap<String, StringToString>();
      Iterator<StringToString>  mapping = getDmwTypeToPackage();
      if (mapping != null){
        while(mapping.hasNext()){
          StringToString curr = mapping.next();
          StringToString existing = dmwToPackageMapping.get(curr.getKey());
          if (existing != null)
            throw(new IllegalStateException("Multiple dmwTypeToPackage values with same key in schema: " + getName()));
          dmwToPackageMapping.put(curr.getKeyAsString(), curr);
        }
      }
     
      if (getDmwPackage() != null){
        // Backwards compatibility
        StringToString entry = new StringToString("dmw",getDmwPackage());
        dmwToPackageMapping.put(entry.getKeyAsString(), entry);       
      }
    }
    StringToString existing = dmwToPackageMapping.get(context);
    if (existing == null)
      return(null);
    return(existing.getValue());
  }
View Full Code Here

       
        TreeMap<String,StringToString> rc = new TreeMap<String,StringToString>();
       
        Iterator<StringToString> it = (Iterator<StringToString>) attr.getMV();
        while(it.hasNext()){
            StringToString obj = it.next();
            rc.put((String)obj.getKey(),obj);
        }
       
        return(rc);
    }
View Full Code Here

       
        HashMap<String,StringToString> rc = new HashMap<String,StringToString>(attr.getMVSize());
       
        Iterator<StringToString> it = (Iterator<StringToString>) attr.getMV();
        while(it.hasNext()){
            StringToString obj = it.next();
            rc.put((String)obj.getKey(),obj);
        }
       
        return(rc);
    }
View Full Code Here

   
    @Override
    // org.dmd.dms.util.GenUtility.dumpMAPType(GenUtility.java:2905)
    public StringToString add(Object v) throws DmcValueException {
        synchronized(this){
            StringToString newval = typeCheck(v);
            if (value == null)
                initValue();
            String key = (String)((DmcMappedAttributeIF)newval).getKey();
            StringToString oldval = value.put(key,newval);
           
            if (oldval != null){
                // We had a value with this key, ensure that the value actually changed
                if (oldval.valuesAreEqual(newval))
                    newval = null;
            }
           
            return(newval);
        }
View Full Code Here

        synchronized(this){
           if (value == null)
               return(false);
   
            try {
                StringToString val = typeCheck(v);
                return(value.containsValue(val));
            } catch (DmcValueException e) {
                return(false);
            }
        }
View Full Code Here

   
    @Override
    // org.dmd.dms.util.GenUtility.dumpSETType(GenUtility.java:2659)
    public StringToString add(Object v) throws DmcValueException {
        synchronized(this){
            StringToString rc = typeCheck(v);
            if (value == null)
                initValue();
       
            // If false is returned, we didn't modify the set, so return null
            if (!value.add(rc))
View Full Code Here

TOP

Related Classes of org.dmd.dmc.types.StringToString

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.