Examples of JSMimeType


Examples of org.apache.jetspeed.serializer.objects.JSMimeType

      if ((mimeTypes != null) && (mimeTypes.size() > 0))
      {
        Iterator _it = mimeTypes.iterator();
        while (_it.hasNext())
        {
          JSMimeType _c = (JSMimeType)_it.next();
// create a new Mime Type
          try
          {
            MimeType mimeType = caps.createMimeType(_c.getName());
          /** THE KEY_OVERWRITE_EXISTING test is not required for mime types, since they carry no other information than the name
           *  Used here for consistency, though
           */          
            if ((this.getSetting(JetspeedSerializer.KEY_OVERWRITE_EXISTING)) || (mimeType.getMimetypeId() == 0))
            {
              caps.storeMimeType(mimeType);
            }
            this.mimeMap.put(_c.getName(), mimeType);

          }
          catch (Exception e)
          {
            throw new SerializerException(
View Full Code Here

Examples of org.apache.jetspeed.serializer.objects.JSMimeType

        while (list.hasNext())
        {
            try
            {
                MimeType _mt = (MimeType) list.next();
                JSMimeType _jsM = new JSMimeType();
                _jsM.setName(_mt.getName());
                this.mimeMap.put(_jsM.getName(), _jsM);
                this.mimeMapInt.put(new Integer(_mt.getMimetypeId()), _jsM);

                ((JSSeedData)getSnapshot()).getMimeTypes().add(_jsM);
            } catch (Exception e)
            {
View Full Code Here

Examples of org.apache.jetspeed.serializer.objects.JSMimeType

            // find the mimeTypes
            Iterator _itM = c.getMimetypes().iterator();
            while (_itM.hasNext())
            {
                MimeType _m = (MimeType) _itM.next();
                JSMimeType _mt = (JSMimeType) mimeMap.get(_m.getName());
                if (_mt != null) jsC.getMimeTypes().add(_mt);
            }
           
        Integer id = new Integer(c.getPreferredMimeTypeId());
        JSMimeType _mt = (JSMimeType) mimeMapInt.get(id);
        if (_mt != null)
          jsC.setPreferredMimeTypeID(_mt.getName());
        else
          jsC.setPreferredMimeTypeID("???");

            // find the capabilities
            Iterator _itC = c.getCapabilities().iterator();
View Full Code Here

Examples of org.apache.jetspeed.serializer.objects.JSMimeType

                // find the mimeTypes
                Iterator _itM = _mt.getMimetypes().iterator();
                while (_itM.hasNext())
                {
                    MimeType _m = (MimeType) _itM.next();
                    JSMimeType _mttype = (JSMimeType) mimeMap.get(_m.getName());
                    if (_mttype != null) _jsM.getMimeTypes().add(_mttype);
                }
                // find the capabilities
                Iterator _itC = _mt.getCapabilities().iterator();
                while (_itC.hasNext())
View Full Code Here

Examples of org.apache.jetspeed.serializer.objects.JSMimeType

      if ((mimeTypes != null) && (mimeTypes.size() > 0))
      {
        Iterator _it = mimeTypes.iterator();
        while (_it.hasNext())
        {
          JSMimeType _c = (JSMimeType)_it.next();
// create a new Mime Type
          try
          {
            MimeType mimeType = caps.createMimeType(_c.getName());
          /** THE KEY_OVERWRITE_EXISTING test is not required for mime types, since they carry no other information than the name
           *  Used here for consistency, though
           */          
            if ((this.getSetting(JetspeedSerializer.KEY_OVERWRITE_EXISTING)) || (mimeType.getMimetypeId() == 0))
            {
              caps.storeMimeType(mimeType);
            }
            this.mimeMap.put(_c.getName(), mimeType);

          }
          catch (Exception e)
          {
            throw new SerializerException(
View Full Code Here

Examples of org.apache.jetspeed.serializer.objects.JSMimeType

        while (list.hasNext())
        {
            try
            {
                MimeType _mt = (MimeType) list.next();
                JSMimeType _jsM = new JSMimeType();
                _jsM.setName(_mt.getName());
                this.mimeMap.put(_jsM.getName(), _jsM);
                this.mimeMapInt.put(new Integer(_mt.getMimetypeId()), _jsM);

                ((JSSeedData)getSnapshot()).getMimeTypes().add(_jsM);
            } catch (Exception e)
            {
View Full Code Here

Examples of org.apache.jetspeed.serializer.objects.JSMimeType

            // find the mimeTypes
            Iterator _itM = c.getMimetypes().iterator();
            while (_itM.hasNext())
            {
                MimeType _m = (MimeType) _itM.next();
                JSMimeType _mt = (JSMimeType) mimeMap.get(_m.getName());
                if (_mt != null) jsC.getMimeTypes().add(_mt);
            }
           
        Integer id = new Integer(c.getPreferredMimeTypeId());
        JSMimeType _mt = (JSMimeType) mimeMapInt.get(id);
        if (_mt != null)
          jsC.setPreferredMimeTypeID(_mt.getName());
        else
          jsC.setPreferredMimeTypeID("???");

            // find the capabilities
            Iterator _itC = c.getCapabilities().iterator();
View Full Code Here

Examples of org.apache.jetspeed.serializer.objects.JSMimeType

                // find the mimeTypes
                Iterator _itM = _mt.getMimetypes().iterator();
                while (_itM.hasNext())
                {
                    MimeType _m = (MimeType) _itM.next();
                    JSMimeType _mttype = (JSMimeType) mimeMap.get(_m.getName());
                    if (_mttype != null) _jsM.getMimeTypes().add(_mttype);
                }
                // find the capabilities
                Iterator _itC = _mt.getCapabilities().iterator();
                while (_itC.hasNext())
View Full Code Here

Examples of org.apache.jetspeed.serializer.objects.JSMimeType

      if ((mimeTypes != null) && (mimeTypes.size() > 0))
      {
        Iterator _it = mimeTypes.iterator();
        while (_it.hasNext())
        {
          JSMimeType _c = (JSMimeType)_it.next();
// create a new Mime Type
          try
          {
            MimeType mimeType = caps.createMimeType(_c.getName());
          /** THE KEY_OVERWRITE_EXISTING test is not required for mime types, since they carry no other information than the name
           *  Used here for consistency, though
           */          
            if ((this.getSetting(JetspeedSerializer.KEY_OVERWRITE_EXISTING)) || (mimeType.getMimetypeId() == 0))
            {
              caps.storeMimeType(mimeType);
            }
            this.mimeMap.put(_c.getName(), mimeType);

          }
          catch (Exception e)
          {
            throw new SerializerException(
View Full Code Here

Examples of org.apache.jetspeed.serializer.objects.JSMimeType

        while (list.hasNext())
        {
            try
            {
                MimeType _mt = (MimeType) list.next();
                JSMimeType _jsM = new JSMimeType();
                _jsM.setName(_mt.getName());
                this.mimeMap.put(_jsM.getName(), _jsM);
                this.mimeMapInt.put(new Integer(_mt.getMimetypeId()), _jsM);

                ((JSSeedData)getSnapshot()).getMimeTypes().add(_jsM);
            } catch (Exception e)
            {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.