public interface ProductSerializer
Modifier and Type | Method and Description |
---|---|
QueryResponse |
deserialize(String xml)
Method to parse a full XML response document into a list of Product, References and Metadata objects.
|
String |
getMimeType()
Mime type of the documents generated by the specific implementation (XML, JSON etc.)
|
List<String> |
serialize(Product product,
boolean create)
Method to transform a CAS Product into one or more documents to be indexed by Solr.
|
List<String> |
serialize(String productId,
org.apache.oodt.cas.metadata.Metadata metadata,
boolean replace)
Method to transform a CAS Metadata object into one or more Solr "update" documents
(i.e.
|
List<String> |
serialize(String productId,
Reference rootReference,
List<Reference> references,
boolean replace)
Method to transform a CAS Product References object into one or more Solr "update" documents
(i.e.
|
List<String> serialize(Product product, boolean create)
product
- : the product to be indexedcreate:
- true to create a new product, false to update an existing one.List<String> serialize(String productId, org.apache.oodt.cas.metadata.Metadata metadata, boolean replace)
productId
- : the product unique identifiermetadata
- : the CAS metadata hash tablereplace
- : true to override the existing metadata values, false to add new values to the existing ones.
Existing metadata fields not contained in the hash are left unchanged.
Note: the special value Parameters.NULL is used to indicate that the corresponding key must be removed
(as the Metadata object cannot store null or empty lists).List<String> serialize(String productId, Reference rootReference, List<Reference> references, boolean replace)
productId
- rootReference
- : the product root reference, may be nullreferences
- : list of product references, may be emptyreplace
- : true to replace the existing references, false to add new references to the existing onesQueryResponse deserialize(String xml) throws CatalogException
xml
- : the Solr XML document to parse (input)Exception
CatalogException
String getMimeType()
Copyright © 1999-2016 Apache OODT. All Rights Reserved.