예제 #1
0
        public OnixDescriptiveDetail()
        {
            ProductComposition = -1;

            ProductForm            = ProductPackaging = AudienceCode = "";
            ProductFormDescription = CountryOfManufacture = "";
            EpubType          = EpubTypeVersion = EpubFormatDescription = EpubTypeNote = "";
            IllustrationsNote = NumberOfIllustrations = "";

            productContentTypeField = shortProductContentTypeField = new string[0];
            editionTypeField        = shortEditionTypeField = new string[0];
            productFormDetailField  = shortProductFormDetailField = new string[0];
            epubTechProtectionField = shortEpubTechProtectionField = new string[0];
            audienceField           = shortAudienceField = new OnixAudience[0];
            languageField           = shortLanguageField = new OnixLanguage[0];
            prodPartField           = shortProdPartField = new OnixProductPart[0];

            epubUsageConstraintField = shortEpubUsageConstraintField = new OnixEpubUsageConstraint[0];

            EditionNumber    = -1;
            EditionStatement = "";

            Measure       = new OnixMeasure[0];
            Collection    = new OnixCollection[0];
            TitleDetail   = new OnixTitleDetail();
            Contributor   = new OnixContributor[0];
            Extent        = new OnixExtent[0];
            Subject       = new OnixSubject[0];
            AudienceRange = new OnixAudienceRange[0];
        }
예제 #2
0
        public OnixMeasure GetMeasurement(int pnType, bool pbMetricPreferred = false)
        {
            OnixMeasure FoundMeasurement = new OnixMeasure();

            if ((DescriptiveDetail != null) &&
                (DescriptiveDetail.OnixMeasureList != null) &&
                (DescriptiveDetail.OnixMeasureList.Length > 0))
            {
                OnixMeasure[] MeasureList = DescriptiveDetail.OnixMeasureList;

                OnixMeasure MeasureType = null;

                MeasureType = MeasureList.Where(x => (x.MeasureType == pnType) && !x.IsMetricUnitType()).LastOrDefault();
                if (MeasureType != null)
                {
                    FoundMeasurement = MeasureType;
                }

                if ((MeasureType == null) || (MeasureType.Measurement == 0) || pbMetricPreferred)
                {
                    MeasureType = MeasureList.Where(x => (x.MeasureType == pnType) && x.IsMetricUnitType()).LastOrDefault();

                    if (MeasureType != null)
                    {
                        FoundMeasurement = MeasureType;
                    }
                }
            }

            return(FoundMeasurement);
        }
예제 #3
0
        public OnixMeasure GetMeasurement(int Type)
        {
            OnixMeasure FoundMeasurement = new OnixMeasure();

            if ((DescriptiveDetail != null) &&
                (DescriptiveDetail.Measure != null) &&
                (DescriptiveDetail.Measure.Length > 0))
            {
                OnixMeasure[] MeasureList = DescriptiveDetail.Measure;

                FoundMeasurement =
                    MeasureList.Where(x => x.MeasureType == Type).FirstOrDefault();
            }

            return(FoundMeasurement);
        }
        public OnixDescriptiveDetail()
        {
            ProductComposition = AudienceCode = -1;

            ProductForm            = "";
            ProductFormDescription = "";

            productContentTypeField = shortProductContentTypeField = new string[0];
            editionTypeField        = shortEditionTypeField = new string[0];

            EditionNumber = -1;
            Measure       = new OnixMeasure[0];
            Collection    = new OnixCollection[0];
            TitleDetail   = new OnixTitleDetail();
            Contributor   = new OnixContributor[0];
            Extent        = new OnixExtent[0];
            Subject       = new OnixSubject[0];
            AudienceRange = new OnixAudienceRange[0];
        }