Examples of ProfileType


Examples of gov.nist.checklists.xccdf.x11.ProfileType

    // Attribute: id
    // Operation: None

    // Attribute: prohibitChanges, optional, default=false
    // Operation: Replace
    ProfileType extendedData = extendedProfile.data;
   
    if (extendedData.isSetProhibitChanges() && !data.isSetProhibitChanges()) {
      data.setProhibitChanges(extendedData.getProhibitChanges());
    }

    // Attribute: abstract
    // Operation: None

    // Attribute: note-tag, optional
    // Operation: Replace
    if (extendedData.isSetNoteTag() && !data.isSetNoteTag()) {
      data.setNoteTag(extendedData.getNoteTag());
    }

    // Attribute: extends
    // Operation: None

    // Attribute: xml:base
    // Operation: ???None

    // Attribute: Id
    // Operation: None???

    // Element: status
    // Operation: None

    // Element: version, optional
    // Operation: Replace
    if (extendedData.isSetVersion() && !data.isSetVersion()) {
      data.setVersion((VersionType) extendedData.getVersion()
          .copy());
    }

    // Element: title
    // Operation: Override
    PropertyExtensionResolver.getTextWithSubTypeResolver().resolve(
        data.getTitleList(), extendedData.getTitleList(),
        PropertyExtensionResolver.Action.OVERRIDE);

    // Element: description
    // Operation: Override
    PropertyExtensionResolver.getHtmlTextWithSubTypeResolver().resolve(
        data.getDescriptionList(),
        extendedData.getDescriptionList(),
        PropertyExtensionResolver.Action.OVERRIDE);

    // Element: reference
    // Operation: ???Override (What is the key for the override?)
    PropertyExtensionResolver.getReferenceTypeResolver().resolve(
        data.getReferenceList(),
        extendedData.getReferenceList(),
        PropertyExtensionResolver.Action.OVERRIDE);

    // Element: platform
    // Operation: ???Override (Why is this an override?)
    PropertyExtensionResolver.getURIIdRefTypeResolver().resolve(
        data.getPlatformList(),
        extendedData.getPlatformList(),
        PropertyExtensionResolver.Action.OVERRIDE);

    // Element: select, set-value, refine-value and refine-rule
    new ProfileSelectorResolver(data, extendedData).resolve();
View Full Code Here

Examples of gov.nist.checklists.xccdf.x12.ProfileType

    // Attribute: id
    // Operation: None

    // Attribute: prohibitChanges, optional, default=false
    // Operation: Replace
    ProfileType extendedData = extendedProfile.data;
   
    if (extendedData.isSetProhibitChanges() && !data.isSetProhibitChanges()) {
      data.setProhibitChanges(extendedData.getProhibitChanges());
    }

    // Attribute: abstract
    // Operation: None

    // Attribute: note-tag, optional
    // Operation: Replace
    if (extendedData.isSetNoteTag() && !data.isSetNoteTag()) {
      data.setNoteTag(extendedData.getNoteTag());
    }

    // Attribute: extends
    // Operation: None

    // Attribute: xml:base
    // Operation: ???None

    // Attribute: Id
    // Operation: None???

    // Element: status
    // Operation: None

    // Element: version, optional
    // Operation: Replace
    if (extendedData.isSetVersion() && !data.isSetVersion()) {
      data.setVersion((VersionType) extendedData.getVersion()
          .copy());
    }

    // Element: title
    // Operation: Override
    PropertyExtensionResolver.getTextWithSubTypeResolver().resolve(
        data.getTitleList(), extendedData.getTitleList(),
        PropertyExtensionResolver.Action.OVERRIDE);

    // Element: description
    // Operation: Override
    PropertyExtensionResolver.getHtmlTextWithSubTypeResolver().resolve(
        data.getDescriptionList(),
        extendedData.getDescriptionList(),
        PropertyExtensionResolver.Action.OVERRIDE);

    // Element: reference
    // Operation: ???Override (What is the key for the override?)
    PropertyExtensionResolver.getReferenceTypeResolver().resolve(
        data.getReferenceList(),
        extendedData.getReferenceList(),
        PropertyExtensionResolver.Action.OVERRIDE);

    // Element: platform
    // Operation: ???Override (Why is this an override?)
    PropertyExtensionResolver.getURIIdRefTypeResolver().resolve(
        data.getPlatformList(),
        extendedData.getPlatformList(),
        PropertyExtensionResolver.Action.OVERRIDE);

    // Element: select, set-value, refine-value and refine-rule
    new ProfileSelectorResolver(data, extendedData).resolve();
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.ProfileType

   
    NameType name = new NameType();
    name.setName("VCard for John Doe");
    vcard.setName(name);
   
    ProfileType profile = new ProfileType();
    profile.setProfile("VCard");
    vcard.setProfile(profile);
   
    SourceType source = new SourceType();
    source.setSource("Whatever");
    vcard.setSource(source);
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.ProfileType

      assertEquals("Public", f.getSecurityClass());
    }
   
    //PROFILE
    {
      ProfileType f = vcard.getProfile();
      assertEquals("VCard", f.getProfile());
    }
   
    //TZ
    {
      TzType f = vcard.getTz();
      assertEquals(1, f.getHourOffset());
      assertEquals(0, f.getMinuteOffset());
    }
   
    //LABEL
    {
      //This label does not get parsed because its parameter types
      //do not match any of the parameter types of any of the existing
      //addresses. In this case the parameter type PARCEL is extra from
      //the address.
      //
      //This is an issue with the way Labels and Addresses are defined in
      //the VCard RFC. There are 2 ways to go about it:
      //
      //1: An ADR may have only 1 LABEL associated to it, the LABEL directly under it
      //2: An ADR may have only 1 LABEL associated to it by parameter types. Only
      //   one ADR and LABEL without zero parameter types may hold an association.
      //
      // Cardme takes approach 2.
     
      /*
      List<LabelType> it = vcard.getLables();
      assertEquals(1, it.size());
     
      LabelType f = it.get(0);
      assertEquals("John Doe\nNew York, NewYork,\nSouth Crecent Drive,\nBuilding 5, floor 3,\nUSA", f.getLabel());
      List<LabelParamType> types = f.getParams();
      assertEquals(3, types.size());
      assertTrue(types.contains(LabelParamType.HOME));
      assertTrue(types.contains(LabelParamType.PARCEL));
      assertTrue(types.contains(LabelParamType.PREF));
      */
     
    }
   
    //SORT-STRING
    {
      SortStringFeature f = vcard.getSortString();
      assertEquals("JOHN", f.getSortString());
    }
   
    //ROLE
    {
      RoleFeature f = vcard.getRole();
      assertEquals("Counting Money", f.getRole());
    }
   
    //SOURCE
    {
      SourceFeature f = vcard.getSource();
      assertEquals("Whatever", f.getSource());
    }
   
    //MAILER
    {
      MailerFeature f = vcard.getMailer();
      assertEquals("Mozilla Thunderbird", f.getMailer());
    }
   
    //NAME
    {
      NameType f = vcard.getName();
      assertEquals("VCard for John Doe", f.getName());
    }
   
    //custom types
    {
      List<ExtendedType> it = vcard.getExtendedTypes();
      assertEquals(4, it.size());
     
      ExtendedType f = it.get(0);
      assertEquals("item2", f.getGroup());
      assertEquals("X-ABLABEL", f.getExtendedName());
      assertEquals("_$!<HomePage>!$_", f.getExtendedValue());

      f = it.get(1);
      assertEquals("X-ABUID", f.getExtendedName());
      assertEquals("0E7602CC-443E-4B82-B4B1-90F62F99A199:ABPerson", f.getExtendedValue());
     
      f = it.get(2);
      assertEquals("X-GENERATOR", f.getExtendedName());
      assertEquals("Cardme Generator", f.getExtendedValue());
     
      f = it.get(3);
      assertEquals("X-LONG-STRING", f.getExtendedName());
      assertEquals("1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", f.getExtendedValue());
    }
   
    VCardImpl vcard2 = (VCardImpl)vcard;
   
    if(vcard2.hasErrors()) {
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.ProfileType

  }

  @Test
  public void testBuildProfileType() throws VCardBuildException {
    VCardImpl vcard = getSimpleVCard();
    vcard.setProfile(new ProfileType("VCard"));
   
    VCardWriter vcardWriter = new VCardWriter();
    vcardWriter.setOutputVersion(VCardVersion.V3_0);
    vcardWriter.setCompatibilityMode(CompatibilityMode.RFC2426);
    vcardWriter.setFoldingScheme(FoldingScheme.MIME_DIR);
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.ProfileType

   * @param vcard
   * @throws VCardParseException
   */
  private void parseProfileType(String group, String value, List<ParameterType> paramTypeList, VCardImpl vcard) throws VCardParseException {
    try {
      ProfileType profileType = new ProfileType();
      parseParamTypes(profileType, paramTypeList, value, VCardTypeName.PROFILE);
     
      if(profileType.isQuotedPrintable()) {
        value = decodeQuotedPrintableValue(profileType, value);
      }
     
      if(group != null) {
        profileType.setGroup(group);
      }
     
      profileType.setProfile(VCardUtils.unescapeString(value));
      vcard.setProfile(profileType);
    }
    catch(Exception ex) {
      throw new VCardParseException("ProfileType ("+VCardTypeName.PROFILE.getType()+") ["+ex.getClass().getName()+"] "+ex.getMessage(), ex);
    }
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.