Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
SIX OVAL - http://code.google.com/p/six-oval/ Copyright (C) 2010 National Institute of Advanced Industrial Science and Technology (AIST) Registration Number: H22PRO-1124 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 package jp.go.aist.six.oval.model.linux;
 
This item stores the verification results of the individual files in an RPM similar to what is produced by the rpm -V command.

Author(s):
Akihito Nakamura, AIST
Version:
$Id: RpmVerifyFileItem.java 3046 2013-02-21 09:33:57Z nakamura5akihito@gmail.com $
See also:
OVAL Language
 
 public class RpmVerifyFileItem
     extends ItemType
 {
 
     //{0..1}
     private EntityItemStringType        name;
     private EntityItemAnySimpleType     epoch;
     private EntityItemAnySimpleType     version;
     private EntityItemAnySimpleType     release;
     private EntityItemStringType        arch;
     private EntityItemStringType        filepath;
     private EntityItemStringType        extended_name;
 
 
     private EntityItemBoolType             configuration_file;
     private EntityItemBoolType             documentation_file;
     private EntityItemBoolType             ghost_file;
     private EntityItemBoolType             license_file;
     private EntityItemBoolType             readme_file;



    
Constructor.
 
     public RpmVerifyFileItem()
     {
         this( 0 );
     }
 
 
     public RpmVerifyFileItem(
                     final int id
                     )
     {
         thisid );
     }
 
 
     public RpmVerifyFileItem(
                     final int id,
                     final StatusEnumeration status
                     )
     {
         superidstatus );
 
          = .;
     }
 
 //    public RpmInfoItem(
//                    final int id
//                    )
//    {
//        this( id,
//                        (String)null,
//                        (String)null,
//                        (String)null,
//                        (String)null,
//                        (String)null,
//                        (String)null,
//                        (String)null
//                        );
//    }
//
//
//
//    public RpmInfoItem(
//                    final int id,
//                    final String arch,
//                    final String name,
//                    final String version,
//                    final String release,
//                    final String epoch,
//                    final String evr,
//                    final String sigkeyid
//                    )
//    {
//        super( id, arch, name, version, release, epoch, evr );
//
//        if (sigkeyid != null) {
//            setSignatureKeyId( new EntityItemStringType( sigkeyid ) );
//        }
//
//        _oval_platform_type = OvalPlatformType.linux;
//        _oval_component_type = OvalComponentType.rpminfo;
//    }
//    public RpmInfoItem(
//                    final int id,
//                    final EntityItemStringType arch,
//                    final EntityItemStringType name,
//                    final EntityItemAnySimpleType version,
//                    final EntityItemAnySimpleType release,
//                    final EntityItemAnySimpleType epoch,
//                    final EntityItemEVRStringType evr,
//                    final EntityItemStringType sigkeyid
//                    )
//    {
//        super( id, arch, name, version, release, epoch, evr );
//
//        setSignatureKeyID( sigkeyid );
//    }



    
    public void setName(
                    final EntityItemStringType name
                    )
    {
        this. = name;
    }
    public EntityItemStringType getName()
    {
        return ;
    }



    
    public void setEpoch(
                    final EntityItemAnySimpleType epoch
                    )
    {
        if (epoch != null) {
            DatatypeEnumeration  datatype = epoch.getDatatype();
            if (datatype != null) {
                if (datatype == .
                                ||  datatype == .) {
                    //validation: xsd:restriction satisfied.
                } else {
                    throw new IllegalArgumentException(
                                    "invalid epoch: datatype=" + datatype );
                }
            }
        }
        this. = epoch;
    }
    {
        return ;
    }



    
    public void setVersion(
                    final EntityItemAnySimpleType version
                    )
    {
        if (version != null) {
            DatatypeEnumeration  datatype = version.getDatatype();
            if (datatype != null) {
                if (datatype == .
                                ||  datatype == .) {
                    // xsd:restriction satisfied.
                } else {
                    throw new IllegalArgumentException(
                                    "invalid version: datatype=" + datatype );
                }
            }
        }
        this. = version;
    }
    {
        return ;
    }



    
    public void setRelease(
                    final EntityItemAnySimpleType release
                    )
    {
        if (release != null) {
            DatatypeEnumeration  datatype = release.getDatatype();
            if (datatype != null) {
                if (datatype == .
                                ||  datatype == .) {
                    // xsd:restriction satisfied.
                } else {
                    throw new IllegalArgumentException(
                                    "invalid release: datatype=" + datatype );
                }
            }
        }
        this. = release;
    }
    {
        return ;
    }



    
    public void setArch(
                    final EntityItemStringType arch
                    )
    {
        this. = arch;
    }
    public EntityItemStringType getArch()
    {
        return ;
    }



    
    public void setFilepath(
                    final EntityItemStringType filepath
                    )
    {
        this. = filepath;
    }
    {
        return ;
    }



    
    public void setExtendedName(
                    final EntityItemStringType extended_name
                    )
    {
        this. = extended_name;
    }
    {
        return ;
    }



    
    public void setSizeDiffers(
                    final EntityItemRpmVerifyResultType size_differs
                    )
    {
        this. = size_differs;
    }
    {
        return ;
    }



    
    public void setModeDiffers(
                    final EntityItemRpmVerifyResultType mode_differs
                    )
    {
        this. = mode_differs;
    }
    {
        return ;
    }



    
    public void setMd5Differs(
                    final EntityItemRpmVerifyResultType md5_differs
                    )
    {
        this. = md5_differs;
    }
    {
        return ;
    }



    
    public void setDeviceDiffers(
                    final EntityItemRpmVerifyResultType device_differs
                    )
    {
        this. = device_differs;
    }
    {
        return ;
    }



    
    public void setLinkMismatch(
                    final EntityItemRpmVerifyResultType link_mismatch
                    )
    {
        this. = link_mismatch;
    }
    {
        return ;
    }



    
    public void setOwnershipDiffers(
                    final EntityItemRpmVerifyResultType ownership_differs
                    )
    {
        this. = ownership_differs;
    }
    {
        return ;
    }



    
    public void setGroupDiffers(
                    final EntityItemRpmVerifyResultType group_differs
                    )
    {
        this. = group_differs;
    }
    {
        return ;
    }



    
    public void setMtimeDiffers(
                    final EntityItemRpmVerifyResultType mtime_differs
                    )
    {
        this. = mtime_differs;
    }
    {
        return ;
    }



    
    public void setCapabilitiesDiffer(
                    final EntityItemRpmVerifyResultType capabilities_differ
                    )
    {
        this. = capabilities_differ;
    }
    {
        return ;
    }



    
    public void setConfigurationFile(
                    final EntityItemBoolType configuration_file
                    )
    {
        this. = configuration_file;
    }
    {
        return ;
    }



    
    public void setDocumentationFile(
                    final EntityItemBoolType documentation_file
                    )
    {
        this. = documentation_file;
    }
    {
        return ;
    }



    
    public void setGhostFile(
                    final EntityItemBoolType ghost_file
                    )
    {
        this. = ghost_file;
    }
    {
        return ;
    }



    
    public void setLicenseFile(
                    final EntityItemBoolType license_file
                    )
    {
        this. = license_file;
    }
    {
        return ;
    }



    
    public void setReadmeFile(
                    final EntityItemBoolType readme_file
                    )
    {
        this. = readme_file;
    }
    {
        return ;
    }
    //**************************************************************
    //  java.lang.Object
    //**************************************************************
    @Override
    public String toString()
    {
        return "rpmverifyfile_item[" + super.toString()
                        + ", name="                 + getName()
                        + ", epoch="                + getEpoch()
                        + ", version="              + getVersion()
                        + ", release="              + getRelease()
                        + ", arch="                 + getArch()
                        + ", filepath="             + getFilepath()
                        + ", extended_name="        + getExtendedName()
                        + ", size_differs="         + getSizeDiffers()
                        + ", mode_differs="         + getModeDiffers()
                        + ", md5_differs="          + getMd5Differs()
                        + ", device_differs="       + getDeviceDiffers()
                        + ", link_mismatch="        + getLinkMismatch()
                        + ", ownership_differs="    + getOwnershipDiffers()
                        + ", group_differs="        + getGroupDiffers()
                        + ", mtime_differs="        + getMtimeDiffers()
                        + ", capabilities_differ="  + getCapabilitiesDiffer()
                        + ", configuration_file="   + getConfigurationFile()
                        + ", documentation_file="   + getDocumentationFile()
                        + ", ghost_file="           + getGhostFile()
                        + ", license_file="         + getLicenseFile()
                        + ", readme_file="          + getReadmeFile()
             + "]";
    }
//
New to GrepCode? Check out our FAQ X