Module jonix.common
Package com.tectonica.jonix.common
Interface JonixKeyedStruct<K extends Enum<K> & OnixCodelist>
- All Superinterfaces:
JonixStruct
- All Known Implementing Classes:
JonixAddresseeIdentifier
,JonixAffiliationIdentifier
,JonixAgentIdentifier
,JonixAncillaryContent
,JonixAudience
,JonixAVItemIdentifier
,JonixCollectionIdentifier
,JonixCollectionSequence
,JonixConferenceSponsorIdentifier
,JonixContentDate
,JonixContributorDate
,JonixCopyrightOwnerIdentifier
,JonixDiscountCoded
,JonixEpubLicenseDate
,JonixEpubLicenseExpression
,JonixEventIdentifier
,JonixEventSponsorIdentifier
,JonixExtent
,JonixFundingIdentifier
,JonixIllustrations
,JonixImprintIdentifier
,JonixInsertPoint
,JonixLanguage
,JonixLocationIdentifier
,JonixMarketDate
,JonixMeasure
,JonixMediaFile
,JonixNameIdentifier
,JonixOccurrenceDate
,JonixOtherText
,JonixParentIdentifier
,JonixPersonDate
,JonixPersonNameIdentifier
,JonixPriceCoded
,JonixPriceConditionQuantity
,JonixPriceDate
,JonixPriceIdentifier
,JonixPrizeIdentifier
,JonixProductClassification
,JonixProductContactIdentifier
,JonixProductFormFeature
,JonixProductIdentifier
,JonixPublisherIdentifier
,JonixPublishingDate
,JonixRecordSourceIdentifier
,JonixReligiousTextFeature
,JonixResourceFeature
,JonixResourceFileDate
,JonixResourceFileFeature
,JonixResourceIdentifier
,JonixResourceVersionFeature
,JonixReturnsConditions
,JonixSalesOutletIdentifier
,JonixSenderIdentifier
,JonixSeriesIdentifier
,JonixSpecificationFeature
,JonixStockQuantityCoded
,JonixSubjectDate
,JonixSupplierIdentifier
,JonixSupplierOwnCoding
,JonixSupplyContactIdentifier
,JonixSupplyDate
,JonixTextItemIdentifier
,JonixTitle
,JonixWorkIdentifier
Fundamental interface in
Jonix object model
, this interface completes
JonixStruct
by representing a Struct
that contains a key (i.e. mandatory, unique, and
searchable-by field).
The key is an enumerated type, and more specifically an OnixCodelist
.
To obtain Struct
from a keyed Data Composite invoke
OnixComposite.OnixDataComposite.asStruct()
.
To find a Struct
by its key, use any of the finder methods in ListOfOnixDataCompositeWithKey
.
For example, each ONIX Product may have several Product Identifiers (ISBN-10, ISBN-13, URN, etc.). To find a certain
identifier, say ISBN-13, you can look up its struct JonixProductIdentifier
by its key (of type
ProductIdentifierTypes
), and once having the struct, use it to get the requested value (the product
identifier, idValue
):
com.tectonica.jonix.onix2.Product product; ... ProductIdentifierTypes idType = ProductIdentifierTypes.ISBN_13; Optional<JonixProductIdentifier> pidStruct = product.productIdentifiers().findAsStruct(idType); String isbn13 = pidStruct.map(pi -> pi.idValue).orElse(null);
-
Method Summary
-
Method Details
-
key
K key()
-