index int64 | repo_id string | file_path string | content string |
|---|---|---|---|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/ObjectFactory.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.namespace.QName;
/**
* This object contains factory methods for each Java content interface and Java
* element interface generated in the am.ik.aws.apa.jaxws package.
* <p>
* An ObjectFactory allows you to programatically construct new instances of the
* Java representation for XML content. The Java representation of XML content
* can consist of schema derived interfaces and classes representing the binding
* of schema type definitions, element declarations and model groups. Factory
* methods for each of these are provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {
private final static QName _AudienceRating_QNAME = new QName(
"http://webservices.amazon.com/AWSECommerceService/2011-08-01",
"AudienceRating");
private final static QName _Condition_QNAME = new QName(
"http://webservices.amazon.com/AWSECommerceService/2011-08-01",
"Condition");
/**
* Create a new ObjectFactory that can be used to create new instances of
* schema derived classes for package: am.ik.aws.apa.jaxws
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link CartClear }
*
*/
public CartClear createCartClear() {
return new CartClear();
}
/**
* Create an instance of {@link OfferListing.AvailabilityAttributes }
*
*/
public OfferListing.AvailabilityAttributes createOfferListingAvailabilityAttributes() {
return new OfferListing.AvailabilityAttributes();
}
/**
* Create an instance of {@link ItemLookup }
*
*/
public ItemLookup createItemLookup() {
return new ItemLookup();
}
/**
* Create an instance of {@link CartItem }
*
*/
public CartItem createCartItem() {
return new CartItem();
}
/**
* Create an instance of {@link CartCreateRequest.Items.Item }
*
*/
public CartCreateRequest.Items.Item createCartCreateRequestItemsItem() {
return new CartCreateRequest.Items.Item();
}
/**
* Create an instance of {@link TopSellers.TopSeller }
*
*/
public TopSellers.TopSeller createTopSellersTopSeller() {
return new TopSellers.TopSeller();
}
/**
* Create an instance of {@link CartModifyResponse }
*
*/
public CartModifyResponse createCartModifyResponse() {
return new CartModifyResponse();
}
/**
* Create an instance of {@link am.ik.aws.apa.jaxws.Item.AlternateVersions }
*
*/
public am.ik.aws.apa.jaxws.Item.AlternateVersions createItemAlternateVersions() {
return new am.ik.aws.apa.jaxws.Item.AlternateVersions();
}
/**
* Create an instance of {@link SearchResultsMap.SearchIndex }
*
*/
public SearchResultsMap.SearchIndex createSearchResultsMapSearchIndex() {
return new SearchResultsMap.SearchIndex();
}
/**
* Create an instance of {@link RelatedItems }
*
*/
public RelatedItems createRelatedItems() {
return new RelatedItems();
}
/**
* Create an instance of {@link Promotion }
*
*/
public Promotion createPromotion() {
return new Promotion();
}
/**
* Create an instance of {@link Tracks.Disc }
*
*/
public Tracks.Disc createTracksDisc() {
return new Tracks.Disc();
}
/**
* Create an instance of {@link NonNegativeIntegerWithUnits }
*
*/
public NonNegativeIntegerWithUnits createNonNegativeIntegerWithUnits() {
return new NonNegativeIntegerWithUnits();
}
/**
* Create an instance of {@link CartItem.MetaData.KeyValuePair }
*
*/
public CartItem.MetaData.KeyValuePair createCartItemMetaDataKeyValuePair() {
return new CartItem.MetaData.KeyValuePair();
}
/**
* Create an instance of {@link ItemLinks }
*
*/
public ItemLinks createItemLinks() {
return new ItemLinks();
}
/**
* Create an instance of {@link LoyaltyPoints }
*
*/
public LoyaltyPoints createLoyaltyPoints() {
return new LoyaltyPoints();
}
/**
* Create an instance of {@link VariationAttribute }
*
*/
public VariationAttribute createVariationAttribute() {
return new VariationAttribute();
}
/**
* Create an instance of {@link Collections.Collection }
*
*/
public Collections.Collection createCollectionsCollection() {
return new Collections.Collection();
}
/**
* Create an instance of {@link Arguments }
*
*/
public Arguments createArguments() {
return new Arguments();
}
/**
* Create an instance of {@link Collections }
*
*/
public Collections createCollections() {
return new Collections();
}
/**
* Create an instance of {@link CartAddRequest }
*
*/
public CartAddRequest createCartAddRequest() {
return new CartAddRequest();
}
/**
* Create an instance of {@link TopItemSet }
*
*/
public TopItemSet createTopItemSet() {
return new TopItemSet();
}
/**
* Create an instance of {@link BrowseNodeLookup }
*
*/
public BrowseNodeLookup createBrowseNodeLookup() {
return new BrowseNodeLookup();
}
/**
* Create an instance of {@link HTTPHeaders.Header }
*
*/
public HTTPHeaders.Header createHTTPHeadersHeader() {
return new HTTPHeaders.Header();
}
/**
* Create an instance of {@link am.ik.aws.apa.jaxws.Item.ImageSets }
*
*/
public am.ik.aws.apa.jaxws.Item.ImageSets createItemImageSets() {
return new am.ik.aws.apa.jaxws.Item.ImageSets();
}
/**
* Create an instance of {@link SimilarityLookup }
*
*/
public SimilarityLookup createSimilarityLookup() {
return new SimilarityLookup();
}
/**
* Create an instance of
* {@link am.ik.aws.apa.jaxws.Item.AlternateVersions.AlternateVersion }
*
*/
public am.ik.aws.apa.jaxws.Item.AlternateVersions.AlternateVersion createItemAlternateVersionsAlternateVersion() {
return new am.ik.aws.apa.jaxws.Item.AlternateVersions.AlternateVersion();
}
/**
* Create an instance of {@link TopItemSet.TopItem }
*
*/
public TopItemSet.TopItem createTopItemSetTopItem() {
return new TopItemSet.TopItem();
}
/**
* Create an instance of {@link OperationRequest }
*
*/
public OperationRequest createOperationRequest() {
return new OperationRequest();
}
/**
* Create an instance of {@link ItemAttributes.PackageDimensions }
*
*/
public ItemAttributes.PackageDimensions createItemAttributesPackageDimensions() {
return new ItemAttributes.PackageDimensions();
}
/**
* Create an instance of {@link ItemAttributes }
*
*/
public ItemAttributes createItemAttributes() {
return new ItemAttributes();
}
/**
* Create an instance of {@link Variations }
*
*/
public Variations createVariations() {
return new Variations();
}
/**
* Create an instance of
* {@link am.ik.aws.apa.jaxws.Item.VariationAttributes }
*
*/
public am.ik.aws.apa.jaxws.Item.VariationAttributes createItemVariationAttributes() {
return new am.ik.aws.apa.jaxws.Item.VariationAttributes();
}
/**
* Create an instance of {@link CartCreateRequest.Items }
*
*/
public CartCreateRequest.Items createCartCreateRequestItems() {
return new CartCreateRequest.Items();
}
/**
* Create an instance of {@link BrowseNodes }
*
*/
public BrowseNodes createBrowseNodes() {
return new BrowseNodes();
}
/**
* Create an instance of {@link SimilarViewedProducts.SimilarViewedProduct }
*
*/
public SimilarViewedProducts.SimilarViewedProduct createSimilarViewedProductsSimilarViewedProduct() {
return new SimilarViewedProducts.SimilarViewedProduct();
}
/**
* Create an instance of {@link ItemSearch }
*
*/
public ItemSearch createItemSearch() {
return new ItemSearch();
}
/**
* Create an instance of {@link DecimalWithUnits }
*
*/
public DecimalWithUnits createDecimalWithUnits() {
return new DecimalWithUnits();
}
/**
* Create an instance of {@link Errors }
*
*/
public Errors createErrors() {
return new Errors();
}
/**
* Create an instance of {@link ItemAttributes.ItemDimensions }
*
*/
public ItemAttributes.ItemDimensions createItemAttributesItemDimensions() {
return new ItemAttributes.ItemDimensions();
}
/**
* Create an instance of {@link Collections.Collection.CollectionSummary }
*
*/
public Collections.Collection.CollectionSummary createCollectionsCollectionCollectionSummary() {
return new Collections.Collection.CollectionSummary();
}
/**
* Create an instance of {@link CartCreate }
*
*/
public CartCreate createCartCreate() {
return new CartCreate();
}
/**
* Create an instance of {@link EditorialReviews }
*
*/
public EditorialReviews createEditorialReviews() {
return new EditorialReviews();
}
/**
* Create an instance of {@link SearchBinSet }
*
*/
public SearchBinSet createSearchBinSet() {
return new SearchBinSet();
}
/**
* Create an instance of {@link Offers }
*
*/
public Offers createOffers() {
return new Offers();
}
/**
* Create an instance of {@link CartModify }
*
*/
public CartModify createCartModify() {
return new CartModify();
}
/**
* Create an instance of {@link BrowseNode.Ancestors }
*
*/
public BrowseNode.Ancestors createBrowseNodeAncestors() {
return new BrowseNode.Ancestors();
}
/**
* Create an instance of {@link CartCreateRequest.Items.Item.MetaData }
*
*/
public CartCreateRequest.Items.Item.MetaData createCartCreateRequestItemsItemMetaData() {
return new CartCreateRequest.Items.Item.MetaData();
}
/**
* Create an instance of {@link ItemSearchResponse }
*
*/
public ItemSearchResponse createItemSearchResponse() {
return new ItemSearchResponse();
}
/**
* Create an instance of {@link BrowseNode.Properties }
*
*/
public BrowseNode.Properties createBrowseNodeProperties() {
return new BrowseNode.Properties();
}
/**
* Create an instance of {@link Merchant }
*
*/
public Merchant createMerchant() {
return new Merchant();
}
/**
* Create an instance of {@link NewReleases }
*
*/
public NewReleases createNewReleases() {
return new NewReleases();
}
/**
* Create an instance of {@link Image }
*
*/
public Image createImage() {
return new Image();
}
/**
* Create an instance of {@link SearchBinSets }
*
*/
public SearchBinSets createSearchBinSets() {
return new SearchBinSets();
}
/**
* Create an instance of {@link ItemAttributes.CatalogNumberList }
*
*/
public ItemAttributes.CatalogNumberList createItemAttributesCatalogNumberList() {
return new ItemAttributes.CatalogNumberList();
}
/**
* Create an instance of {@link CartItem.MetaData }
*
*/
public CartItem.MetaData createCartItemMetaData() {
return new CartItem.MetaData();
}
/**
* Create an instance of {@link StringWithUnits }
*
*/
public StringWithUnits createStringWithUnits() {
return new StringWithUnits();
}
/**
* Create an instance of {@link OfferAttributes }
*
*/
public OfferAttributes createOfferAttributes() {
return new OfferAttributes();
}
/**
* Create an instance of {@link SimilarProducts.SimilarProduct }
*
*/
public SimilarProducts.SimilarProduct createSimilarProductsSimilarProduct() {
return new SimilarProducts.SimilarProduct();
}
/**
* Create an instance of {@link ItemAttributes.Languages }
*
*/
public ItemAttributes.Languages createItemAttributesLanguages() {
return new ItemAttributes.Languages();
}
/**
* Create an instance of {@link Arguments.Argument }
*
*/
public Arguments.Argument createArgumentsArgument() {
return new Arguments.Argument();
}
/**
* Create an instance of {@link CartAddRequest.Items.Item }
*
*/
public CartAddRequest.Items.Item createCartAddRequestItemsItem() {
return new CartAddRequest.Items.Item();
}
/**
* Create an instance of {@link Tracks.Disc.Track }
*
*/
public Tracks.Disc.Track createTracksDiscTrack() {
return new Tracks.Disc.Track();
}
/**
* Create an instance of {@link Property }
*
*/
public Property createProperty() {
return new Property();
}
/**
* Create an instance of {@link am.ik.aws.apa.jaxws.Item.Subjects }
*
*/
public am.ik.aws.apa.jaxws.Item.Subjects createItemSubjects() {
return new am.ik.aws.apa.jaxws.Item.Subjects();
}
/**
* Create an instance of {@link CartModifyRequest.Items.Item }
*
*/
public CartModifyRequest.Items.Item createCartModifyRequestItemsItem() {
return new CartModifyRequest.Items.Item();
}
/**
* Create an instance of {@link CartAddRequest.Items }
*
*/
public CartAddRequest.Items createCartAddRequestItems() {
return new CartAddRequest.Items();
}
/**
* Create an instance of {@link CartGet }
*
*/
public CartGet createCartGet() {
return new CartGet();
}
/**
* Create an instance of {@link CorrectedQuery }
*
*/
public CorrectedQuery createCorrectedQuery() {
return new CorrectedQuery();
}
/**
* Create an instance of {@link VariationSummary }
*
*/
public VariationSummary createVariationSummary() {
return new VariationSummary();
}
/**
* Create an instance of {@link ItemAttributes.EANList }
*
*/
public ItemAttributes.EANList createItemAttributesEANList() {
return new ItemAttributes.EANList();
}
/**
* Create an instance of
* {@link OtherCategoriesSimilarProducts.OtherCategoriesSimilarProduct }
*
*/
public OtherCategoriesSimilarProducts.OtherCategoriesSimilarProduct createOtherCategoriesSimilarProductsOtherCategoriesSimilarProduct() {
return new OtherCategoriesSimilarProducts.OtherCategoriesSimilarProduct();
}
/**
* Create an instance of {@link SimilarityLookupResponse }
*
*/
public SimilarityLookupResponse createSimilarityLookupResponse() {
return new SimilarityLookupResponse();
}
/**
* Create an instance of {@link HTTPHeaders }
*
*/
public HTTPHeaders createHTTPHeaders() {
return new HTTPHeaders();
}
/**
* Create an instance of {@link CartClearResponse }
*
*/
public CartClearResponse createCartClearResponse() {
return new CartClearResponse();
}
/**
* Create an instance of {@link NewReleases.NewRelease }
*
*/
public NewReleases.NewRelease createNewReleasesNewRelease() {
return new NewReleases.NewRelease();
}
/**
* Create an instance of {@link SimilarProducts }
*
*/
public SimilarProducts createSimilarProducts() {
return new SimilarProducts();
}
/**
* Create an instance of {@link ItemAttributes.Creator }
*
*/
public ItemAttributes.Creator createItemAttributesCreator() {
return new ItemAttributes.Creator();
}
/**
* Create an instance of {@link Price }
*
*/
public Price createPrice() {
return new Price();
}
/**
* Create an instance of {@link EditorialReview }
*
*/
public EditorialReview createEditorialReview() {
return new EditorialReview();
}
/**
* Create an instance of {@link Accessories.Accessory }
*
*/
public Accessories.Accessory createAccessoriesAccessory() {
return new Accessories.Accessory();
}
/**
* Create an instance of {@link VariationDimensions }
*
*/
public VariationDimensions createVariationDimensions() {
return new VariationDimensions();
}
/**
* Create an instance of {@link ItemAttributes.UPCList }
*
*/
public ItemAttributes.UPCList createItemAttributesUPCList() {
return new ItemAttributes.UPCList();
}
/**
* Create an instance of {@link SimilarViewedProducts }
*
*/
public SimilarViewedProducts createSimilarViewedProducts() {
return new SimilarViewedProducts();
}
/**
* Create an instance of {@link Collections.Collection.CollectionParent }
*
*/
public Collections.Collection.CollectionParent createCollectionsCollectionCollectionParent() {
return new Collections.Collection.CollectionParent();
}
/**
* Create an instance of {@link Bin }
*
*/
public Bin createBin() {
return new Bin();
}
/**
* Create an instance of {@link Errors.Error }
*
*/
public Errors.Error createErrorsError() {
return new Errors.Error();
}
/**
* Create an instance of {@link ItemLink }
*
*/
public ItemLink createItemLink() {
return new ItemLink();
}
/**
* Create an instance of {@link Accessories }
*
*/
public Accessories createAccessories() {
return new Accessories();
}
/**
* Create an instance of {@link ItemSearchRequest }
*
*/
public ItemSearchRequest createItemSearchRequest() {
return new ItemSearchRequest();
}
/**
* Create an instance of {@link CartAddResponse }
*
*/
public CartAddResponse createCartAddResponse() {
return new CartAddResponse();
}
/**
* Create an instance of {@link ItemLookupRequest }
*
*/
public ItemLookupRequest createItemLookupRequest() {
return new ItemLookupRequest();
}
/**
* Create an instance of {@link BrowseNode.Children }
*
*/
public BrowseNode.Children createBrowseNodeChildren() {
return new BrowseNode.Children();
}
/**
* Create an instance of {@link OfferSummary }
*
*/
public OfferSummary createOfferSummary() {
return new OfferSummary();
}
/**
* Create an instance of {@link CartModifyRequest.Items }
*
*/
public CartModifyRequest.Items createCartModifyRequestItems() {
return new CartModifyRequest.Items();
}
/**
* Create an instance of {@link am.ik.aws.apa.jaxws.Item }
*
*/
public am.ik.aws.apa.jaxws.Item createItem() {
return new am.ik.aws.apa.jaxws.Item();
}
/**
* Create an instance of {@link am.ik.aws.apa.jaxws.Items }
*
*/
public am.ik.aws.apa.jaxws.Items createItems() {
return new am.ik.aws.apa.jaxws.Items();
}
/**
* Create an instance of {@link BrowseNodeLookupRequest }
*
*/
public BrowseNodeLookupRequest createBrowseNodeLookupRequest() {
return new BrowseNodeLookupRequest();
}
/**
* Create an instance of {@link CartCreateRequest }
*
*/
public CartCreateRequest createCartCreateRequest() {
return new CartCreateRequest();
}
/**
* Create an instance of {@link CartClearRequest }
*
*/
public CartClearRequest createCartClearRequest() {
return new CartClearRequest();
}
/**
* Create an instance of {@link BrowseNodeLookupResponse }
*
*/
public BrowseNodeLookupResponse createBrowseNodeLookupResponse() {
return new BrowseNodeLookupResponse();
}
/**
* Create an instance of {@link RelatedItem }
*
*/
public RelatedItem createRelatedItem() {
return new RelatedItem();
}
/**
* Create an instance of {@link Cart }
*
*/
public Cart createCart() {
return new Cart();
}
/**
* Create an instance of {@link SavedForLaterItems }
*
*/
public SavedForLaterItems createSavedForLaterItems() {
return new SavedForLaterItems();
}
/**
* Create an instance of {@link TopSellers }
*
*/
public TopSellers createTopSellers() {
return new TopSellers();
}
/**
* Create an instance of {@link Promotions }
*
*/
public Promotions createPromotions() {
return new Promotions();
}
/**
* Create an instance of {@link Offer }
*
*/
public Offer createOffer() {
return new Offer();
}
/**
* Create an instance of {@link Bin.BinParameter }
*
*/
public Bin.BinParameter createBinBinParameter() {
return new Bin.BinParameter();
}
/**
* Create an instance of {@link SearchResultsMap }
*
*/
public SearchResultsMap createSearchResultsMap() {
return new SearchResultsMap();
}
/**
* Create an instance of {@link Tracks }
*
*/
public Tracks createTracks() {
return new Tracks();
}
/**
* Create an instance of {@link CartModifyRequest }
*
*/
public CartModifyRequest createCartModifyRequest() {
return new CartModifyRequest();
}
/**
* Create an instance of {@link BrowseNode }
*
*/
public BrowseNode createBrowseNode() {
return new BrowseNode();
}
/**
* Create an instance of {@link SimilarityLookupRequest }
*
*/
public SimilarityLookupRequest createSimilarityLookupRequest() {
return new SimilarityLookupRequest();
}
/**
* Create an instance of {@link ImageSet }
*
*/
public ImageSet createImageSet() {
return new ImageSet();
}
/**
* Create an instance of {@link Request }
*
*/
public Request createRequest() {
return new Request();
}
/**
* Create an instance of {@link CartCreateResponse }
*
*/
public CartCreateResponse createCartCreateResponse() {
return new CartCreateResponse();
}
/**
* Create an instance of {@link OtherCategoriesSimilarProducts }
*
*/
public OtherCategoriesSimilarProducts createOtherCategoriesSimilarProducts() {
return new OtherCategoriesSimilarProducts();
}
/**
* Create an instance of {@link CartGetRequest }
*
*/
public CartGetRequest createCartGetRequest() {
return new CartGetRequest();
}
/**
* Create an instance of {@link ItemLookupResponse }
*
*/
public ItemLookupResponse createItemLookupResponse() {
return new ItemLookupResponse();
}
/**
* Create an instance of {@link CartAdd }
*
*/
public CartAdd createCartAdd() {
return new CartAdd();
}
/**
* Create an instance of {@link Promotion.Summary }
*
*/
public Promotion.Summary createPromotionSummary() {
return new Promotion.Summary();
}
/**
* Create an instance of {@link CustomerReviews }
*
*/
public CustomerReviews createCustomerReviews() {
return new CustomerReviews();
}
/**
* Create an instance of {@link OfferListing }
*
*/
public OfferListing createOfferListing() {
return new OfferListing();
}
/**
* Create an instance of {@link ItemAttributes.Languages.Language }
*
*/
public ItemAttributes.Languages.Language createItemAttributesLanguagesLanguage() {
return new ItemAttributes.Languages.Language();
}
/**
* Create an instance of {@link Collections.Collection.CollectionItem }
*
*/
public Collections.Collection.CollectionItem createCollectionsCollectionCollectionItem() {
return new Collections.Collection.CollectionItem();
}
/**
* Create an instance of {@link CartGetResponse }
*
*/
public CartGetResponse createCartGetResponse() {
return new CartGetResponse();
}
/**
* Create an instance of {@link CartItems }
*
*/
public CartItems createCartItems() {
return new CartItems();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
@XmlElementDecl(namespace = "http://webservices.amazon.com/AWSECommerceService/2011-08-01", name = "AudienceRating")
public JAXBElement<String> createAudienceRating(String value) {
return new JAXBElement<String>(_AudienceRating_QNAME, String.class,
null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
@XmlElementDecl(namespace = "http://webservices.amazon.com/AWSECommerceService/2011-08-01", name = "Condition")
public JAXBElement<String> createCondition(String value) {
return new JAXBElement<String>(_Condition_QNAME, String.class, null,
value);
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/Offer.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Merchant" minOccurs="0"/>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}OfferAttributes" minOccurs="0"/>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}OfferListing" maxOccurs="unbounded" minOccurs="0"/>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}LoyaltyPoints" minOccurs="0"/>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Promotions" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "merchant", "offerAttributes",
"offerListing", "loyaltyPoints", "promotions" })
@XmlRootElement(name = "Offer")
public class Offer {
@XmlElement(name = "Merchant")
protected Merchant merchant;
@XmlElement(name = "OfferAttributes")
protected OfferAttributes offerAttributes;
@XmlElement(name = "OfferListing")
protected List<OfferListing> offerListing;
@XmlElement(name = "LoyaltyPoints")
protected LoyaltyPoints loyaltyPoints;
@XmlElement(name = "Promotions")
protected Promotions promotions;
/**
* Gets the value of the merchant property.
*
* @return possible object is {@link Merchant }
*
*/
public Merchant getMerchant() {
return merchant;
}
/**
* Sets the value of the merchant property.
*
* @param value
* allowed object is {@link Merchant }
*
*/
public void setMerchant(Merchant value) {
this.merchant = value;
}
/**
* Gets the value of the offerAttributes property.
*
* @return possible object is {@link OfferAttributes }
*
*/
public OfferAttributes getOfferAttributes() {
return offerAttributes;
}
/**
* Sets the value of the offerAttributes property.
*
* @param value
* allowed object is {@link OfferAttributes }
*
*/
public void setOfferAttributes(OfferAttributes value) {
this.offerAttributes = value;
}
/**
* Gets the value of the offerListing property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the offerListing property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getOfferListing().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link OfferListing }
*
*
*/
public List<OfferListing> getOfferListing() {
if (offerListing == null) {
offerListing = new ArrayList<OfferListing>();
}
return this.offerListing;
}
/**
* Gets the value of the loyaltyPoints property.
*
* @return possible object is {@link LoyaltyPoints }
*
*/
public LoyaltyPoints getLoyaltyPoints() {
return loyaltyPoints;
}
/**
* Sets the value of the loyaltyPoints property.
*
* @param value
* allowed object is {@link LoyaltyPoints }
*
*/
public void setLoyaltyPoints(LoyaltyPoints value) {
this.loyaltyPoints = value;
}
/**
* Gets the value of the promotions property.
*
* @return possible object is {@link Promotions }
*
*/
public Promotions getPromotions() {
return promotions;
}
/**
* Sets the value of the promotions property.
*
* @param value
* allowed object is {@link Promotions }
*
*/
public void setPromotions(Promotions value) {
this.promotions = value;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/OfferAttributes.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Condition" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "condition" })
@XmlRootElement(name = "OfferAttributes")
public class OfferAttributes {
@XmlElement(name = "Condition")
protected String condition;
/**
* Gets the value of the condition property.
*
* @return possible object is {@link String }
*
*/
public String getCondition() {
return condition;
}
/**
* Sets the value of the condition property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setCondition(String value) {
this.condition = value;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/OfferListing.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="OfferListingId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Price" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Price" minOccurs="0"/>
* <element name="SalePrice" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Price" minOccurs="0"/>
* <element name="AmountSaved" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Price" minOccurs="0"/>
* <element name="PercentageSaved" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" minOccurs="0"/>
* <element name="Availability" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="AvailabilityAttributes" minOccurs="0">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="AvailabilityType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="IsPreorder" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* <element name="MinimumHours" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
* <element name="MaximumHours" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* <element name="IsEligibleForSuperSaverShipping" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* <element name="IsEligibleForPrime" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "offerListingId", "price", "salePrice",
"amountSaved", "percentageSaved", "availability",
"availabilityAttributes", "isEligibleForSuperSaverShipping",
"isEligibleForPrime" })
@XmlRootElement(name = "OfferListing")
public class OfferListing {
@XmlElement(name = "OfferListingId")
protected String offerListingId;
@XmlElement(name = "Price")
protected Price price;
@XmlElement(name = "SalePrice")
protected Price salePrice;
@XmlElement(name = "AmountSaved")
protected Price amountSaved;
@XmlElement(name = "PercentageSaved")
@XmlSchemaType(name = "nonNegativeInteger")
protected BigInteger percentageSaved;
@XmlElement(name = "Availability")
protected String availability;
@XmlElement(name = "AvailabilityAttributes")
protected OfferListing.AvailabilityAttributes availabilityAttributes;
@XmlElement(name = "IsEligibleForSuperSaverShipping")
protected Boolean isEligibleForSuperSaverShipping;
@XmlElement(name = "IsEligibleForPrime")
protected Boolean isEligibleForPrime;
/**
* Gets the value of the offerListingId property.
*
* @return possible object is {@link String }
*
*/
public String getOfferListingId() {
return offerListingId;
}
/**
* Sets the value of the offerListingId property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setOfferListingId(String value) {
this.offerListingId = value;
}
/**
* Gets the value of the price property.
*
* @return possible object is {@link Price }
*
*/
public Price getPrice() {
return price;
}
/**
* Sets the value of the price property.
*
* @param value
* allowed object is {@link Price }
*
*/
public void setPrice(Price value) {
this.price = value;
}
/**
* Gets the value of the salePrice property.
*
* @return possible object is {@link Price }
*
*/
public Price getSalePrice() {
return salePrice;
}
/**
* Sets the value of the salePrice property.
*
* @param value
* allowed object is {@link Price }
*
*/
public void setSalePrice(Price value) {
this.salePrice = value;
}
/**
* Gets the value of the amountSaved property.
*
* @return possible object is {@link Price }
*
*/
public Price getAmountSaved() {
return amountSaved;
}
/**
* Sets the value of the amountSaved property.
*
* @param value
* allowed object is {@link Price }
*
*/
public void setAmountSaved(Price value) {
this.amountSaved = value;
}
/**
* Gets the value of the percentageSaved property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getPercentageSaved() {
return percentageSaved;
}
/**
* Sets the value of the percentageSaved property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setPercentageSaved(BigInteger value) {
this.percentageSaved = value;
}
/**
* Gets the value of the availability property.
*
* @return possible object is {@link String }
*
*/
public String getAvailability() {
return availability;
}
/**
* Sets the value of the availability property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setAvailability(String value) {
this.availability = value;
}
/**
* Gets the value of the availabilityAttributes property.
*
* @return possible object is {@link OfferListing.AvailabilityAttributes }
*
*/
public OfferListing.AvailabilityAttributes getAvailabilityAttributes() {
return availabilityAttributes;
}
/**
* Sets the value of the availabilityAttributes property.
*
* @param value
* allowed object is {@link OfferListing.AvailabilityAttributes }
*
*/
public void setAvailabilityAttributes(
OfferListing.AvailabilityAttributes value) {
this.availabilityAttributes = value;
}
/**
* Gets the value of the isEligibleForSuperSaverShipping property.
*
* @return possible object is {@link Boolean }
*
*/
public Boolean isIsEligibleForSuperSaverShipping() {
return isEligibleForSuperSaverShipping;
}
/**
* Sets the value of the isEligibleForSuperSaverShipping property.
*
* @param value
* allowed object is {@link Boolean }
*
*/
public void setIsEligibleForSuperSaverShipping(Boolean value) {
this.isEligibleForSuperSaverShipping = value;
}
/**
* Gets the value of the isEligibleForPrime property.
*
* @return possible object is {@link Boolean }
*
*/
public Boolean isIsEligibleForPrime() {
return isEligibleForPrime;
}
/**
* Sets the value of the isEligibleForPrime property.
*
* @param value
* allowed object is {@link Boolean }
*
*/
public void setIsEligibleForPrime(Boolean value) {
this.isEligibleForPrime = value;
}
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained
* within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="AvailabilityType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="IsPreorder" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* <element name="MinimumHours" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
* <element name="MaximumHours" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "availabilityType", "isPreorder",
"minimumHours", "maximumHours" })
public static class AvailabilityAttributes {
@XmlElement(name = "AvailabilityType")
protected String availabilityType;
@XmlElement(name = "IsPreorder")
protected Boolean isPreorder;
@XmlElement(name = "MinimumHours")
protected BigInteger minimumHours;
@XmlElement(name = "MaximumHours")
protected BigInteger maximumHours;
/**
* Gets the value of the availabilityType property.
*
* @return possible object is {@link String }
*
*/
public String getAvailabilityType() {
return availabilityType;
}
/**
* Sets the value of the availabilityType property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setAvailabilityType(String value) {
this.availabilityType = value;
}
/**
* Gets the value of the isPreorder property.
*
* @return possible object is {@link Boolean }
*
*/
public Boolean isIsPreorder() {
return isPreorder;
}
/**
* Sets the value of the isPreorder property.
*
* @param value
* allowed object is {@link Boolean }
*
*/
public void setIsPreorder(Boolean value) {
this.isPreorder = value;
}
/**
* Gets the value of the minimumHours property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getMinimumHours() {
return minimumHours;
}
/**
* Sets the value of the minimumHours property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setMinimumHours(BigInteger value) {
this.minimumHours = value;
}
/**
* Gets the value of the maximumHours property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getMaximumHours() {
return maximumHours;
}
/**
* Sets the value of the maximumHours property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setMaximumHours(BigInteger value) {
this.maximumHours = value;
}
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/OfferSummary.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="LowestNewPrice" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Price" minOccurs="0"/>
* <element name="LowestUsedPrice" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Price" minOccurs="0"/>
* <element name="LowestCollectiblePrice" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Price" minOccurs="0"/>
* <element name="LowestRefurbishedPrice" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Price" minOccurs="0"/>
* <element name="TotalNew" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="TotalUsed" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="TotalCollectible" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="TotalRefurbished" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "lowestNewPrice", "lowestUsedPrice",
"lowestCollectiblePrice", "lowestRefurbishedPrice", "totalNew",
"totalUsed", "totalCollectible", "totalRefurbished" })
@XmlRootElement(name = "OfferSummary")
public class OfferSummary {
@XmlElement(name = "LowestNewPrice")
protected Price lowestNewPrice;
@XmlElement(name = "LowestUsedPrice")
protected Price lowestUsedPrice;
@XmlElement(name = "LowestCollectiblePrice")
protected Price lowestCollectiblePrice;
@XmlElement(name = "LowestRefurbishedPrice")
protected Price lowestRefurbishedPrice;
@XmlElement(name = "TotalNew")
protected String totalNew;
@XmlElement(name = "TotalUsed")
protected String totalUsed;
@XmlElement(name = "TotalCollectible")
protected String totalCollectible;
@XmlElement(name = "TotalRefurbished")
protected String totalRefurbished;
/**
* Gets the value of the lowestNewPrice property.
*
* @return possible object is {@link Price }
*
*/
public Price getLowestNewPrice() {
return lowestNewPrice;
}
/**
* Sets the value of the lowestNewPrice property.
*
* @param value
* allowed object is {@link Price }
*
*/
public void setLowestNewPrice(Price value) {
this.lowestNewPrice = value;
}
/**
* Gets the value of the lowestUsedPrice property.
*
* @return possible object is {@link Price }
*
*/
public Price getLowestUsedPrice() {
return lowestUsedPrice;
}
/**
* Sets the value of the lowestUsedPrice property.
*
* @param value
* allowed object is {@link Price }
*
*/
public void setLowestUsedPrice(Price value) {
this.lowestUsedPrice = value;
}
/**
* Gets the value of the lowestCollectiblePrice property.
*
* @return possible object is {@link Price }
*
*/
public Price getLowestCollectiblePrice() {
return lowestCollectiblePrice;
}
/**
* Sets the value of the lowestCollectiblePrice property.
*
* @param value
* allowed object is {@link Price }
*
*/
public void setLowestCollectiblePrice(Price value) {
this.lowestCollectiblePrice = value;
}
/**
* Gets the value of the lowestRefurbishedPrice property.
*
* @return possible object is {@link Price }
*
*/
public Price getLowestRefurbishedPrice() {
return lowestRefurbishedPrice;
}
/**
* Sets the value of the lowestRefurbishedPrice property.
*
* @param value
* allowed object is {@link Price }
*
*/
public void setLowestRefurbishedPrice(Price value) {
this.lowestRefurbishedPrice = value;
}
/**
* Gets the value of the totalNew property.
*
* @return possible object is {@link String }
*
*/
public String getTotalNew() {
return totalNew;
}
/**
* Sets the value of the totalNew property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setTotalNew(String value) {
this.totalNew = value;
}
/**
* Gets the value of the totalUsed property.
*
* @return possible object is {@link String }
*
*/
public String getTotalUsed() {
return totalUsed;
}
/**
* Sets the value of the totalUsed property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setTotalUsed(String value) {
this.totalUsed = value;
}
/**
* Gets the value of the totalCollectible property.
*
* @return possible object is {@link String }
*
*/
public String getTotalCollectible() {
return totalCollectible;
}
/**
* Sets the value of the totalCollectible property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setTotalCollectible(String value) {
this.totalCollectible = value;
}
/**
* Gets the value of the totalRefurbished property.
*
* @return possible object is {@link String }
*
*/
public String getTotalRefurbished() {
return totalRefurbished;
}
/**
* Sets the value of the totalRefurbished property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setTotalRefurbished(String value) {
this.totalRefurbished = value;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/Offers.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="TotalOffers" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" minOccurs="0"/>
* <element name="TotalOfferPages" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" minOccurs="0"/>
* <element name="MoreOffersUrl" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Offer" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "totalOffers", "totalOfferPages",
"moreOffersUrl", "offer" })
@XmlRootElement(name = "Offers")
public class Offers {
@XmlElement(name = "TotalOffers")
@XmlSchemaType(name = "nonNegativeInteger")
protected BigInteger totalOffers;
@XmlElement(name = "TotalOfferPages")
@XmlSchemaType(name = "nonNegativeInteger")
protected BigInteger totalOfferPages;
@XmlElement(name = "MoreOffersUrl")
protected String moreOffersUrl;
@XmlElement(name = "Offer")
protected List<Offer> offer;
/**
* Gets the value of the totalOffers property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getTotalOffers() {
return totalOffers;
}
/**
* Sets the value of the totalOffers property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setTotalOffers(BigInteger value) {
this.totalOffers = value;
}
/**
* Gets the value of the totalOfferPages property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getTotalOfferPages() {
return totalOfferPages;
}
/**
* Sets the value of the totalOfferPages property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setTotalOfferPages(BigInteger value) {
this.totalOfferPages = value;
}
/**
* Gets the value of the moreOffersUrl property.
*
* @return possible object is {@link String }
*
*/
public String getMoreOffersUrl() {
return moreOffersUrl;
}
/**
* Sets the value of the moreOffersUrl property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setMoreOffersUrl(String value) {
this.moreOffersUrl = value;
}
/**
* Gets the value of the offer property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the offer property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getOffer().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link Offer }
*
*
*/
public List<Offer> getOffer() {
if (offer == null) {
offer = new ArrayList<Offer>();
}
return this.offer;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/OperationRequest.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}HTTPHeaders" minOccurs="0"/>
* <element name="RequestId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Arguments" minOccurs="0"/>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Errors" minOccurs="0"/>
* <element name="RequestProcessingTime" type="{http://www.w3.org/2001/XMLSchema}float" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "httpHeaders", "requestId", "arguments",
"errors", "requestProcessingTime" })
@XmlRootElement(name = "OperationRequest")
public class OperationRequest {
@XmlElement(name = "HTTPHeaders")
protected HTTPHeaders httpHeaders;
@XmlElement(name = "RequestId")
protected String requestId;
@XmlElement(name = "Arguments")
protected Arguments arguments;
@XmlElement(name = "Errors")
protected Errors errors;
@XmlElement(name = "RequestProcessingTime")
protected Float requestProcessingTime;
/**
* Gets the value of the httpHeaders property.
*
* @return possible object is {@link HTTPHeaders }
*
*/
public HTTPHeaders getHTTPHeaders() {
return httpHeaders;
}
/**
* Sets the value of the httpHeaders property.
*
* @param value
* allowed object is {@link HTTPHeaders }
*
*/
public void setHTTPHeaders(HTTPHeaders value) {
this.httpHeaders = value;
}
/**
* Gets the value of the requestId property.
*
* @return possible object is {@link String }
*
*/
public String getRequestId() {
return requestId;
}
/**
* Sets the value of the requestId property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setRequestId(String value) {
this.requestId = value;
}
/**
* Gets the value of the arguments property.
*
* @return possible object is {@link Arguments }
*
*/
public Arguments getArguments() {
return arguments;
}
/**
* Sets the value of the arguments property.
*
* @param value
* allowed object is {@link Arguments }
*
*/
public void setArguments(Arguments value) {
this.arguments = value;
}
/**
* Gets the value of the errors property.
*
* @return possible object is {@link Errors }
*
*/
public Errors getErrors() {
return errors;
}
/**
* Sets the value of the errors property.
*
* @param value
* allowed object is {@link Errors }
*
*/
public void setErrors(Errors value) {
this.errors = value;
}
/**
* Gets the value of the requestProcessingTime property.
*
* @return possible object is {@link Float }
*
*/
public Float getRequestProcessingTime() {
return requestProcessingTime;
}
/**
* Sets the value of the requestProcessingTime property.
*
* @param value
* allowed object is {@link Float }
*
*/
public void setRequestProcessingTime(Float value) {
this.requestProcessingTime = value;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/OtherCategoriesSimilarProducts.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="OtherCategoriesSimilarProduct" maxOccurs="unbounded">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "otherCategoriesSimilarProduct" })
@XmlRootElement(name = "OtherCategoriesSimilarProducts")
public class OtherCategoriesSimilarProducts {
@XmlElement(name = "OtherCategoriesSimilarProduct", required = true)
protected List<OtherCategoriesSimilarProducts.OtherCategoriesSimilarProduct> otherCategoriesSimilarProduct;
/**
* Gets the value of the otherCategoriesSimilarProduct property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the otherCategoriesSimilarProduct property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getOtherCategoriesSimilarProduct().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link OtherCategoriesSimilarProducts.OtherCategoriesSimilarProduct }
*
*
*/
public List<OtherCategoriesSimilarProducts.OtherCategoriesSimilarProduct> getOtherCategoriesSimilarProduct() {
if (otherCategoriesSimilarProduct == null) {
otherCategoriesSimilarProduct = new ArrayList<OtherCategoriesSimilarProducts.OtherCategoriesSimilarProduct>();
}
return this.otherCategoriesSimilarProduct;
}
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained
* within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "asin", "title" })
public static class OtherCategoriesSimilarProduct {
@XmlElement(name = "ASIN")
protected String asin;
@XmlElement(name = "Title")
protected String title;
/**
* Gets the value of the asin property.
*
* @return possible object is {@link String }
*
*/
public String getASIN() {
return asin;
}
/**
* Sets the value of the asin property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setASIN(String value) {
this.asin = value;
}
/**
* Gets the value of the title property.
*
* @return possible object is {@link String }
*
*/
public String getTitle() {
return title;
}
/**
* Sets the value of the title property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setTitle(String value) {
this.title = value;
}
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/Price.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for Price complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType name="Price">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Amount" type="{http://www.w3.org/2001/XMLSchema}integer" minOccurs="0"/>
* <element name="CurrencyCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="FormattedPrice" type="{http://www.w3.org/2001/XMLSchema}string"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Price", propOrder = { "amount", "currencyCode",
"formattedPrice" })
public class Price {
@XmlElement(name = "Amount")
protected BigInteger amount;
@XmlElement(name = "CurrencyCode")
protected String currencyCode;
@XmlElement(name = "FormattedPrice", required = true)
protected String formattedPrice;
/**
* Gets the value of the amount property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getAmount() {
return amount;
}
/**
* Sets the value of the amount property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setAmount(BigInteger value) {
this.amount = value;
}
/**
* Gets the value of the currencyCode property.
*
* @return possible object is {@link String }
*
*/
public String getCurrencyCode() {
return currencyCode;
}
/**
* Sets the value of the currencyCode property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setCurrencyCode(String value) {
this.currencyCode = value;
}
/**
* Gets the value of the formattedPrice property.
*
* @return possible object is {@link String }
*
*/
public String getFormattedPrice() {
return formattedPrice;
}
/**
* Sets the value of the formattedPrice property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setFormattedPrice(String value) {
this.formattedPrice = value;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/Promotion.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Summary" minOccurs="0">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="PromotionId" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="Category" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="StartDate" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="EndDate" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="EligibilityRequirementDescription" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="BenefitDescription" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="TermsAndConditions" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "summary" })
@XmlRootElement(name = "Promotion")
public class Promotion {
@XmlElement(name = "Summary")
protected Promotion.Summary summary;
/**
* Gets the value of the summary property.
*
* @return possible object is {@link Promotion.Summary }
*
*/
public Promotion.Summary getSummary() {
return summary;
}
/**
* Sets the value of the summary property.
*
* @param value
* allowed object is {@link Promotion.Summary }
*
*/
public void setSummary(Promotion.Summary value) {
this.summary = value;
}
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained
* within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="PromotionId" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="Category" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="StartDate" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="EndDate" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="EligibilityRequirementDescription" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="BenefitDescription" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="TermsAndConditions" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "promotionId", "category", "startDate",
"endDate", "eligibilityRequirementDescription",
"benefitDescription", "termsAndConditions" })
public static class Summary {
@XmlElement(name = "PromotionId", required = true)
protected String promotionId;
@XmlElement(name = "Category")
protected String category;
@XmlElement(name = "StartDate")
protected String startDate;
@XmlElement(name = "EndDate")
protected String endDate;
@XmlElement(name = "EligibilityRequirementDescription")
protected String eligibilityRequirementDescription;
@XmlElement(name = "BenefitDescription")
protected String benefitDescription;
@XmlElement(name = "TermsAndConditions")
protected String termsAndConditions;
/**
* Gets the value of the promotionId property.
*
* @return possible object is {@link String }
*
*/
public String getPromotionId() {
return promotionId;
}
/**
* Sets the value of the promotionId property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setPromotionId(String value) {
this.promotionId = value;
}
/**
* Gets the value of the category property.
*
* @return possible object is {@link String }
*
*/
public String getCategory() {
return category;
}
/**
* Sets the value of the category property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setCategory(String value) {
this.category = value;
}
/**
* Gets the value of the startDate property.
*
* @return possible object is {@link String }
*
*/
public String getStartDate() {
return startDate;
}
/**
* Sets the value of the startDate property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setStartDate(String value) {
this.startDate = value;
}
/**
* Gets the value of the endDate property.
*
* @return possible object is {@link String }
*
*/
public String getEndDate() {
return endDate;
}
/**
* Sets the value of the endDate property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setEndDate(String value) {
this.endDate = value;
}
/**
* Gets the value of the eligibilityRequirementDescription property.
*
* @return possible object is {@link String }
*
*/
public String getEligibilityRequirementDescription() {
return eligibilityRequirementDescription;
}
/**
* Sets the value of the eligibilityRequirementDescription property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setEligibilityRequirementDescription(String value) {
this.eligibilityRequirementDescription = value;
}
/**
* Gets the value of the benefitDescription property.
*
* @return possible object is {@link String }
*
*/
public String getBenefitDescription() {
return benefitDescription;
}
/**
* Sets the value of the benefitDescription property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setBenefitDescription(String value) {
this.benefitDescription = value;
}
/**
* Gets the value of the termsAndConditions property.
*
* @return possible object is {@link String }
*
*/
public String getTermsAndConditions() {
return termsAndConditions;
}
/**
* Sets the value of the termsAndConditions property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setTermsAndConditions(String value) {
this.termsAndConditions = value;
}
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/Promotions.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Promotion" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "promotion" })
@XmlRootElement(name = "Promotions")
public class Promotions {
@XmlElement(name = "Promotion")
protected List<Promotion> promotion;
/**
* Gets the value of the promotion property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the promotion property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getPromotion().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Promotion }
*
*
*/
public List<Promotion> getPromotion() {
if (promotion == null) {
promotion = new ArrayList<Promotion>();
}
return this.promotion;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/Property.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "name", "value" })
@XmlRootElement(name = "Property")
public class Property {
@XmlElement(name = "Name")
protected String name;
@XmlElement(name = "Value")
protected String value;
/**
* Gets the value of the name property.
*
* @return possible object is {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the value property.
*
* @return possible object is {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/RelatedItem.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Item" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "item" })
@XmlRootElement(name = "RelatedItem")
public class RelatedItem {
@XmlElement(name = "Item")
protected Item item;
/**
* Gets the value of the item property.
*
* @return possible object is {@link Item }
*
*/
public Item getItem() {
return item;
}
/**
* Sets the value of the item property.
*
* @param value
* allowed object is {@link Item }
*
*/
public void setItem(Item value) {
this.item = value;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/RelatedItems.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Relationship" minOccurs="0">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="Parents"/>
* <enumeration value="Children"/>
* </restriction>
* </simpleType>
* </element>
* <element name="RelationshipType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="RelatedItemCount" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" minOccurs="0"/>
* <element name="RelatedItemPageCount" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" minOccurs="0"/>
* <element name="RelatedItemPage" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" minOccurs="0"/>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}RelatedItem" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "relationship", "relationshipType",
"relatedItemCount", "relatedItemPageCount", "relatedItemPage",
"relatedItem" })
@XmlRootElement(name = "RelatedItems")
public class RelatedItems {
@XmlElement(name = "Relationship")
protected String relationship;
@XmlElement(name = "RelationshipType")
protected String relationshipType;
@XmlElement(name = "RelatedItemCount")
@XmlSchemaType(name = "nonNegativeInteger")
protected BigInteger relatedItemCount;
@XmlElement(name = "RelatedItemPageCount")
@XmlSchemaType(name = "nonNegativeInteger")
protected BigInteger relatedItemPageCount;
@XmlElement(name = "RelatedItemPage")
@XmlSchemaType(name = "nonNegativeInteger")
protected BigInteger relatedItemPage;
@XmlElement(name = "RelatedItem")
protected List<RelatedItem> relatedItem;
/**
* Gets the value of the relationship property.
*
* @return possible object is {@link String }
*
*/
public String getRelationship() {
return relationship;
}
/**
* Sets the value of the relationship property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setRelationship(String value) {
this.relationship = value;
}
/**
* Gets the value of the relationshipType property.
*
* @return possible object is {@link String }
*
*/
public String getRelationshipType() {
return relationshipType;
}
/**
* Sets the value of the relationshipType property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setRelationshipType(String value) {
this.relationshipType = value;
}
/**
* Gets the value of the relatedItemCount property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getRelatedItemCount() {
return relatedItemCount;
}
/**
* Sets the value of the relatedItemCount property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setRelatedItemCount(BigInteger value) {
this.relatedItemCount = value;
}
/**
* Gets the value of the relatedItemPageCount property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getRelatedItemPageCount() {
return relatedItemPageCount;
}
/**
* Sets the value of the relatedItemPageCount property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setRelatedItemPageCount(BigInteger value) {
this.relatedItemPageCount = value;
}
/**
* Gets the value of the relatedItemPage property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getRelatedItemPage() {
return relatedItemPage;
}
/**
* Sets the value of the relatedItemPage property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setRelatedItemPage(BigInteger value) {
this.relatedItemPage = value;
}
/**
* Gets the value of the relatedItem property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the relatedItem property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getRelatedItem().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link RelatedItem }
*
*
*/
public List<RelatedItem> getRelatedItem() {
if (relatedItem == null) {
relatedItem = new ArrayList<RelatedItem>();
}
return this.relatedItem;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/Request.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="IsValid" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="BrowseNodeLookupRequest" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}BrowseNodeLookupRequest" minOccurs="0"/>
* <element name="ItemSearchRequest" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}ItemSearchRequest" minOccurs="0"/>
* <element name="ItemLookupRequest" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}ItemLookupRequest" minOccurs="0"/>
* <element name="SimilarityLookupRequest" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}SimilarityLookupRequest" minOccurs="0"/>
* <element name="CartGetRequest" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}CartGetRequest" minOccurs="0"/>
* <element name="CartAddRequest" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}CartAddRequest" minOccurs="0"/>
* <element name="CartCreateRequest" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}CartCreateRequest" minOccurs="0"/>
* <element name="CartModifyRequest" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}CartModifyRequest" minOccurs="0"/>
* <element name="CartClearRequest" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}CartClearRequest" minOccurs="0"/>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Errors" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "isValid", "browseNodeLookupRequest",
"itemSearchRequest", "itemLookupRequest", "similarityLookupRequest",
"cartGetRequest", "cartAddRequest", "cartCreateRequest",
"cartModifyRequest", "cartClearRequest", "errors" })
@XmlRootElement(name = "Request")
public class Request {
@XmlElement(name = "IsValid")
protected String isValid;
@XmlElement(name = "BrowseNodeLookupRequest")
protected BrowseNodeLookupRequest browseNodeLookupRequest;
@XmlElement(name = "ItemSearchRequest")
protected ItemSearchRequest itemSearchRequest;
@XmlElement(name = "ItemLookupRequest")
protected ItemLookupRequest itemLookupRequest;
@XmlElement(name = "SimilarityLookupRequest")
protected SimilarityLookupRequest similarityLookupRequest;
@XmlElement(name = "CartGetRequest")
protected CartGetRequest cartGetRequest;
@XmlElement(name = "CartAddRequest")
protected CartAddRequest cartAddRequest;
@XmlElement(name = "CartCreateRequest")
protected CartCreateRequest cartCreateRequest;
@XmlElement(name = "CartModifyRequest")
protected CartModifyRequest cartModifyRequest;
@XmlElement(name = "CartClearRequest")
protected CartClearRequest cartClearRequest;
@XmlElement(name = "Errors")
protected Errors errors;
/**
* Gets the value of the isValid property.
*
* @return possible object is {@link String }
*
*/
public String getIsValid() {
return isValid;
}
/**
* Sets the value of the isValid property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setIsValid(String value) {
this.isValid = value;
}
/**
* Gets the value of the browseNodeLookupRequest property.
*
* @return possible object is {@link BrowseNodeLookupRequest }
*
*/
public BrowseNodeLookupRequest getBrowseNodeLookupRequest() {
return browseNodeLookupRequest;
}
/**
* Sets the value of the browseNodeLookupRequest property.
*
* @param value
* allowed object is {@link BrowseNodeLookupRequest }
*
*/
public void setBrowseNodeLookupRequest(BrowseNodeLookupRequest value) {
this.browseNodeLookupRequest = value;
}
/**
* Gets the value of the itemSearchRequest property.
*
* @return possible object is {@link ItemSearchRequest }
*
*/
public ItemSearchRequest getItemSearchRequest() {
return itemSearchRequest;
}
/**
* Sets the value of the itemSearchRequest property.
*
* @param value
* allowed object is {@link ItemSearchRequest }
*
*/
public void setItemSearchRequest(ItemSearchRequest value) {
this.itemSearchRequest = value;
}
/**
* Gets the value of the itemLookupRequest property.
*
* @return possible object is {@link ItemLookupRequest }
*
*/
public ItemLookupRequest getItemLookupRequest() {
return itemLookupRequest;
}
/**
* Sets the value of the itemLookupRequest property.
*
* @param value
* allowed object is {@link ItemLookupRequest }
*
*/
public void setItemLookupRequest(ItemLookupRequest value) {
this.itemLookupRequest = value;
}
/**
* Gets the value of the similarityLookupRequest property.
*
* @return possible object is {@link SimilarityLookupRequest }
*
*/
public SimilarityLookupRequest getSimilarityLookupRequest() {
return similarityLookupRequest;
}
/**
* Sets the value of the similarityLookupRequest property.
*
* @param value
* allowed object is {@link SimilarityLookupRequest }
*
*/
public void setSimilarityLookupRequest(SimilarityLookupRequest value) {
this.similarityLookupRequest = value;
}
/**
* Gets the value of the cartGetRequest property.
*
* @return possible object is {@link CartGetRequest }
*
*/
public CartGetRequest getCartGetRequest() {
return cartGetRequest;
}
/**
* Sets the value of the cartGetRequest property.
*
* @param value
* allowed object is {@link CartGetRequest }
*
*/
public void setCartGetRequest(CartGetRequest value) {
this.cartGetRequest = value;
}
/**
* Gets the value of the cartAddRequest property.
*
* @return possible object is {@link CartAddRequest }
*
*/
public CartAddRequest getCartAddRequest() {
return cartAddRequest;
}
/**
* Sets the value of the cartAddRequest property.
*
* @param value
* allowed object is {@link CartAddRequest }
*
*/
public void setCartAddRequest(CartAddRequest value) {
this.cartAddRequest = value;
}
/**
* Gets the value of the cartCreateRequest property.
*
* @return possible object is {@link CartCreateRequest }
*
*/
public CartCreateRequest getCartCreateRequest() {
return cartCreateRequest;
}
/**
* Sets the value of the cartCreateRequest property.
*
* @param value
* allowed object is {@link CartCreateRequest }
*
*/
public void setCartCreateRequest(CartCreateRequest value) {
this.cartCreateRequest = value;
}
/**
* Gets the value of the cartModifyRequest property.
*
* @return possible object is {@link CartModifyRequest }
*
*/
public CartModifyRequest getCartModifyRequest() {
return cartModifyRequest;
}
/**
* Sets the value of the cartModifyRequest property.
*
* @param value
* allowed object is {@link CartModifyRequest }
*
*/
public void setCartModifyRequest(CartModifyRequest value) {
this.cartModifyRequest = value;
}
/**
* Gets the value of the cartClearRequest property.
*
* @return possible object is {@link CartClearRequest }
*
*/
public CartClearRequest getCartClearRequest() {
return cartClearRequest;
}
/**
* Sets the value of the cartClearRequest property.
*
* @param value
* allowed object is {@link CartClearRequest }
*
*/
public void setCartClearRequest(CartClearRequest value) {
this.cartClearRequest = value;
}
/**
* Gets the value of the errors property.
*
* @return possible object is {@link Errors }
*
*/
public Errors getErrors() {
return errors;
}
/**
* Sets the value of the errors property.
*
* @param value
* allowed object is {@link Errors }
*
*/
public void setErrors(Errors value) {
this.errors = value;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/SavedForLaterItems.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="SubTotal" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Price" minOccurs="0"/>
* <element name="SavedForLaterItem" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}CartItem" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "subTotal", "savedForLaterItem" })
@XmlRootElement(name = "SavedForLaterItems")
public class SavedForLaterItems {
@XmlElement(name = "SubTotal")
protected Price subTotal;
@XmlElement(name = "SavedForLaterItem", required = true)
protected List<CartItem> savedForLaterItem;
/**
* Gets the value of the subTotal property.
*
* @return possible object is {@link Price }
*
*/
public Price getSubTotal() {
return subTotal;
}
/**
* Sets the value of the subTotal property.
*
* @param value
* allowed object is {@link Price }
*
*/
public void setSubTotal(Price value) {
this.subTotal = value;
}
/**
* Gets the value of the savedForLaterItem property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the savedForLaterItem property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getSavedForLaterItem().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link CartItem }
*
*
*/
public List<CartItem> getSavedForLaterItem() {
if (savedForLaterItem == null) {
savedForLaterItem = new ArrayList<CartItem>();
}
return this.savedForLaterItem;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/SearchBinSet.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Bin" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attribute name="NarrowBy" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "bin" })
@XmlRootElement(name = "SearchBinSet")
public class SearchBinSet {
@XmlElement(name = "Bin")
protected List<Bin> bin;
@XmlAttribute(name = "NarrowBy", required = true)
protected String narrowBy;
/**
* Gets the value of the bin property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the bin property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getBin().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link Bin }
*
*
*/
public List<Bin> getBin() {
if (bin == null) {
bin = new ArrayList<Bin>();
}
return this.bin;
}
/**
* Gets the value of the narrowBy property.
*
* @return possible object is {@link String }
*
*/
public String getNarrowBy() {
return narrowBy;
}
/**
* Sets the value of the narrowBy property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setNarrowBy(String value) {
this.narrowBy = value;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/SearchBinSets.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}SearchBinSet" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "searchBinSet" })
@XmlRootElement(name = "SearchBinSets")
public class SearchBinSets {
@XmlElement(name = "SearchBinSet")
protected List<SearchBinSet> searchBinSet;
/**
* Gets the value of the searchBinSet property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the searchBinSet property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getSearchBinSet().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link SearchBinSet }
*
*
*/
public List<SearchBinSet> getSearchBinSet() {
if (searchBinSet == null) {
searchBinSet = new ArrayList<SearchBinSet>();
}
return this.searchBinSet;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/SearchResultsMap.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="SearchIndex" maxOccurs="unbounded">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="IndexName" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="Results" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" minOccurs="0"/>
* <element name="Pages" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" minOccurs="0"/>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}CorrectedQuery" minOccurs="0"/>
* <element name="RelevanceRank" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
* <element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "searchIndex" })
@XmlRootElement(name = "SearchResultsMap")
public class SearchResultsMap {
@XmlElement(name = "SearchIndex", required = true)
protected List<SearchResultsMap.SearchIndex> searchIndex;
/**
* Gets the value of the searchIndex property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the searchIndex property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getSearchIndex().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link SearchResultsMap.SearchIndex }
*
*
*/
public List<SearchResultsMap.SearchIndex> getSearchIndex() {
if (searchIndex == null) {
searchIndex = new ArrayList<SearchResultsMap.SearchIndex>();
}
return this.searchIndex;
}
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained
* within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="IndexName" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="Results" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" minOccurs="0"/>
* <element name="Pages" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" minOccurs="0"/>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}CorrectedQuery" minOccurs="0"/>
* <element name="RelevanceRank" type="{http://www.w3.org/2001/XMLSchema}positiveInteger"/>
* <element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "indexName", "results", "pages",
"correctedQuery", "relevanceRank", "asin" })
public static class SearchIndex {
@XmlElement(name = "IndexName", required = true)
protected String indexName;
@XmlElement(name = "Results")
@XmlSchemaType(name = "nonNegativeInteger")
protected BigInteger results;
@XmlElement(name = "Pages")
@XmlSchemaType(name = "nonNegativeInteger")
protected BigInteger pages;
@XmlElement(name = "CorrectedQuery")
protected CorrectedQuery correctedQuery;
@XmlElement(name = "RelevanceRank", required = true)
@XmlSchemaType(name = "positiveInteger")
protected BigInteger relevanceRank;
@XmlElement(name = "ASIN", required = true)
protected List<String> asin;
/**
* Gets the value of the indexName property.
*
* @return possible object is {@link String }
*
*/
public String getIndexName() {
return indexName;
}
/**
* Sets the value of the indexName property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setIndexName(String value) {
this.indexName = value;
}
/**
* Gets the value of the results property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getResults() {
return results;
}
/**
* Sets the value of the results property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setResults(BigInteger value) {
this.results = value;
}
/**
* Gets the value of the pages property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getPages() {
return pages;
}
/**
* Sets the value of the pages property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setPages(BigInteger value) {
this.pages = value;
}
/**
* Gets the value of the correctedQuery property.
*
* @return possible object is {@link CorrectedQuery }
*
*/
public CorrectedQuery getCorrectedQuery() {
return correctedQuery;
}
/**
* Sets the value of the correctedQuery property.
*
* @param value
* allowed object is {@link CorrectedQuery }
*
*/
public void setCorrectedQuery(CorrectedQuery value) {
this.correctedQuery = value;
}
/**
* Gets the value of the relevanceRank property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getRelevanceRank() {
return relevanceRank;
}
/**
* Sets the value of the relevanceRank property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setRelevanceRank(BigInteger value) {
this.relevanceRank = value;
}
/**
* Gets the value of the asin property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list
* will be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the asin property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getASIN().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getASIN() {
if (asin == null) {
asin = new ArrayList<String>();
}
return this.asin;
}
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/SimilarProducts.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="SimilarProduct" maxOccurs="unbounded">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "similarProduct" })
@XmlRootElement(name = "SimilarProducts")
public class SimilarProducts {
@XmlElement(name = "SimilarProduct", required = true)
protected List<SimilarProducts.SimilarProduct> similarProduct;
/**
* Gets the value of the similarProduct property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the similarProduct property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getSimilarProduct().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link SimilarProducts.SimilarProduct }
*
*
*/
public List<SimilarProducts.SimilarProduct> getSimilarProduct() {
if (similarProduct == null) {
similarProduct = new ArrayList<SimilarProducts.SimilarProduct>();
}
return this.similarProduct;
}
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained
* within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "asin", "title" })
public static class SimilarProduct {
@XmlElement(name = "ASIN")
protected String asin;
@XmlElement(name = "Title")
protected String title;
/**
* Gets the value of the asin property.
*
* @return possible object is {@link String }
*
*/
public String getASIN() {
return asin;
}
/**
* Sets the value of the asin property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setASIN(String value) {
this.asin = value;
}
/**
* Gets the value of the title property.
*
* @return possible object is {@link String }
*
*/
public String getTitle() {
return title;
}
/**
* Sets the value of the title property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setTitle(String value) {
this.title = value;
}
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/SimilarViewedProducts.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="SimilarViewedProduct" maxOccurs="unbounded">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "similarViewedProduct" })
@XmlRootElement(name = "SimilarViewedProducts")
public class SimilarViewedProducts {
@XmlElement(name = "SimilarViewedProduct", required = true)
protected List<SimilarViewedProducts.SimilarViewedProduct> similarViewedProduct;
/**
* Gets the value of the similarViewedProduct property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the similarViewedProduct property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getSimilarViewedProduct().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link SimilarViewedProducts.SimilarViewedProduct }
*
*
*/
public List<SimilarViewedProducts.SimilarViewedProduct> getSimilarViewedProduct() {
if (similarViewedProduct == null) {
similarViewedProduct = new ArrayList<SimilarViewedProducts.SimilarViewedProduct>();
}
return this.similarViewedProduct;
}
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained
* within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "asin", "title" })
public static class SimilarViewedProduct {
@XmlElement(name = "ASIN")
protected String asin;
@XmlElement(name = "Title")
protected String title;
/**
* Gets the value of the asin property.
*
* @return possible object is {@link String }
*
*/
public String getASIN() {
return asin;
}
/**
* Sets the value of the asin property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setASIN(String value) {
this.asin = value;
}
/**
* Gets the value of the title property.
*
* @return possible object is {@link String }
*
*/
public String getTitle() {
return title;
}
/**
* Sets the value of the title property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setTitle(String value) {
this.title = value;
}
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/SimilarityLookup.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="MarketplaceDomain" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="AWSAccessKeyId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="AssociateTag" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Validate" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="XMLEscaping" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Shared" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}SimilarityLookupRequest" minOccurs="0"/>
* <element name="Request" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}SimilarityLookupRequest" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "marketplaceDomain", "awsAccessKeyId",
"associateTag", "validate", "xmlEscaping", "shared", "request" })
@XmlRootElement(name = "SimilarityLookup")
public class SimilarityLookup {
@XmlElement(name = "MarketplaceDomain")
protected String marketplaceDomain;
@XmlElement(name = "AWSAccessKeyId")
protected String awsAccessKeyId;
@XmlElement(name = "AssociateTag")
protected String associateTag;
@XmlElement(name = "Validate")
protected String validate;
@XmlElement(name = "XMLEscaping")
protected String xmlEscaping;
@XmlElement(name = "Shared")
protected SimilarityLookupRequest shared;
@XmlElement(name = "Request")
protected List<SimilarityLookupRequest> request;
/**
* Gets the value of the marketplaceDomain property.
*
* @return possible object is {@link String }
*
*/
public String getMarketplaceDomain() {
return marketplaceDomain;
}
/**
* Sets the value of the marketplaceDomain property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setMarketplaceDomain(String value) {
this.marketplaceDomain = value;
}
/**
* Gets the value of the awsAccessKeyId property.
*
* @return possible object is {@link String }
*
*/
public String getAWSAccessKeyId() {
return awsAccessKeyId;
}
/**
* Sets the value of the awsAccessKeyId property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setAWSAccessKeyId(String value) {
this.awsAccessKeyId = value;
}
/**
* Gets the value of the associateTag property.
*
* @return possible object is {@link String }
*
*/
public String getAssociateTag() {
return associateTag;
}
/**
* Sets the value of the associateTag property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setAssociateTag(String value) {
this.associateTag = value;
}
/**
* Gets the value of the validate property.
*
* @return possible object is {@link String }
*
*/
public String getValidate() {
return validate;
}
/**
* Sets the value of the validate property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setValidate(String value) {
this.validate = value;
}
/**
* Gets the value of the xmlEscaping property.
*
* @return possible object is {@link String }
*
*/
public String getXMLEscaping() {
return xmlEscaping;
}
/**
* Sets the value of the xmlEscaping property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setXMLEscaping(String value) {
this.xmlEscaping = value;
}
/**
* Gets the value of the shared property.
*
* @return possible object is {@link SimilarityLookupRequest }
*
*/
public SimilarityLookupRequest getShared() {
return shared;
}
/**
* Sets the value of the shared property.
*
* @param value
* allowed object is {@link SimilarityLookupRequest }
*
*/
public void setShared(SimilarityLookupRequest value) {
this.shared = value;
}
/**
* Gets the value of the request property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the request property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getRequest().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link SimilarityLookupRequest }
*
*
*/
public List<SimilarityLookupRequest> getRequest() {
if (request == null) {
request = new ArrayList<SimilarityLookupRequest>();
}
return this.request;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/SimilarityLookupRequest.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for SimilarityLookupRequest complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType name="SimilarityLookupRequest">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Condition" minOccurs="0"/>
* <element name="ItemId" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
* <element name="MerchantId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="ResponseGroup" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
* <element name="SimilarityType" minOccurs="0">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="Intersection"/>
* <enumeration value="Random"/>
* </restriction>
* </simpleType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SimilarityLookupRequest", propOrder = { "condition", "itemId",
"merchantId", "responseGroup", "similarityType" })
public class SimilarityLookupRequest {
@XmlElement(name = "Condition")
protected String condition;
@XmlElement(name = "ItemId")
protected List<String> itemId;
@XmlElement(name = "MerchantId")
protected String merchantId;
@XmlElement(name = "ResponseGroup")
protected List<String> responseGroup;
@XmlElement(name = "SimilarityType")
protected String similarityType;
/**
* Gets the value of the condition property.
*
* @return possible object is {@link String }
*
*/
public String getCondition() {
return condition;
}
/**
* Sets the value of the condition property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setCondition(String value) {
this.condition = value;
}
/**
* Gets the value of the itemId property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the itemId property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getItemId().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link String }
*
*
*/
public List<String> getItemId() {
if (itemId == null) {
itemId = new ArrayList<String>();
}
return this.itemId;
}
/**
* Gets the value of the merchantId property.
*
* @return possible object is {@link String }
*
*/
public String getMerchantId() {
return merchantId;
}
/**
* Sets the value of the merchantId property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setMerchantId(String value) {
this.merchantId = value;
}
/**
* Gets the value of the responseGroup property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the responseGroup property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getResponseGroup().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link String }
*
*
*/
public List<String> getResponseGroup() {
if (responseGroup == null) {
responseGroup = new ArrayList<String>();
}
return this.responseGroup;
}
/**
* Gets the value of the similarityType property.
*
* @return possible object is {@link String }
*
*/
public String getSimilarityType() {
return similarityType;
}
/**
* Sets the value of the similarityType property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setSimilarityType(String value) {
this.similarityType = value;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/SimilarityLookupResponse.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}OperationRequest" minOccurs="0"/>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Items" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "operationRequest", "items" })
@XmlRootElement(name = "SimilarityLookupResponse")
public class SimilarityLookupResponse {
@XmlElement(name = "OperationRequest")
protected OperationRequest operationRequest;
@XmlElement(name = "Items")
protected List<Items> items;
/**
* Gets the value of the operationRequest property.
*
* @return possible object is {@link OperationRequest }
*
*/
public OperationRequest getOperationRequest() {
return operationRequest;
}
/**
* Sets the value of the operationRequest property.
*
* @param value
* allowed object is {@link OperationRequest }
*
*/
public void setOperationRequest(OperationRequest value) {
this.operationRequest = value;
}
/**
* Gets the value of the items property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the items property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getItems().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link Items }
*
*
*/
public List<Items> getItems() {
if (items == null) {
items = new ArrayList<Items>();
}
return this.items;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/StringWithUnits.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
/**
* <p>
* Java class for StringWithUnits complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType name="StringWithUnits">
* <simpleContent>
* <extension base="<http://www.w3.org/2001/XMLSchema>string">
* <attribute name="Units" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "StringWithUnits", propOrder = { "value" })
public class StringWithUnits {
@XmlValue
protected String value;
@XmlAttribute(name = "Units", required = true)
protected String units;
/**
* Gets the value of the value property.
*
* @return possible object is {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
/**
* Gets the value of the units property.
*
* @return possible object is {@link String }
*
*/
public String getUnits() {
return units;
}
/**
* Sets the value of the units property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setUnits(String value) {
this.units = value;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/TopItemSet.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="TopItem" maxOccurs="unbounded">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="DetailPageURL" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="ProductGroup" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Author" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
* <element name="Artist" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
* <element name="Actor" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "type", "topItem" })
@XmlRootElement(name = "TopItemSet")
public class TopItemSet {
@XmlElement(name = "Type")
protected String type;
@XmlElement(name = "TopItem", required = true)
protected List<TopItemSet.TopItem> topItem;
/**
* Gets the value of the type property.
*
* @return possible object is {@link String }
*
*/
public String getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setType(String value) {
this.type = value;
}
/**
* Gets the value of the topItem property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the topItem property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getTopItem().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link TopItemSet.TopItem }
*
*
*/
public List<TopItemSet.TopItem> getTopItem() {
if (topItem == null) {
topItem = new ArrayList<TopItemSet.TopItem>();
}
return this.topItem;
}
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained
* within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="DetailPageURL" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="ProductGroup" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Author" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
* <element name="Artist" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
* <element name="Actor" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "asin", "title", "detailPageURL",
"productGroup", "author", "artist", "actor" })
public static class TopItem {
@XmlElement(name = "ASIN")
protected String asin;
@XmlElement(name = "Title")
protected String title;
@XmlElement(name = "DetailPageURL")
protected String detailPageURL;
@XmlElement(name = "ProductGroup")
protected String productGroup;
@XmlElement(name = "Author")
protected List<String> author;
@XmlElement(name = "Artist")
protected List<String> artist;
@XmlElement(name = "Actor")
protected List<String> actor;
/**
* Gets the value of the asin property.
*
* @return possible object is {@link String }
*
*/
public String getASIN() {
return asin;
}
/**
* Sets the value of the asin property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setASIN(String value) {
this.asin = value;
}
/**
* Gets the value of the title property.
*
* @return possible object is {@link String }
*
*/
public String getTitle() {
return title;
}
/**
* Sets the value of the title property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setTitle(String value) {
this.title = value;
}
/**
* Gets the value of the detailPageURL property.
*
* @return possible object is {@link String }
*
*/
public String getDetailPageURL() {
return detailPageURL;
}
/**
* Sets the value of the detailPageURL property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setDetailPageURL(String value) {
this.detailPageURL = value;
}
/**
* Gets the value of the productGroup property.
*
* @return possible object is {@link String }
*
*/
public String getProductGroup() {
return productGroup;
}
/**
* Sets the value of the productGroup property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setProductGroup(String value) {
this.productGroup = value;
}
/**
* Gets the value of the author property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list
* will be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the author property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getAuthor().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getAuthor() {
if (author == null) {
author = new ArrayList<String>();
}
return this.author;
}
/**
* Gets the value of the artist property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list
* will be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the artist property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getArtist().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getArtist() {
if (artist == null) {
artist = new ArrayList<String>();
}
return this.artist;
}
/**
* Gets the value of the actor property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list
* will be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the actor property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getActor().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getActor() {
if (actor == null) {
actor = new ArrayList<String>();
}
return this.actor;
}
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/TopSellers.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="TopSeller" maxOccurs="unbounded">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "topSeller" })
@XmlRootElement(name = "TopSellers")
public class TopSellers {
@XmlElement(name = "TopSeller", required = true)
protected List<TopSellers.TopSeller> topSeller;
/**
* Gets the value of the topSeller property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the topSeller property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getTopSeller().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link TopSellers.TopSeller }
*
*
*/
public List<TopSellers.TopSeller> getTopSeller() {
if (topSeller == null) {
topSeller = new ArrayList<TopSellers.TopSeller>();
}
return this.topSeller;
}
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained
* within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="ASIN" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Title" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "asin", "title" })
public static class TopSeller {
@XmlElement(name = "ASIN")
protected String asin;
@XmlElement(name = "Title")
protected String title;
/**
* Gets the value of the asin property.
*
* @return possible object is {@link String }
*
*/
public String getASIN() {
return asin;
}
/**
* Sets the value of the asin property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setASIN(String value) {
this.asin = value;
}
/**
* Gets the value of the title property.
*
* @return possible object is {@link String }
*
*/
public String getTitle() {
return title;
}
/**
* Sets the value of the title property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setTitle(String value) {
this.title = value;
}
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/Tracks.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Disc" maxOccurs="unbounded">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Track" maxOccurs="unbounded">
* <complexType>
* <simpleContent>
* <extension base="<http://www.w3.org/2001/XMLSchema>string">
* <attribute name="Number" use="required" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
* </extension>
* </simpleContent>
* </complexType>
* </element>
* </sequence>
* <attribute name="Number" use="required" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "disc" })
@XmlRootElement(name = "Tracks")
public class Tracks {
@XmlElement(name = "Disc", required = true)
protected List<Tracks.Disc> disc;
/**
* Gets the value of the disc property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the disc property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getDisc().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Tracks.Disc }
*
*
*/
public List<Tracks.Disc> getDisc() {
if (disc == null) {
disc = new ArrayList<Tracks.Disc>();
}
return this.disc;
}
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained
* within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Track" maxOccurs="unbounded">
* <complexType>
* <simpleContent>
* <extension base="<http://www.w3.org/2001/XMLSchema>string">
* <attribute name="Number" use="required" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
* </extension>
* </simpleContent>
* </complexType>
* </element>
* </sequence>
* <attribute name="Number" use="required" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "track" })
public static class Disc {
@XmlElement(name = "Track", required = true)
protected List<Tracks.Disc.Track> track;
@XmlAttribute(name = "Number", required = true)
@XmlSchemaType(name = "positiveInteger")
protected BigInteger number;
/**
* Gets the value of the track property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list
* will be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the track property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getTrack().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Tracks.Disc.Track }
*
*
*/
public List<Tracks.Disc.Track> getTrack() {
if (track == null) {
track = new ArrayList<Tracks.Disc.Track>();
}
return this.track;
}
/**
* Gets the value of the number property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getNumber() {
return number;
}
/**
* Sets the value of the number property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setNumber(BigInteger value) {
this.number = value;
}
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content
* contained within this class.
*
* <pre>
* <complexType>
* <simpleContent>
* <extension base="<http://www.w3.org/2001/XMLSchema>string">
* <attribute name="Number" use="required" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "value" })
public static class Track {
@XmlValue
protected String value;
@XmlAttribute(name = "Number", required = true)
@XmlSchemaType(name = "positiveInteger")
protected BigInteger number;
/**
* Gets the value of the value property.
*
* @return possible object is {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
/**
* Gets the value of the number property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getNumber() {
return number;
}
/**
* Sets the value of the number property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setNumber(BigInteger value) {
this.number = value;
}
}
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/VariationAttribute.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Name" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="Value" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "name", "value" })
@XmlRootElement(name = "VariationAttribute")
public class VariationAttribute {
@XmlElement(name = "Name", required = true)
protected String name;
@XmlElement(name = "Value", required = true)
protected List<String> value;
/**
* Gets the value of the name property.
*
* @return possible object is {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the value property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the value property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getValue().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link String }
*
*
*/
public List<String> getValue() {
if (value == null) {
value = new ArrayList<String>();
}
return this.value;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/VariationDimensions.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="VariationDimension" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "variationDimension" })
@XmlRootElement(name = "VariationDimensions")
public class VariationDimensions {
@XmlElement(name = "VariationDimension", required = true)
protected List<String> variationDimension;
/**
* Gets the value of the variationDimension property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the variationDimension property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getVariationDimension().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link String }
*
*
*/
public List<String> getVariationDimension() {
if (variationDimension == null) {
variationDimension = new ArrayList<String>();
}
return this.variationDimension;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/VariationSummary.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="LowestPrice" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Price" minOccurs="0"/>
* <element name="HighestPrice" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Price" minOccurs="0"/>
* <element name="LowestSalePrice" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Price" minOccurs="0"/>
* <element name="HighestSalePrice" type="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Price" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "lowestPrice", "highestPrice",
"lowestSalePrice", "highestSalePrice" })
@XmlRootElement(name = "VariationSummary")
public class VariationSummary {
@XmlElement(name = "LowestPrice")
protected Price lowestPrice;
@XmlElement(name = "HighestPrice")
protected Price highestPrice;
@XmlElement(name = "LowestSalePrice")
protected Price lowestSalePrice;
@XmlElement(name = "HighestSalePrice")
protected Price highestSalePrice;
/**
* Gets the value of the lowestPrice property.
*
* @return possible object is {@link Price }
*
*/
public Price getLowestPrice() {
return lowestPrice;
}
/**
* Sets the value of the lowestPrice property.
*
* @param value
* allowed object is {@link Price }
*
*/
public void setLowestPrice(Price value) {
this.lowestPrice = value;
}
/**
* Gets the value of the highestPrice property.
*
* @return possible object is {@link Price }
*
*/
public Price getHighestPrice() {
return highestPrice;
}
/**
* Sets the value of the highestPrice property.
*
* @param value
* allowed object is {@link Price }
*
*/
public void setHighestPrice(Price value) {
this.highestPrice = value;
}
/**
* Gets the value of the lowestSalePrice property.
*
* @return possible object is {@link Price }
*
*/
public Price getLowestSalePrice() {
return lowestSalePrice;
}
/**
* Sets the value of the lowestSalePrice property.
*
* @param value
* allowed object is {@link Price }
*
*/
public void setLowestSalePrice(Price value) {
this.lowestSalePrice = value;
}
/**
* Gets the value of the highestSalePrice property.
*
* @return possible object is {@link Price }
*
*/
public Price getHighestSalePrice() {
return highestSalePrice;
}
/**
* Sets the value of the highestSalePrice property.
*
* @param value
* allowed object is {@link Price }
*
*/
public void setHighestSalePrice(Price value) {
this.highestSalePrice = value;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/Variations.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.apa.jaxws;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="TotalVariations" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" minOccurs="0"/>
* <element name="TotalVariationPages" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" minOccurs="0"/>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}VariationDimensions" minOccurs="0"/>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2011-08-01}Item" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "totalVariations", "totalVariationPages",
"variationDimensions", "item" })
@XmlRootElement(name = "Variations")
public class Variations {
@XmlElement(name = "TotalVariations")
@XmlSchemaType(name = "nonNegativeInteger")
protected BigInteger totalVariations;
@XmlElement(name = "TotalVariationPages")
@XmlSchemaType(name = "nonNegativeInteger")
protected BigInteger totalVariationPages;
@XmlElement(name = "VariationDimensions")
protected VariationDimensions variationDimensions;
@XmlElement(name = "Item")
protected List<Item> item;
/**
* Gets the value of the totalVariations property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getTotalVariations() {
return totalVariations;
}
/**
* Sets the value of the totalVariations property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setTotalVariations(BigInteger value) {
this.totalVariations = value;
}
/**
* Gets the value of the totalVariationPages property.
*
* @return possible object is {@link BigInteger }
*
*/
public BigInteger getTotalVariationPages() {
return totalVariationPages;
}
/**
* Sets the value of the totalVariationPages property.
*
* @param value
* allowed object is {@link BigInteger }
*
*/
public void setTotalVariationPages(BigInteger value) {
this.totalVariationPages = value;
}
/**
* Gets the value of the variationDimensions property.
*
* @return possible object is {@link VariationDimensions }
*
*/
public VariationDimensions getVariationDimensions() {
return variationDimensions;
}
/**
* Sets the value of the variationDimensions property.
*
* @param value
* allowed object is {@link VariationDimensions }
*
*/
public void setVariationDimensions(VariationDimensions value) {
this.variationDimensions = value;
}
/**
* Gets the value of the item property.
*
* <p>
* This accessor method returns a reference to the live list, not a
* snapshot. Therefore any modification you make to the returned list will
* be present inside the JAXB object. This is why there is not a
* <CODE>set</CODE> method for the item property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getItem().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link Item }
*
*
*/
public List<Item> getItem() {
if (item == null) {
item = new ArrayList<Item>();
}
return this.item;
}
}
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/apa/jaxws/package-info.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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.
*/
@javax.xml.bind.annotation.XmlSchema(namespace = "http://webservices.amazon.com/AWSECommerceService/2011-08-01", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package am.ik.aws.apa.jaxws;
|
0 | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws | java-sources/am/ik/aws/aws-apa/0.9.5/am/ik/aws/config/AwsConfig.java | /*
* Copyright (C) 2011 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.aws.config;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
public class AwsConfig {
private static final String BUNDLE_NAME = "aws-config";
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
.getBundle(BUNDLE_NAME);
private AwsConfig() {
}
public static String getValue(String key) {
try {
return RESOURCE_BUNDLE.getString(key);
} catch (MissingResourceException e) {
return null;
}
}
}
|
0 | java-sources/am/ik/beansviz/beansviz-spring-boot-actuator/0.1.0/am/ik | java-sources/am/ik/beansviz/beansviz-spring-boot-actuator/0.1.0/am/ik/beansviz/BeansVizAutoConfiguration.java | /*
* Copyright (C) 2017 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.beansviz;
import org.springframework.boot.actuate.endpoint.BeansEndpoint;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class BeansVizAutoConfiguration {
@Bean
public BeansVizMvcHandler beansVizMvcHandler(BeansEndpoint beansEndpoint) {
return new BeansVizMvcHandler(beansEndpoint);
}
@Configuration
@ConditionalOnMissingClass(value = "org.springframework.boot.actuate.endpoint.mvc.AbstractNamedMvcEndpoint")
static class ConfigForOldSpringBoot {
@Bean
@ConfigurationProperties(prefix = "endpoints.beansviz")
public BeansVizMvcEndpoint beansVizMvcEndpoint(
BeansVizMvcHandler beansVizMvcHandler) {
return new BeansVizMvcEndpoint(beansVizMvcHandler);
}
}
@Configuration
@ConditionalOnClass(name = "org.springframework.boot.actuate.endpoint.mvc.AbstractNamedMvcEndpoint")
static class ConfigForNewSpringBoot {
@Bean
@ConfigurationProperties(prefix = "endpoints.beansviz")
public BeansVizNamedMvcEndpoint beansVizNamedMvcEndpoint(
BeansVizMvcHandler beansVizMvcHandler) {
return new BeansVizNamedMvcEndpoint(beansVizMvcHandler);
}
}
}
|
0 | java-sources/am/ik/beansviz/beansviz-spring-boot-actuator/0.1.0/am/ik | java-sources/am/ik/beansviz/beansviz-spring-boot-actuator/0.1.0/am/ik/beansviz/BeansVizMvcEndpoint.java | /*
* Copyright (C) 2017 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.beansviz;
import org.springframework.boot.actuate.endpoint.mvc.AbstractMvcEndpoint;
import org.springframework.boot.actuate.endpoint.mvc.HypermediaDisabled;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@HypermediaDisabled
public class BeansVizMvcEndpoint extends AbstractMvcEndpoint {
public final BeansVizMvcHandler beansVizMvcHandler;
public BeansVizMvcEndpoint(BeansVizMvcHandler beansVizMvcHandler) {
super("/beansviz", true);
this.beansVizMvcHandler = beansVizMvcHandler;
}
@GetMapping(produces = BeansVizMvcHandler.IMAGE_SVG_VALUE)
ResponseEntity<String> beansviz(
@RequestParam(name = "all", defaultValue = "false") boolean all) {
return beansVizMvcHandler.beansviz(all);
}
}
|
0 | java-sources/am/ik/beansviz/beansviz-spring-boot-actuator/0.1.0/am/ik | java-sources/am/ik/beansviz/beansviz-spring-boot-actuator/0.1.0/am/ik/beansviz/BeansVizMvcHandler.java | /*
* Copyright (C) 2017 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.beansviz;
import static guru.nidi.graphviz.model.Factory.mutGraph;
import static guru.nidi.graphviz.model.Factory.mutNode;
import java.util.List;
import java.util.Map;
import org.springframework.boot.actuate.endpoint.BeansEndpoint;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import guru.nidi.graphviz.engine.Graphviz;
import guru.nidi.graphviz.model.MutableGraph;
import guru.nidi.graphviz.model.MutableNode;
public class BeansVizMvcHandler {
public static final String IMAGE_SVG_VALUE = "image/svg+xml";
private final BeansEndpoint beansEndpoint;
public BeansVizMvcHandler(BeansEndpoint beansEndpoint) {
this.beansEndpoint = beansEndpoint;
}
@SuppressWarnings("unchecked")
ResponseEntity<String> beansviz(boolean all) {
List<Object> info = beansEndpoint.invoke();
MutableGraph graphs = mutGraph().setDirected();
for (Object o : info) {
Map<String, Object> context = (Map<String, Object>) o;
MutableGraph graph = new MutableGraph().setDirected()
.setLabel((String) context.get("context"));
graphs.add(graph);
List<Map<String, Object>> beans = (List<Map<String, Object>>) context
.get("beans");
for (Map<String, Object> bean : beans) {
List<String> dependencies = (List<String>) bean.get("dependencies");
if (!dependencies.isEmpty() || all) {
MutableNode node = mutNode(shorten((String) bean.get("bean")));
for (String dep : dependencies) {
node.addLink(shorten(dep));
}
graph.add(node);
}
}
}
String svg;
synchronized (this) {
Graphviz.initEngine();
try {
svg = Graphviz.fromGraph(graphs).createSvg();
}
finally {
Graphviz.releaseEngine();
}
}
return ResponseEntity.status(HttpStatus.OK)
.contentType(MediaType.valueOf(IMAGE_SVG_VALUE)).body(svg);
}
private String shorten(String name) {
name = name.split("@")[0];
if (name.contains(".")) {
String[] split = name.split("\\.");
StringBuilder builder = new StringBuilder();
for (int i = 0; i < split.length - 1; i++) {
builder.append(split[i].toLowerCase().charAt(0));
builder.append(".");
}
builder.append(split[split.length - 1]);
return builder.toString();
}
return name;
}
}
|
0 | java-sources/am/ik/beansviz/beansviz-spring-boot-actuator/0.1.0/am/ik | java-sources/am/ik/beansviz/beansviz-spring-boot-actuator/0.1.0/am/ik/beansviz/BeansVizNamedMvcEndpoint.java | /*
* Copyright (C) 2017 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.beansviz;
import org.springframework.boot.actuate.endpoint.mvc.AbstractNamedMvcEndpoint;
import org.springframework.boot.actuate.endpoint.mvc.HypermediaDisabled;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@HypermediaDisabled
public class BeansVizNamedMvcEndpoint extends AbstractNamedMvcEndpoint {
public final BeansVizMvcHandler beansVizMvcHandler;
public BeansVizNamedMvcEndpoint(BeansVizMvcHandler beansVizMvcHandler) {
super("beansviz", "/beansviz", true);
this.beansVizMvcHandler = beansVizMvcHandler;
}
@GetMapping(produces = BeansVizMvcHandler.IMAGE_SVG_VALUE)
ResponseEntity<String> beansviz(
@RequestParam(name = "all", defaultValue = "false") boolean all) {
return beansVizMvcHandler.beansviz(all);
}
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/Author.java | package am.ik.blog.entry;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import am.ik.blog.entry.json.AuthorDeserializer;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
@RequiredArgsConstructor
@ToString
@EqualsAndHashCode
@Getter
@JsonDeserialize(using = AuthorDeserializer.class)
public class Author implements Serializable {
@JsonUnwrapped
final Name name;
@JsonUnwrapped
final EventTime date;
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/Categories.java | package am.ik.blog.entry;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collector;
import java.util.stream.Stream;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.EqualsAndHashCode;
import static java.util.stream.Collectors.toList;
@EqualsAndHashCode
public class Categories implements Serializable {
final List<Category> value;
public Categories(Category... categories) {
this(Arrays.asList(categories));
}
public Categories(List<Category> value) {
if (value == null) {
throw new IllegalArgumentException("value must not be null!!");
}
this.value = value;
}
public Stream<Category> stream() {
return this.value.stream();
}
public <A, R> R collect(Collector<Category, A, R> collector) {
return this.value.stream().collect(collector);
}
public int size() {
return value.size();
}
@JsonIgnore
public List<Category> getValue() {
return Collections.unmodifiableList(value);
}
@JsonProperty("categories")
List<String> values() {
return stream().map(Category::getValue).collect(toList());
}
@Override
public String toString() {
return value == null ? null : value.toString();
}
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/Category.java | package am.ik.blog.entry;
import java.io.Serializable;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@EqualsAndHashCode
@Getter
public class Category implements Serializable {
final String value;
@Override
public String toString() {
return value;
}
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/Content.java | package am.ik.blog.entry;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@EqualsAndHashCode
@Getter
public class Content implements Serializable {
@JsonProperty("content")
final String value;
@Override
public String toString() {
return value;
}
@JsonIgnore
public boolean isEmpty() {
return value == null || value.isEmpty();
}
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/ETag.java | package am.ik.blog.entry;
import java.io.Serializable;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@EqualsAndHashCode
@Getter
public class ETag implements Serializable {
final String value;
@Override
public String toString() {
return value;
}
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/Entry.java | package am.ik.blog.entry;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import am.ik.blog.entry.json.EntryDeserializer;
import lombok.*;
@RequiredArgsConstructor
@ToString
@EqualsAndHashCode
@Builder
@Getter
@JsonDeserialize(using = EntryDeserializer.class)
public class Entry implements Serializable {
@JsonUnwrapped
final EntryId entryId;
@JsonUnwrapped
final Content content;
final Author created;
final Author updated;
final FrontMatter frontMatter;
public Entry.EntryBuilder copy() {
return Entry.builder().entryId(entryId).content(content).created(created)
.updated(updated).frontMatter(frontMatter);
}
public Entry useFrontMatterDate() {
EntryBuilder builder = copy();
if (frontMatter != null && frontMatter.date != null
&& frontMatter.date.value != null && created != null) {
builder.created(new Author(created.name, frontMatter.date));
}
if (frontMatter != null && frontMatter.updated != null
&& frontMatter.updated.value != null && updated != null) {
builder.updated(new Author(updated.name, frontMatter.updated));
}
return builder.build();
}
@JsonIgnore
public boolean isPremium() {
return this.frontMatter.point.isPremium();
}
public static boolean isPublicFileName(String fileName) {
return fileName.matches("[0-9]+\\.md");
}
public EntryId entryId() {
return entryId;
}
public Content content() {
return content;
}
public FrontMatter frontMatter() {
return frontMatter;
}
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/EntryId.java | package am.ik.blog.entry;
import java.io.Serializable;
import java.nio.file.Path;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@EqualsAndHashCode
@Getter
public class EntryId implements Serializable {
@JsonProperty("entryId")
final Long value;
public EntryId(String entryId) {
this(Long.valueOf(entryId));
}
@Override
public String toString() {
return value == null ? null : value.toString();
}
public static EntryId fromFileName(String fileName) {
String entryId = fileName.replace(".md", "").replace(".markdown", "");
return new EntryId(Long.valueOf(entryId));
}
public static EntryId fromFilePath(Path filePath) {
return fromFileName(filePath.getFileName().toString());
}
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/EventTime.java | package am.ik.blog.entry;
import java.io.Serializable;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.time.temporal.TemporalUnit;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@EqualsAndHashCode
@Getter
public class EventTime implements Serializable {
public static EventTime UNSET = new EventTime(null) {
@Override
public String toString() {
return "";
}
};
public static EventTime now() {
return new EventTime(OffsetDateTime.now());
}
@JsonProperty("date")
@JsonFormat(shape = JsonFormat.Shape.STRING)
final OffsetDateTime value;
@JsonIgnore
public boolean isSet() {
return value != null;
}
@Override
public String toString() {
return value == null ? null : value.toString();
}
@JsonIgnore
public boolean isOverHalfYearOld() {
return this.isOld(6, ChronoUnit.MONTHS);
}
@JsonIgnore
public boolean isOverOneYearOld() {
return this.isOld(1, ChronoUnit.YEARS);
}
@JsonIgnore
public boolean isOverThreeYearsOld() {
return this.isOld(3, ChronoUnit.YEARS);
}
@JsonIgnore
public boolean isOverFiveYearsOld() {
return this.isOld(5, ChronoUnit.YEARS);
}
private boolean isOld(long amount, TemporalUnit unit) {
return this.value.plus(amount, unit) //
.isBefore(OffsetDateTime.now());
}
public String rfc1123() {
return this.value.format(DateTimeFormatter.RFC_1123_DATE_TIME);
}
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/FrontMatter.java | package am.ik.blog.entry;
import java.io.Serializable;
import am.ik.blog.entry.json.FrontMatterDeserializer;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
@ToString
@EqualsAndHashCode
@Getter
@JsonDeserialize(using = FrontMatterDeserializer.class)
public class FrontMatter implements Serializable {
@JsonUnwrapped
final Title title;
@JsonUnwrapped
final Categories categories;
@JsonUnwrapped
final Tags tags;
@JsonIgnore
final EventTime date;
@JsonIgnore
final EventTime updated;
@JsonUnwrapped
final PremiumPoint point;
public static final String SEPARATOR = "---";
public FrontMatter(Title title, Categories categories, Tags tags, EventTime date,
EventTime updated, PremiumPoint point) {
this.title = title;
this.categories = categories;
this.tags = tags;
this.date = defaultValue(date, EventTime.UNSET);
this.updated = defaultValue(updated, EventTime.UNSET);
this.point = defaultValue(point, PremiumPoint.UNSET);
}
public FrontMatter(Title title, Categories categories, Tags tags, EventTime date,
EventTime updated) {
this(title, categories, tags, date, updated, PremiumPoint.UNSET);
}
public FrontMatter(Title title, Categories categories, Tags tags) {
this(title, categories, tags, EventTime.UNSET, EventTime.UNSET,
PremiumPoint.UNSET);
}
private <T> T defaultValue(T value, T defaultValue) {
if (value == null) {
return defaultValue;
}
return value;
}
public Title title() {
return title;
}
public Tags tags() {
return tags;
}
public Categories categories() {
return categories;
}
public EventTime date() {
return date;
}
public EventTime updated() {
return updated;
}
public PremiumPoint point() {
return point;
}
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/LastModified.java | package am.ik.blog.entry;
import java.io.Serializable;
import java.time.Instant;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import lombok.EqualsAndHashCode;
import lombok.Getter;
@EqualsAndHashCode
@Getter
public class LastModified implements Serializable {
public static final LastModified EPOCH = new LastModified(0L);
final ZonedDateTime value;
public LastModified(ZonedDateTime value) {
this.value = value;
}
public LastModified(Instant value) {
this.value = value.atZone(ZoneId.systemDefault());
}
public LastModified(long epochMilli) {
this(Instant.ofEpochMilli(epochMilli));
}
@Override
public String toString() {
return value == null ? null : value.toString();
}
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/Name.java | package am.ik.blog.entry;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@EqualsAndHashCode
@Getter
public class Name implements Serializable {
@JsonProperty("name")
final String value;
@Override
public String toString() {
return value;
}
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/PremiumPoint.java | package am.ik.blog.entry;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.EqualsAndHashCode;
import lombok.Getter;
@EqualsAndHashCode
@Getter
public class PremiumPoint implements Serializable {
@JsonProperty("point")
@JsonInclude(JsonInclude.Include.NON_NULL)
private final Integer value;
public static final PremiumPoint UNSET = new PremiumPoint(null);
public PremiumPoint(Integer value) {
this.value = value;
}
@JsonIgnore
public boolean isPremium() {
return value != null;
}
@Override
public String toString() {
return String.valueOf(value);
}
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/Tag.java | package am.ik.blog.entry;
import java.io.Serializable;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@EqualsAndHashCode
@Getter
public class Tag implements Serializable {
final String value;
@Override
public String toString() {
return value;
}
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/Tags.java | package am.ik.blog.entry;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collector;
import java.util.stream.Stream;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.EqualsAndHashCode;
import static java.util.stream.Collectors.toList;
@EqualsAndHashCode
public class Tags implements Serializable {
final List<Tag> value;
public Tags(Tag... tags) {
this(Arrays.asList(tags));
}
public Tags(List<Tag> value) {
if (value == null) {
throw new IllegalArgumentException("value must not be null!!");
}
this.value = value;
}
public Stream<Tag> stream() {
return this.value.stream();
}
public <A, R> R collect(Collector<Tag, A, R> collector) {
return this.value.stream().collect(collector);
}
public int size() {
return value.size();
}
@JsonIgnore
public List<Tag> getValue() {
return Collections.unmodifiableList(value);
}
@JsonProperty("tags")
List<String> values() {
return stream().map(Tag::getValue).collect(toList());
}
@Override
public String toString() {
return value == null ? null : value.toString();
}
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/Title.java | package am.ik.blog.entry;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@EqualsAndHashCode
@Getter
public class Title implements Serializable {
@JsonProperty("title")
final private String value;
@Override
public String toString() {
return value;
}
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/factory/Emoji.java | package am.ik.blog.entry.factory;
import static java.util.stream.Collectors.joining;
import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Slim Java port of twemoji (Twitter Emoji) https://github.com/twitter/twemoji
*
* Arnold Buchmueller http://www.eingrad.com
*
* https://gist.github.com/heyarny/71c246f2f7fa4d9d10904fb9d5b1fa1d
*/
public class Emoji {
private static final Pattern pattern = Pattern.compile(
"((([\uD83C\uDF00-\uD83D\uDDFF]|[\uD83D\uDE00-\uD83D\uDE4F]|[\uD83D\uDE80-\uD83D\uDEFF]|[\u2600-\u26FF]|[\u2700-\u27BF])[\\x{1F3FB}-\\x{1F3FF}]?))");
public static String PROTOCOL = "https:";
public static String BASE = "//twemoji.maxcdn.com/";
public static String SIZE = "16x16";
public static String EXTENSION = ".png";
public static String CLASSNAME = "emoji";
public static String parse(String text) {
StringBuffer sb = new StringBuffer();
Matcher matcher = pattern.matcher(text);
String iconUrl = null;
while (matcher.find()) {
String rawCode = matcher.group(2);
String iconId = grabTheRightIcon(rawCode);
iconUrl = PROTOCOL + BASE + SIZE + "/" + iconId + EXTENSION;
matcher.appendReplacement(sb, "<img class=\"" + CLASSNAME
+ "\" draggable=\"false\" src=\"" + iconUrl + "\">");
}
matcher.appendTail(sb);
return sb.toString();
}
private static String toCodePoint(String unicodeSurrogates, String sep) {
ArrayList<String> r = new ArrayList<>();
int c = 0, p = 0, i = 0;
if (sep == null)
sep = "-";
while (i < unicodeSurrogates.length()) {
c = unicodeSurrogates.charAt(i++);
if (p != 0) {
r.add(Integer.toString((0x10000 + ((p - 0xD800) << 10) + (c - 0xDC00)),
16));
p = 0;
}
else if (0xD800 <= c && c <= 0xDBFF) {
p = c;
}
else {
r.add(Integer.toString(c, 16));
}
}
return r.stream().collect(joining(sep));
}
private static String grabTheRightIcon(String rawText) {
// if variant is present as \uFE0F
return toCodePoint(
rawText.indexOf('\u200D') < 0 ? rawText.replace("\uFE0F", "") : rawText,
null);
}
} |
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/factory/EntryFactory.java | package am.ik.blog.entry.factory;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.Optional;
import org.springframework.core.io.Resource;
import org.yaml.snakeyaml.Yaml;
import am.ik.blog.entry.Content;
import am.ik.blog.entry.Entry;
import am.ik.blog.entry.EntryId;
import am.ik.blog.entry.FrontMatter;
public class EntryFactory {
final Yaml yaml;
final FrontMatterFactory frontMatterFactory;
public EntryFactory() {
this(new Yaml());
}
public EntryFactory(Yaml yaml) {
this.yaml = yaml;
this.frontMatterFactory = new FrontMatterFactory(yaml);
}
static boolean isPublic(Resource file) {
return file != null && Entry.isPublicFileName(file.getFilename());
}
static EntryId parseEntryId(Resource file) {
return EntryId.fromFileName(file.getFilename());
}
public Optional<Entry.EntryBuilder> parseBody(EntryId entryId, InputStream body) {
return this.parseBody(entryId,
new InputStreamReader(body, StandardCharsets.UTF_8));
}
public Optional<Entry.EntryBuilder> parseBody(EntryId entryId, String body) {
return this.parseBody(entryId, new StringReader(body));
}
private Optional<Entry.EntryBuilder> parseBody(EntryId entryId, Reader r) {
final BufferedReader reader = new BufferedReader(r);
Entry.EntryBuilder entryBuilder = Entry.builder();
entryBuilder.entryId(entryId);
try {
{
final StringBuilder out = new StringBuilder();
final String firstLine = reader.readLine();
if (FrontMatter.SEPARATOR.equals(firstLine)) {
for (String line = reader.readLine(); line != null
&& !FrontMatter.SEPARATOR.equals(line); line = reader
.readLine()) {
out.append(line);
out.append(System.lineSeparator());
}
String yaml = out.toString();
FrontMatter frontMatter = frontMatterFactory.createFromYaml(yaml);
entryBuilder.frontMatter(frontMatter);
}
else {
return Optional.empty();
}
}
{
final StringBuilder out = new StringBuilder();
for (String line = reader.readLine(); line != null; line = reader
.readLine()) {
out.append(line);
out.append(System.lineSeparator());
}
String content = out.toString().trim();
entryBuilder.content(new Content(Emoji.parse(content)));
}
}
catch (IOException e) {
throw new UncheckedIOException(e);
}
return Optional.of(entryBuilder);
}
public Optional<Entry.EntryBuilder> createFromYamlFile(Resource file) {
if (!isPublic(file)) {
return Optional.empty();
}
EntryId entryId = parseEntryId(file);
try (InputStream stream = file.getInputStream()) {
return parseBody(entryId, stream);
}
catch (IOException e) {
throw new UncheckedIOException(e);
}
}
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/factory/FrontMatterFactory.java | package am.ik.blog.entry.factory;
import static java.util.Collections.emptyList;
import static java.util.stream.Collectors.toList;
import java.time.OffsetDateTime;
import java.time.ZoneId;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.yaml.snakeyaml.Yaml;
import am.ik.blog.entry.*;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
class FrontMatterFactory {
private final Yaml yaml;
@SuppressWarnings({ "unchecked" })
public FrontMatter createFromYaml(String string) {
Map<String, Object> map = (Map<String, Object>) yaml.load(string);
Title title = new Title((String) map.getOrDefault("title", "no title"));
Categories categories = new Categories(
((List<String>) map.computeIfAbsent("categories", key -> emptyList()))
.stream().map(Category::new).collect(toList()));
Tags tags = new Tags(
((List<String>) map.computeIfAbsent("tags", key -> emptyList())).stream()
.map(Tag::new).collect(toList()));
EventTime date = map.containsKey("date")
? new EventTime(OffsetDateTime.ofInstant(
((Date) map.get("date")).toInstant(), ZoneId.systemDefault()))
: EventTime.UNSET;
EventTime updated = map.containsKey("updated")
? new EventTime(OffsetDateTime.ofInstant(
((Date) map.get("updated")).toInstant(), ZoneId.systemDefault()))
: EventTime.UNSET;
PremiumPoint point = map.containsKey("point")
? new PremiumPoint((Integer) map.get("point")) : PremiumPoint.UNSET;
return new FrontMatter(title, categories, tags, date, updated, point);
}
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/json/AuthorDeserializer.java | package am.ik.blog.entry.json;
import java.io.IOException;
import java.time.OffsetDateTime;
import org.springframework.boot.jackson.JsonObjectDeserializer;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.ObjectCodec;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonNode;
import am.ik.blog.entry.Author;
import am.ik.blog.entry.EventTime;
import am.ik.blog.entry.Name;
public class AuthorDeserializer extends JsonObjectDeserializer<Author> {
@Override
protected Author deserializeObject(JsonParser jsonParser,
DeserializationContext deserializationContext, ObjectCodec objectCodec,
JsonNode jsonNode) throws IOException {
Name name = new Name(nullSafeValue(jsonNode.get("name"), String.class));
String dateText = nullSafeValue(jsonNode.get("date"), String.class);
EventTime date = new EventTime(OffsetDateTime.parse(dateText));
return new Author(name, date);
}
} |
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/json/EntryDeserializer.java | package am.ik.blog.entry.json;
import java.io.IOException;
import org.springframework.boot.jackson.JsonObjectDeserializer;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.ObjectCodec;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonNode;
import am.ik.blog.entry.*;
public class EntryDeserializer extends JsonObjectDeserializer<Entry> {
@Override
protected Entry deserializeObject(JsonParser jsonParser,
DeserializationContext deserializationContext, ObjectCodec objectCodec,
JsonNode jsonNode) throws IOException {
Entry.EntryBuilder builder = Entry.builder();
builder.entryId(new EntryId(nullSafeValue(jsonNode.get("entryId"), Long.class)));
builder.content(
new Content(nullSafeValue(jsonNode.get("content"), String.class)));
JsonNode frontMatterNode = jsonNode.get("frontMatter");
FrontMatter frontMatter = objectCodec
.readValue(frontMatterNode.traverse(objectCodec), FrontMatter.class);
builder.frontMatter(frontMatter);
JsonNode createdNode = jsonNode.get("created");
Author created = objectCodec.readValue(createdNode.traverse(objectCodec),
Author.class);
builder.created(created);
JsonNode updatedNode = jsonNode.get("updated");
Author updated = objectCodec.readValue(updatedNode.traverse(objectCodec),
Author.class);
builder.updated(updated);
return builder.build();
}
}
|
0 | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry | java-sources/am/ik/blog/blog-domain/4.3.6/am/ik/blog/entry/json/FrontMatterDeserializer.java | package am.ik.blog.entry.json;
import java.io.IOException;
import am.ik.blog.entry.*;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.ObjectCodec;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonNode;
import org.springframework.boot.jackson.JsonObjectDeserializer;
import static java.util.stream.Collectors.toList;
import static java.util.stream.StreamSupport.stream;
public class FrontMatterDeserializer extends JsonObjectDeserializer<FrontMatter> {
@Override
protected FrontMatter deserializeObject(JsonParser jsonParser,
DeserializationContext deserializationContext, ObjectCodec objectCodec,
JsonNode jsonNode) throws IOException {
Title title = new Title(nullSafeValue(jsonNode.get("title"), String.class));
JsonNode tagsNode = jsonNode.get("tags");
Tags tags = tagsNode == null ? new Tags()
: new Tags(stream(tagsNode.spliterator(), false)
.map(n -> new Tag(n.asText())).collect(toList()));
JsonNode categoriesNode = jsonNode.get("categories");
Categories categories = categoriesNode == null ? new Categories()
: new Categories(stream(categoriesNode.spliterator(), false)
.map(n -> new Category(n.asText())).collect(toList()));
PremiumPoint point = new PremiumPoint(
nullSafeValue(jsonNode.get("point"), Integer.class));
return new FrontMatter(title, categories, tags, EventTime.UNSET, EventTime.UNSET,
point);
}
} |
0 | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog/entry/CategoryMapper.java | package am.ik.blog.entry;
import java.util.List;
import java.util.stream.Stream;
import static java.util.stream.Collectors.toList;
public interface CategoryMapper {
default List<Categories> findAll() {
return findAllConcatenatedCategory().stream()
.map(s -> new Categories(
Stream.of(s.split(",")).map(Category::new).collect(toList())))
.collect(toList());
}
default List<Categories> findLikeCategoryName(String categoryName) {
return findConcatenatedCategoryLikeCategoryName(categoryName).stream()
.map(s -> new Categories(
Stream.of(s.split(",")).map(Category::new).collect(toList())))
.collect(toList());
}
List<String> findAllConcatenatedCategory();
List<String> findConcatenatedCategoryLikeCategoryName(String categoryName);
}
|
0 | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog/entry/EntryMapper.java | package am.ik.blog.entry;
import java.util.Collections;
import java.util.List;
import am.ik.blog.entry.criteria.SearchCriteria;
import reactor.core.publisher.Flux;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
public interface EntryMapper {
long count(SearchCriteria searchCriteria);
Entry findOne(EntryId entryId, boolean excludeContent);
List<Entry> findAll(SearchCriteria searchCriteria, Pageable pageable);
EventTime findLatestModifiedDate();
EventTime findLastModifiedDate(EntryId entryId);
void save(Entry entry);
int delete(EntryId entryId);
default Page<Entry> findPage(SearchCriteria searchCriteria, Pageable pageable) {
long count = count(searchCriteria);
if (count <= 0) {
return new PageImpl<>(Collections.emptyList(), pageable, count);
}
else {
return new PageImpl<>(findAll(searchCriteria, pageable), pageable, count);
}
}
Flux<Entry> collectAll(SearchCriteria searchCriteria, Pageable pageable);
}
|
0 | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog/entry/TagMapper.java | package am.ik.blog.entry;
import java.util.List;
import static java.util.stream.Collectors.toList;
public interface TagMapper {
default List<Tag> findOrderByTagNameAsc() {
return findTagStringOrderByTagNameAsc().stream().map(Tag::new).collect(toList());
}
List<String> findTagStringOrderByTagNameAsc();
}
|
0 | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog/entry | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog/entry/criteria/CategoryOrder.java | package am.ik.blog.entry.criteria;
import am.ik.blog.entry.Category;
import lombok.Data;
import lombok.RequiredArgsConstructor;
/**
* Created by makit on 西暦17/04/05.
*/
@Data
@RequiredArgsConstructor
public class CategoryOrder {
private final Category category;
private final int categoryOrder;
}
|
0 | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog/entry | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog/entry/criteria/CategoryOrders.java | package am.ik.blog.entry.criteria;
import java.util.HashSet;
import java.util.Set;
import am.ik.blog.entry.Category;
import lombok.Data;
import lombok.RequiredArgsConstructor;
/**
* Created by makit on 西暦17/04/05.
*/
@Data
@RequiredArgsConstructor
public class CategoryOrders {
private final Set<CategoryOrder> value = new HashSet<>();
public CategoryOrders add(CategoryOrder categoryOrder) {
value.add(categoryOrder);
return this;
}
public CategoryOrders add(Category category, int categoryOrder) {
return add(new CategoryOrder(category, categoryOrder));
}
}
|
0 | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog/entry | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog/entry/criteria/SearchCriteria.java | package am.ik.blog.entry.criteria;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.stream.Collectors;
import am.ik.blog.entry.Name;
import am.ik.blog.entry.Tag;
import lombok.Builder;
import lombok.Getter;
import org.springframework.util.StringUtils;
@Builder
@Getter
public class SearchCriteria {
public static final SearchCriteria DEFAULT = defaults().build();
private boolean excludeContent;
private Name createdBy;
private Name lastModifiedBy;
private Tag tag;
private CategoryOrders categoryOrders;
private String keyword;
public static SearchCriteria.SearchCriteriaBuilder defaults() {
return SearchCriteria.builder().excludeContent(true);
}
public String toJoinClause() {
StringBuilder sb = new StringBuilder();
if (this.tag != null) {
sb.append("LEFT JOIN entry_tag AS et ON e.entry_id = et.entry_id ");
}
if (this.categoryOrders != null) {
sb.append("LEFT JOIN category AS c ON e.entry_id = c.entry_id ");
}
return sb.toString();
}
public ClauseAndParams toWhereClause() {
Map<String, String> clause = new LinkedHashMap<>();
Map<String, Object> params = new HashMap<>();
if (!StringUtils.isEmpty(this.keyword)) {
params.put("keyword", "%" + this.keyword + "%");
clause.put("keyword", "AND e.content LIKE :keyword");
}
if (this.createdBy != null) {
params.put("created_by", this.createdBy.getValue());
clause.put("created_by", "AND e.created_by = :created_by");
}
if (this.lastModifiedBy != null) {
params.put("last_modified_by", this.lastModifiedBy.getValue());
clause.put("last_modified_by", "AND e.last_modified_by = :last_modified_by");
}
if (this.categoryOrders != null) {
this.categoryOrders.getValue().forEach(c -> {
int categoryOrder = c.getCategoryOrder();
String categoryNameKey = "category_name" + categoryOrder;
String categoryOrderKey = "category_order" + categoryOrder;
params.put(categoryNameKey, c.getCategory().getValue());
clause.put(categoryNameKey, "AND c.category_name = :" + categoryNameKey);
params.put(categoryOrderKey, categoryOrder);
clause.put(categoryOrderKey,
"AND c.category_order = :" + categoryOrderKey);
});
}
if (this.tag != null) {
params.put("tag", this.tag.getValue());
clause.put("tag", "AND et.tag_name = :tag");
}
return new ClauseAndParams(clause, params);
}
public static class ClauseAndParams {
private final Map<String, String> clause;
private final Map<String, Object> params;
ClauseAndParams(Map<String, String> clause, Map<String, Object> params) {
this.clause = clause;
this.params = params;
}
public String clauseForEntryId() {
return this.clause.values().stream().collect(Collectors.joining(" "));
}
public Map<String, Object> params() {
return this.params;
}
}
}
|
0 | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog/entry | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog/entry/jdbc/CategoryJdbcMapper.java | package am.ik.blog.entry.jdbc;
import java.util.List;
import am.ik.blog.entry.CategoryMapper;
import org.springframework.cloud.sleuth.annotation.NewSpan;
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.stereotype.Repository;
@Repository
public class CategoryJdbcMapper implements CategoryMapper {
private final NamedParameterJdbcTemplate jdbcTemplate;
public CategoryJdbcMapper(NamedParameterJdbcTemplate jdbcTemplate) {
this.jdbcTemplate = jdbcTemplate;
}
@Override
@NewSpan
public List<String> findAllConcatenatedCategory() {
return this.jdbcTemplate.query(
"SELECT DISTINCT GROUP_CONCAT(DISTINCT category_name ORDER BY category_order ASC SEPARATOR ',') category"
+ " FROM category" //
+ " GROUP BY entry_id" //
+ " ORDER BY category",
(rs, i) -> rs.getString("category"));
}
@Override
@NewSpan
public List<String> findConcatenatedCategoryLikeCategoryName(String categoryName) {
MapSqlParameterSource source = new MapSqlParameterSource()
.addValue("category_name", categoryName + "%");
return this.jdbcTemplate.query(
" SELECT DISTINCT GROUP_CONCAT(DISTINCT category_name ORDER BY category_order ASC SEPARATOR ',') category"
+ " FROM category" //
+ " GROUP BY entry_id" //
+ " HAVING category LIKE :category_name" //
+ " ORDER BY category",
source, (rs, i) -> rs.getString("category"));
}
}
|
0 | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog/entry | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog/entry/jdbc/EntryExtractors.java | package am.ik.blog.entry.jdbc;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.function.Consumer;
import am.ik.blog.entry.*;
import am.ik.blog.entry.Entry.EntryBuilder;
import org.springframework.jdbc.core.ResultSetExtractor;
import org.springframework.util.StringUtils;
class EntryExtractors {
static final ZoneOffset zoneOffset = OffsetDateTime.now().getOffset();
static ResultSetExtractor<Optional<Entry>> forEntry(boolean excludeContent) {
return rs -> {
if (!rs.next()) {
return Optional.empty();
}
List<Category> categories = new ArrayList<>();
EntryBuilder builder = builder(rs, categories, excludeContent);
do {
String categoryName = rs.getString("category_name");
if (!StringUtils.isEmpty(categoryName)) {
categories.add(new Category(categoryName));
}
}
while (rs.next());
return Optional.of(builder.build());
};
}
static ResultSetExtractor<List<Entry>> forEntries(boolean excludeContent) {
return rs -> {
List<Entry> entries = new ArrayList<>();
if (rs.next()) {
withEntries(rs, entries::add, excludeContent);
}
return entries;
};
}
static void withEntries(ResultSet rs, Consumer<Entry> consumer,
boolean excludeContent) throws SQLException {
long prevId = -1;
EntryBuilder builder = null;
List<Category> categories = new ArrayList<>();
do {
long entryId = rs.getLong("entry_id");
if (entryId != prevId) {
if (builder != null) {
Entry entry = builder.build();
consumer.accept(entry);
}
categories = new ArrayList<>();
builder = builder(rs, categories, excludeContent);
}
Category category = new Category(rs.getString("category_name"));
categories.add(category);
prevId = entryId;
}
while (rs.next());
if (builder != null) {
// for last loop
Entry entry = builder.build();
consumer.accept(entry);
}
}
private static EntryBuilder builder(ResultSet rs, List<Category> categories,
boolean excludeContent) throws SQLException {
EventTime createdDate = new EventTime(OffsetDateTime
.of(rs.getTimestamp("created_date").toLocalDateTime(), zoneOffset));
EventTime lastModifiedDate = new EventTime(OffsetDateTime
.of(rs.getTimestamp("last_modified_date").toLocalDateTime(), zoneOffset));
EntryBuilder entryBuilder = Entry.builder() //
.entryId(new EntryId(rs.getLong("entry_id")));
if (!excludeContent) {
entryBuilder = entryBuilder.content(new Content(rs.getString("content")));
}
else {
entryBuilder = entryBuilder.content(new Content(""));
}
return entryBuilder //
.frontMatter(new FrontMatter(new Title(rs.getString("title")),
new Categories(categories), new Tags(), createdDate,
lastModifiedDate)) //
.created(new Author(new Name(rs.getString("created_by")), createdDate)) //
.updated(new Author(new Name(rs.getString("last_modified_by")),
lastModifiedDate));
}
} |
0 | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog/entry | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog/entry/jdbc/EntryJdbcMapper.java | package am.ik.blog.entry.jdbc;
import java.time.OffsetDateTime;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import am.ik.blog.entry.*;
import am.ik.blog.entry.criteria.SearchCriteria;
import am.ik.blog.entry.criteria.SearchCriteria.ClauseAndParams;
import reactor.core.publisher.Flux;
import reactor.util.function.Tuple2;
import reactor.util.function.Tuples;
import org.springframework.cloud.sleuth.annotation.NewSpan;
import org.springframework.cloud.sleuth.annotation.SpanTag;
import org.springframework.data.domain.Pageable;
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.jdbc.core.namedparam.SqlParameterSource;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import static am.ik.blog.entry.jdbc.EntryExtractors.zoneOffset;
import static java.util.stream.Collectors.*;
@Repository
public class EntryJdbcMapper implements EntryMapper {
private final NamedParameterJdbcTemplate jdbcTemplate;
public EntryJdbcMapper(NamedParameterJdbcTemplate jdbcTemplate) {
this.jdbcTemplate = jdbcTemplate;
}
@Override
@NewSpan
public long count(SearchCriteria searchCriteria) {
ClauseAndParams clauseAndParams = searchCriteria.toWhereClause();
MapSqlParameterSource source = new MapSqlParameterSource();
source.addValues(clauseAndParams.params());
Long count = this.jdbcTemplate
.queryForObject("SELECT count(e.entry_id) FROM entry AS e "
+ searchCriteria.toJoinClause() + " WHERE 1=1 "
+ clauseAndParams.clauseForEntryId(), source, Long.class);
return count;
}
@Override
@NewSpan
public Entry findOne(@SpanTag("entryId") EntryId entryId,
@SpanTag("excludeContent") boolean excludeContent) {
MapSqlParameterSource source = new MapSqlParameterSource() //
.addValue("entry_id", entryId.getValue());
return this.jdbcTemplate.query("SELECT e.entry_id, e.title"
+ (excludeContent ? "" : ", e.content")
+ ", e.created_by, e.created_date, e.last_modified_by, e.last_modified_date, c.category_name"
+ " FROM entry AS e LEFT OUTER JOIN category AS c ON e.entry_id = c.entry_id"
+ " WHERE e.entry_id = :entry_id" //
+ " ORDER BY c.category_order ASC", source,
EntryExtractors.forEntry(excludeContent)) //
.map(e -> {
List<Tag> tags = this.jdbcTemplate.query(
"SELECT tag_name FROM entry_tag WHERE entry_id = :entry_id",
source, (rs, i) -> new Tag(rs.getString("tag_name")));
FrontMatter fm = e.getFrontMatter();
return e.copy().frontMatter(new FrontMatter(fm.title(),
fm.categories(), new Tags(tags), fm.date(), fm.updated()))
.build();
}).orElse(null);
}
Map<EntryId, Tags> tagsMap(List<Long> ids) {
MapSqlParameterSource source = new MapSqlParameterSource() //
.addValue("entry_ids", ids);
return this.jdbcTemplate.query(
"SELECT entry_id, tag_name FROM entry_tag WHERE entry_id IN (:entry_ids)",
source,
(rs, i) -> Tuples.of(new EntryId(rs.getLong("entry_id")),
new Tag(rs.getString("tag_name"))))
.stream() //
.collect(groupingBy(Tuple2::getT1)) //
.entrySet() //
.stream() //
.map(e -> Tuples.of(e.getKey(), new Tags(e.getValue() //
.stream() //
.map(Tuple2::getT2) //
.collect(toList()))))
.collect(toMap(Tuple2::getT1, Tuple2::getT2));
}
List<Long> entryIds(SearchCriteria searchCriteria, Pageable pageable,
ClauseAndParams clauseAndParams, MapSqlParameterSource source) {
return this.jdbcTemplate.query(
"SELECT e.entry_id FROM entry AS e " + searchCriteria.toJoinClause()
+ " WHERE 1=1 " + clauseAndParams.clauseForEntryId()
+ " ORDER BY e.last_modified_date DESC LIMIT "
+ pageable.getPageSize() + " OFFSET " + pageable.getOffset(),
source, (rs, i) -> rs.getLong("entry_id"));
}
String sqlForEntries(boolean excludeContent) {
return "SELECT e.entry_id, e.title" + (excludeContent ? "" : ", e.content")
+ ", e.created_by, e.created_date, e.last_modified_by, e.last_modified_date, c.category_name"
+ " FROM entry AS e LEFT JOIN category AS c ON e.entry_id = c.entry_id "
+ " WHERE e.entry_id IN (:entry_ids)"
+ " ORDER BY e.last_modified_date DESC, c.category_order ASC";
}
@Override
@NewSpan
public List<Entry> findAll(SearchCriteria searchCriteria, Pageable pageable) {
ClauseAndParams clauseAndParams = searchCriteria.toWhereClause();
MapSqlParameterSource source = new MapSqlParameterSource();
source.addValues(clauseAndParams.params());
List<Long> ids = this.entryIds(searchCriteria, pageable, clauseAndParams, source);
source.addValue("entry_ids", ids);
boolean excludeContent = searchCriteria.isExcludeContent();
Map<EntryId, Tags> tagsMap = this.tagsMap(ids);
List<Entry> entries = this.jdbcTemplate.query(this.sqlForEntries(excludeContent),
source, EntryExtractors.forEntries(excludeContent));
return entries.stream() //
.map(e -> {
FrontMatter fm = e.getFrontMatter();
EntryId entryId = e.getEntryId();
Categories categories = fm.categories();
Tags tags = tagsMap.get(entryId);
return e.copy() //
.frontMatter(new FrontMatter(fm.title(), categories, tags,
fm.date(), fm.updated()))
.build();
}) //
.collect(toList());
}
@Override
@NewSpan
public Flux<Entry> collectAll(SearchCriteria searchCriteria, Pageable pageable) {
return Flux.create(sink -> {
ClauseAndParams clauseAndParams = searchCriteria.toWhereClause();
MapSqlParameterSource source = new MapSqlParameterSource();
source.addValues(clauseAndParams.params());
List<Long> ids = this.entryIds(searchCriteria, pageable, clauseAndParams,
source);
source.addValue("entry_ids", ids);
boolean excludeContent = searchCriteria.isExcludeContent();
Map<EntryId, Tags> tagsMap = this.tagsMap(ids);
this.jdbcTemplate.query(this.sqlForEntries(excludeContent), source, rs -> {
EntryExtractors.withEntries(rs, e -> {
FrontMatter fm = e.getFrontMatter();
EntryId entryId = e.getEntryId();
Categories categories = fm.categories();
Tags tags = tagsMap.get(entryId);
Entry entry = e.copy() //
.frontMatter(new FrontMatter(fm.title(), categories, tags,
fm.date(), fm.updated()))
.build();
sink.next(entry);
}, excludeContent);
});
sink.complete();
});
}
@Override
@NewSpan
@Transactional
public void save(Entry entry) {
FrontMatter frontMatter = entry.frontMatter();
Author created = entry.getCreated();
Author updated = entry.getUpdated();
MapSqlParameterSource source = new MapSqlParameterSource() //
.addValue("entry_id", entry.entryId().getValue()) //
.addValue("title", frontMatter.title().getValue()) //
.addValue("content", entry.content().getValue()) //
.addValue("created_by", created.getName().getValue()) //
.addValue("created_date", created.getDate().getValue()) //
.addValue("last_modified_by", updated.getName().getValue()) //
.addValue("last_modified_date", updated.getDate().getValue()) //
;
this.jdbcTemplate.update(
"INSERT INTO entry (entry_id, title, content, created_by, created_date, last_modified_by, last_modified_date)"
+ " VALUES (:entry_id, :title, :content, :created_by, :created_date, :last_modified_by, :last_modified_date)"
+ " ON DUPLICATE KEY UPDATE" //
+ " title = :title," //
+ " content = :content," //
+ " created_by = :created_by," //
+ " created_date = :created_date," //
+ " last_modified_by = :last_modified_by," //
+ " last_modified_date = :last_modified_date",
source);
AtomicInteger order = new AtomicInteger(0);
SqlParameterSource[] categories = frontMatter.getCategories().getValue().stream()
.map(category -> new MapSqlParameterSource() //
.addValue("category_name", category.getValue()) //
.addValue("category_order", order.getAndIncrement()) //
.addValue("entry_id", entry.entryId().getValue()))
.toArray(SqlParameterSource[]::new);
this.jdbcTemplate.update("DELETE FROM category WHERE entry_id = :entry_id",
source);
this.jdbcTemplate.batchUpdate(
"INSERT INTO category (category_name, category_order, entry_id) VALUES (:category_name, :category_order, :entry_id)",
categories);
SqlParameterSource[] tags = frontMatter.getTags().getValue().stream()
.map(tag -> new MapSqlParameterSource() //
.addValue("tag", tag.getValue()) //
.addValue("entry_id", entry.entryId().getValue()))
.toArray(SqlParameterSource[]::new);
this.jdbcTemplate.update("DELETE FROM entry_tag WHERE entry_id = :entry_id",
source);
this.jdbcTemplate.batchUpdate(
"INSERT INTO tag (tag_name) VALUES (:tag) ON DUPLICATE KEY UPDATE tag_name = :tag",
tags);
this.jdbcTemplate.batchUpdate(
"INSERT INTO entry_tag (entry_id, tag_name) VALUES (:entry_id, :tag)",
tags);
}
@Override
@NewSpan
@Transactional
public int delete(@SpanTag("entryId") EntryId entryId) {
MapSqlParameterSource source = new MapSqlParameterSource().addValue("entry_id",
entryId.getValue());
return this.jdbcTemplate.update("DELETE FROM entry WHERE entry_id = :entry_id",
source);
}
@Override
@NewSpan
public EventTime findLatestModifiedDate() {
return this.jdbcTemplate.queryForObject(
"SELECT last_modified_date FROM entry ORDER BY last_modified_date DESC LIMIT 1",
Collections.emptyMap(),
(rs, i) -> new EventTime(OffsetDateTime.of(
rs.getTimestamp("last_modified_date").toLocalDateTime(),
zoneOffset)));
}
@Override
@NewSpan
public EventTime findLastModifiedDate(@SpanTag("entryId") EntryId entryId) {
MapSqlParameterSource source = new MapSqlParameterSource() //
.addValue("entry_id", entryId.getValue());
return this.jdbcTemplate.queryForObject(
"SELECT last_modified_date FROM entry WHERE entry_id = :entry_id", source,
(rs, i) -> new EventTime(OffsetDateTime.of(
rs.getTimestamp("last_modified_date").toLocalDateTime(),
zoneOffset)));
}
}
|
0 | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog/entry | java-sources/am/ik/blog/blog-mapper/4.8.1/am/ik/blog/entry/jdbc/TagJdbcMapper.java | package am.ik.blog.entry.jdbc;
import java.util.List;
import am.ik.blog.entry.TagMapper;
import org.springframework.cloud.sleuth.annotation.NewSpan;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
@Repository
public class TagJdbcMapper implements TagMapper {
private final JdbcTemplate jdbcTemplate;
public TagJdbcMapper(JdbcTemplate jdbcTemplate) {
this.jdbcTemplate = jdbcTemplate;
}
@Override
@NewSpan
public List<String> findTagStringOrderByTagNameAsc() {
return this.jdbcTemplate.query("SELECT tag_name FROM tag ORDER BY tag_name ASC",
(rs, i) -> rs.getString("tag_name"));
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/CategoLJ3ApiConfig.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api;
import am.ik.categolj3.api.category.CategoryService;
import am.ik.categolj3.api.category.InMemoryCategoryService;
import am.ik.categolj3.api.jest.JestProperties;
import am.ik.categolj3.api.tag.InMemoryTagService;
import am.ik.categolj3.api.tag.TagService;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.util.StdDateFormat;
import com.google.gson.*;
import io.searchbox.client.JestClient;
import io.searchbox.client.JestClientFactory;
import io.searchbox.client.config.HttpClientConfig;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
@Configuration
@ComponentScan
@EnableCaching
@EnableAsync
@EnableScheduling
public class CategoLJ3ApiConfig {
@Bean
@ConditionalOnMissingBean
JestClient jestClient(JestProperties jestProperties) {
JestClientFactory factory = new JestClientFactory();
factory.setHttpClientConfig(new HttpClientConfig.Builder(jestProperties.getConnectionUrl())
.multiThreaded(true)
.connTimeout(jestProperties.getConnectionTimeout())
.readTimeout(jestProperties.getReadTimeout())
.gson(gson())
.build());
return factory.getObject();
}
@Bean
Gson gson() {
return new GsonBuilder()
.setDateFormat("yyyy-MM-dd'T'HH:mm:ssX")
.registerTypeAdapter(OffsetDateTime.class,
(JsonDeserializer<OffsetDateTime>) (json, type, context)
-> DateTimeFormatter.ISO_OFFSET_DATE_TIME.parse(json.getAsString(), OffsetDateTime::from))
.registerTypeAdapter(OffsetDateTime.class,
(JsonSerializer<OffsetDateTime>) (json, type, context)
-> new JsonPrimitive(DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(json))).create();
}
@Bean
@ConditionalOnMissingBean
ObjectMapper objectMapper() {
return new Jackson2ObjectMapperBuilder()
.dateFormat(new StdDateFormat())
.build();
}
@Bean
@ConditionalOnMissingBean
TagService tagService() {
return new InMemoryTagService();
}
@Bean
@ConditionalOnMissingBean
CategoryService categoryService() {
return new InMemoryCategoryService();
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/EnableCategoLJ3ApiServer.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api;
import org.springframework.context.annotation.Import;
import java.lang.annotation.*;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Import(CategoLJ3ApiConfig.class)
public @interface EnableCategoLJ3ApiServer {
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/category/CategoryRestController.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.category;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping(path = "api")
public class CategoryRestController {
@Autowired
CategoryService categoryService;
@RequestMapping(path = "categories", method = RequestMethod.GET)
List<List<String>> list() {
return categoryService.findAllOrderByNameAsc();
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/category/CategoryService.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.category;
import java.util.List;
public interface CategoryService {
List<List<String>> findAllOrderByNameAsc();
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/category/InMemoryCategoryService.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.category;
import am.ik.categolj3.api.entry.Entry;
import am.ik.categolj3.api.event.EntryEvictEvent;
import am.ik.categolj3.api.event.EntryPutEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.util.CollectionUtils;
import java.util.Comparator;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.stream.Collectors;
@Slf4j
public class InMemoryCategoryService implements CategoryService {
private final ConcurrentMap<Long, List<String>> categories = new ConcurrentHashMap<>();
@EventListener
public void handlePutEntry(EntryPutEvent.Bulk event) {
if (log.isInfoEnabled()) {
log.info("bulk put ({})", event.getEvents().size());
}
categories.putAll(event.getEvents().stream()
.map(EntryPutEvent::getEntry)
.filter(e -> !CollectionUtils.isEmpty(e.getFrontMatter().getCategories()))
.collect(Collectors.toMap(Entry::getEntryId, e -> e.getFrontMatter().getCategories())));
}
@EventListener
public void handleEvictEntry(EntryEvictEvent.Bulk event) {
if (log.isInfoEnabled()) {
log.info("bulk evict ({})", event.getEvents().size());
}
event.getEvents().forEach(e -> categories.remove(e.getEntryId()));
}
@Override
public List<List<String>> findAllOrderByNameAsc() {
return this.categories.values().stream()
.distinct()
.sorted(Comparator.comparing(categories -> String.join(",", categories)))
.collect(Collectors.toList());
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/entry/Author.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.entry;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.time.OffsetDateTime;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Author implements Serializable {
private String name;
private OffsetDateTime date;
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/entry/Entry.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.entry;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.searchbox.annotations.JestId;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Optional;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Entry implements Serializable {
public static final String INDEX_NAME = "entries";
public static final String DOC_TYPE = "entry";
@JestId
private Long entryId;
@JsonInclude(JsonInclude.Include.NON_NULL)
private String content;
private Author created;
private Author updated;
private FrontMatter frontMatter;
public static boolean isPublic(Path file) {
return file != null && file.toFile().getName().matches("[0-9]+\\.md");
}
public static Long parseEntryId(Path file) {
String entryId = file.toFile().getName().replace(".md", "");
return Long.valueOf(entryId);
}
public static Optional<Entry> loadFromFile(Path file) {
if (!isPublic(file)) {
return Optional.empty();
}
try (InputStream stream = Files.newInputStream(file)) {
final BufferedReader reader = new BufferedReader(new InputStreamReader(stream, StandardCharsets.UTF_8));
Entry entry = new Entry();
entry.setEntryId(parseEntryId(file));
try {
{
final StringBuilder out = new StringBuilder();
final String firstLine = reader.readLine();
if (FrontMatter.SEPARATOR.equals(firstLine)) {
for (String line = reader.readLine(); line != null
&& !FrontMatter.SEPARATOR.equals(
line); line = reader.readLine()) {
out.append(line);
out.append(System.lineSeparator());
}
entry.setFrontMatter(FrontMatter.loadFromYamlString(out
.toString()));
} else {
return Optional.empty();
}
}
{
final StringBuilder out = new StringBuilder();
for (String line = reader
.readLine(); line != null; line = reader
.readLine()) {
out.append(line);
out.append(System.lineSeparator());
}
entry.setContent(out.toString().trim());
}
} catch (IOException e) {
throw new UncheckedIOException(e);
}
return Optional.of(entry);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/entry/EntryEventFiringCache.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.entry;
import am.ik.categolj3.api.event.EntryEvictEvent;
import am.ik.categolj3.api.event.EntryPutEvent;
import am.ik.categolj3.api.event.EventManager;
import org.springframework.cache.Cache;
public class EntryEventFiringCache implements Cache {
private final Cache delegate;
private final EventManager eventManager;
public EntryEventFiringCache(Cache delegate, EventManager eventManager) {
this.delegate = delegate;
this.eventManager = eventManager;
}
@Override
public void clear() {
delegate.clear();
}
@Override
public String getName() {
return delegate.getName();
}
@Override
public Object getNativeCache() {
return delegate.getNativeCache();
}
@Override
public ValueWrapper get(Object key) {
return delegate.get(key);
}
@Override
public <T> T get(Object key, Class<T> type) {
return delegate.get(key, type);
}
@Override
public void put(Object key, Object value) {
delegate.put(key, value);
eventManager.registerEntryPutEvent(new EntryPutEvent((Entry) value));
}
@Override
public ValueWrapper putIfAbsent(Object key, Object value) {
ValueWrapper wrapper = delegate.putIfAbsent(key, value);
if (wrapper == null) {
eventManager.registerEntryPutEvent(new EntryPutEvent((Entry) value));
}
return wrapper;
}
@Override
public void evict(Object key) {
delegate.evict(key);
eventManager.registerEntryEvictEvent(new EntryEvictEvent((Long) key));
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/entry/EntryFileDownloadController.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.entry;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class EntryFileDownloadController {
@Value("${downloadFile:classpath:/new.md}")
Resource downloadFile;
@RequestMapping(path = "new")
ResponseEntity<Resource> download() {
return ResponseEntity
.status(HttpStatus.OK)
.contentType(MediaType.parseMediaType("text/x-markdown"))
.body(downloadFile);
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/entry/EntryProperties.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.entry;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@Component
@ConfigurationProperties(prefix = "entry")
@Data
public class EntryProperties {
@NotEmpty
private String categoriesSeparator = ",";
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/entry/EntryRestController.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.entry;
import com.google.common.base.Splitter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.web.PageableDefault;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.stream.Collectors;
@RestController
@RequestMapping(path = "api")
public class EntryRestController {
@Autowired
EntryService entryService;
@Autowired
EntryProperties entryProperties;
final SearchEntryOperations.SearchOptions excludeContentOption = SearchEntryOperations.SearchOptions.builder()
.excludeContent(true)
.build();
@RequestMapping(path = "entries", method = RequestMethod.GET)
Page<Entry> getEntries(@PageableDefault Pageable pageable, @RequestParam(defaultValue = "false") boolean excludeContent) {
return excludeContent ? entryService.findAll(pageable, excludeContentOption) : entryService.findAll(pageable);
}
@RequestMapping(path = "entries", method = RequestMethod.GET, params = "q")
Page<Entry> searchEntries(@PageableDefault Pageable pageable, @RequestParam String q, @RequestParam(defaultValue = "false") boolean excludeContent) {
return excludeContent ? entryService.findByQuery(q, pageable, excludeContentOption) : entryService.findByQuery(q, pageable);
}
@RequestMapping(path = "users/{createdBy}/entries", method = RequestMethod.GET)
Page<Entry> getEntriesByCreatedBy(@PageableDefault Pageable pageable, @PathVariable String createdBy, @RequestParam(defaultValue = "false") boolean excludeContent) {
return excludeContent ? entryService.findByCreatedBy(createdBy, pageable, excludeContentOption) : entryService.findByCreatedBy(createdBy, pageable);
}
@RequestMapping(path = "users/{updatedBy}/entries", method = RequestMethod.GET, params = "updated")
Page<Entry> getEntriesByUpdatedBy(@PageableDefault Pageable pageable, @PathVariable String updatedBy, @RequestParam(defaultValue = "false") boolean excludeContent) {
return excludeContent ? entryService.findByUpdatedBy(updatedBy, pageable, excludeContentOption) : entryService.findByUpdatedBy(updatedBy, pageable);
}
@RequestMapping(path = "tags/{tag}/entries", method = RequestMethod.GET)
Page<Entry> getEntriesByTag(@PageableDefault Pageable pageable, @PathVariable String tag, @RequestParam(defaultValue = "false") boolean excludeContent) {
return excludeContent ? entryService.findByTag(tag, pageable, excludeContentOption) : entryService.findByTag(tag, pageable);
}
@RequestMapping(path = "categories/{categories}/entries", method = RequestMethod.GET)
Page<Entry> getEntriesByCategories(@PageableDefault Pageable pageable, @PathVariable String categories, @RequestParam(defaultValue = "false") boolean excludeContent) {
List<String> c = Splitter.on(entryProperties.getCategoriesSeparator())
.trimResults()
.omitEmptyStrings()
.splitToList(categories)
.stream()
.map(String::toLowerCase)
.collect(Collectors.toList());
return excludeContent ? entryService.findByCategories(c, pageable, excludeContentOption) : entryService.findByCategories(c, pageable);
}
@RequestMapping(path = "entries/{entryId}", method = RequestMethod.GET)
Entry getEntry(@PathVariable Long entryId) {
return entryService.findOne(entryId);
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/entry/EntryService.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.entry;
public interface EntryService extends SimpleEntryOperations,
SearchEntryOperations {
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/entry/EntryServiceImpl.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.entry;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class EntryServiceImpl implements EntryService {
@Autowired
SimpleEntryOperations simpleEntryOperations;
@Autowired
SearchEntryOperations searchEntryOperations;
@Override
public Page<Entry> findAll(Pageable pageable, SearchOptions options) {
return this.searchEntryOperations.findAll(pageable, options);
}
@Override
public Page<Entry> findByTag(String tag, Pageable pageable, SearchOptions options) {
return this.searchEntryOperations.findByTag(tag, pageable, options);
}
@Override
public Page<Entry> findByCategories(List<String> categories, Pageable pageable, SearchOptions options) {
return this.searchEntryOperations.findByCategories(categories, pageable, options);
}
@Override
public Page<Entry> findByCreatedBy(String user, Pageable pageable, SearchOptions options) {
return this.searchEntryOperations.findByCreatedBy(user, pageable, options);
}
@Override
public Page<Entry> findByUpdatedBy(String user, Pageable pageable, SearchOptions options) {
return this.searchEntryOperations.findByUpdatedBy(user, pageable, options);
}
@Override
public Page<Entry> findByQuery(String keyword, Pageable pageable, SearchOptions options) {
return this.searchEntryOperations.findByQuery(keyword, pageable, options);
}
@Override
public Entry findOne(Long entryId) {
return this.simpleEntryOperations.findOne(entryId);
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/entry/FrontMatter.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.entry;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.*;
import org.yaml.snakeyaml.Yaml;
import java.io.Serializable;
import java.time.OffsetDateTime;
import java.time.ZoneId;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FrontMatter implements Serializable {
private String title;
private List<String> tags;
private List<String> categories;
@JsonIgnore
transient private OffsetDateTime date;
@JsonIgnore
transient private OffsetDateTime updated;
@Getter(AccessLevel.NONE)
private static final Yaml yaml = new Yaml();
static final String SEPARATOR = "---";
@SuppressWarnings({"unchecked"})
public static FrontMatter loadFromYamlString(String string) {
Map<String, Object> map = (Map<String, Object>) yaml.load(string);
FrontMatter frontMatter = new FrontMatter();
frontMatter.setTitle((String) map.getOrDefault("title", "no title"));
frontMatter.setTags((List<String>) map.computeIfAbsent("tags",
key -> Collections.emptyList()));
frontMatter.setCategories((List<String>) map.computeIfAbsent(
"categories", key -> Collections.emptyList()));
if (map.containsKey("date")) { // published date
frontMatter.setDate(OffsetDateTime.ofInstant(((Date) map.get("date")).toInstant(), ZoneId.systemDefault()));
}
if (map.containsKey("updated")) { // Updated date
frontMatter.setUpdated(OffsetDateTime.ofInstant(((Date) map.get("updated")).toInstant(), ZoneId.systemDefault()));
}
return frontMatter;
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/entry/SearchEntryOperations.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.entry;
import lombok.Builder;
import lombok.Data;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import java.util.List;
public interface SearchEntryOperations {
Page<Entry> findAll(Pageable pageable, SearchOptions options);
default Page<Entry> findAll(Pageable pageable) {
return findAll(pageable, SearchOptions.DEFAULT);
}
Page<Entry> findByTag(String tag, Pageable pageable, SearchOptions options);
default Page<Entry> findByTag(String tag, Pageable pageable) {
return findByTag(tag, pageable, SearchOptions.DEFAULT);
}
Page<Entry> findByCategories(List<String> categories, Pageable pageable, SearchOptions options);
default Page<Entry> findByCategories(List<String> categories, Pageable pageable) {
return findByCategories(categories, pageable, SearchOptions.DEFAULT);
}
Page<Entry> findByCreatedBy(String user, Pageable pageable, SearchOptions options);
default Page<Entry> findByCreatedBy(String user, Pageable pageable) {
return findByCreatedBy(user, pageable, SearchOptions.DEFAULT);
}
Page<Entry> findByUpdatedBy(String user, Pageable pageable, SearchOptions options);
default Page<Entry> findByUpdatedBy(String user, Pageable pageable) {
return findByUpdatedBy(user, pageable, SearchOptions.DEFAULT);
}
Page<Entry> findByQuery(String q, Pageable pageable, SearchOptions options);
default Page<Entry> findByQuery(String q, Pageable pageable) {
return findByQuery(q, pageable, SearchOptions.DEFAULT);
}
@Data
@Builder
class SearchOptions {
private boolean excludeContent;
public static final SearchOptions DEFAULT = SearchOptions.builder()
.excludeContent(false)
.build();
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/entry/SimpleEntryOperations.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.entry;
public interface SimpleEntryOperations {
Entry findOne(Long entryId);
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/entry | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/entry/redis/EntryRedisTemplateFactory.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.entry.redis;
import am.ik.categolj3.api.entry.Entry;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.JdkSerializationRedisSerializer;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.SerializationException;
import java.io.IOException;
import java.util.Arrays;
@Data
public class EntryRedisTemplateFactory {
final RedisConnectionFactory redisConnectionFactory;
final ObjectMapper objectMapper;
public RedisTemplate<Object, Object> create() {
RedisTemplate<Object, Object> template = new RedisTemplate<>();
template.setConnectionFactory(redisConnectionFactory);
template.setKeySerializer(new JdkSerializationRedisSerializer());
template.setValueSerializer(new RedisSerializer<Entry>() {
@Override
public byte[] serialize(Entry entry) throws SerializationException {
if (entry == null) {
return new byte[0];
}
try {
return objectMapper.writeValueAsBytes(entry);
} catch (JsonProcessingException e) {
throw new SerializationException("Cannot serialize " + entry, e);
}
}
@Override
public Entry deserialize(byte[] bytes) throws SerializationException {
if (bytes == null || bytes.length == 0) {
return null;
}
try {
return objectMapper.readValue(bytes, Entry.class);
} catch (IOException e) {
throw new SerializationException("Cannot deserialize " + Arrays.toString(bytes), e);
}
}
});
return template;
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/event/AppState.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.event;
public enum AppState {
INITIALIZING,
INITIALIZED
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/event/BulkEvent.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.event;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public abstract class BulkEvent<T> implements Serializable {
private final List<T> events;
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/event/EntryEvictEvent.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.event;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class EntryEvictEvent implements Serializable {
private final Long entryId;
public static class Bulk extends BulkEvent<EntryEvictEvent> {
public Bulk(List<EntryEvictEvent> events) {
super(events);
}
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/event/EntryPutEvent.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.event;
import am.ik.categolj3.api.entry.Entry;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class EntryPutEvent implements Serializable {
private final Long entryId;
private final Entry entry;
public EntryPutEvent(Entry entry) {
this.entryId = entry.getEntryId();
this.entry = entry;
}
public static class Bulk extends BulkEvent<EntryPutEvent> {
public Bulk(List<EntryPutEvent> events) {
super(events);
}
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/event/EntryReIndexEvent.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.event;
import lombok.Data;
import java.io.Serializable;
@Data
public class EntryReIndexEvent implements Serializable {
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/event/EventManager.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.event;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.atomic.AtomicReference;
@Component
@Slf4j
public class EventManager {
final ApplicationEventPublisher publisher;
final Queue<EntryEvictEvent> entryEvictEventQueue = new ConcurrentLinkedDeque<>();
final Queue<EntryPutEvent> entryPutEventQueue = new ConcurrentLinkedDeque<>();
final Queue<AppState> appStateQueue = new ConcurrentLinkedDeque<>();
private final AtomicReference<AppState> state = new AtomicReference<>(AppState.INITIALIZING);
@Autowired
public EventManager(ApplicationEventPublisher publisher) {
this.publisher = publisher;
}
@Scheduled(fixedRate = 5000)
public void fireEvents() {
List<EntryEvictEvent> entryEvictEvents = new ArrayList<>();
while (!entryEvictEventQueue.isEmpty()) {
entryEvictEvents.add(entryEvictEventQueue.poll());
}
if (!entryEvictEvents.isEmpty()) {
log.info("publish bulk evict event");
publisher.publishEvent(new EntryEvictEvent.Bulk(entryEvictEvents));
}
List<EntryPutEvent> entryPutEvents = new ArrayList<>();
while (!entryPutEventQueue.isEmpty()) {
entryPutEvents.add(entryPutEventQueue.poll());
}
if (!entryPutEvents.isEmpty()) {
log.info("publish bulk put event");
publisher.publishEvent(new EntryPutEvent.Bulk(entryPutEvents));
}
while (!appStateQueue.isEmpty()) {
AppState state = appStateQueue.poll();
if (state == AppState.INITIALIZED) {
log.info("Initialized");
}
this.state.set(state);
}
}
public void registerEntryEvictEvent(EntryEvictEvent event) {
entryEvictEventQueue.add(event);
}
public void registerEntryPutEvent(EntryPutEvent event) {
entryPutEventQueue.add(event);
}
public void registerEntryReindexEvent(EntryReIndexEvent event) {
publisher.publishEvent(event);
}
public void setState(AppState state) {
appStateQueue.add(state);
}
public AppState getState() {
return this.state.get();
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/git/GitEntryOperations.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.git;
import am.ik.categolj3.api.entry.Entry;
import am.ik.categolj3.api.entry.SimpleEntryOperations;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class GitEntryOperations implements SimpleEntryOperations {
@Autowired
GitStore gitStore;
@Override
public Entry findOne(Long entryId) {
return gitStore.get(entryId);
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/git/GitProperties.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.git;
import java.io.File;
import java.util.Optional;
import lombok.Data;
import lombok.ToString;
import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import javax.validation.constraints.NotNull;
@Component
@ConfigurationProperties(prefix = "git")
@Data
@ToString(exclude = "password")
public class GitProperties {
@NotNull
private File baseDir;
@NotEmpty
private String contentDir;
@NotEmpty
private String uri;
private boolean init = false;
private String username;
private char[] password;
public Optional<UsernamePasswordCredentialsProvider> credentialsProvider() {
if (username == null || password == null) {
return Optional.empty();
}
return Optional.of(
new UsernamePasswordCredentialsProvider(username, password));
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/git/GitRestController.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.git;
import lombok.extern.slf4j.Slf4j;
import org.eclipse.jgit.api.PullResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.concurrent.CompletableFuture;
@RestController
@RequestMapping("api/git")
@Slf4j
public class GitRestController {
@Autowired
GitStore gitStore;
@RequestMapping(path = "pull")
CompletableFuture<String> pull() {
return gitStore.pull()
.thenApply(PullResult::toString)
.exceptionally(e -> {
log.error("Failed to git pull", e);
return e.toString();
});
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/git/GitStore.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.git;
import am.ik.categolj3.api.entry.Author;
import am.ik.categolj3.api.entry.Entry;
import am.ik.categolj3.api.entry.EntryEventFiringCache;
import am.ik.categolj3.api.event.AppState;
import am.ik.categolj3.api.event.EventManager;
import com.google.common.collect.Iterables;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.eclipse.jgit.api.CloneCommand;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.PullCommand;
import org.eclipse.jgit.api.PullResult;
import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.diff.DiffEntry;
import org.eclipse.jgit.diff.DiffFormatter;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevWalk;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import org.springframework.util.FileSystemUtils;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import java.io.File;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.OffsetDateTime;
import java.time.ZoneId;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
@Component
@Slf4j
public class GitStore {
@Autowired
GitProperties gitProperties;
@Autowired
CacheManager cacheManager;
@Autowired
EventManager eventManager;
@Autowired
ForceRefreshTask forceRefreshTask;
@Autowired
GitPullTask gitPullTask;
@Autowired
ApplicationContext applicationContext;
Cache entryCache;
Git git;
AtomicReference<ObjectId> currentHead = new AtomicReference<>();
public Entry get(Long entryId) {
Entry entry = this.entryCache.get(entryId, Entry.class);
if (entry == null) {
entry = getContentFiles().stream()
.filter(f -> String.format("%05d.md", entryId).equals(f.getName()))
.map(File::toPath)
.map(Entry::loadFromFile)
.filter(Optional::isPresent)
.map(Optional::get)
.findAny()
.orElseThrow(() -> new IllegalArgumentException("The requested entry is not found [" + entryId + "]"));
this.entryCache.put(entryId, entry);
}
return entry;
}
public CompletableFuture<PullResult> pull() {
return this.gitPullTask.pull(this.git).thenApply(x -> {
this.syncHead();
return x;
});
}
public List<Entry> loadEntries() {
return getContentFiles().stream()
.map(File::toPath)
.map(this::loadEntry)
.filter(Optional::isPresent)
.map(Optional::get)
.collect(Collectors.toList());
}
public void forceRefreshAll() {
loadEntries().forEach(entry -> {
entryCache.put(entry.getEntryId(), entry);
});
}
void syncHead() {
log.info("Syncing HEAD...");
ObjectId oldHead = this.currentHead.get();
ObjectId newHead = this.head();
try (Repository repository = this.git.getRepository()) {
DiffFormatter diffFormatter = new DiffFormatter(System.out);
diffFormatter.setRepository(repository);
RevWalk walk = new RevWalk(repository);
try {
RevCommit fromCommit = walk.parseCommit(oldHead);
RevCommit toCommit = walk.parseCommit(newHead);
List<DiffEntry> list = diffFormatter.scan(fromCommit.getTree(),
toCommit.getTree());
list.forEach(diff -> {
log.info("[{}]\tnew={}\told={}", diff.getChangeType(), diff
.getNewPath(), diff.getOldPath());
if (diff.getOldPath() != null) {
Path path = Paths.get(gitProperties.getBaseDir()
.getAbsolutePath() + "/" + diff.getOldPath());
if (Entry.isPublic(path)) {
Long entryId = Entry.parseEntryId(path);
log.info("evict Entry({})", entryId);
this.entryCache.evict(entryId);
}
}
if (diff.getNewPath() != null) {
Path path = Paths.get(gitProperties.getBaseDir()
.getAbsolutePath() + "/" + diff.getNewPath());
this.loadEntry(path).ifPresent(entry -> {
log.info("put Entry({})", entry.getEntryId());
this.entryCache.put(entry.getEntryId(), entry);
});
}
});
} finally {
walk.dispose();
}
} catch (IOException e) {
throw new UncheckedIOException(e);
} catch (Exception e) {
throw new IllegalStateException(e);
}
this.currentHead.set(newHead);
}
ObjectId head() {
try (Repository repository = this.git.getRepository()) {
return repository.resolve("HEAD");
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
Optional<Entry> loadEntry(Path path) {
return Entry.loadFromFile(path)
.map(e -> {
Pair<Author, Author> author = getAuthor(path);
if (e.getFrontMatter() != null && e.getFrontMatter().getDate() != null) {
// ignore created.date if it is set by frontMatter
e.setCreated(new Author(author.getKey().getName(), e.getFrontMatter().getDate()));
} else {
e.setCreated(author.getKey());
}
if (e.getFrontMatter() != null && e.getFrontMatter().getUpdated() != null) {
// ignore updated.date if it is set by frontMatter
e.setUpdated(new Author(author.getValue().getName(), e.getFrontMatter().getUpdated()));
} else {
e.setUpdated(author.getValue());
}
return e;
});
}
List<File> getContentFiles() {
String contentsDir = gitProperties.getBaseDir().getAbsolutePath() + "/"
+ gitProperties.getContentDir();
File[] files = new File(contentsDir).listFiles(f -> Entry.isPublic(f
.toPath()));
return files == null ? Collections.emptyList() : Arrays.asList(files);
}
Pair<Author, Author> getAuthor(Path path) {
Path p = gitProperties.getBaseDir().toPath().relativize(path);
try {
Iterable<RevCommit> commits = git.log().addPath(p.toString().replace("\\", "/")).call();
RevCommit updated = Iterables.getFirst(commits, null);
RevCommit created = Iterables.getLast(commits, updated);
return new Pair<>(author(created), author(updated));
} catch (GitAPIException e) {
throw new IllegalStateException(e);
}
}
Author author(RevCommit commit) {
String name = commit != null ? commit.getAuthorIdent().getName() : "";
Date date = commit != null ? commit.getAuthorIdent().getWhen() : new Date();
OffsetDateTime o = OffsetDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault());
return new Author(name, o);
}
Git getGitDirectory() {
try {
if (gitProperties.getBaseDir().exists()) {
if (gitProperties.isInit()) {
FileSystemUtils.deleteRecursively(gitProperties
.getBaseDir());
} else {
return Git.open(gitProperties.getBaseDir());
}
}
CloneCommand clone = Git.cloneRepository().setURI(gitProperties
.getUri()).setDirectory(gitProperties.getBaseDir());
gitProperties.credentialsProvider().ifPresent(
clone::setCredentialsProvider);
return clone.call();
} catch (IOException e) {
throw new UncheckedIOException(e);
} catch (GitAPIException e) {
throw new IllegalStateException(e);
}
}
@PostConstruct
void load() {
this.entryCache = new EntryEventFiringCache(this.cacheManager.getCache("entry"), this.eventManager);
this.git = this.getGitDirectory();
this.currentHead.set(this.head());
this.pull()
.thenCompose(r -> this.forceRefreshTask.forceRefresh(this))
.thenAccept(v -> this.eventManager.setState(AppState.INITIALIZED))
.exceptionally(e -> {
log.error("error!", e);
return null;
});
}
@PreDestroy
void destroy() {
this.git.close();
}
@Component
@Slf4j
public static class ForceRefreshTask {
@Async
public CompletableFuture<Void> forceRefresh(GitStore gitStore) {
try {
gitStore.forceRefreshAll();
return CompletableFuture.completedFuture(null);
} catch (Exception e) {
CompletableFuture<Void> f = new CompletableFuture<>();
f.completeExceptionally(e);
return f;
}
}
}
@Component
@Slf4j
public static class GitPullTask {
@Autowired
GitProperties gitProperties;
@Async
public CompletableFuture<PullResult> pull(Git git) {
log.info("git pull {}", gitProperties.getUri());
try {
PullCommand pull = git.pull();
gitProperties.credentialsProvider().ifPresent(
pull::setCredentialsProvider);
return CompletableFuture.completedFuture(pull.call());
} catch (GitAPIException e) {
CompletableFuture<PullResult> f = new CompletableFuture<>();
f.completeExceptionally(e);
return f;
}
}
}
@Data
public static class Pair<K, V> {
private final K key;
private final V value;
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/git/GitSyncScheduler.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.git;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class GitSyncScheduler {
@Autowired
GitStore gitStore;
@Scheduled(cron = "0 0/30 * * * *")
public void onSchedule() {
gitStore.pull()
.thenAccept(r -> log.info("Scheduled git pull is finished {}", r));
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/jest/JestIndexer.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.jest;
import am.ik.categolj3.api.entry.Entry;
import am.ik.categolj3.api.git.GitStore;
import io.searchbox.client.JestClient;
import io.searchbox.core.Bulk;
import io.searchbox.core.Delete;
import io.searchbox.core.Index;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.concurrent.CompletableFuture;
@Component
@Slf4j
public class JestIndexer {
@Autowired
GitStore gitStore;
@Autowired
JestClient jestClient;
@Async
public CompletableFuture<Void> reindex() {
log.info("re-indexing ...");
List<Entry> entries = gitStore.loadEntries();
Bulk.Builder bulkBuilder = new Bulk.Builder();
for (Entry entry : entries) {
Index index = new Index.Builder(entry)
.refresh(true)
.index(Entry.INDEX_NAME)
.type(Entry.DOC_TYPE)
.build();
bulkBuilder.addAction(index);
}
try {
jestClient.execute(bulkBuilder.build());
log.info("re-indexed!");
return CompletableFuture.completedFuture(null);
} catch (Exception e) {
CompletableFuture<Void> f = new CompletableFuture<>();
f.completeExceptionally(e);
return f;
}
}
public void bulkDelete(List<Long> deleteIds) throws Exception {
Bulk.Builder bulkBuilder = new Bulk.Builder();
for (Long id : deleteIds) {
Delete delete = new Delete.Builder(id.toString())
.refresh(true)
.index(Entry.INDEX_NAME)
.type(Entry.DOC_TYPE)
.build();
bulkBuilder.addAction(delete);
}
jestClient.execute(bulkBuilder.build());
}
public void bulkUpdate(List<Entry> updateEntries) throws Exception {
Bulk.Builder bulkBuilder = new Bulk.Builder();
for (Entry entry : updateEntries) {
Index index = new Index.Builder(entry)
.refresh(true)
.index(Entry.INDEX_NAME)
.type(Entry.DOC_TYPE)
.build();
bulkBuilder.addAction(index);
}
jestClient.execute(bulkBuilder.build());
}
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/jest/JestProperties.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.jest;
import lombok.Data;
import org.hibernate.validator.constraints.URL;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@ConfigurationProperties(prefix = "jest")
@Component
@Data
public class JestProperties {
@URL
private String connectionUrl;
private int connectionTimeout = 10000;
private int readTimeout = 10000;
private boolean init = false;
}
|
0 | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api | java-sources/am/ik/categolj3/categolj3-api/1.0.0.M6/am/ik/categolj3/api/jest/JestRestController.java | /*
* Copyright (C) 2015 Toshiaki Maki <makingx@gmail.com>
*
* 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 am.ik.categolj3.api.jest;
import am.ik.categolj3.api.event.EntryReIndexEvent;
import am.ik.categolj3.api.event.EventManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("api/jest")
public class JestRestController {
@Autowired
EventManager eventManager;
@RequestMapping(path = "reindex")
void reindex() {
eventManager.registerEntryReindexEvent(new EntryReIndexEvent());
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.