From 04df348dbbd092a33724f1f4f7515b8857a775c1 Mon Sep 17 00:00:00 2001 From: Victor Kropp Date: Tue, 19 Jan 2016 20:53:19 +0100 Subject: [PATCH] regenerate --- src/main/java/org/schema/APIReference.java | 24 +- src/main/java/org/schema/Abdomen.java | 14 + src/main/java/org/schema/AboutPage.java | 16 +- src/main/java/org/schema/AcceptAction.java | 16 +- .../java/org/schema/AccountingService.java | 16 +- src/main/java/org/schema/AchieveAction.java | 16 +- src/main/java/org/schema/Action.java | 28 +- .../java/org/schema/ActionCollabClass.java | 14 + .../java/org/schema/ActionStatusType.java | 16 +- src/main/java/org/schema/ActivateAction.java | 16 +- .../java/org/schema/ActiveActionStatus.java | 14 + .../java/org/schema/ActiveNotRecruiting.java | 14 + src/main/java/org/schema/AddAction.java | 16 +- .../java/org/schema/AdministrativeArea.java | 16 +- .../java/org/schema/AdultEntertainment.java | 16 +- src/main/java/org/schema/AerobicActivity.java | 14 + src/main/java/org/schema/AggregateOffer.java | 226 +- src/main/java/org/schema/AggregateRating.java | 112 +- src/main/java/org/schema/AgreeAction.java | 16 +- src/main/java/org/schema/Airline.java | 20 +- src/main/java/org/schema/Airport.java | 20 +- src/main/java/org/schema/AlbumRelease.java | 14 + src/main/java/org/schema/AlignmentObject.java | 26 +- .../schema/AllWheelDriveConfiguration.java | 14 + src/main/java/org/schema/AllocateAction.java | 18 +- src/main/java/org/schema/AmusementPark.java | 16 +- .../java/org/schema/AnaerobicActivity.java | 14 + .../java/org/schema/AnatomicalStructure.java | 34 +- ...AnatomicalStructureOrAnatomicalSystem.java | 17 + ...rAnatomicalSystemOrSuperficialAnatomy.java | 19 + ...atomicalStructureOrSuperficialAnatomy.java | 17 + .../java/org/schema/AnatomicalSystem.java | 26 +- src/main/java/org/schema/Anesthesia.java | 14 + src/main/java/org/schema/AnimalShelter.java | 16 +- src/main/java/org/schema/Answer.java | 16 +- .../java/org/schema/ApartmentComplex.java | 16 +- src/main/java/org/schema/Appearance.java | 14 + src/main/java/org/schema/AppendAction.java | 16 +- src/main/java/org/schema/ApplyAction.java | 16 +- .../java/org/schema/ApprovedIndication.java | 16 +- src/main/java/org/schema/Aquarium.java | 16 +- src/main/java/org/schema/ArriveAction.java | 16 +- src/main/java/org/schema/ArtGallery.java | 16 +- src/main/java/org/schema/Artery.java | 22 +- src/main/java/org/schema/Article.java | 28 +- src/main/java/org/schema/AskAction.java | 18 +- src/main/java/org/schema/AssessAction.java | 16 +- src/main/java/org/schema/AssignAction.java | 16 +- src/main/java/org/schema/Attorney.java | 16 +- src/main/java/org/schema/Audience.java | 20 +- .../AudienceOrOrganizationOrPerson.java | 19 + src/main/java/org/schema/AudioObject.java | 18 +- src/main/java/org/schema/AuthorizeAction.java | 18 +- src/main/java/org/schema/AutoBodyShop.java | 16 +- src/main/java/org/schema/AutoDealer.java | 16 +- src/main/java/org/schema/AutoPartsStore.java | 16 +- src/main/java/org/schema/AutoRental.java | 16 +- src/main/java/org/schema/AutoRepair.java | 16 +- src/main/java/org/schema/AutoWash.java | 16 +- src/main/java/org/schema/AutomatedTeller.java | 16 +- .../java/org/schema/AutomotiveBusiness.java | 16 +- .../org/schema/AutomotiveOntologyWGClass.java | 14 + src/main/java/org/schema/Ayurvedic.java | 14 + src/main/java/org/schema/Bacteria.java | 14 + src/main/java/org/schema/Bakery.java | 16 +- src/main/java/org/schema/Balance.java | 14 + .../java/org/schema/BankOrCreditUnion.java | 16 +- src/main/java/org/schema/BarOrPub.java | 16 +- src/main/java/org/schema/Beach.java | 16 +- src/main/java/org/schema/BeautySalon.java | 16 +- src/main/java/org/schema/BedAndBreakfast.java | 16 +- src/main/java/org/schema/BefriendAction.java | 16 +- src/main/java/org/schema/BibExTerm.java | 14 + src/main/java/org/schema/BikeStore.java | 16 +- src/main/java/org/schema/Blog.java | 18 +- src/main/java/org/schema/BlogPosting.java | 16 +- src/main/java/org/schema/BloodTest.java | 16 +- .../java/org/schema/BoardingPolicyType.java | 16 +- src/main/java/org/schema/BodyOfWater.java | 16 +- src/main/java/org/schema/Bone.java | 16 +- src/main/java/org/schema/Book.java | 26 +- src/main/java/org/schema/BookFormatType.java | 16 +- src/main/java/org/schema/BookSeries.java | 16 +- src/main/java/org/schema/BookStore.java | 16 +- src/main/java/org/schema/BookmarkAction.java | 16 +- ...leanOrNumberOrStringOrStructuredValue.java | 52 - src/main/java/org/schema/BooleanOrString.java | 17 + src/main/java/org/schema/BorrowAction.java | 18 +- src/main/java/org/schema/BowlingAlley.java | 16 +- src/main/java/org/schema/BrainStructure.java | 16 +- src/main/java/org/schema/Brand.java | 22 +- .../java/org/schema/BrandOrOrganization.java | 17 + src/main/java/org/schema/BreadcrumbList.java | 16 +- .../org/schema/BreadcrumbListOrString.java | 17 + src/main/java/org/schema/Brewery.java | 16 +- .../java/org/schema/BroadcastChannel.java | 24 +- src/main/java/org/schema/BroadcastEvent.java | 18 +- .../java/org/schema/BroadcastRelease.java | 14 + .../java/org/schema/BroadcastService.java | 26 +- src/main/java/org/schema/BuddhistTemple.java | 16 +- src/main/java/org/schema/BusReservation.java | 61 +- src/main/java/org/schema/BusStation.java | 16 +- .../java/org/schema/BusStationOrBusStop.java | 17 + src/main/java/org/schema/BusStop.java | 16 +- src/main/java/org/schema/BusTrip.java | 30 +- .../java/org/schema/BusinessAudience.java | 22 +- .../java/org/schema/BusinessEntityType.java | 16 +- src/main/java/org/schema/BusinessEvent.java | 16 +- .../java/org/schema/BusinessFunction.java | 16 +- src/main/java/org/schema/BuyAction.java | 124 +- src/main/java/org/schema/CDFormat.java | 14 + src/main/java/org/schema/CT.java | 14 + .../org/schema/CableOrSatelliteService.java | 16 +- .../java/org/schema/CafeOrCoffeeShop.java | 16 +- src/main/java/org/schema/Campground.java | 16 +- src/main/java/org/schema/Canal.java | 16 +- src/main/java/org/schema/CancelAction.java | 16 +- src/main/java/org/schema/Car.java | 62 +- src/main/java/org/schema/CarUsageType.java | 16 +- src/main/java/org/schema/Cardiovascular.java | 14 + .../java/org/schema/CardiovascularExam.java | 14 + src/main/java/org/schema/CaseSeries.java | 14 + src/main/java/org/schema/Casino.java | 16 +- src/main/java/org/schema/CassetteFormat.java | 14 + src/main/java/org/schema/CatholicChurch.java | 16 +- src/main/java/org/schema/Cemetery.java | 16 +- src/main/java/org/schema/CheckAction.java | 16 +- src/main/java/org/schema/CheckInAction.java | 16 +- src/main/java/org/schema/CheckOutAction.java | 16 +- src/main/java/org/schema/CheckoutPage.java | 16 +- src/main/java/org/schema/ChildCare.java | 16 +- src/main/java/org/schema/ChildrensEvent.java | 16 +- src/main/java/org/schema/Chiropractic.java | 14 + src/main/java/org/schema/ChooseAction.java | 18 +- src/main/java/org/schema/Church.java | 16 +- src/main/java/org/schema/City.java | 16 +- src/main/java/org/schema/CityHall.java | 16 +- src/main/java/org/schema/CivicStructure.java | 18 +- src/main/java/org/schema/Clinician.java | 14 + src/main/java/org/schema/Clip.java | 30 +- src/main/java/org/schema/ClothingStore.java | 16 +- src/main/java/org/schema/CoOp.java | 14 + src/main/java/org/schema/Code.java | 16 +- src/main/java/org/schema/CohortStudy.java | 14 + src/main/java/org/schema/CollectionPage.java | 16 +- .../java/org/schema/CollegeOrUniversity.java | 16 +- src/main/java/org/schema/ComedyClub.java | 16 +- src/main/java/org/schema/ComedyEvent.java | 16 +- src/main/java/org/schema/Comment.java | 22 +- src/main/java/org/schema/CommentAction.java | 18 +- .../java/org/schema/CommunicateAction.java | 22 +- src/main/java/org/schema/CommunityHealth.java | 14 + .../java/org/schema/CompilationAlbum.java | 14 + src/main/java/org/schema/Completed.java | 14 + .../org/schema/CompletedActionStatus.java | 14 + src/main/java/org/schema/ComputerStore.java | 16 +- src/main/java/org/schema/ConfirmAction.java | 16 +- src/main/java/org/schema/ConsumeAction.java | 18 +- src/main/java/org/schema/ContactPage.java | 16 +- src/main/java/org/schema/ContactPoint.java | 34 +- .../java/org/schema/ContactPointOption.java | 16 +- .../java/org/schema/ContactPointOrPlace.java | 17 + src/main/java/org/schema/Continent.java | 16 +- src/main/java/org/schema/ControlAction.java | 16 +- .../java/org/schema/ConvenienceStore.java | 16 +- src/main/java/org/schema/CookAction.java | 22 +- src/main/java/org/schema/Corporation.java | 18 +- src/main/java/org/schema/Country.java | 16 +- src/main/java/org/schema/Courthouse.java | 16 +- src/main/java/org/schema/CreateAction.java | 16 +- src/main/java/org/schema/CreativeWork.java | 142 +- .../java/org/schema/CreativeWorkOrString.java | 17 + .../java/org/schema/CreativeWorkSeason.java | 36 +- .../java/org/schema/CreativeWorkSeries.java | 20 +- src/main/java/org/schema/CreditCard.java | 16 +- src/main/java/org/schema/Crematorium.java | 16 +- src/main/java/org/schema/CrossSectional.java | 14 + src/main/java/org/schema/DDxElement.java | 20 +- src/main/java/org/schema/DJMixAlbum.java | 14 + src/main/java/org/schema/DVDFormat.java | 14 + .../java/org/schema/DamagedCondition.java | 14 + src/main/java/org/schema/DanceEvent.java | 16 +- src/main/java/org/schema/DanceGroup.java | 16 +- src/main/java/org/schema/DataCatalog.java | 18 +- src/main/java/org/schema/DataDownload.java | 16 +- src/main/java/org/schema/DataType.java | 56 - src/main/java/org/schema/Dataset.java | 24 +- src/main/java/org/schema/DatasetClass.java | 14 + .../org/schema/DatedMoneySpecification.java | 24 +- src/main/java/org/schema/DayOfWeek.java | 16 +- src/main/java/org/schema/DaySpa.java | 16 +- .../java/org/schema/DeactivateAction.java | 16 +- .../java/org/schema/DefenceEstablishment.java | 16 +- src/main/java/org/schema/DeleteAction.java | 16 +- .../schema/DeliveryChargeSpecification.java | 128 +- src/main/java/org/schema/DeliveryEvent.java | 24 +- src/main/java/org/schema/DeliveryMethod.java | 16 +- src/main/java/org/schema/Demand.java | 76 +- src/main/java/org/schema/DemoAlbum.java | 14 + src/main/java/org/schema/Dentist.java | 16 +- src/main/java/org/schema/Dentistry.java | 14 + src/main/java/org/schema/DepartAction.java | 16 +- src/main/java/org/schema/DepartmentStore.java | 16 +- src/main/java/org/schema/Dermatologic.java | 14 + src/main/java/org/schema/Diagnostic.java | 14 + src/main/java/org/schema/DiagnosticLab.java | 18 +- .../java/org/schema/DiagnosticProcedure.java | 16 +- src/main/java/org/schema/Diet.java | 30 +- src/main/java/org/schema/DietNutrition.java | 14 + .../java/org/schema/DietarySupplement.java | 40 +- .../org/schema/DigitalAudioTapeFormat.java | 14 + src/main/java/org/schema/DigitalFormat.java | 14 + src/main/java/org/schema/DisagreeAction.java | 16 +- src/main/java/org/schema/Discontinued.java | 14 + src/main/java/org/schema/DiscoverAction.java | 16 +- src/main/java/org/schema/DislikeAction.java | 16 +- src/main/java/org/schema/Distance.java | 16 +- .../schema/DistanceOrQuantitativeValue.java | 17 + .../java/org/schema/DistanceOrString.java | 17 + src/main/java/org/schema/DonateAction.java | 124 +- src/main/java/org/schema/DoseSchedule.java | 24 +- .../java/org/schema/DoubleBlindedTrial.java | 14 + src/main/java/org/schema/DownloadAction.java | 16 +- src/main/java/org/schema/DrawAction.java | 16 +- src/main/java/org/schema/DrinkAction.java | 16 +- .../schema/DriveWheelConfigurationValue.java | 16 +- .../DriveWheelConfigurationValueOrString.java | 17 + .../org/schema/DrivingSchoolVehicleUsage.java | 14 + src/main/java/org/schema/Drug.java | 68 +- src/main/java/org/schema/DrugClass.java | 18 +- src/main/java/org/schema/DrugCost.java | 78 +- .../java/org/schema/DrugCostCategory.java | 16 +- src/main/java/org/schema/DrugLegalStatus.java | 18 +- .../org/schema/DrugPregnancyCategory.java | 16 +- .../org/schema/DrugPrescriptionStatus.java | 16 +- src/main/java/org/schema/DrugStrength.java | 24 +- .../java/org/schema/DryCleaningOrLaundry.java | 16 +- src/main/java/org/schema/Duration.java | 16 +- .../java/org/schema/DurationOrString.java | 17 + src/main/java/org/schema/EBook.java | 14 + src/main/java/org/schema/EPRelease.java | 14 + src/main/java/org/schema/Ear.java | 14 + src/main/java/org/schema/EatAction.java | 16 +- src/main/java/org/schema/EducationEvent.java | 16 +- .../java/org/schema/EducationalAudience.java | 18 +- .../org/schema/EducationalOrganization.java | 18 +- src/main/java/org/schema/Electrician.java | 16 +- .../java/org/schema/ElectronicsStore.java | 16 +- .../java/org/schema/ElementarySchool.java | 16 +- src/main/java/org/schema/EmailMessage.java | 16 +- src/main/java/org/schema/Embassy.java | 16 +- src/main/java/org/schema/Emergency.java | 14 + .../java/org/schema/EmergencyService.java | 16 +- src/main/java/org/schema/EmployeeRole.java | 18 +- .../java/org/schema/EmploymentAgency.java | 16 +- src/main/java/org/schema/Endocrine.java | 14 + src/main/java/org/schema/EndorseAction.java | 18 +- src/main/java/org/schema/Energy.java | 16 +- .../java/org/schema/EngineSpecification.java | 18 +- .../org/schema/EnrollingByInvitation.java | 14 + .../org/schema/EntertainmentBusiness.java | 16 +- src/main/java/org/schema/EntryPoint.java | 26 +- src/main/java/org/schema/Enumeration.java | 18 +- .../org/schema/EnumerationOrProperty.java | 17 + ...eOrQuantitativeValueOrStructuredValue.java | 23 + src/main/java/org/schema/Episode.java | 32 +- src/main/java/org/schema/Event.java | 52 +- src/main/java/org/schema/EventCancelled.java | 14 + src/main/java/org/schema/EventPostponed.java | 14 + .../java/org/schema/EventRescheduled.java | 14 + .../java/org/schema/EventReservation.java | 61 +- src/main/java/org/schema/EventScheduled.java | 14 + src/main/java/org/schema/EventStatusType.java | 16 +- src/main/java/org/schema/EventVenue.java | 16 +- src/main/java/org/schema/EvidenceLevelA.java | 14 + src/main/java/org/schema/EvidenceLevelB.java | 14 + src/main/java/org/schema/EvidenceLevelC.java | 14 + src/main/java/org/schema/ExerciseAction.java | 38 +- src/main/java/org/schema/ExerciseGym.java | 16 +- src/main/java/org/schema/ExercisePlan.java | 32 +- src/main/java/org/schema/Eye.java | 14 + src/main/java/org/schema/FDAcategoryA.java | 14 + src/main/java/org/schema/FDAcategoryB.java | 14 + src/main/java/org/schema/FDAcategoryC.java | 14 + src/main/java/org/schema/FDAcategoryD.java | 14 + src/main/java/org/schema/FDAcategoryX.java | 14 + src/main/java/org/schema/FDAnotEvaluated.java | 14 + .../java/org/schema/FailedActionStatus.java | 14 + .../java/org/schema/FastFoodRestaurant.java | 16 +- src/main/java/org/schema/Festival.java | 16 +- src/main/java/org/schema/FilmAction.java | 16 +- .../java/org/schema/FinancialService.java | 16 +- src/main/java/org/schema/FindAction.java | 16 +- src/main/java/org/schema/FireStation.java | 16 +- src/main/java/org/schema/Flexibility.java | 14 + src/main/java/org/schema/Flight.java | 50 +- .../java/org/schema/FlightReservation.java | 69 +- src/main/java/org/schema/Florist.java | 16 +- src/main/java/org/schema/FollowAction.java | 18 +- .../java/org/schema/FoodEstablishment.java | 22 +- .../org/schema/FoodEstablishmentOrPlace.java | 17 + .../schema/FoodEstablishmentReservation.java | 65 +- src/main/java/org/schema/FoodEvent.java | 16 +- .../schema/FourWheelDriveConfiguration.java | 14 + .../schema/FrontWheelDriveConfiguration.java | 14 + src/main/java/org/schema/Fungus.java | 14 + src/main/java/org/schema/FurnitureStore.java | 16 +- src/main/java/org/schema/Game.java | 26 +- src/main/java/org/schema/GamePlayMode.java | 16 +- src/main/java/org/schema/GameServer.java | 22 +- .../java/org/schema/GameServerStatus.java | 16 +- src/main/java/org/schema/GardenStore.java | 16 +- src/main/java/org/schema/GasStation.java | 16 +- .../java/org/schema/Gastroenterologic.java | 14 + .../org/schema/GatedResidenceCommunity.java | 16 +- .../java/org/schema/GeneralContractor.java | 16 +- src/main/java/org/schema/Genetic.java | 14 + src/main/java/org/schema/Genitourinary.java | 14 + src/main/java/org/schema/GeoCoordinates.java | 168 +- .../org/schema/GeoCoordinatesOrGeoShape.java | 17 + src/main/java/org/schema/GeoShape.java | 76 +- .../org/schema/GeoShapeOrPlaceOrString.java | 19 + src/main/java/org/schema/Geriatric.java | 14 + src/main/java/org/schema/GiveAction.java | 18 +- src/main/java/org/schema/GolfCourse.java | 16 +- .../java/org/schema/GoodRelationsClass.java | 14 + .../org/schema/GoodRelationsProperties.java | 14 + .../java/org/schema/GovernmentBuilding.java | 16 +- .../java/org/schema/GovernmentOffice.java | 16 +- .../org/schema/GovernmentOrganization.java | 16 +- .../java/org/schema/GovernmentPermit.java | 16 +- .../java/org/schema/GovernmentService.java | 18 +- src/main/java/org/schema/GroceryStore.java | 16 +- .../java/org/schema/GroupBoardingPolicy.java | 14 + src/main/java/org/schema/Gynecologic.java | 14 + src/main/java/org/schema/HVACBusiness.java | 16 +- src/main/java/org/schema/HairSalon.java | 16 +- src/main/java/org/schema/Hardcover.java | 14 + src/main/java/org/schema/HardwareStore.java | 16 +- src/main/java/org/schema/Head.java | 14 + .../org/schema/HealthAndBeautyBusiness.java | 16 +- src/main/java/org/schema/HealthClub.java | 16 +- .../org/schema/HearingImpairedSupported.java | 14 + src/main/java/org/schema/Hematologic.java | 14 + src/main/java/org/schema/HighSchool.java | 16 +- src/main/java/org/schema/HinduTemple.java | 16 +- src/main/java/org/schema/HobbyShop.java | 16 +- .../schema/HomeAndConstructionBusiness.java | 16 +- src/main/java/org/schema/HomeGoodsStore.java | 16 +- src/main/java/org/schema/Homeopathic.java | 14 + src/main/java/org/schema/Hospital.java | 20 +- src/main/java/org/schema/Hostel.java | 16 +- src/main/java/org/schema/Hotel.java | 16 +- src/main/java/org/schema/HousePainter.java | 16 +- src/main/java/org/schema/IceCreamShop.java | 16 +- src/main/java/org/schema/IgnoreAction.java | 16 +- src/main/java/org/schema/ImageGallery.java | 16 +- src/main/java/org/schema/ImageObject.java | 24 +- .../org/schema/ImageObjectOrPhotograph.java | 17 + .../java/org/schema/ImageObjectOrString.java | 17 + src/main/java/org/schema/ImagingTest.java | 18 +- src/main/java/org/schema/InStock.java | 14 + src/main/java/org/schema/InStoreOnly.java | 14 + .../java/org/schema/IndividualProduct.java | 16 +- src/main/java/org/schema/Infectious.java | 14 + .../java/org/schema/InfectiousAgentClass.java | 16 +- .../java/org/schema/InfectiousDisease.java | 22 +- src/main/java/org/schema/InformAction.java | 18 +- src/main/java/org/schema/InsertAction.java | 18 +- src/main/java/org/schema/InstallAction.java | 16 +- src/main/java/org/schema/InsuranceAgency.java | 16 +- src/main/java/org/schema/Intangible.java | 16 +- src/main/java/org/schema/Integer.java | 56 - .../schema/IntegerOrQuantitativeValue.java | 17 + src/main/java/org/schema/IntegerOrString.java | 17 + src/main/java/org/schema/InteractAction.java | 16 +- .../java/org/schema/InteractionCount.java | 14 + .../java/org/schema/InternationalTrial.java | 14 + src/main/java/org/schema/InternetCafe.java | 16 +- src/main/java/org/schema/InviteAction.java | 18 +- src/main/java/org/schema/Invoice.java | 44 +- .../java/org/schema/ItemAvailability.java | 16 +- src/main/java/org/schema/ItemList.java | 22 +- .../org/schema/ItemListOrMusicRecording.java | 17 + .../java/org/schema/ItemListOrString.java | 17 + .../org/schema/ItemListOrderAscending.java | 14 + .../org/schema/ItemListOrderDescending.java | 14 + .../java/org/schema/ItemListOrderType.java | 16 +- .../org/schema/ItemListOrderTypeOrString.java | 17 + .../java/org/schema/ItemListUnordered.java | 14 + src/main/java/org/schema/ItemPage.java | 16 +- src/main/java/org/schema/JewelryStore.java | 16 +- src/main/java/org/schema/JobPosting.java | 109 +- src/main/java/org/schema/JoinAction.java | 18 +- src/main/java/org/schema/Joint.java | 22 +- src/main/java/org/schema/LRMIClass.java | 14 + .../java/org/schema/LaboratoryScience.java | 14 + src/main/java/org/schema/LakeBodyOfWater.java | 16 +- src/main/java/org/schema/Landform.java | 16 +- .../LandmarksOrHistoricalBuildings.java | 16 +- src/main/java/org/schema/Language.java | 16 +- .../java/org/schema/LanguageOrString.java | 17 + src/main/java/org/schema/LaserDiscFormat.java | 14 + src/main/java/org/schema/LeaveAction.java | 18 +- src/main/java/org/schema/LeftHandDriving.java | 14 + .../java/org/schema/LegislativeBuilding.java | 16 +- .../java/org/schema/LeisureTimeActivity.java | 14 + src/main/java/org/schema/LendAction.java | 18 +- src/main/java/org/schema/Library.java | 16 +- .../org/schema/LifestyleModification.java | 16 +- src/main/java/org/schema/Ligament.java | 16 +- src/main/java/org/schema/LikeAction.java | 16 +- .../java/org/schema/LimitedAvailability.java | 14 + src/main/java/org/schema/LiquorStore.java | 16 +- src/main/java/org/schema/ListItem.java | 22 +- .../org/schema/ListItemOrStringOrThing.java | 19 + src/main/java/org/schema/ListenAction.java | 16 +- src/main/java/org/schema/LiteraryEvent.java | 16 +- src/main/java/org/schema/LiveAlbum.java | 14 + src/main/java/org/schema/LocalBusiness.java | 26 +- src/main/java/org/schema/LockerDelivery.java | 16 +- src/main/java/org/schema/Locksmith.java | 16 +- src/main/java/org/schema/LodgingBusiness.java | 16 +- .../java/org/schema/LodgingReservation.java | 73 +- src/main/java/org/schema/Longitudinal.java | 14 + src/main/java/org/schema/LoseAction.java | 18 +- src/main/java/org/schema/Lung.java | 14 + src/main/java/org/schema/LymphaticVessel.java | 22 +- src/main/java/org/schema/MBZ.java | 14 + src/main/java/org/schema/MRI.java | 14 + src/main/java/org/schema/Map.java | 18 +- src/main/java/org/schema/MapCategoryType.java | 16 +- src/main/java/org/schema/MapOrString.java | 17 + src/main/java/org/schema/MarryAction.java | 16 +- src/main/java/org/schema/Mass.java | 16 +- .../java/org/schema/MaximumDoseSchedule.java | 16 +- src/main/java/org/schema/MediaObject.java | 48 +- src/main/java/org/schema/MedicalAudience.java | 16 +- src/main/java/org/schema/MedicalCause.java | 18 +- src/main/java/org/schema/MedicalClinic.java | 20 +- src/main/java/org/schema/MedicalCode.java | 20 +- .../java/org/schema/MedicalCondition.java | 48 +- .../org/schema/MedicalConditionStage.java | 20 +- .../org/schema/MedicalContraindication.java | 16 +- src/main/java/org/schema/MedicalDevice.java | 32 +- .../java/org/schema/MedicalDevicePurpose.java | 16 +- .../schema/MedicalDevicePurposeOrThing.java | 17 + src/main/java/org/schema/MedicalEntity.java | 28 +- .../java/org/schema/MedicalEnumeration.java | 16 +- .../java/org/schema/MedicalEvidenceLevel.java | 16 +- .../java/org/schema/MedicalGuideline.java | 24 +- .../MedicalGuidelineContraindication.java | 16 +- .../MedicalGuidelineRecommendation.java | 18 +- .../org/schema/MedicalImagingTechnique.java | 16 +- .../java/org/schema/MedicalIndication.java | 16 +- .../java/org/schema/MedicalIntangible.java | 16 +- .../org/schema/MedicalObservationalStudy.java | 18 +- .../MedicalObservationalStudyDesign.java | 16 +- .../java/org/schema/MedicalOrganization.java | 16 +- .../java/org/schema/MedicalProcedure.java | 24 +- ...rocedureOrMedicalTestOrMedicalTherapy.java | 19 + .../java/org/schema/MedicalProcedureType.java | 16 +- .../java/org/schema/MedicalResearcher.java | 14 + .../org/schema/MedicalRiskCalculator.java | 16 +- .../java/org/schema/MedicalRiskEstimator.java | 20 +- .../java/org/schema/MedicalRiskFactor.java | 18 +- .../java/org/schema/MedicalRiskScore.java | 18 +- .../org/schema/MedicalScholarlyArticle.java | 18 +- src/main/java/org/schema/MedicalSign.java | 20 +- .../java/org/schema/MedicalSignOrSymptom.java | 20 +- .../java/org/schema/MedicalSpecialty.java | 16 +- src/main/java/org/schema/MedicalStudy.java | 28 +- .../java/org/schema/MedicalStudyStatus.java | 16 +- src/main/java/org/schema/MedicalSymptom.java | 16 +- src/main/java/org/schema/MedicalTest.java | 26 +- .../java/org/schema/MedicalTestPanel.java | 18 +- src/main/java/org/schema/MedicalTherapy.java | 26 +- src/main/java/org/schema/MedicalTrial.java | 20 +- .../java/org/schema/MedicalTrialDesign.java | 16 +- src/main/java/org/schema/MedicalWebPage.java | 18 +- src/main/java/org/schema/MedicineSystem.java | 16 +- .../java/org/schema/MensClothingStore.java | 16 +- src/main/java/org/schema/MiddleSchool.java | 16 +- src/main/java/org/schema/Midwifery.java | 14 + src/main/java/org/schema/MixtapeAlbum.java | 14 + .../java/org/schema/MobileApplication.java | 18 +- .../java/org/schema/MobilePhoneStore.java | 16 +- src/main/java/org/schema/Mosque.java | 16 +- src/main/java/org/schema/Motel.java | 16 +- .../java/org/schema/MotorcycleDealer.java | 16 +- .../java/org/schema/MotorcycleRepair.java | 16 +- src/main/java/org/schema/Mountain.java | 16 +- src/main/java/org/schema/MoveAction.java | 20 +- src/main/java/org/schema/Movie.java | 30 +- src/main/java/org/schema/MovieClip.java | 16 +- .../java/org/schema/MovieRentalStore.java | 16 +- src/main/java/org/schema/MovieSeries.java | 24 +- src/main/java/org/schema/MovieTheater.java | 18 +- src/main/java/org/schema/MovingCompany.java | 16 +- .../java/org/schema/MultiCenterTrial.java | 14 + src/main/java/org/schema/MultiPlayer.java | 14 + .../org/schema/MulticellularParasite.java | 14 + src/main/java/org/schema/Muscle.java | 28 +- src/main/java/org/schema/Musculoskeletal.java | 14 + .../java/org/schema/MusculoskeletalExam.java | 14 + src/main/java/org/schema/Museum.java | 16 +- src/main/java/org/schema/MusicAlbum.java | 24 +- .../org/schema/MusicAlbumProductionType.java | 16 +- .../org/schema/MusicAlbumReleaseType.java | 16 +- .../java/org/schema/MusicComposition.java | 34 +- src/main/java/org/schema/MusicEvent.java | 16 +- src/main/java/org/schema/MusicGroup.java | 22 +- .../java/org/schema/MusicGroupOrPerson.java | 17 + src/main/java/org/schema/MusicPlaylist.java | 20 +- src/main/java/org/schema/MusicRecording.java | 28 +- src/main/java/org/schema/MusicRelease.java | 28 +- .../org/schema/MusicReleaseFormatType.java | 16 +- src/main/java/org/schema/MusicStore.java | 16 +- src/main/java/org/schema/MusicVenue.java | 16 +- .../java/org/schema/MusicVideoObject.java | 16 +- src/main/java/org/schema/NGO.java | 16 +- src/main/java/org/schema/NailSalon.java | 16 +- src/main/java/org/schema/Neck.java | 14 + src/main/java/org/schema/Nerve.java | 24 +- src/main/java/org/schema/Neuro.java | 14 + src/main/java/org/schema/Neurologic.java | 14 + src/main/java/org/schema/NewCondition.java | 14 + src/main/java/org/schema/NewsArticle.java | 26 +- src/main/java/org/schema/NightClub.java | 16 +- .../java/org/schema/NoninvasiveProcedure.java | 14 + src/main/java/org/schema/Nose.java | 14 + .../java/org/schema/NotYetRecruiting.java | 14 + src/main/java/org/schema/Notary.java | 16 +- src/main/java/org/schema/Number.java | 23 + .../schema/NumberOrPriceSpecification.java | 46 - .../NumberOrPriceSpecificationOrString.java | 47 - .../org/schema/NumberOrQuantitativeValue.java | 17 + src/main/java/org/schema/NumberOrString.java | 42 - src/main/java/org/schema/Nursing.java | 14 + .../java/org/schema/NutritionInformation.java | 40 +- src/main/java/org/schema/OTC.java | 14 + src/main/java/org/schema/Observational.java | 14 + src/main/java/org/schema/Obstetric.java | 14 + .../java/org/schema/OccupationalActivity.java | 14 + .../java/org/schema/OccupationalTherapy.java | 14 + .../java/org/schema/OceanBodyOfWater.java | 16 +- src/main/java/org/schema/Offer.java | 200 +- .../java/org/schema/OfferItemCondition.java | 16 +- .../java/org/schema/OfficeEquipmentStore.java | 16 +- .../java/org/schema/OfflinePermanently.java | 14 + .../java/org/schema/OfflineTemporarily.java | 14 + src/main/java/org/schema/OnDemandEvent.java | 16 +- src/main/java/org/schema/OnSitePickup.java | 14 + src/main/java/org/schema/Oncologic.java | 14 + src/main/java/org/schema/Online.java | 14 + src/main/java/org/schema/OnlineFull.java | 14 + src/main/java/org/schema/OnlineOnly.java | 14 + src/main/java/org/schema/OpenTrial.java | 14 + .../org/schema/OpeningHoursSpecification.java | 26 +- src/main/java/org/schema/Optician.java | 16 +- src/main/java/org/schema/Optometic.java | 14 + src/main/java/org/schema/Order.java | 106 +- src/main/java/org/schema/OrderAction.java | 124 +- src/main/java/org/schema/OrderCancelled.java | 14 + src/main/java/org/schema/OrderDelivered.java | 14 + src/main/java/org/schema/OrderInTransit.java | 14 + src/main/java/org/schema/OrderItem.java | 26 +- .../java/org/schema/OrderItemOrProduct.java | 17 + src/main/java/org/schema/OrderPaymentDue.java | 14 + .../java/org/schema/OrderPickupAvailable.java | 14 + src/main/java/org/schema/OrderProblem.java | 14 + src/main/java/org/schema/OrderProcessing.java | 14 + src/main/java/org/schema/OrderReturned.java | 14 + src/main/java/org/schema/OrderStatus.java | 16 +- src/main/java/org/schema/Organization.java | 80 +- .../java/org/schema/OrganizationOrPerson.java | 17 + .../OrganizationOrProgramMembership.java | 17 + .../java/org/schema/OrganizationRole.java | 18 +- src/main/java/org/schema/OrganizeAction.java | 16 +- src/main/java/org/schema/Osteopathic.java | 14 + src/main/java/org/schema/Otolaryngologic.java | 14 + src/main/java/org/schema/OutOfStock.java | 14 + src/main/java/org/schema/OutletStore.java | 16 +- src/main/java/org/schema/OwnershipInfo.java | 24 +- .../org/schema/OwnershipInfoOrProduct.java | 17 + src/main/java/org/schema/PET.java | 14 + src/main/java/org/schema/PaintAction.java | 16 +- src/main/java/org/schema/Painting.java | 16 +- .../java/org/schema/PalliativeProcedure.java | 16 +- src/main/java/org/schema/Paperback.java | 14 + src/main/java/org/schema/ParcelDelivery.java | 38 +- src/main/java/org/schema/ParcelService.java | 16 +- src/main/java/org/schema/ParentAudience.java | 20 +- src/main/java/org/schema/Park.java | 16 +- src/main/java/org/schema/ParkingFacility.java | 16 +- src/main/java/org/schema/ParkingMap.java | 14 + src/main/java/org/schema/Pathology.java | 14 + src/main/java/org/schema/PathologyTest.java | 18 +- src/main/java/org/schema/Patient.java | 14 + src/main/java/org/schema/PawnShop.java | 16 +- src/main/java/org/schema/PayAction.java | 126 +- .../schema/PaymentChargeSpecification.java | 126 +- src/main/java/org/schema/PaymentMethod.java | 16 +- src/main/java/org/schema/Pediatric.java | 14 + src/main/java/org/schema/PeopleAudience.java | 30 +- .../org/schema/PercutaneousProcedure.java | 14 + src/main/java/org/schema/PerformAction.java | 18 +- src/main/java/org/schema/PerformanceRole.java | 18 +- .../org/schema/PerformingArtsTheater.java | 16 +- src/main/java/org/schema/PerformingGroup.java | 16 +- src/main/java/org/schema/Periodical.java | 18 +- src/main/java/org/schema/Permit.java | 30 +- src/main/java/org/schema/Person.java | 110 +- src/main/java/org/schema/PetStore.java | 16 +- src/main/java/org/schema/Pharmacy.java | 16 +- .../java/org/schema/PharmacySpecialty.java | 14 + src/main/java/org/schema/Photograph.java | 16 +- .../java/org/schema/PhotographAction.java | 16 +- .../java/org/schema/PhysicalActivity.java | 24 +- .../org/schema/PhysicalActivityCategory.java | 16 +- ...ysicalActivityCategoryOrStringOrThing.java | 19 + src/main/java/org/schema/PhysicalExam.java | 16 +- src/main/java/org/schema/PhysicalTherapy.java | 16 +- src/main/java/org/schema/Physician.java | 22 +- src/main/java/org/schema/Physiotherapy.java | 14 + src/main/java/org/schema/Place.java | 46 +- src/main/java/org/schema/PlaceOfWorship.java | 16 +- .../schema/PlaceOrPostalAddressOrString.java | 19 + .../org/schema/PlaceboControlledTrial.java | 14 + src/main/java/org/schema/PlanAction.java | 18 +- src/main/java/org/schema/PlasticSurgery.java | 14 + src/main/java/org/schema/PlayAction.java | 20 +- src/main/java/org/schema/Playground.java | 16 +- src/main/java/org/schema/Plumber.java | 16 +- src/main/java/org/schema/Podiatric.java | 14 + src/main/java/org/schema/PoliceStation.java | 16 +- src/main/java/org/schema/Pond.java | 16 +- src/main/java/org/schema/PostOffice.java | 16 +- src/main/java/org/schema/PostalAddress.java | 28 +- .../org/schema/PotentialActionStatus.java | 14 + src/main/java/org/schema/PreOrder.java | 14 + src/main/java/org/schema/PrependAction.java | 16 +- src/main/java/org/schema/Preschool.java | 16 +- .../java/org/schema/PrescriptionOnly.java | 14 + .../java/org/schema/PreventionIndication.java | 16 +- .../java/org/schema/PriceSpecification.java | 144 +- src/main/java/org/schema/PrimaryCare.java | 14 + src/main/java/org/schema/Prion.java | 14 + src/main/java/org/schema/Product.java | 78 +- src/main/java/org/schema/ProductModel.java | 22 +- .../java/org/schema/ProductModelOrString.java | 17 + src/main/java/org/schema/ProductOrString.java | 17 + .../java/org/schema/ProfessionalService.java | 16 +- src/main/java/org/schema/ProfilePage.java | 16 +- .../java/org/schema/ProgramMembership.java | 22 +- src/main/java/org/schema/Project.java | 16 +- src/main/java/org/schema/Property.java | 20 +- src/main/java/org/schema/PropertyValue.java | 81 +- .../org/schema/PropertyValueOrString.java | 17 + .../schema/PropertyValueSpecification.java | 36 +- src/main/java/org/schema/Protozoa.java | 14 + src/main/java/org/schema/Psychiatric.java | 14 + .../org/schema/PsychologicalTreatment.java | 16 +- src/main/java/org/schema/PublicHealth.java | 14 + .../java/org/schema/PublicSwimmingPool.java | 16 +- .../java/org/schema/PublicationEvent.java | 20 +- .../java/org/schema/PublicationIssue.java | 24 +- .../java/org/schema/PublicationVolume.java | 24 +- src/main/java/org/schema/Pulmonary.java | 14 + src/main/java/org/schema/QAPage.java | 16 +- .../java/org/schema/QualitativeValue.java | 32 +- .../org/schema/QualitativeValueOrString.java | 17 + .../java/org/schema/QuantitativeValue.java | 83 +- src/main/java/org/schema/Quantity.java | 16 +- src/main/java/org/schema/Question.java | 26 +- src/main/java/org/schema/QuoteAction.java | 122 +- src/main/java/org/schema/RNews.java | 14 + src/main/java/org/schema/RVPark.java | 16 +- .../java/org/schema/RadiationTherapy.java | 16 +- src/main/java/org/schema/RadioChannel.java | 16 +- src/main/java/org/schema/RadioClip.java | 16 +- src/main/java/org/schema/RadioEpisode.java | 16 +- src/main/java/org/schema/RadioSeason.java | 16 +- src/main/java/org/schema/RadioSeries.java | 34 +- src/main/java/org/schema/RadioStation.java | 16 +- src/main/java/org/schema/Radiograpy.java | 14 + src/main/java/org/schema/RandomizedTrial.java | 14 + src/main/java/org/schema/Rating.java | 120 +- src/main/java/org/schema/ReactAction.java | 16 +- src/main/java/org/schema/ReadAction.java | 16 +- src/main/java/org/schema/RealEstateAgent.java | 16 +- .../schema/RearWheelDriveConfiguration.java | 14 + src/main/java/org/schema/ReceiveAction.java | 20 +- src/main/java/org/schema/Recipe.java | 36 +- .../org/schema/RecommendedDoseSchedule.java | 16 +- src/main/java/org/schema/Recruiting.java | 14 + src/main/java/org/schema/RecyclingCenter.java | 16 +- .../java/org/schema/RefurbishedCondition.java | 14 + src/main/java/org/schema/RegisterAction.java | 16 +- src/main/java/org/schema/Registry.java | 14 + .../java/org/schema/ReimbursementCap.java | 14 + src/main/java/org/schema/RejectAction.java | 16 +- src/main/java/org/schema/RemixAlbum.java | 14 + src/main/java/org/schema/Renal.java | 14 + src/main/java/org/schema/RentAction.java | 126 +- .../java/org/schema/RentalCarReservation.java | 69 +- .../java/org/schema/RentalVehicleUsage.java | 14 + src/main/java/org/schema/ReplaceAction.java | 20 +- src/main/java/org/schema/ReplyAction.java | 18 +- .../java/org/schema/ReportedDoseSchedule.java | 16 +- src/main/java/org/schema/Researcher.java | 14 + src/main/java/org/schema/Reservation.java | 89 +- .../java/org/schema/ReservationCancelled.java | 14 + .../java/org/schema/ReservationConfirmed.java | 14 + src/main/java/org/schema/ReservationHold.java | 14 + .../java/org/schema/ReservationPackage.java | 63 +- .../java/org/schema/ReservationPending.java | 14 + .../org/schema/ReservationStatusType.java | 16 +- src/main/java/org/schema/ReserveAction.java | 16 +- src/main/java/org/schema/Reservoir.java | 16 +- src/main/java/org/schema/Residence.java | 16 +- .../java/org/schema/RespiratoryTherapy.java | 14 + src/main/java/org/schema/Restaurant.java | 16 +- .../java/org/schema/ResultsAvailable.java | 14 + .../java/org/schema/ResultsNotAvailable.java | 14 + src/main/java/org/schema/ResumeAction.java | 16 +- src/main/java/org/schema/Retail.java | 14 + src/main/java/org/schema/ReturnAction.java | 18 +- src/main/java/org/schema/Review.java | 22 +- src/main/java/org/schema/ReviewAction.java | 18 +- src/main/java/org/schema/Rheumatologic.java | 14 + .../java/org/schema/RightHandDriving.java | 14 + .../java/org/schema/RiverBodyOfWater.java | 16 +- src/main/java/org/schema/Role.java | 20 +- .../java/org/schema/RoofingContractor.java | 16 +- src/main/java/org/schema/RsvpAction.java | 22 +- .../java/org/schema/RsvpResponseMaybe.java | 14 + src/main/java/org/schema/RsvpResponseNo.java | 14 + .../java/org/schema/RsvpResponseType.java | 16 +- src/main/java/org/schema/RsvpResponseYes.java | 14 + src/main/java/org/schema/SaleEvent.java | 16 +- src/main/java/org/schema/ScheduleAction.java | 16 +- src/main/java/org/schema/SchemaOrg.java | 10 - .../java/org/schema/ScholarlyArticle.java | 16 +- src/main/java/org/schema/School.java | 16 +- src/main/java/org/schema/ScreeningEvent.java | 22 +- src/main/java/org/schema/Sculpture.java | 16 +- src/main/java/org/schema/SeaBodyOfWater.java | 16 +- src/main/java/org/schema/SearchAction.java | 18 +- .../java/org/schema/SearchResultsPage.java | 16 +- src/main/java/org/schema/Season.java | 16 +- src/main/java/org/schema/Seat.java | 24 +- src/main/java/org/schema/SeatingMap.java | 14 + src/main/java/org/schema/SelfStorage.java | 16 +- src/main/java/org/schema/SellAction.java | 124 +- src/main/java/org/schema/SendAction.java | 20 +- src/main/java/org/schema/Series.java | 16 +- src/main/java/org/schema/Service.java | 30 +- src/main/java/org/schema/ServiceChannel.java | 32 +- src/main/java/org/schema/ShareAction.java | 16 +- src/main/java/org/schema/ShoeStore.java | 16 +- src/main/java/org/schema/ShoppingCenter.java | 16 +- .../java/org/schema/SingleBlindedTrial.java | 14 + .../java/org/schema/SingleCenterTrial.java | 14 + .../org/schema/SingleFamilyResidence.java | 16 +- src/main/java/org/schema/SinglePlayer.java | 14 + src/main/java/org/schema/SingleRelease.java | 14 + .../org/schema/SiteNavigationElement.java | 16 +- src/main/java/org/schema/SkiResort.java | 16 +- src/main/java/org/schema/Skin.java | 14 + src/main/java/org/schema/SocialEvent.java | 16 +- .../java/org/schema/SoftwareApplication.java | 60 +- .../org/schema/SoftwareApplicationBuild.java | 20 +- .../java/org/schema/SoftwareSourceCode.java | 26 +- src/main/java/org/schema/SoldOut.java | 14 + src/main/java/org/schema/SomeProducts.java | 18 +- src/main/java/org/schema/SoundtrackAlbum.java | 14 + src/main/java/org/schema/Specialty.java | 16 +- src/main/java/org/schema/SpeechPathology.java | 14 + src/main/java/org/schema/SpokenWordAlbum.java | 14 + .../java/org/schema/SportingGoodsStore.java | 16 +- .../org/schema/SportsActivityLocation.java | 16 +- src/main/java/org/schema/SportsClub.java | 16 +- src/main/java/org/schema/SportsEvent.java | 22 +- .../java/org/schema/SportsOrganization.java | 18 +- src/main/java/org/schema/SportsTeam.java | 20 +- src/main/java/org/schema/StackExchange.java | 14 + src/main/java/org/schema/StadiumOrArena.java | 16 +- src/main/java/org/schema/State.java | 16 +- .../org/schema/SteeringPositionValue.java | 16 +- src/main/java/org/schema/Store.java | 16 +- .../java/org/schema/StrengthTraining.java | 14 + src/main/java/org/schema/StringOrThing.java | 17 + src/main/java/org/schema/StringOrVehicle.java | 17 + src/main/java/org/schema/StructuredValue.java | 16 +- src/main/java/org/schema/StudioAlbum.java | 14 + src/main/java/org/schema/SubscribeAction.java | 16 +- src/main/java/org/schema/SubwayStation.java | 16 +- .../java/org/schema/SuperficialAnatomy.java | 26 +- src/main/java/org/schema/Surgical.java | 14 + .../java/org/schema/SurgicalProcedure.java | 14 + src/main/java/org/schema/SuspendAction.java | 16 +- src/main/java/org/schema/Suspended.java | 14 + src/main/java/org/schema/Synagogue.java | 16 +- src/main/java/org/schema/TVClip.java | 16 +- src/main/java/org/schema/TVEpisode.java | 18 +- src/main/java/org/schema/TVSeason.java | 16 +- src/main/java/org/schema/TVSeries.java | 34 +- src/main/java/org/schema/Table.java | 16 +- src/main/java/org/schema/TakeAction.java | 16 +- src/main/java/org/schema/TattooParlor.java | 16 +- src/main/java/org/schema/Taxi.java | 16 +- src/main/java/org/schema/TaxiReservation.java | 67 +- src/main/java/org/schema/TaxiService.java | 16 +- src/main/java/org/schema/TaxiStand.java | 16 +- .../java/org/schema/TaxiVehicleUsage.java | 14 + src/main/java/org/schema/TechArticle.java | 20 +- .../java/org/schema/TelevisionChannel.java | 16 +- .../java/org/schema/TelevisionStation.java | 18 +- src/main/java/org/schema/TennisComplex.java | 16 +- src/main/java/org/schema/Terminated.java | 14 + src/main/java/org/schema/TheaterEvent.java | 16 +- src/main/java/org/schema/TheaterGroup.java | 16 +- src/main/java/org/schema/Therapeutic.java | 14 + .../java/org/schema/TherapeuticProcedure.java | 16 +- src/main/java/org/schema/Thing.java | 33 +- .../java/org/schema/ThingDeserializer.java | 17 +- src/main/java/org/schema/Throat.java | 14 + src/main/java/org/schema/Ticket.java | 81 +- src/main/java/org/schema/TieAction.java | 16 +- src/main/java/org/schema/TipAction.java | 124 +- src/main/java/org/schema/TireShop.java | 16 +- src/main/java/org/schema/TollFree.java | 14 + .../java/org/schema/TouristAttraction.java | 16 +- .../org/schema/TouristInformationCenter.java | 16 +- src/main/java/org/schema/Toxicologic.java | 14 + src/main/java/org/schema/ToyStore.java | 16 +- src/main/java/org/schema/TrackAction.java | 18 +- src/main/java/org/schema/TradeAction.java | 130 +- .../java/org/schema/TraditionalChinese.java | 14 + .../java/org/schema/TrainReservation.java | 61 +- src/main/java/org/schema/TrainStation.java | 16 +- src/main/java/org/schema/TrainTrip.java | 34 +- src/main/java/org/schema/TransferAction.java | 20 +- src/main/java/org/schema/TransitMap.java | 14 + src/main/java/org/schema/TravelAction.java | 18 +- src/main/java/org/schema/TravelAgency.java | 16 +- .../java/org/schema/TreatmentIndication.java | 16 +- .../java/org/schema/TripleBlindedTrial.java | 14 + .../java/org/schema/TypeAndQuantityNode.java | 26 +- src/main/java/org/schema/Ultrasound.java | 14 + .../java/org/schema/UnRegisterAction.java | 16 +- .../org/schema/UnitPriceSpecification.java | 130 +- src/main/java/org/schema/UpdateAction.java | 18 +- src/main/java/org/schema/Urologic.java | 14 + src/main/java/org/schema/UseAction.java | 16 +- src/main/java/org/schema/UsedCondition.java | 14 + src/main/java/org/schema/UserBlocks.java | 16 +- src/main/java/org/schema/UserCheckins.java | 16 +- src/main/java/org/schema/UserComments.java | 26 +- src/main/java/org/schema/UserDownloads.java | 16 +- src/main/java/org/schema/UserInteraction.java | 16 +- src/main/java/org/schema/UserLikes.java | 16 +- src/main/java/org/schema/UserPageVisits.java | 16 +- src/main/java/org/schema/UserPlays.java | 16 +- src/main/java/org/schema/UserPlusOnes.java | 16 +- src/main/java/org/schema/UserTweets.java | 16 +- src/main/java/org/schema/Vehicle.java | 114 +- .../java/org/schema/VehicleSpecialUsage.java | 14 + src/main/java/org/schema/Vein.java | 22 +- src/main/java/org/schema/VenueMap.java | 14 + src/main/java/org/schema/Vessel.java | 16 +- src/main/java/org/schema/VeterinaryCare.java | 16 +- src/main/java/org/schema/VideoGallery.java | 16 +- src/main/java/org/schema/VideoGame.java | 32 +- src/main/java/org/schema/VideoGameClip.java | 16 +- src/main/java/org/schema/VideoGameSeries.java | 50 +- src/main/java/org/schema/VideoObject.java | 32 +- src/main/java/org/schema/ViewAction.java | 16 +- src/main/java/org/schema/VinylFormat.java | 14 + src/main/java/org/schema/Virus.java | 14 + src/main/java/org/schema/VisualArtsEvent.java | 16 +- src/main/java/org/schema/VisualArtwork.java | 30 +- src/main/java/org/schema/VitalSign.java | 14 + src/main/java/org/schema/Volcano.java | 16 +- src/main/java/org/schema/VoteAction.java | 18 +- src/main/java/org/schema/WPAdBlock.java | 16 +- src/main/java/org/schema/WPFooter.java | 16 +- src/main/java/org/schema/WPHeader.java | 16 +- src/main/java/org/schema/WPSideBar.java | 16 +- src/main/java/org/schema/WantAction.java | 16 +- src/main/java/org/schema/WarrantyPromise.java | 20 +- src/main/java/org/schema/WarrantyScope.java | 16 +- src/main/java/org/schema/WatchAction.java | 16 +- src/main/java/org/schema/Waterfall.java | 16 +- src/main/java/org/schema/WearAction.java | 16 +- src/main/java/org/schema/WebApplication.java | 18 +- src/main/java/org/schema/WebPage.java | 32 +- src/main/java/org/schema/WebPageElement.java | 16 +- src/main/java/org/schema/WebSite.java | 16 +- .../java/org/schema/WesternConventional.java | 14 + src/main/java/org/schema/Wholesale.java | 14 + src/main/java/org/schema/WholesaleStore.java | 16 +- src/main/java/org/schema/WikiDoc.java | 14 + src/main/java/org/schema/WinAction.java | 18 +- src/main/java/org/schema/Winery.java | 16 +- src/main/java/org/schema/Withdrawn.java | 14 + src/main/java/org/schema/WriteAction.java | 18 +- src/main/java/org/schema/XRay.java | 14 + .../java/org/schema/ZoneBoardingPolicy.java | 14 + src/main/java/org/schema/Zoo.java | 16 +- test/main/java/org/schema/SmokeTest.java | 13311 ++++++++++++++++ 912 files changed, 31644 insertions(+), 1440 deletions(-) delete mode 100644 src/main/java/org/schema/BooleanOrNumberOrStringOrStructuredValue.java delete mode 100644 src/main/java/org/schema/DataType.java delete mode 100644 src/main/java/org/schema/Integer.java delete mode 100644 src/main/java/org/schema/NumberOrPriceSpecification.java delete mode 100644 src/main/java/org/schema/NumberOrPriceSpecificationOrString.java delete mode 100644 src/main/java/org/schema/NumberOrString.java create mode 100644 test/main/java/org/schema/SmokeTest.java diff --git a/src/main/java/org/schema/APIReference.java b/src/main/java/org/schema/APIReference.java index ac8bba10..b38650ec 100644 --- a/src/main/java/org/schema/APIReference.java +++ b/src/main/java/org/schema/APIReference.java @@ -1286,7 +1286,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String executableLibraryName; @@ -1533,6 +1533,28 @@ protected APIReference(String executableLibraryName, String assemblyVersion, Str myProgrammingModel = programmingModel; myTargetPlatform = targetPlatform; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myExecutableLibraryName != null ? myExecutableLibraryName.hashCode() : 0); + result = 31 * result + (myAssemblyVersion != null ? myAssemblyVersion.hashCode() : 0); + result = 31 * result + (myProgrammingModel != null ? myProgrammingModel.hashCode() : 0); + result = 31 * result + (myTargetPlatform != null ? myTargetPlatform.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + APIReference aPIReference = (APIReference) o; + if (!super.equals(o)) return false; + if (myExecutableLibraryName != null ? !myExecutableLibraryName.equals(aPIReference.myExecutableLibraryName) : aPIReference.myExecutableLibraryName != null) return false; + if (myAssemblyVersion != null ? !myAssemblyVersion.equals(aPIReference.myAssemblyVersion) : aPIReference.myAssemblyVersion != null) return false; + if (myProgrammingModel != null ? !myProgrammingModel.equals(aPIReference.myProgrammingModel) : aPIReference.myProgrammingModel != null) return false; + if (myTargetPlatform != null ? !myTargetPlatform.equals(aPIReference.myTargetPlatform) : aPIReference.myTargetPlatform != null) return false; + return true; + } + private String myExecutableLibraryName; private String myAssemblyVersion; private String myProgrammingModel; diff --git a/src/main/java/org/schema/Abdomen.java b/src/main/java/org/schema/Abdomen.java index d7891178..f2b7f13b 100644 --- a/src/main/java/org/schema/Abdomen.java +++ b/src/main/java/org/schema/Abdomen.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Abdomen() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Abdomen abdomen = (Abdomen) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AboutPage.java b/src/main/java/org/schema/AboutPage.java index 15c0b05f..633eaf12 100644 --- a/src/main/java/org/schema/AboutPage.java +++ b/src/main/java/org/schema/AboutPage.java @@ -1266,7 +1266,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BreadcrumbListOrString breadcrumb; @@ -1507,4 +1507,18 @@ public interface Builder extends ThingBuilder { protected AboutPage(BreadcrumbListOrString breadcrumb, java.util.Date lastReviewed, WebPageElement mainContentOfPage, ImageObject primaryImageOfPage, String relatedLink, OrganizationOrPerson reviewedBy, String significantLink, Specialty specialty, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(breadcrumb, lastReviewed, mainContentOfPage, primaryImageOfPage, relatedLink, reviewedBy, significantLink, specialty, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AboutPage aboutPage = (AboutPage) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AcceptAction.java b/src/main/java/org/schema/AcceptAction.java index d8286eff..d53dda84 100644 --- a/src/main/java/org/schema/AcceptAction.java +++ b/src/main/java/org/schema/AcceptAction.java @@ -338,7 +338,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalDevicePurposeOrThing purpose; @@ -392,4 +392,18 @@ public interface Builder extends ThingBuilder { protected AcceptAction(MedicalDevicePurposeOrThing purpose, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(purpose, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AcceptAction acceptAction = (AcceptAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AccountingService.java b/src/main/java/org/schema/AccountingService.java index 9916f631..7fccf76d 100644 --- a/src/main/java/org/schema/AccountingService.java +++ b/src/main/java/org/schema/AccountingService.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected AccountingService(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AccountingService accountingService = (AccountingService) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AchieveAction.java b/src/main/java/org/schema/AchieveAction.java index 2591e380..8d18a616 100644 --- a/src/main/java/org/schema/AchieveAction.java +++ b/src/main/java/org/schema/AchieveAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected AchieveAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AchieveAction achieveAction = (AchieveAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Action.java b/src/main/java/org/schema/Action.java index 7e3ccde4..69b76b9a 100644 --- a/src/main/java/org/schema/Action.java +++ b/src/main/java/org/schema/Action.java @@ -353,7 +353,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -408,6 +408,32 @@ protected Action(OrganizationOrPerson agent, java.util.Date endTime, java.util.D myError = error; myTarget = target; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAgent != null ? myAgent.hashCode() : 0); + result = 31 * result + (myEndTime != null ? myEndTime.hashCode() : 0); + result = 31 * result + (myStartTime != null ? myStartTime.hashCode() : 0); + result = 31 * result + (myActionStatus != null ? myActionStatus.hashCode() : 0); + result = 31 * result + (myError != null ? myError.hashCode() : 0); + result = 31 * result + (myTarget != null ? myTarget.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Action action = (Action) o; + if (!super.equals(o)) return false; + if (myAgent != null ? !myAgent.equals(action.myAgent) : action.myAgent != null) return false; + if (myEndTime != null ? !myEndTime.equals(action.myEndTime) : action.myEndTime != null) return false; + if (myStartTime != null ? !myStartTime.equals(action.myStartTime) : action.myStartTime != null) return false; + if (myActionStatus != null ? !myActionStatus.equals(action.myActionStatus) : action.myActionStatus != null) return false; + if (myError != null ? !myError.equals(action.myError) : action.myError != null) return false; + if (myTarget != null ? !myTarget.equals(action.myTarget) : action.myTarget != null) return false; + return true; + } + private OrganizationOrPerson myAgent; private java.util.Date myEndTime; private java.util.Date myStartTime; diff --git a/src/main/java/org/schema/ActionCollabClass.java b/src/main/java/org/schema/ActionCollabClass.java index 5850eff3..0f1369bb 100644 --- a/src/main/java/org/schema/ActionCollabClass.java +++ b/src/main/java/org/schema/ActionCollabClass.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected ActionCollabClass() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ActionCollabClass actionCollabClass = (ActionCollabClass) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ActionStatusType.java b/src/main/java/org/schema/ActionStatusType.java index e9d2ff15..ef470ac5 100644 --- a/src/main/java/org/schema/ActionStatusType.java +++ b/src/main/java/org/schema/ActionStatusType.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected ActionStatusType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ActionStatusType actionStatusType = (ActionStatusType) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ActivateAction.java b/src/main/java/org/schema/ActivateAction.java index a2498d51..a52c1edc 100644 --- a/src/main/java/org/schema/ActivateAction.java +++ b/src/main/java/org/schema/ActivateAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected ActivateAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ActivateAction activateAction = (ActivateAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ActiveActionStatus.java b/src/main/java/org/schema/ActiveActionStatus.java index 62418e20..3304a268 100644 --- a/src/main/java/org/schema/ActiveActionStatus.java +++ b/src/main/java/org/schema/ActiveActionStatus.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected ActiveActionStatus() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ActiveActionStatus activeActionStatus = (ActiveActionStatus) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ActiveNotRecruiting.java b/src/main/java/org/schema/ActiveNotRecruiting.java index 059874ef..6b987527 100644 --- a/src/main/java/org/schema/ActiveNotRecruiting.java +++ b/src/main/java/org/schema/ActiveNotRecruiting.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected ActiveNotRecruiting() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ActiveNotRecruiting activeNotRecruiting = (ActiveNotRecruiting) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AddAction.java b/src/main/java/org/schema/AddAction.java index c03b8429..f2646f1c 100644 --- a/src/main/java/org/schema/AddAction.java +++ b/src/main/java/org/schema/AddAction.java @@ -322,7 +322,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Thing targetCollection; @@ -374,4 +374,18 @@ public interface Builder extends ThingBuilder { protected AddAction(Thing targetCollection, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(targetCollection, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AddAction addAction = (AddAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AdministrativeArea.java b/src/main/java/org/schema/AdministrativeArea.java index 9fd19e84..23040887 100644 --- a/src/main/java/org/schema/AdministrativeArea.java +++ b/src/main/java/org/schema/AdministrativeArea.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected AdministrativeArea(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AdministrativeArea administrativeArea = (AdministrativeArea) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AdultEntertainment.java b/src/main/java/org/schema/AdultEntertainment.java index 680febc0..56a4e869 100644 --- a/src/main/java/org/schema/AdultEntertainment.java +++ b/src/main/java/org/schema/AdultEntertainment.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected AdultEntertainment(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AdultEntertainment adultEntertainment = (AdultEntertainment) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AerobicActivity.java b/src/main/java/org/schema/AerobicActivity.java index a3ed1281..3e4029c2 100644 --- a/src/main/java/org/schema/AerobicActivity.java +++ b/src/main/java/org/schema/AerobicActivity.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected AerobicActivity() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AerobicActivity aerobicActivity = (AerobicActivity) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AggregateOffer.java b/src/main/java/org/schema/AggregateOffer.java index e8828f4b..6a7ecf46 100644 --- a/src/main/java/org/schema/AggregateOffer.java +++ b/src/main/java/org/schema/AggregateOffer.java @@ -29,13 +29,13 @@ public class AggregateOffer extends Offer { /** * The highest price of all offers available. */ - public NumberOrString getHighPrice() { + public Number getHighPrice() { return myHighPrice; } /** * The lowest price of all offers available. */ - public NumberOrString getLowPrice() { + public Number getLowPrice() { return myLowPrice; } /** @@ -63,32 +63,80 @@ public AggregateOffer build() { /** * The highest price of all offers available. */ - @NotNull public Builder highPrice(@NotNull Number number) { - if (this.highPrice == null) this.highPrice = new NumberOrString(); - this.highPrice.setNumber(number); + @NotNull public Builder highPrice(@NotNull Integer integer) { + if (this.highPrice == null) this.highPrice = new Number(); + this.highPrice.setInteger(integer); + return this; + } + /** + * The highest price of all offers available. + */ + @NotNull public Builder highPrice(@NotNull Long highPrice) { + if (this.highPrice == null) this.highPrice = new Number(); + this.highPrice.setLong(highPrice); + return this; + } + /** + * The highest price of all offers available. + */ + @NotNull public Builder highPrice(@NotNull Float highPrice) { + if (this.highPrice == null) this.highPrice = new Number(); + this.highPrice.setFloat(highPrice); + return this; + } + /** + * The highest price of all offers available. + */ + @NotNull public Builder highPrice(@NotNull Double highPrice) { + if (this.highPrice == null) this.highPrice = new Number(); + this.highPrice.setDouble(highPrice); return this; } /** * The highest price of all offers available. */ @NotNull public Builder highPrice(@NotNull String highPrice) { - if (this.highPrice == null) this.highPrice = new NumberOrString(); + if (this.highPrice == null) this.highPrice = new Number(); this.highPrice.setString(highPrice); return this; } /** * The lowest price of all offers available. */ - @NotNull public Builder lowPrice(@NotNull Number number) { - if (this.lowPrice == null) this.lowPrice = new NumberOrString(); - this.lowPrice.setNumber(number); + @NotNull public Builder lowPrice(@NotNull Integer integer) { + if (this.lowPrice == null) this.lowPrice = new Number(); + this.lowPrice.setInteger(integer); + return this; + } + /** + * The lowest price of all offers available. + */ + @NotNull public Builder lowPrice(@NotNull Long lowPrice) { + if (this.lowPrice == null) this.lowPrice = new Number(); + this.lowPrice.setLong(lowPrice); + return this; + } + /** + * The lowest price of all offers available. + */ + @NotNull public Builder lowPrice(@NotNull Float lowPrice) { + if (this.lowPrice == null) this.lowPrice = new Number(); + this.lowPrice.setFloat(lowPrice); + return this; + } + /** + * The lowest price of all offers available. + */ + @NotNull public Builder lowPrice(@NotNull Double lowPrice) { + if (this.lowPrice == null) this.lowPrice = new Number(); + this.lowPrice.setDouble(lowPrice); return this; } /** * The lowest price of all offers available. */ @NotNull public Builder lowPrice(@NotNull String lowPrice) { - if (this.lowPrice == null) this.lowPrice = new NumberOrString(); + if (this.lowPrice == null) this.lowPrice = new Number(); this.lowPrice.setString(lowPrice); return this; } @@ -513,9 +561,93 @@ public AggregateOffer build() { */ - @NotNull public Builder price(@NotNull Number number) { - if (this.price == null) this.price = new NumberOrString(); - this.price.setNumber(number); + @NotNull public Builder price(@NotNull Integer integer) { + if (this.price == null) this.price = new Number(); + this.price.setInteger(integer); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Long price) { + if (this.price == null) this.price = new Number(); + this.price.setLong(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Float price) { + if (this.price == null) this.price = new Number(); + this.price.setFloat(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Double price) { + if (this.price == null) this.price = new Number(); + this.price.setDouble(price); return this; } /** @@ -542,7 +674,7 @@ public AggregateOffer build() { */ @NotNull public Builder price(@NotNull String price) { - if (this.price == null) this.price = new NumberOrString(); + if (this.price == null) this.price = new Number(); this.price.setString(price); return this; } @@ -798,9 +930,15 @@ public Builder id(long id) { final String key = entry.getKey(); Object value = entry.getValue(); if (value instanceof java.util.Map) { value = ThingDeserializer.fromMap((java.util.Map)value); } - if ("highPrice".equals(key) && value instanceof Number) { highPrice((Number)value); continue; } + if ("highPrice".equals(key) && value instanceof Integer) { highPrice((Integer)value); continue; } + if ("highPrice".equals(key) && value instanceof Long) { highPrice((Long)value); continue; } + if ("highPrice".equals(key) && value instanceof Float) { highPrice((Float)value); continue; } + if ("highPrice".equals(key) && value instanceof Double) { highPrice((Double)value); continue; } if ("highPrice".equals(key) && value instanceof String) { highPrice((String)value); continue; } - if ("lowPrice".equals(key) && value instanceof Number) { lowPrice((Number)value); continue; } + if ("lowPrice".equals(key) && value instanceof Integer) { lowPrice((Integer)value); continue; } + if ("lowPrice".equals(key) && value instanceof Long) { lowPrice((Long)value); continue; } + if ("lowPrice".equals(key) && value instanceof Float) { lowPrice((Float)value); continue; } + if ("lowPrice".equals(key) && value instanceof Double) { lowPrice((Double)value); continue; } if ("lowPrice".equals(key) && value instanceof String) { lowPrice((String)value); continue; } if ("offerCount".equals(key) && value instanceof Integer) { offerCount((Integer)value); continue; } if ("offers".equals(key) && value instanceof Offer) { offers((Offer)value); continue; } @@ -837,7 +975,10 @@ public Builder id(long id) { if ("itemCondition".equals(key) && value instanceof OfferItemCondition) { itemCondition((OfferItemCondition)value); continue; } if ("itemOffered".equals(key) && value instanceof Product) { itemOffered((Product)value); continue; } if ("mpn".equals(key) && value instanceof String) { mpn((String)value); continue; } - if ("price".equals(key) && value instanceof Number) { price((Number)value); continue; } + if ("price".equals(key) && value instanceof Integer) { price((Integer)value); continue; } + if ("price".equals(key) && value instanceof Long) { price((Long)value); continue; } + if ("price".equals(key) && value instanceof Float) { price((Float)value); continue; } + if ("price".equals(key) && value instanceof Double) { price((Double)value); continue; } if ("price".equals(key) && value instanceof String) { price((String)value); continue; } if ("priceSpecification".equals(key) && value instanceof PriceSpecification) { priceSpecification((PriceSpecification)value); continue; } if ("priceValidUntil".equals(key) && value instanceof java.util.Date) { priceValidUntil((java.util.Date)value); continue; } @@ -857,11 +998,11 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } - private NumberOrString highPrice; - private NumberOrString lowPrice; + private Number highPrice; + private Number lowPrice; private Integer offerCount; private Offer offers; private PaymentMethod acceptedPaymentMethod; @@ -891,7 +1032,7 @@ public Builder id(long id) { private OfferItemCondition itemCondition; private Product itemOffered; private String mpn; - private NumberOrString price; + private Number price; private PriceSpecification priceSpecification; private java.util.Date priceValidUntil; private Review review; @@ -912,9 +1053,15 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - @NotNull Builder highPrice(@NotNull Number number); + @NotNull Builder highPrice(@NotNull Integer integer); + @NotNull Builder highPrice(@NotNull Long highPrice); + @NotNull Builder highPrice(@NotNull Float highPrice); + @NotNull Builder highPrice(@NotNull Double highPrice); @NotNull Builder highPrice(@NotNull String highPrice); - @NotNull Builder lowPrice(@NotNull Number number); + @NotNull Builder lowPrice(@NotNull Integer integer); + @NotNull Builder lowPrice(@NotNull Long lowPrice); + @NotNull Builder lowPrice(@NotNull Float lowPrice); + @NotNull Builder lowPrice(@NotNull Double lowPrice); @NotNull Builder lowPrice(@NotNull String lowPrice); @NotNull Builder offerCount(@NotNull Integer integer); @NotNull Builder offers(@NotNull Offer offer); @@ -975,7 +1122,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder itemOffered(@NotNull Product product); @NotNull Builder itemOffered(@NotNull Product.Builder product); @NotNull Builder mpn(@NotNull String mpn); - @NotNull Builder price(@NotNull Number number); + @NotNull Builder price(@NotNull Integer integer); + @NotNull Builder price(@NotNull Long price); + @NotNull Builder price(@NotNull Float price); + @NotNull Builder price(@NotNull Double price); @NotNull Builder price(@NotNull String price); @NotNull Builder priceSpecification(@NotNull PriceSpecification priceSpecification); @NotNull Builder priceSpecification(@NotNull PriceSpecification.Builder priceSpecification); @@ -1003,15 +1153,37 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected AggregateOffer(NumberOrString highPrice, NumberOrString lowPrice, Integer offerCount, Offer offers, PaymentMethod acceptedPaymentMethod, Offer addOn, QuantitativeValue advanceBookingRequirement, AggregateRating aggregateRating, ItemAvailability availability, java.util.Date availabilityEnds, java.util.Date availabilityStarts, Place availableAtOrFrom, DeliveryMethod availableDeliveryMethod, BusinessFunction businessFunction, PhysicalActivityCategoryOrStringOrThing category, QuantitativeValue deliveryLeadTime, BusinessEntityType eligibleCustomerType, QuantitativeValue eligibleDuration, QuantitativeValue eligibleQuantity, GeoShapeOrPlaceOrString eligibleRegion, GeoShapeOrPlaceOrString ineligibleRegion, PriceSpecification eligibleTransactionVolume, String gtin12, String gtin13, String gtin14, String gtin8, TypeAndQuantityNode includesObject, QuantitativeValue inventoryLevel, OfferItemCondition itemCondition, Product itemOffered, String mpn, NumberOrString price, PriceSpecification priceSpecification, java.util.Date priceValidUntil, Review review, Participant seller, String sku, java.util.Date validFrom, java.util.Date validThrough, WarrantyPromise warranty, String priceCurrency, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected AggregateOffer(Number highPrice, Number lowPrice, Integer offerCount, Offer offers, PaymentMethod acceptedPaymentMethod, Offer addOn, QuantitativeValue advanceBookingRequirement, AggregateRating aggregateRating, ItemAvailability availability, java.util.Date availabilityEnds, java.util.Date availabilityStarts, Place availableAtOrFrom, DeliveryMethod availableDeliveryMethod, BusinessFunction businessFunction, PhysicalActivityCategoryOrStringOrThing category, QuantitativeValue deliveryLeadTime, BusinessEntityType eligibleCustomerType, QuantitativeValue eligibleDuration, QuantitativeValue eligibleQuantity, GeoShapeOrPlaceOrString eligibleRegion, GeoShapeOrPlaceOrString ineligibleRegion, PriceSpecification eligibleTransactionVolume, String gtin12, String gtin13, String gtin14, String gtin8, TypeAndQuantityNode includesObject, QuantitativeValue inventoryLevel, OfferItemCondition itemCondition, Product itemOffered, String mpn, Number price, PriceSpecification priceSpecification, java.util.Date priceValidUntil, Review review, Participant seller, String sku, java.util.Date validFrom, java.util.Date validThrough, WarrantyPromise warranty, String priceCurrency, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(acceptedPaymentMethod, addOn, advanceBookingRequirement, aggregateRating, availability, availabilityEnds, availabilityStarts, availableAtOrFrom, availableDeliveryMethod, businessFunction, category, deliveryLeadTime, eligibleCustomerType, eligibleDuration, eligibleQuantity, eligibleRegion, ineligibleRegion, eligibleTransactionVolume, gtin12, gtin13, gtin14, gtin8, includesObject, inventoryLevel, itemCondition, itemOffered, mpn, price, priceSpecification, priceValidUntil, review, seller, sku, validFrom, validThrough, warranty, priceCurrency, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myHighPrice = highPrice; myLowPrice = lowPrice; myOfferCount = offerCount; myOffers = offers; } - private NumberOrString myHighPrice; - private NumberOrString myLowPrice; + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myHighPrice != null ? myHighPrice.hashCode() : 0); + result = 31 * result + (myLowPrice != null ? myLowPrice.hashCode() : 0); + result = 31 * result + (myOfferCount != null ? myOfferCount.hashCode() : 0); + result = 31 * result + (myOffers != null ? myOffers.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AggregateOffer aggregateOffer = (AggregateOffer) o; + if (!super.equals(o)) return false; + if (myHighPrice != null ? !myHighPrice.equals(aggregateOffer.myHighPrice) : aggregateOffer.myHighPrice != null) return false; + if (myLowPrice != null ? !myLowPrice.equals(aggregateOffer.myLowPrice) : aggregateOffer.myLowPrice != null) return false; + if (myOfferCount != null ? !myOfferCount.equals(aggregateOffer.myOfferCount) : aggregateOffer.myOfferCount != null) return false; + if (myOffers != null ? !myOffers.equals(aggregateOffer.myOffers) : aggregateOffer.myOffers != null) return false; + return true; + } + + private Number myHighPrice; + private Number myLowPrice; private Integer myOfferCount; private Offer myOffers; } diff --git a/src/main/java/org/schema/AggregateRating.java b/src/main/java/org/schema/AggregateRating.java index 1f8bfe76..5bd7ef82 100644 --- a/src/main/java/org/schema/AggregateRating.java +++ b/src/main/java/org/schema/AggregateRating.java @@ -84,16 +84,40 @@ public AggregateRating build() { /** * The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed. */ - @NotNull public Builder bestRating(@NotNull Number number) { - if (this.bestRating == null) this.bestRating = new NumberOrString(); - this.bestRating.setNumber(number); + @NotNull public Builder bestRating(@NotNull Integer integer) { + if (this.bestRating == null) this.bestRating = new Number(); + this.bestRating.setInteger(integer); + return this; + } + /** + * The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed. + */ + @NotNull public Builder bestRating(@NotNull Long bestRating) { + if (this.bestRating == null) this.bestRating = new Number(); + this.bestRating.setLong(bestRating); + return this; + } + /** + * The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed. + */ + @NotNull public Builder bestRating(@NotNull Float bestRating) { + if (this.bestRating == null) this.bestRating = new Number(); + this.bestRating.setFloat(bestRating); + return this; + } + /** + * The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed. + */ + @NotNull public Builder bestRating(@NotNull Double bestRating) { + if (this.bestRating == null) this.bestRating = new Number(); + this.bestRating.setDouble(bestRating); return this; } /** * The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed. */ @NotNull public Builder bestRating(@NotNull String bestRating) { - if (this.bestRating == null) this.bestRating = new NumberOrString(); + if (this.bestRating == null) this.bestRating = new Number(); this.bestRating.setString(bestRating); return this; } @@ -107,16 +131,40 @@ public AggregateRating build() { /** * The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed. */ - @NotNull public Builder worstRating(@NotNull Number number) { - if (this.worstRating == null) this.worstRating = new NumberOrString(); - this.worstRating.setNumber(number); + @NotNull public Builder worstRating(@NotNull Integer integer) { + if (this.worstRating == null) this.worstRating = new Number(); + this.worstRating.setInteger(integer); + return this; + } + /** + * The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed. + */ + @NotNull public Builder worstRating(@NotNull Long worstRating) { + if (this.worstRating == null) this.worstRating = new Number(); + this.worstRating.setLong(worstRating); + return this; + } + /** + * The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed. + */ + @NotNull public Builder worstRating(@NotNull Float worstRating) { + if (this.worstRating == null) this.worstRating = new Number(); + this.worstRating.setFloat(worstRating); + return this; + } + /** + * The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed. + */ + @NotNull public Builder worstRating(@NotNull Double worstRating) { + if (this.worstRating == null) this.worstRating = new Number(); + this.worstRating.setDouble(worstRating); return this; } /** * The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed. */ @NotNull public Builder worstRating(@NotNull String worstRating) { - if (this.worstRating == null) this.worstRating = new NumberOrString(); + if (this.worstRating == null) this.worstRating = new Number(); this.worstRating.setString(worstRating); return this; } @@ -294,10 +342,16 @@ public Builder id(long id) { if ("itemReviewed".equals(key) && value instanceof Thing) { itemReviewed((Thing)value); continue; } if ("ratingCount".equals(key) && value instanceof Integer) { ratingCount((Integer)value); continue; } if ("reviewCount".equals(key) && value instanceof Integer) { reviewCount((Integer)value); continue; } - if ("bestRating".equals(key) && value instanceof Number) { bestRating((Number)value); continue; } + if ("bestRating".equals(key) && value instanceof Integer) { bestRating((Integer)value); continue; } + if ("bestRating".equals(key) && value instanceof Long) { bestRating((Long)value); continue; } + if ("bestRating".equals(key) && value instanceof Float) { bestRating((Float)value); continue; } + if ("bestRating".equals(key) && value instanceof Double) { bestRating((Double)value); continue; } if ("bestRating".equals(key) && value instanceof String) { bestRating((String)value); continue; } if ("ratingValue".equals(key) && value instanceof String) { ratingValue((String)value); continue; } - if ("worstRating".equals(key) && value instanceof Number) { worstRating((Number)value); continue; } + if ("worstRating".equals(key) && value instanceof Integer) { worstRating((Integer)value); continue; } + if ("worstRating".equals(key) && value instanceof Long) { worstRating((Long)value); continue; } + if ("worstRating".equals(key) && value instanceof Float) { worstRating((Float)value); continue; } + if ("worstRating".equals(key) && value instanceof Double) { worstRating((Double)value); continue; } if ("worstRating".equals(key) && value instanceof String) { worstRating((String)value); continue; } if ("additionalType".equals(key) && value instanceof String) { additionalType((String)value); continue; } if ("alternateName".equals(key) && value instanceof String) { alternateName((String)value); continue; } @@ -308,15 +362,15 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Thing itemReviewed; private Integer ratingCount; private Integer reviewCount; - private NumberOrString bestRating; + private Number bestRating; private String ratingValue; - private NumberOrString worstRating; + private Number worstRating; private String additionalType; private String alternateName; private String description; @@ -332,10 +386,16 @@ public interface Builder extends ThingBuilder { @NotNull Builder itemReviewed(@NotNull Thing.Builder thing); @NotNull Builder ratingCount(@NotNull Integer integer); @NotNull Builder reviewCount(@NotNull Integer integer); - @NotNull Builder bestRating(@NotNull Number number); + @NotNull Builder bestRating(@NotNull Integer integer); + @NotNull Builder bestRating(@NotNull Long bestRating); + @NotNull Builder bestRating(@NotNull Float bestRating); + @NotNull Builder bestRating(@NotNull Double bestRating); @NotNull Builder bestRating(@NotNull String bestRating); @NotNull Builder ratingValue(@NotNull String ratingValue); - @NotNull Builder worstRating(@NotNull Number number); + @NotNull Builder worstRating(@NotNull Integer integer); + @NotNull Builder worstRating(@NotNull Long worstRating); + @NotNull Builder worstRating(@NotNull Float worstRating); + @NotNull Builder worstRating(@NotNull Double worstRating); @NotNull Builder worstRating(@NotNull String worstRating); @NotNull Builder additionalType(@NotNull String additionalType); @NotNull Builder alternateName(@NotNull String alternateName); @@ -351,12 +411,32 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected AggregateRating(Thing itemReviewed, Integer ratingCount, Integer reviewCount, NumberOrString bestRating, String ratingValue, NumberOrString worstRating, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected AggregateRating(Thing itemReviewed, Integer ratingCount, Integer reviewCount, Number bestRating, String ratingValue, Number worstRating, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(bestRating, ratingValue, worstRating, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myItemReviewed = itemReviewed; myRatingCount = ratingCount; myReviewCount = reviewCount; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myItemReviewed != null ? myItemReviewed.hashCode() : 0); + result = 31 * result + (myRatingCount != null ? myRatingCount.hashCode() : 0); + result = 31 * result + (myReviewCount != null ? myReviewCount.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AggregateRating aggregateRating = (AggregateRating) o; + if (!super.equals(o)) return false; + if (myItemReviewed != null ? !myItemReviewed.equals(aggregateRating.myItemReviewed) : aggregateRating.myItemReviewed != null) return false; + if (myRatingCount != null ? !myRatingCount.equals(aggregateRating.myRatingCount) : aggregateRating.myRatingCount != null) return false; + if (myReviewCount != null ? !myReviewCount.equals(aggregateRating.myReviewCount) : aggregateRating.myReviewCount != null) return false; + return true; + } + private Thing myItemReviewed; private Integer myRatingCount; private Integer myReviewCount; diff --git a/src/main/java/org/schema/AgreeAction.java b/src/main/java/org/schema/AgreeAction.java index 3915bce0..36b12c48 100644 --- a/src/main/java/org/schema/AgreeAction.java +++ b/src/main/java/org/schema/AgreeAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected AgreeAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AgreeAction agreeAction = (AgreeAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Airline.java b/src/main/java/org/schema/Airline.java index dd878de2..588a7234 100644 --- a/src/main/java/org/schema/Airline.java +++ b/src/main/java/org/schema/Airline.java @@ -694,7 +694,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BoardingPolicyType boardingPolicy; @@ -824,6 +824,24 @@ protected Airline(BoardingPolicyType boardingPolicy, String iataCode, PostalAddr myBoardingPolicy = boardingPolicy; myIataCode = iataCode; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBoardingPolicy != null ? myBoardingPolicy.hashCode() : 0); + result = 31 * result + (myIataCode != null ? myIataCode.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Airline airline = (Airline) o; + if (!super.equals(o)) return false; + if (myBoardingPolicy != null ? !myBoardingPolicy.equals(airline.myBoardingPolicy) : airline.myBoardingPolicy != null) return false; + if (myIataCode != null ? !myIataCode.equals(airline.myIataCode) : airline.myIataCode != null) return false; + return true; + } + private BoardingPolicyType myBoardingPolicy; private String myIataCode; } diff --git a/src/main/java/org/schema/Airport.java b/src/main/java/org/schema/Airport.java index 99f764b3..a0378b61 100644 --- a/src/main/java/org/schema/Airport.java +++ b/src/main/java/org/schema/Airport.java @@ -496,7 +496,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String iataCode; @@ -582,6 +582,24 @@ protected Airport(String iataCode, String iacoCode, String openingHours, PostalA myIataCode = iataCode; myIacoCode = iacoCode; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myIataCode != null ? myIataCode.hashCode() : 0); + result = 31 * result + (myIacoCode != null ? myIacoCode.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Airport airport = (Airport) o; + if (!super.equals(o)) return false; + if (myIataCode != null ? !myIataCode.equals(airport.myIataCode) : airport.myIataCode != null) return false; + if (myIacoCode != null ? !myIacoCode.equals(airport.myIacoCode) : airport.myIacoCode != null) return false; + return true; + } + private String myIataCode; private String myIacoCode; } diff --git a/src/main/java/org/schema/AlbumRelease.java b/src/main/java/org/schema/AlbumRelease.java index 199cea20..3acdd394 100644 --- a/src/main/java/org/schema/AlbumRelease.java +++ b/src/main/java/org/schema/AlbumRelease.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected AlbumRelease() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AlbumRelease albumRelease = (AlbumRelease) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AlignmentObject.java b/src/main/java/org/schema/AlignmentObject.java index 6599ff86..44a0b62c 100644 --- a/src/main/java/org/schema/AlignmentObject.java +++ b/src/main/java/org/schema/AlignmentObject.java @@ -287,7 +287,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String alignmentType; @@ -333,6 +333,30 @@ protected AlignmentObject(String alignmentType, String educationalFramework, Str myTargetName = targetName; myTargetUrl = targetUrl; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAlignmentType != null ? myAlignmentType.hashCode() : 0); + result = 31 * result + (myEducationalFramework != null ? myEducationalFramework.hashCode() : 0); + result = 31 * result + (myTargetDescription != null ? myTargetDescription.hashCode() : 0); + result = 31 * result + (myTargetName != null ? myTargetName.hashCode() : 0); + result = 31 * result + (myTargetUrl != null ? myTargetUrl.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AlignmentObject alignmentObject = (AlignmentObject) o; + if (!super.equals(o)) return false; + if (myAlignmentType != null ? !myAlignmentType.equals(alignmentObject.myAlignmentType) : alignmentObject.myAlignmentType != null) return false; + if (myEducationalFramework != null ? !myEducationalFramework.equals(alignmentObject.myEducationalFramework) : alignmentObject.myEducationalFramework != null) return false; + if (myTargetDescription != null ? !myTargetDescription.equals(alignmentObject.myTargetDescription) : alignmentObject.myTargetDescription != null) return false; + if (myTargetName != null ? !myTargetName.equals(alignmentObject.myTargetName) : alignmentObject.myTargetName != null) return false; + if (myTargetUrl != null ? !myTargetUrl.equals(alignmentObject.myTargetUrl) : alignmentObject.myTargetUrl != null) return false; + return true; + } + private String myAlignmentType; private String myEducationalFramework; private String myTargetDescription; diff --git a/src/main/java/org/schema/AllWheelDriveConfiguration.java b/src/main/java/org/schema/AllWheelDriveConfiguration.java index c2b652c7..1bc12d18 100644 --- a/src/main/java/org/schema/AllWheelDriveConfiguration.java +++ b/src/main/java/org/schema/AllWheelDriveConfiguration.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected AllWheelDriveConfiguration() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AllWheelDriveConfiguration allWheelDriveConfiguration = (AllWheelDriveConfiguration) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AllocateAction.java b/src/main/java/org/schema/AllocateAction.java index 21e86a8d..2f72169d 100644 --- a/src/main/java/org/schema/AllocateAction.java +++ b/src/main/java/org/schema/AllocateAction.java @@ -344,7 +344,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalDevicePurposeOrThing purpose; @@ -399,5 +399,21 @@ protected AllocateAction(MedicalDevicePurposeOrThing purpose, OrganizationOrPers super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myPurpose = purpose; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myPurpose != null ? myPurpose.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AllocateAction allocateAction = (AllocateAction) o; + if (!super.equals(o)) return false; + if (myPurpose != null ? !myPurpose.equals(allocateAction.myPurpose) : allocateAction.myPurpose != null) return false; + return true; + } + private MedicalDevicePurposeOrThing myPurpose; } diff --git a/src/main/java/org/schema/AmusementPark.java b/src/main/java/org/schema/AmusementPark.java index 644e46b6..e64ab049 100644 --- a/src/main/java/org/schema/AmusementPark.java +++ b/src/main/java/org/schema/AmusementPark.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected AmusementPark(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AmusementPark amusementPark = (AmusementPark) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AnaerobicActivity.java b/src/main/java/org/schema/AnaerobicActivity.java index 920ebcc7..3242c99e 100644 --- a/src/main/java/org/schema/AnaerobicActivity.java +++ b/src/main/java/org/schema/AnaerobicActivity.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected AnaerobicActivity() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AnaerobicActivity anaerobicActivity = (AnaerobicActivity) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AnatomicalStructure.java b/src/main/java/org/schema/AnatomicalStructure.java index 45ae3cb3..0ff4a3e2 100644 --- a/src/main/java/org/schema/AnatomicalStructure.java +++ b/src/main/java/org/schema/AnatomicalStructure.java @@ -457,7 +457,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String associatedPathophysiology; @@ -538,6 +538,38 @@ protected AnatomicalStructure(String associatedPathophysiology, String bodyLocat myRelatedTherapy = relatedTherapy; mySubStructure = subStructure; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAssociatedPathophysiology != null ? myAssociatedPathophysiology.hashCode() : 0); + result = 31 * result + (myBodyLocation != null ? myBodyLocation.hashCode() : 0); + result = 31 * result + (myConnectedTo != null ? myConnectedTo.hashCode() : 0); + result = 31 * result + (myDiagram != null ? myDiagram.hashCode() : 0); + result = 31 * result + (myFunction != null ? myFunction.hashCode() : 0); + result = 31 * result + (myPartOfSystem != null ? myPartOfSystem.hashCode() : 0); + result = 31 * result + (myRelatedCondition != null ? myRelatedCondition.hashCode() : 0); + result = 31 * result + (myRelatedTherapy != null ? myRelatedTherapy.hashCode() : 0); + result = 31 * result + (mySubStructure != null ? mySubStructure.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AnatomicalStructure anatomicalStructure = (AnatomicalStructure) o; + if (!super.equals(o)) return false; + if (myAssociatedPathophysiology != null ? !myAssociatedPathophysiology.equals(anatomicalStructure.myAssociatedPathophysiology) : anatomicalStructure.myAssociatedPathophysiology != null) return false; + if (myBodyLocation != null ? !myBodyLocation.equals(anatomicalStructure.myBodyLocation) : anatomicalStructure.myBodyLocation != null) return false; + if (myConnectedTo != null ? !myConnectedTo.equals(anatomicalStructure.myConnectedTo) : anatomicalStructure.myConnectedTo != null) return false; + if (myDiagram != null ? !myDiagram.equals(anatomicalStructure.myDiagram) : anatomicalStructure.myDiagram != null) return false; + if (myFunction != null ? !myFunction.equals(anatomicalStructure.myFunction) : anatomicalStructure.myFunction != null) return false; + if (myPartOfSystem != null ? !myPartOfSystem.equals(anatomicalStructure.myPartOfSystem) : anatomicalStructure.myPartOfSystem != null) return false; + if (myRelatedCondition != null ? !myRelatedCondition.equals(anatomicalStructure.myRelatedCondition) : anatomicalStructure.myRelatedCondition != null) return false; + if (myRelatedTherapy != null ? !myRelatedTherapy.equals(anatomicalStructure.myRelatedTherapy) : anatomicalStructure.myRelatedTherapy != null) return false; + if (mySubStructure != null ? !mySubStructure.equals(anatomicalStructure.mySubStructure) : anatomicalStructure.mySubStructure != null) return false; + return true; + } + private String myAssociatedPathophysiology; private String myBodyLocation; private AnatomicalStructure myConnectedTo; diff --git a/src/main/java/org/schema/AnatomicalStructureOrAnatomicalSystem.java b/src/main/java/org/schema/AnatomicalStructureOrAnatomicalSystem.java index 06eba7ce..db5bca53 100644 --- a/src/main/java/org/schema/AnatomicalStructureOrAnatomicalSystem.java +++ b/src/main/java/org/schema/AnatomicalStructureOrAnatomicalSystem.java @@ -44,4 +44,21 @@ private void clear() { myAnatomicalStructure = null; myAnatomicalSystem = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAnatomicalStructure != null ? myAnatomicalStructure.hashCode() : 0); + result = 31 * result + (myAnatomicalSystem != null ? myAnatomicalSystem.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AnatomicalStructureOrAnatomicalSystem anatomicalStructureOrAnatomicalSystem = (AnatomicalStructureOrAnatomicalSystem) o; + if (myAnatomicalStructure != null ? !myAnatomicalStructure.equals(anatomicalStructureOrAnatomicalSystem.myAnatomicalStructure) : anatomicalStructureOrAnatomicalSystem.myAnatomicalStructure != null) return false; + if (myAnatomicalSystem != null ? !myAnatomicalSystem.equals(anatomicalStructureOrAnatomicalSystem.myAnatomicalSystem) : anatomicalStructureOrAnatomicalSystem.myAnatomicalSystem != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy.java b/src/main/java/org/schema/AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy.java index 3cebe398..5b6b98ad 100644 --- a/src/main/java/org/schema/AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy.java +++ b/src/main/java/org/schema/AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy.java @@ -50,4 +50,23 @@ private void clear() { myAnatomicalSystem = null; mySuperficialAnatomy = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAnatomicalStructure != null ? myAnatomicalStructure.hashCode() : 0); + result = 31 * result + (myAnatomicalSystem != null ? myAnatomicalSystem.hashCode() : 0); + result = 31 * result + (mySuperficialAnatomy != null ? mySuperficialAnatomy.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy anatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy = (AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy) o; + if (myAnatomicalStructure != null ? !myAnatomicalStructure.equals(anatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy.myAnatomicalStructure) : anatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy.myAnatomicalStructure != null) return false; + if (myAnatomicalSystem != null ? !myAnatomicalSystem.equals(anatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy.myAnatomicalSystem) : anatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy.myAnatomicalSystem != null) return false; + if (mySuperficialAnatomy != null ? !mySuperficialAnatomy.equals(anatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy.mySuperficialAnatomy) : anatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy.mySuperficialAnatomy != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AnatomicalStructureOrSuperficialAnatomy.java b/src/main/java/org/schema/AnatomicalStructureOrSuperficialAnatomy.java index 222985af..9563cc83 100644 --- a/src/main/java/org/schema/AnatomicalStructureOrSuperficialAnatomy.java +++ b/src/main/java/org/schema/AnatomicalStructureOrSuperficialAnatomy.java @@ -44,4 +44,21 @@ private void clear() { myAnatomicalStructure = null; mySuperficialAnatomy = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAnatomicalStructure != null ? myAnatomicalStructure.hashCode() : 0); + result = 31 * result + (mySuperficialAnatomy != null ? mySuperficialAnatomy.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AnatomicalStructureOrSuperficialAnatomy anatomicalStructureOrSuperficialAnatomy = (AnatomicalStructureOrSuperficialAnatomy) o; + if (myAnatomicalStructure != null ? !myAnatomicalStructure.equals(anatomicalStructureOrSuperficialAnatomy.myAnatomicalStructure) : anatomicalStructureOrSuperficialAnatomy.myAnatomicalStructure != null) return false; + if (mySuperficialAnatomy != null ? !mySuperficialAnatomy.equals(anatomicalStructureOrSuperficialAnatomy.mySuperficialAnatomy) : anatomicalStructureOrSuperficialAnatomy.mySuperficialAnatomy != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AnatomicalSystem.java b/src/main/java/org/schema/AnatomicalSystem.java index fe21243b..9a00c32c 100644 --- a/src/main/java/org/schema/AnatomicalSystem.java +++ b/src/main/java/org/schema/AnatomicalSystem.java @@ -411,7 +411,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String associatedPathophysiology; @@ -481,6 +481,30 @@ protected AnatomicalSystem(String associatedPathophysiology, AnatomicalStructure myRelatedStructure = relatedStructure; myRelatedTherapy = relatedTherapy; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAssociatedPathophysiology != null ? myAssociatedPathophysiology.hashCode() : 0); + result = 31 * result + (myComprisedOf != null ? myComprisedOf.hashCode() : 0); + result = 31 * result + (myRelatedCondition != null ? myRelatedCondition.hashCode() : 0); + result = 31 * result + (myRelatedStructure != null ? myRelatedStructure.hashCode() : 0); + result = 31 * result + (myRelatedTherapy != null ? myRelatedTherapy.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AnatomicalSystem anatomicalSystem = (AnatomicalSystem) o; + if (!super.equals(o)) return false; + if (myAssociatedPathophysiology != null ? !myAssociatedPathophysiology.equals(anatomicalSystem.myAssociatedPathophysiology) : anatomicalSystem.myAssociatedPathophysiology != null) return false; + if (myComprisedOf != null ? !myComprisedOf.equals(anatomicalSystem.myComprisedOf) : anatomicalSystem.myComprisedOf != null) return false; + if (myRelatedCondition != null ? !myRelatedCondition.equals(anatomicalSystem.myRelatedCondition) : anatomicalSystem.myRelatedCondition != null) return false; + if (myRelatedStructure != null ? !myRelatedStructure.equals(anatomicalSystem.myRelatedStructure) : anatomicalSystem.myRelatedStructure != null) return false; + if (myRelatedTherapy != null ? !myRelatedTherapy.equals(anatomicalSystem.myRelatedTherapy) : anatomicalSystem.myRelatedTherapy != null) return false; + return true; + } + private String myAssociatedPathophysiology; private AnatomicalStructureOrAnatomicalSystem myComprisedOf; private MedicalCondition myRelatedCondition; diff --git a/src/main/java/org/schema/Anesthesia.java b/src/main/java/org/schema/Anesthesia.java index 956e4d49..773edba8 100644 --- a/src/main/java/org/schema/Anesthesia.java +++ b/src/main/java/org/schema/Anesthesia.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Anesthesia() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Anesthesia anesthesia = (Anesthesia) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AnimalShelter.java b/src/main/java/org/schema/AnimalShelter.java index 556ff6ec..e6021072 100644 --- a/src/main/java/org/schema/AnimalShelter.java +++ b/src/main/java/org/schema/AnimalShelter.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected AnimalShelter(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AnimalShelter animalShelter = (AnimalShelter) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Answer.java b/src/main/java/org/schema/Answer.java index e801019d..752f4f9d 100644 --- a/src/main/java/org/schema/Answer.java +++ b/src/main/java/org/schema/Answer.java @@ -1177,7 +1177,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Integer upvoteCount; @@ -1401,4 +1401,18 @@ public interface Builder extends ThingBuilder { protected Answer(Integer upvoteCount, Integer downvoteCount, Question parentItem, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(upvoteCount, downvoteCount, parentItem, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Answer answer = (Answer) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ApartmentComplex.java b/src/main/java/org/schema/ApartmentComplex.java index fdf1bf5e..044a987c 100644 --- a/src/main/java/org/schema/ApartmentComplex.java +++ b/src/main/java/org/schema/ApartmentComplex.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected ApartmentComplex(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ApartmentComplex apartmentComplex = (ApartmentComplex) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Appearance.java b/src/main/java/org/schema/Appearance.java index c48186e2..22278f4b 100644 --- a/src/main/java/org/schema/Appearance.java +++ b/src/main/java/org/schema/Appearance.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Appearance() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Appearance appearance = (Appearance) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AppendAction.java b/src/main/java/org/schema/AppendAction.java index 87c9a675..4c3b5862 100644 --- a/src/main/java/org/schema/AppendAction.java +++ b/src/main/java/org/schema/AppendAction.java @@ -336,7 +336,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Place toLocation; @@ -391,4 +391,18 @@ public interface Builder extends ThingBuilder { protected AppendAction(Place toLocation, Thing targetCollection, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(toLocation, targetCollection, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AppendAction appendAction = (AppendAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ApplyAction.java b/src/main/java/org/schema/ApplyAction.java index 410d31a3..0f9c1c9e 100644 --- a/src/main/java/org/schema/ApplyAction.java +++ b/src/main/java/org/schema/ApplyAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected ApplyAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ApplyAction applyAction = (ApplyAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ApprovedIndication.java b/src/main/java/org/schema/ApprovedIndication.java index 0149bd7e..f80c237b 100644 --- a/src/main/java/org/schema/ApprovedIndication.java +++ b/src/main/java/org/schema/ApprovedIndication.java @@ -301,7 +301,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalCode code; @@ -350,4 +350,18 @@ public interface Builder extends ThingBuilder { protected ApprovedIndication(MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ApprovedIndication approvedIndication = (ApprovedIndication) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Aquarium.java b/src/main/java/org/schema/Aquarium.java index 997eea0d..37a35515 100644 --- a/src/main/java/org/schema/Aquarium.java +++ b/src/main/java/org/schema/Aquarium.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected Aquarium(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Aquarium aquarium = (Aquarium) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ArriveAction.java b/src/main/java/org/schema/ArriveAction.java index 7e59bbcd..4577c770 100644 --- a/src/main/java/org/schema/ArriveAction.java +++ b/src/main/java/org/schema/ArriveAction.java @@ -336,7 +336,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Place fromLocation; @@ -391,4 +391,18 @@ public interface Builder extends ThingBuilder { protected ArriveAction(Place fromLocation, Place toLocation, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(fromLocation, toLocation, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ArriveAction arriveAction = (ArriveAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ArtGallery.java b/src/main/java/org/schema/ArtGallery.java index ac0da865..2012ec91 100644 --- a/src/main/java/org/schema/ArtGallery.java +++ b/src/main/java/org/schema/ArtGallery.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected ArtGallery(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ArtGallery artGallery = (ArtGallery) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Artery.java b/src/main/java/org/schema/Artery.java index 5bf56139..67a4857b 100644 --- a/src/main/java/org/schema/Artery.java +++ b/src/main/java/org/schema/Artery.java @@ -463,7 +463,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AnatomicalStructure arterialBranch; @@ -547,6 +547,26 @@ protected Artery(AnatomicalStructure arterialBranch, AnatomicalStructure source, mySource = source; mySupplyTo = supplyTo; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myArterialBranch != null ? myArterialBranch.hashCode() : 0); + result = 31 * result + (mySource != null ? mySource.hashCode() : 0); + result = 31 * result + (mySupplyTo != null ? mySupplyTo.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Artery artery = (Artery) o; + if (!super.equals(o)) return false; + if (myArterialBranch != null ? !myArterialBranch.equals(artery.myArterialBranch) : artery.myArterialBranch != null) return false; + if (mySource != null ? !mySource.equals(artery.mySource) : artery.mySource != null) return false; + if (mySupplyTo != null ? !mySupplyTo.equals(artery.mySupplyTo) : artery.mySupplyTo != null) return false; + return true; + } + private AnatomicalStructure myArterialBranch; private AnatomicalStructure mySource; private AnatomicalStructure mySupplyTo; diff --git a/src/main/java/org/schema/Article.java b/src/main/java/org/schema/Article.java index 0ea4e85c..826dc4a9 100644 --- a/src/main/java/org/schema/Article.java +++ b/src/main/java/org/schema/Article.java @@ -1253,7 +1253,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String articleBody; @@ -1490,6 +1490,32 @@ protected Article(String articleBody, String articleSection, Integer wordCount, myPageStart = pageStart; myPagination = pagination; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myArticleBody != null ? myArticleBody.hashCode() : 0); + result = 31 * result + (myArticleSection != null ? myArticleSection.hashCode() : 0); + result = 31 * result + (myWordCount != null ? myWordCount.hashCode() : 0); + result = 31 * result + (myPageEnd != null ? myPageEnd.hashCode() : 0); + result = 31 * result + (myPageStart != null ? myPageStart.hashCode() : 0); + result = 31 * result + (myPagination != null ? myPagination.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Article article = (Article) o; + if (!super.equals(o)) return false; + if (myArticleBody != null ? !myArticleBody.equals(article.myArticleBody) : article.myArticleBody != null) return false; + if (myArticleSection != null ? !myArticleSection.equals(article.myArticleSection) : article.myArticleSection != null) return false; + if (myWordCount != null ? !myWordCount.equals(article.myWordCount) : article.myWordCount != null) return false; + if (myPageEnd != null ? !myPageEnd.equals(article.myPageEnd) : article.myPageEnd != null) return false; + if (myPageStart != null ? !myPageStart.equals(article.myPageStart) : article.myPageStart != null) return false; + if (myPagination != null ? !myPagination.equals(article.myPagination) : article.myPagination != null) return false; + return true; + } + private String myArticleBody; private String myArticleSection; private Integer myWordCount; diff --git a/src/main/java/org/schema/AskAction.java b/src/main/java/org/schema/AskAction.java index ae4d55e3..5acb9236 100644 --- a/src/main/java/org/schema/AskAction.java +++ b/src/main/java/org/schema/AskAction.java @@ -411,7 +411,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Question question; @@ -478,5 +478,21 @@ protected AskAction(Question question, Thing about, LanguageOrString inLanguage, super(about, inLanguage, recipient, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myQuestion = question; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myQuestion != null ? myQuestion.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AskAction askAction = (AskAction) o; + if (!super.equals(o)) return false; + if (myQuestion != null ? !myQuestion.equals(askAction.myQuestion) : askAction.myQuestion != null) return false; + return true; + } + private Question myQuestion; } diff --git a/src/main/java/org/schema/AssessAction.java b/src/main/java/org/schema/AssessAction.java index 8a13ca10..74e8a07a 100644 --- a/src/main/java/org/schema/AssessAction.java +++ b/src/main/java/org/schema/AssessAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected AssessAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AssessAction assessAction = (AssessAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AssignAction.java b/src/main/java/org/schema/AssignAction.java index d077ae6e..ba06a052 100644 --- a/src/main/java/org/schema/AssignAction.java +++ b/src/main/java/org/schema/AssignAction.java @@ -338,7 +338,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalDevicePurposeOrThing purpose; @@ -392,4 +392,18 @@ public interface Builder extends ThingBuilder { protected AssignAction(MedicalDevicePurposeOrThing purpose, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(purpose, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AssignAction assignAction = (AssignAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Attorney.java b/src/main/java/org/schema/Attorney.java index b09747ea..2ed5e34d 100644 --- a/src/main/java/org/schema/Attorney.java +++ b/src/main/java/org/schema/Attorney.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected Attorney(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Attorney attorney = (Attorney) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Audience.java b/src/main/java/org/schema/Audience.java index 1cfdb02f..585ad58c 100644 --- a/src/main/java/org/schema/Audience.java +++ b/src/main/java/org/schema/Audience.java @@ -250,7 +250,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String audienceType; @@ -288,6 +288,24 @@ protected Audience(String audienceType, AdministrativeArea geographicArea, Strin myAudienceType = audienceType; myGeographicArea = geographicArea; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAudienceType != null ? myAudienceType.hashCode() : 0); + result = 31 * result + (myGeographicArea != null ? myGeographicArea.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Audience audience = (Audience) o; + if (!super.equals(o)) return false; + if (myAudienceType != null ? !myAudienceType.equals(audience.myAudienceType) : audience.myAudienceType != null) return false; + if (myGeographicArea != null ? !myGeographicArea.equals(audience.myGeographicArea) : audience.myGeographicArea != null) return false; + return true; + } + private String myAudienceType; private AdministrativeArea myGeographicArea; } diff --git a/src/main/java/org/schema/AudienceOrOrganizationOrPerson.java b/src/main/java/org/schema/AudienceOrOrganizationOrPerson.java index 76183c78..3c46bea8 100644 --- a/src/main/java/org/schema/AudienceOrOrganizationOrPerson.java +++ b/src/main/java/org/schema/AudienceOrOrganizationOrPerson.java @@ -50,4 +50,23 @@ private void clear() { myOrganization = null; myPerson = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAudience != null ? myAudience.hashCode() : 0); + result = 31 * result + (myOrganization != null ? myOrganization.hashCode() : 0); + result = 31 * result + (myPerson != null ? myPerson.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AudienceOrOrganizationOrPerson audienceOrOrganizationOrPerson = (AudienceOrOrganizationOrPerson) o; + if (myAudience != null ? !myAudience.equals(audienceOrOrganizationOrPerson.myAudience) : audienceOrOrganizationOrPerson.myAudience != null) return false; + if (myOrganization != null ? !myOrganization.equals(audienceOrOrganizationOrPerson.myOrganization) : audienceOrOrganizationOrPerson.myOrganization != null) return false; + if (myPerson != null ? !myPerson.equals(audienceOrOrganizationOrPerson.myPerson) : audienceOrOrganizationOrPerson.myPerson != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AudioObject.java b/src/main/java/org/schema/AudioObject.java index 2523cdca..59038690 100644 --- a/src/main/java/org/schema/AudioObject.java +++ b/src/main/java/org/schema/AudioObject.java @@ -1363,7 +1363,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String transcript; @@ -1626,5 +1626,21 @@ protected AudioObject(String transcript, NewsArticle associatedArticle, String b super(associatedArticle, bitrate, contentSize, contentUrl, duration, embedUrl, encodesCreativeWork, encodingFormat, expires, height, playerType, productionCompany, regionsAllowed, requiresSubscription, uploadDate, width, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myTranscript = transcript; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myTranscript != null ? myTranscript.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AudioObject audioObject = (AudioObject) o; + if (!super.equals(o)) return false; + if (myTranscript != null ? !myTranscript.equals(audioObject.myTranscript) : audioObject.myTranscript != null) return false; + return true; + } + private String myTranscript; } diff --git a/src/main/java/org/schema/AuthorizeAction.java b/src/main/java/org/schema/AuthorizeAction.java index 4e7eebc4..e7d5c838 100644 --- a/src/main/java/org/schema/AuthorizeAction.java +++ b/src/main/java/org/schema/AuthorizeAction.java @@ -389,7 +389,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AudienceOrOrganizationOrPerson recipient; @@ -451,5 +451,21 @@ protected AuthorizeAction(AudienceOrOrganizationOrPerson recipient, MedicalDevic super(purpose, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myRecipient = recipient; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myRecipient != null ? myRecipient.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AuthorizeAction authorizeAction = (AuthorizeAction) o; + if (!super.equals(o)) return false; + if (myRecipient != null ? !myRecipient.equals(authorizeAction.myRecipient) : authorizeAction.myRecipient != null) return false; + return true; + } + private AudienceOrOrganizationOrPerson myRecipient; } diff --git a/src/main/java/org/schema/AutoBodyShop.java b/src/main/java/org/schema/AutoBodyShop.java index 886b42d6..bcbde4f6 100644 --- a/src/main/java/org/schema/AutoBodyShop.java +++ b/src/main/java/org/schema/AutoBodyShop.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected AutoBodyShop(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AutoBodyShop autoBodyShop = (AutoBodyShop) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AutoDealer.java b/src/main/java/org/schema/AutoDealer.java index 25d65191..76007531 100644 --- a/src/main/java/org/schema/AutoDealer.java +++ b/src/main/java/org/schema/AutoDealer.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected AutoDealer(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AutoDealer autoDealer = (AutoDealer) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AutoPartsStore.java b/src/main/java/org/schema/AutoPartsStore.java index 85bddc99..9413fa04 100644 --- a/src/main/java/org/schema/AutoPartsStore.java +++ b/src/main/java/org/schema/AutoPartsStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected AutoPartsStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AutoPartsStore autoPartsStore = (AutoPartsStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AutoRental.java b/src/main/java/org/schema/AutoRental.java index d8f20c2c..b77a0597 100644 --- a/src/main/java/org/schema/AutoRental.java +++ b/src/main/java/org/schema/AutoRental.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected AutoRental(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AutoRental autoRental = (AutoRental) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AutoRepair.java b/src/main/java/org/schema/AutoRepair.java index bff41fc9..3ca7c6bd 100644 --- a/src/main/java/org/schema/AutoRepair.java +++ b/src/main/java/org/schema/AutoRepair.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected AutoRepair(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AutoRepair autoRepair = (AutoRepair) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AutoWash.java b/src/main/java/org/schema/AutoWash.java index f9bb3610..f96d105a 100644 --- a/src/main/java/org/schema/AutoWash.java +++ b/src/main/java/org/schema/AutoWash.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected AutoWash(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AutoWash autoWash = (AutoWash) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AutomatedTeller.java b/src/main/java/org/schema/AutomatedTeller.java index 92c9d6bd..f7c67f77 100644 --- a/src/main/java/org/schema/AutomatedTeller.java +++ b/src/main/java/org/schema/AutomatedTeller.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected AutomatedTeller(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AutomatedTeller automatedTeller = (AutomatedTeller) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AutomotiveBusiness.java b/src/main/java/org/schema/AutomotiveBusiness.java index 9ba70e8d..4ec1b5cd 100644 --- a/src/main/java/org/schema/AutomotiveBusiness.java +++ b/src/main/java/org/schema/AutomotiveBusiness.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected AutomotiveBusiness(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AutomotiveBusiness automotiveBusiness = (AutomotiveBusiness) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/AutomotiveOntologyWGClass.java b/src/main/java/org/schema/AutomotiveOntologyWGClass.java index df5fc851..057015ea 100644 --- a/src/main/java/org/schema/AutomotiveOntologyWGClass.java +++ b/src/main/java/org/schema/AutomotiveOntologyWGClass.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected AutomotiveOntologyWGClass() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + AutomotiveOntologyWGClass automotiveOntologyWGClass = (AutomotiveOntologyWGClass) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Ayurvedic.java b/src/main/java/org/schema/Ayurvedic.java index 650f0bf6..a705966a 100644 --- a/src/main/java/org/schema/Ayurvedic.java +++ b/src/main/java/org/schema/Ayurvedic.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Ayurvedic() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Ayurvedic ayurvedic = (Ayurvedic) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Bacteria.java b/src/main/java/org/schema/Bacteria.java index b5ae737a..2fdc6c67 100644 --- a/src/main/java/org/schema/Bacteria.java +++ b/src/main/java/org/schema/Bacteria.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Bacteria() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Bacteria bacteria = (Bacteria) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Bakery.java b/src/main/java/org/schema/Bakery.java index 447034b7..dfd0605b 100644 --- a/src/main/java/org/schema/Bakery.java +++ b/src/main/java/org/schema/Bakery.java @@ -540,7 +540,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BooleanOrString acceptsReservations; @@ -636,4 +636,18 @@ public interface Builder extends ThingBuilder { protected Bakery(BooleanOrString acceptsReservations, String menu, String servesCuisine, Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(acceptsReservations, menu, servesCuisine, parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Bakery bakery = (Bakery) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Balance.java b/src/main/java/org/schema/Balance.java index 3cdbd514..66d5d3b6 100644 --- a/src/main/java/org/schema/Balance.java +++ b/src/main/java/org/schema/Balance.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Balance() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Balance balance = (Balance) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BankOrCreditUnion.java b/src/main/java/org/schema/BankOrCreditUnion.java index 7e3f2e32..fcf78980 100644 --- a/src/main/java/org/schema/BankOrCreditUnion.java +++ b/src/main/java/org/schema/BankOrCreditUnion.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected BankOrCreditUnion(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BankOrCreditUnion bankOrCreditUnion = (BankOrCreditUnion) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BarOrPub.java b/src/main/java/org/schema/BarOrPub.java index 04dc77a2..0c071f1f 100644 --- a/src/main/java/org/schema/BarOrPub.java +++ b/src/main/java/org/schema/BarOrPub.java @@ -540,7 +540,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BooleanOrString acceptsReservations; @@ -636,4 +636,18 @@ public interface Builder extends ThingBuilder { protected BarOrPub(BooleanOrString acceptsReservations, String menu, String servesCuisine, Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(acceptsReservations, menu, servesCuisine, parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BarOrPub barOrPub = (BarOrPub) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Beach.java b/src/main/java/org/schema/Beach.java index aa1de59b..12f8b4f7 100644 --- a/src/main/java/org/schema/Beach.java +++ b/src/main/java/org/schema/Beach.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected Beach(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Beach beach = (Beach) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BeautySalon.java b/src/main/java/org/schema/BeautySalon.java index 1ad7dd1e..659342ed 100644 --- a/src/main/java/org/schema/BeautySalon.java +++ b/src/main/java/org/schema/BeautySalon.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected BeautySalon(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BeautySalon beautySalon = (BeautySalon) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BedAndBreakfast.java b/src/main/java/org/schema/BedAndBreakfast.java index 4d4d3f0f..be6086e7 100644 --- a/src/main/java/org/schema/BedAndBreakfast.java +++ b/src/main/java/org/schema/BedAndBreakfast.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected BedAndBreakfast(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BedAndBreakfast bedAndBreakfast = (BedAndBreakfast) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BefriendAction.java b/src/main/java/org/schema/BefriendAction.java index 0cc6fa51..2820a933 100644 --- a/src/main/java/org/schema/BefriendAction.java +++ b/src/main/java/org/schema/BefriendAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected BefriendAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BefriendAction befriendAction = (BefriendAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BibExTerm.java b/src/main/java/org/schema/BibExTerm.java index f47c8863..d69873b0 100644 --- a/src/main/java/org/schema/BibExTerm.java +++ b/src/main/java/org/schema/BibExTerm.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected BibExTerm() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BibExTerm bibExTerm = (BibExTerm) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BikeStore.java b/src/main/java/org/schema/BikeStore.java index dc635613..ea3aa50b 100644 --- a/src/main/java/org/schema/BikeStore.java +++ b/src/main/java/org/schema/BikeStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected BikeStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BikeStore bikeStore = (BikeStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Blog.java b/src/main/java/org/schema/Blog.java index b9d34842..783e454c 100644 --- a/src/main/java/org/schema/Blog.java +++ b/src/main/java/org/schema/Blog.java @@ -1166,7 +1166,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BlogPosting blogPost; @@ -1387,5 +1387,21 @@ protected Blog(BlogPosting blogPost, String schemaVersion, Thing about, String a super(schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myBlogPost = blogPost; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBlogPost != null ? myBlogPost.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Blog blog = (Blog) o; + if (!super.equals(o)) return false; + if (myBlogPost != null ? !myBlogPost.equals(blog.myBlogPost) : blog.myBlogPost != null) return false; + return true; + } + private BlogPosting myBlogPost; } diff --git a/src/main/java/org/schema/BlogPosting.java b/src/main/java/org/schema/BlogPosting.java index 2b1c979a..3219eb67 100644 --- a/src/main/java/org/schema/BlogPosting.java +++ b/src/main/java/org/schema/BlogPosting.java @@ -1214,7 +1214,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String articleBody; @@ -1445,4 +1445,18 @@ public interface Builder extends ThingBuilder { protected BlogPosting(String articleBody, String articleSection, Integer wordCount, IntegerOrString pageEnd, IntegerOrString pageStart, String pagination, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(articleBody, articleSection, wordCount, pageEnd, pageStart, pagination, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BlogPosting blogPosting = (BlogPosting) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BloodTest.java b/src/main/java/org/schema/BloodTest.java index e25beaf0..0c6610e4 100644 --- a/src/main/java/org/schema/BloodTest.java +++ b/src/main/java/org/schema/BloodTest.java @@ -365,7 +365,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Drug affectedBy; @@ -428,4 +428,18 @@ public interface Builder extends ThingBuilder { protected BloodTest(Drug affectedBy, String normalRange, MedicalSign signDetected, MedicalCondition usedToDiagnose, MedicalDevice usesDevice, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(affectedBy, normalRange, signDetected, usedToDiagnose, usesDevice, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BloodTest bloodTest = (BloodTest) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BoardingPolicyType.java b/src/main/java/org/schema/BoardingPolicyType.java index 2544a985..03a66194 100644 --- a/src/main/java/org/schema/BoardingPolicyType.java +++ b/src/main/java/org/schema/BoardingPolicyType.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected BoardingPolicyType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BoardingPolicyType boardingPolicyType = (BoardingPolicyType) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BodyOfWater.java b/src/main/java/org/schema/BodyOfWater.java index fdfbcac4..f44e01ea 100644 --- a/src/main/java/org/schema/BodyOfWater.java +++ b/src/main/java/org/schema/BodyOfWater.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected BodyOfWater(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BodyOfWater bodyOfWater = (BodyOfWater) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Bone.java b/src/main/java/org/schema/Bone.java index 2d0be67a..143a2abe 100644 --- a/src/main/java/org/schema/Bone.java +++ b/src/main/java/org/schema/Bone.java @@ -403,7 +403,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String associatedPathophysiology; @@ -475,4 +475,18 @@ public interface Builder extends ThingBuilder { protected Bone(String associatedPathophysiology, String bodyLocation, AnatomicalStructure connectedTo, ImageObject diagram, String function, IsPartOf partOfSystem, MedicalCondition relatedCondition, MedicalTherapy relatedTherapy, AnatomicalStructure subStructure, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(associatedPathophysiology, bodyLocation, connectedTo, diagram, function, partOfSystem, relatedCondition, relatedTherapy, subStructure, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Bone bone = (Bone) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Book.java b/src/main/java/org/schema/Book.java index 00ea1745..b788d756 100644 --- a/src/main/java/org/schema/Book.java +++ b/src/main/java/org/schema/Book.java @@ -1228,7 +1228,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String bookEdition; @@ -1462,6 +1462,30 @@ protected Book(String bookEdition, BookFormatType bookFormat, Person illustrator myIsbn = isbn; myNumberOfPages = numberOfPages; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBookEdition != null ? myBookEdition.hashCode() : 0); + result = 31 * result + (myBookFormat != null ? myBookFormat.hashCode() : 0); + result = 31 * result + (myIllustrator != null ? myIllustrator.hashCode() : 0); + result = 31 * result + (myIsbn != null ? myIsbn.hashCode() : 0); + result = 31 * result + (myNumberOfPages != null ? myNumberOfPages.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Book book = (Book) o; + if (!super.equals(o)) return false; + if (myBookEdition != null ? !myBookEdition.equals(book.myBookEdition) : book.myBookEdition != null) return false; + if (myBookFormat != null ? !myBookFormat.equals(book.myBookFormat) : book.myBookFormat != null) return false; + if (myIllustrator != null ? !myIllustrator.equals(book.myIllustrator) : book.myIllustrator != null) return false; + if (myIsbn != null ? !myIsbn.equals(book.myIsbn) : book.myIsbn != null) return false; + if (myNumberOfPages != null ? !myNumberOfPages.equals(book.myNumberOfPages) : book.myNumberOfPages != null) return false; + return true; + } + private String myBookEdition; private BookFormatType myBookFormat; private Person myIllustrator; diff --git a/src/main/java/org/schema/BookFormatType.java b/src/main/java/org/schema/BookFormatType.java index 7ebc0135..9b15db1d 100644 --- a/src/main/java/org/schema/BookFormatType.java +++ b/src/main/java/org/schema/BookFormatType.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected BookFormatType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BookFormatType bookFormatType = (BookFormatType) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BookSeries.java b/src/main/java/org/schema/BookSeries.java index 6b2195d2..a848c023 100644 --- a/src/main/java/org/schema/BookSeries.java +++ b/src/main/java/org/schema/BookSeries.java @@ -1162,7 +1162,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private java.util.Date endDate; @@ -1383,4 +1383,18 @@ public interface Builder extends ThingBuilder { protected BookSeries(java.util.Date endDate, java.util.Date startDate, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(endDate, startDate, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BookSeries bookSeries = (BookSeries) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BookStore.java b/src/main/java/org/schema/BookStore.java index a2fc3aa0..6ebfa4fa 100644 --- a/src/main/java/org/schema/BookStore.java +++ b/src/main/java/org/schema/BookStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected BookStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BookStore bookStore = (BookStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BookmarkAction.java b/src/main/java/org/schema/BookmarkAction.java index 239e7883..ad539dc9 100644 --- a/src/main/java/org/schema/BookmarkAction.java +++ b/src/main/java/org/schema/BookmarkAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected BookmarkAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BookmarkAction bookmarkAction = (BookmarkAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BooleanOrNumberOrStringOrStructuredValue.java b/src/main/java/org/schema/BooleanOrNumberOrStringOrStructuredValue.java deleted file mode 100644 index de8a4723..00000000 --- a/src/main/java/org/schema/BooleanOrNumberOrStringOrStructuredValue.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2015-2016 JetBrains s.r.o. - * - * 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. - * - * This is auto-generated file. Do not edit. - */ - -package org.schema; - -import com.fasterxml.jackson.databind.annotation.*; -import com.fasterxml.jackson.annotation.*; - -@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) -class BooleanOrNumberOrStringOrStructuredValue { - @JsonValue - public Object getJsonLdValue() { - if (myBoolean != null) return myBoolean; - if (myNumber != null) return myNumber; - if (myString != null) return myString; - if (myStructuredValue != null) return myStructuredValue; - return null; - } - public void setBoolean(Boolean value) { clear(); myBoolean = value; } - public Boolean getBoolean() { return myBoolean; } - private Boolean myBoolean; - public void setNumber(Number number) { clear(); myNumber = number; } - public Number getNumber() { return myNumber; } - private Number myNumber; - public void setString(String value) { clear(); myString = value; } - public String getString() { return myString; } - private String myString; - public void setStructuredValue(StructuredValue structuredValue) { clear(); myStructuredValue = structuredValue; } - public StructuredValue getStructuredValue() { return myStructuredValue; } - private StructuredValue myStructuredValue; - private void clear() { - myBoolean = null; - myNumber = null; - myString = null; - myStructuredValue = null; - } -} diff --git a/src/main/java/org/schema/BooleanOrString.java b/src/main/java/org/schema/BooleanOrString.java index 4ec6986a..716f496d 100644 --- a/src/main/java/org/schema/BooleanOrString.java +++ b/src/main/java/org/schema/BooleanOrString.java @@ -39,4 +39,21 @@ private void clear() { myBoolean = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBoolean != null ? myBoolean.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BooleanOrString booleanOrString = (BooleanOrString) o; + if (myBoolean != null ? !myBoolean.equals(booleanOrString.myBoolean) : booleanOrString.myBoolean != null) return false; + if (myString != null ? !myString.equals(booleanOrString.myString) : booleanOrString.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BorrowAction.java b/src/main/java/org/schema/BorrowAction.java index e50210f7..79c326c3 100644 --- a/src/main/java/org/schema/BorrowAction.java +++ b/src/main/java/org/schema/BorrowAction.java @@ -356,7 +356,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person lender; @@ -415,5 +415,21 @@ protected BorrowAction(Person lender, Place fromLocation, Place toLocation, Orga super(fromLocation, toLocation, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myLender = lender; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myLender != null ? myLender.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BorrowAction borrowAction = (BorrowAction) o; + if (!super.equals(o)) return false; + if (myLender != null ? !myLender.equals(borrowAction.myLender) : borrowAction.myLender != null) return false; + return true; + } + private Person myLender; } diff --git a/src/main/java/org/schema/BowlingAlley.java b/src/main/java/org/schema/BowlingAlley.java index 220483d4..eb37a147 100644 --- a/src/main/java/org/schema/BowlingAlley.java +++ b/src/main/java/org/schema/BowlingAlley.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected BowlingAlley(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BowlingAlley bowlingAlley = (BowlingAlley) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BrainStructure.java b/src/main/java/org/schema/BrainStructure.java index 49a3f115..10a25f74 100644 --- a/src/main/java/org/schema/BrainStructure.java +++ b/src/main/java/org/schema/BrainStructure.java @@ -403,7 +403,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String associatedPathophysiology; @@ -475,4 +475,18 @@ public interface Builder extends ThingBuilder { protected BrainStructure(String associatedPathophysiology, String bodyLocation, AnatomicalStructure connectedTo, ImageObject diagram, String function, IsPartOf partOfSystem, MedicalCondition relatedCondition, MedicalTherapy relatedTherapy, AnatomicalStructure subStructure, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(associatedPathophysiology, bodyLocation, connectedTo, diagram, function, partOfSystem, relatedCondition, relatedTherapy, subStructure, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BrainStructure brainStructure = (BrainStructure) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Brand.java b/src/main/java/org/schema/Brand.java index 0dbd2bf4..a3fdbe0e 100644 --- a/src/main/java/org/schema/Brand.java +++ b/src/main/java/org/schema/Brand.java @@ -287,7 +287,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -331,6 +331,26 @@ protected Brand(AggregateRating aggregateRating, ImageObjectOrString logo, Revie myLogo = logo; myReview = review; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAggregateRating != null ? myAggregateRating.hashCode() : 0); + result = 31 * result + (myLogo != null ? myLogo.hashCode() : 0); + result = 31 * result + (myReview != null ? myReview.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Brand brand = (Brand) o; + if (!super.equals(o)) return false; + if (myAggregateRating != null ? !myAggregateRating.equals(brand.myAggregateRating) : brand.myAggregateRating != null) return false; + if (myLogo != null ? !myLogo.equals(brand.myLogo) : brand.myLogo != null) return false; + if (myReview != null ? !myReview.equals(brand.myReview) : brand.myReview != null) return false; + return true; + } + private AggregateRating myAggregateRating; private ImageObjectOrString myLogo; private Review myReview; diff --git a/src/main/java/org/schema/BrandOrOrganization.java b/src/main/java/org/schema/BrandOrOrganization.java index 16dd5efc..5dbabc73 100644 --- a/src/main/java/org/schema/BrandOrOrganization.java +++ b/src/main/java/org/schema/BrandOrOrganization.java @@ -44,4 +44,21 @@ private void clear() { myBrand = null; myOrganization = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBrand != null ? myBrand.hashCode() : 0); + result = 31 * result + (myOrganization != null ? myOrganization.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BrandOrOrganization brandOrOrganization = (BrandOrOrganization) o; + if (myBrand != null ? !myBrand.equals(brandOrOrganization.myBrand) : brandOrOrganization.myBrand != null) return false; + if (myOrganization != null ? !myOrganization.equals(brandOrOrganization.myOrganization) : brandOrOrganization.myOrganization != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BreadcrumbList.java b/src/main/java/org/schema/BreadcrumbList.java index e93ecfe6..d31d6b8b 100644 --- a/src/main/java/org/schema/BreadcrumbList.java +++ b/src/main/java/org/schema/BreadcrumbList.java @@ -316,7 +316,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Integer numberOfItems; @@ -359,4 +359,18 @@ public interface Builder extends ThingBuilder { protected BreadcrumbList(Integer numberOfItems, ItemListOrderTypeOrString itemListOrder, ListItemOrStringOrThing itemListElement, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(numberOfItems, itemListOrder, itemListElement, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BreadcrumbList breadcrumbList = (BreadcrumbList) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BreadcrumbListOrString.java b/src/main/java/org/schema/BreadcrumbListOrString.java index f251ee27..33e88b29 100644 --- a/src/main/java/org/schema/BreadcrumbListOrString.java +++ b/src/main/java/org/schema/BreadcrumbListOrString.java @@ -39,4 +39,21 @@ private void clear() { myBreadcrumbList = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBreadcrumbList != null ? myBreadcrumbList.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BreadcrumbListOrString breadcrumbListOrString = (BreadcrumbListOrString) o; + if (myBreadcrumbList != null ? !myBreadcrumbList.equals(breadcrumbListOrString.myBreadcrumbList) : breadcrumbListOrString.myBreadcrumbList != null) return false; + if (myString != null ? !myString.equals(breadcrumbListOrString.myString) : breadcrumbListOrString.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Brewery.java b/src/main/java/org/schema/Brewery.java index 58d3642a..62bbd2c1 100644 --- a/src/main/java/org/schema/Brewery.java +++ b/src/main/java/org/schema/Brewery.java @@ -540,7 +540,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BooleanOrString acceptsReservations; @@ -636,4 +636,18 @@ public interface Builder extends ThingBuilder { protected Brewery(BooleanOrString acceptsReservations, String menu, String servesCuisine, Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(acceptsReservations, menu, servesCuisine, parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Brewery brewery = (Brewery) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BroadcastChannel.java b/src/main/java/org/schema/BroadcastChannel.java index 54d1ec55..65067c5b 100644 --- a/src/main/java/org/schema/BroadcastChannel.java +++ b/src/main/java/org/schema/BroadcastChannel.java @@ -284,7 +284,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String broadcastChannelId; @@ -329,6 +329,28 @@ protected BroadcastChannel(String broadcastChannelId, CableOrSatelliteService in myBroadcastServiceTier = broadcastServiceTier; myProvidesBroadcastService = providesBroadcastService; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBroadcastChannelId != null ? myBroadcastChannelId.hashCode() : 0); + result = 31 * result + (myInBroadcastLineup != null ? myInBroadcastLineup.hashCode() : 0); + result = 31 * result + (myBroadcastServiceTier != null ? myBroadcastServiceTier.hashCode() : 0); + result = 31 * result + (myProvidesBroadcastService != null ? myProvidesBroadcastService.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BroadcastChannel broadcastChannel = (BroadcastChannel) o; + if (!super.equals(o)) return false; + if (myBroadcastChannelId != null ? !myBroadcastChannelId.equals(broadcastChannel.myBroadcastChannelId) : broadcastChannel.myBroadcastChannelId != null) return false; + if (myInBroadcastLineup != null ? !myInBroadcastLineup.equals(broadcastChannel.myInBroadcastLineup) : broadcastChannel.myInBroadcastLineup != null) return false; + if (myBroadcastServiceTier != null ? !myBroadcastServiceTier.equals(broadcastChannel.myBroadcastServiceTier) : broadcastChannel.myBroadcastServiceTier != null) return false; + if (myProvidesBroadcastService != null ? !myProvidesBroadcastService.equals(broadcastChannel.myProvidesBroadcastService) : broadcastChannel.myProvidesBroadcastService != null) return false; + return true; + } + private String myBroadcastChannelId; private CableOrSatelliteService myInBroadcastLineup; private String myBroadcastServiceTier; diff --git a/src/main/java/org/schema/BroadcastEvent.java b/src/main/java/org/schema/BroadcastEvent.java index 506f0a4a..d1d83678 100644 --- a/src/main/java/org/schema/BroadcastEvent.java +++ b/src/main/java/org/schema/BroadcastEvent.java @@ -532,7 +532,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Boolean isLiveBroadcast; @@ -627,5 +627,21 @@ protected BroadcastEvent(Boolean isLiveBroadcast, Boolean isAccessibleForFree, B super(isAccessibleForFree, publishedOn, aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myIsLiveBroadcast = isLiveBroadcast; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myIsLiveBroadcast != null ? myIsLiveBroadcast.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BroadcastEvent broadcastEvent = (BroadcastEvent) o; + if (!super.equals(o)) return false; + if (myIsLiveBroadcast != null ? !myIsLiveBroadcast.equals(broadcastEvent.myIsLiveBroadcast) : broadcastEvent.myIsLiveBroadcast != null) return false; + return true; + } + private Boolean myIsLiveBroadcast; } diff --git a/src/main/java/org/schema/BroadcastRelease.java b/src/main/java/org/schema/BroadcastRelease.java index c683719f..0154f294 100644 --- a/src/main/java/org/schema/BroadcastRelease.java +++ b/src/main/java/org/schema/BroadcastRelease.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected BroadcastRelease() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BroadcastRelease broadcastRelease = (BroadcastRelease) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BroadcastService.java b/src/main/java/org/schema/BroadcastService.java index 134bb9d2..a2b8c4e0 100644 --- a/src/main/java/org/schema/BroadcastService.java +++ b/src/main/java/org/schema/BroadcastService.java @@ -304,7 +304,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization broadcaster; @@ -353,6 +353,30 @@ protected BroadcastService(Organization broadcaster, BroadcastService parentServ myBroadcastDisplayName = broadcastDisplayName; myTimezone = timezone; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBroadcaster != null ? myBroadcaster.hashCode() : 0); + result = 31 * result + (myParentService != null ? myParentService.hashCode() : 0); + result = 31 * result + (myBroadcastAffiliateOf != null ? myBroadcastAffiliateOf.hashCode() : 0); + result = 31 * result + (myBroadcastDisplayName != null ? myBroadcastDisplayName.hashCode() : 0); + result = 31 * result + (myTimezone != null ? myTimezone.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BroadcastService broadcastService = (BroadcastService) o; + if (!super.equals(o)) return false; + if (myBroadcaster != null ? !myBroadcaster.equals(broadcastService.myBroadcaster) : broadcastService.myBroadcaster != null) return false; + if (myParentService != null ? !myParentService.equals(broadcastService.myParentService) : broadcastService.myParentService != null) return false; + if (myBroadcastAffiliateOf != null ? !myBroadcastAffiliateOf.equals(broadcastService.myBroadcastAffiliateOf) : broadcastService.myBroadcastAffiliateOf != null) return false; + if (myBroadcastDisplayName != null ? !myBroadcastDisplayName.equals(broadcastService.myBroadcastDisplayName) : broadcastService.myBroadcastDisplayName != null) return false; + if (myTimezone != null ? !myTimezone.equals(broadcastService.myTimezone) : broadcastService.myTimezone != null) return false; + return true; + } + private Organization myBroadcaster; private BroadcastService myParentService; private Organization myBroadcastAffiliateOf; diff --git a/src/main/java/org/schema/BuddhistTemple.java b/src/main/java/org/schema/BuddhistTemple.java index 89945b6b..579ac0f5 100644 --- a/src/main/java/org/schema/BuddhistTemple.java +++ b/src/main/java/org/schema/BuddhistTemple.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected BuddhistTemple(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BuddhistTemple buddhistTemple = (BuddhistTemple) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BusReservation.java b/src/main/java/org/schema/BusReservation.java index e1661dd1..868e66ab 100644 --- a/src/main/java/org/schema/BusReservation.java +++ b/src/main/java/org/schema/BusReservation.java @@ -168,30 +168,40 @@ public BusReservation build() { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull Number number) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setNumber(number); + @NotNull public Builder totalPrice(@NotNull Integer integer) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setInteger(integer); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification priceSpecification) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setPriceSpecification(priceSpecification); + @NotNull public Builder totalPrice(@NotNull Long totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setLong(totalPrice); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification) { - return this.totalPrice(priceSpecification.build()); + @NotNull public Builder totalPrice(@NotNull Float totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setFloat(totalPrice); + return this; + } + /** + * The total price for the reservation or ticket, including applicable taxes, shipping, etc. + */ + @NotNull public Builder totalPrice(@NotNull Double totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setDouble(totalPrice); + return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ @NotNull public Builder totalPrice(@NotNull String totalPrice) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); + if (this.totalPrice == null) this.totalPrice = new Number(); this.totalPrice.setString(totalPrice); return this; } @@ -412,8 +422,10 @@ public Builder id(long id) { if ("modifiedTime".equals(key) && value instanceof java.util.Date) { modifiedTime((java.util.Date)value); continue; } if ("programMembershipUsed".equals(key) && value instanceof ProgramMembership) { programMembershipUsed((ProgramMembership)value); continue; } if ("reservedTicket".equals(key) && value instanceof Ticket) { reservedTicket((Ticket)value); continue; } - if ("totalPrice".equals(key) && value instanceof Number) { totalPrice((Number)value); continue; } - if ("totalPrice".equals(key) && value instanceof PriceSpecification) { totalPrice((PriceSpecification)value); continue; } + if ("totalPrice".equals(key) && value instanceof Integer) { totalPrice((Integer)value); continue; } + if ("totalPrice".equals(key) && value instanceof Long) { totalPrice((Long)value); continue; } + if ("totalPrice".equals(key) && value instanceof Float) { totalPrice((Float)value); continue; } + if ("totalPrice".equals(key) && value instanceof Double) { totalPrice((Double)value); continue; } if ("totalPrice".equals(key) && value instanceof String) { totalPrice((String)value); continue; } if ("priceCurrency".equals(key) && value instanceof String) { priceCurrency((String)value); continue; } if ("broker".equals(key) && value instanceof Organization) { broker((Organization)value); continue; } @@ -427,7 +439,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String reservationId; @@ -439,7 +451,7 @@ public Builder id(long id) { private java.util.Date modifiedTime; private ProgramMembership programMembershipUsed; private Ticket reservedTicket; - private NumberOrPriceSpecificationOrString totalPrice; + private Number totalPrice; private String priceCurrency; private OrganizationOrPerson broker; private String additionalType; @@ -472,9 +484,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder programMembershipUsed(@NotNull ProgramMembership.Builder programMembership); @NotNull Builder reservedTicket(@NotNull Ticket ticket); @NotNull Builder reservedTicket(@NotNull Ticket.Builder ticket); - @NotNull Builder totalPrice(@NotNull Number number); - @NotNull Builder totalPrice(@NotNull PriceSpecification priceSpecification); - @NotNull Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(@NotNull Integer integer); + @NotNull Builder totalPrice(@NotNull Long totalPrice); + @NotNull Builder totalPrice(@NotNull Float totalPrice); + @NotNull Builder totalPrice(@NotNull Double totalPrice); @NotNull Builder totalPrice(@NotNull String totalPrice); @NotNull Builder priceCurrency(@NotNull String priceCurrency); @NotNull Builder broker(@NotNull Organization organization); @@ -495,7 +508,21 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected BusReservation(String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, NumberOrPriceSpecificationOrString totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected BusReservation(String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, Number totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(reservationId, reservationStatus, reservationFor, underName, provider, bookingTime, modifiedTime, programMembershipUsed, reservedTicket, totalPrice, priceCurrency, broker, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BusReservation busReservation = (BusReservation) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BusStation.java b/src/main/java/org/schema/BusStation.java index e4620b5b..234c58fa 100644 --- a/src/main/java/org/schema/BusStation.java +++ b/src/main/java/org/schema/BusStation.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected BusStation(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BusStation busStation = (BusStation) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BusStationOrBusStop.java b/src/main/java/org/schema/BusStationOrBusStop.java index 0ff02ba1..d3c5e5e1 100644 --- a/src/main/java/org/schema/BusStationOrBusStop.java +++ b/src/main/java/org/schema/BusStationOrBusStop.java @@ -44,4 +44,21 @@ private void clear() { myBusStation = null; myBusStop = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBusStation != null ? myBusStation.hashCode() : 0); + result = 31 * result + (myBusStop != null ? myBusStop.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BusStationOrBusStop busStationOrBusStop = (BusStationOrBusStop) o; + if (myBusStation != null ? !myBusStation.equals(busStationOrBusStop.myBusStation) : busStationOrBusStop.myBusStation != null) return false; + if (myBusStop != null ? !myBusStop.equals(busStationOrBusStop.myBusStop) : busStationOrBusStop.myBusStop != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BusStop.java b/src/main/java/org/schema/BusStop.java index 4f665321..bfb7a72d 100644 --- a/src/main/java/org/schema/BusStop.java +++ b/src/main/java/org/schema/BusStop.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected BusStop(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BusStop busStop = (BusStop) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BusTrip.java b/src/main/java/org/schema/BusTrip.java index d1995f4d..a52667ae 100644 --- a/src/main/java/org/schema/BusTrip.java +++ b/src/main/java/org/schema/BusTrip.java @@ -382,7 +382,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson provider; @@ -443,6 +443,34 @@ protected BusTrip(OrganizationOrPerson provider, java.util.Date departureTime, j myDepartureBusStop = departureBusStop; myArrivalBusStop = arrivalBusStop; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myProvider != null ? myProvider.hashCode() : 0); + result = 31 * result + (myDepartureTime != null ? myDepartureTime.hashCode() : 0); + result = 31 * result + (myArrivalTime != null ? myArrivalTime.hashCode() : 0); + result = 31 * result + (myBusNumber != null ? myBusNumber.hashCode() : 0); + result = 31 * result + (myBusName != null ? myBusName.hashCode() : 0); + result = 31 * result + (myDepartureBusStop != null ? myDepartureBusStop.hashCode() : 0); + result = 31 * result + (myArrivalBusStop != null ? myArrivalBusStop.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BusTrip busTrip = (BusTrip) o; + if (!super.equals(o)) return false; + if (myProvider != null ? !myProvider.equals(busTrip.myProvider) : busTrip.myProvider != null) return false; + if (myDepartureTime != null ? !myDepartureTime.equals(busTrip.myDepartureTime) : busTrip.myDepartureTime != null) return false; + if (myArrivalTime != null ? !myArrivalTime.equals(busTrip.myArrivalTime) : busTrip.myArrivalTime != null) return false; + if (myBusNumber != null ? !myBusNumber.equals(busTrip.myBusNumber) : busTrip.myBusNumber != null) return false; + if (myBusName != null ? !myBusName.equals(busTrip.myBusName) : busTrip.myBusName != null) return false; + if (myDepartureBusStop != null ? !myDepartureBusStop.equals(busTrip.myDepartureBusStop) : busTrip.myDepartureBusStop != null) return false; + if (myArrivalBusStop != null ? !myArrivalBusStop.equals(busTrip.myArrivalBusStop) : busTrip.myArrivalBusStop != null) return false; + return true; + } + private OrganizationOrPerson myProvider; private java.util.Date myDepartureTime; private java.util.Date myArrivalTime; diff --git a/src/main/java/org/schema/BusinessAudience.java b/src/main/java/org/schema/BusinessAudience.java index 9e1caabc..dc068d00 100644 --- a/src/main/java/org/schema/BusinessAudience.java +++ b/src/main/java/org/schema/BusinessAudience.java @@ -298,7 +298,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private QuantitativeValue numberOfEmployees; @@ -346,6 +346,26 @@ protected BusinessAudience(QuantitativeValue numberOfEmployees, QuantitativeValu myYearlyRevenue = yearlyRevenue; myYearsInOperation = yearsInOperation; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myNumberOfEmployees != null ? myNumberOfEmployees.hashCode() : 0); + result = 31 * result + (myYearlyRevenue != null ? myYearlyRevenue.hashCode() : 0); + result = 31 * result + (myYearsInOperation != null ? myYearsInOperation.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BusinessAudience businessAudience = (BusinessAudience) o; + if (!super.equals(o)) return false; + if (myNumberOfEmployees != null ? !myNumberOfEmployees.equals(businessAudience.myNumberOfEmployees) : businessAudience.myNumberOfEmployees != null) return false; + if (myYearlyRevenue != null ? !myYearlyRevenue.equals(businessAudience.myYearlyRevenue) : businessAudience.myYearlyRevenue != null) return false; + if (myYearsInOperation != null ? !myYearsInOperation.equals(businessAudience.myYearsInOperation) : businessAudience.myYearsInOperation != null) return false; + return true; + } + private QuantitativeValue myNumberOfEmployees; private QuantitativeValue myYearlyRevenue; private QuantitativeValue myYearsInOperation; diff --git a/src/main/java/org/schema/BusinessEntityType.java b/src/main/java/org/schema/BusinessEntityType.java index f4516420..cc8c32ab 100644 --- a/src/main/java/org/schema/BusinessEntityType.java +++ b/src/main/java/org/schema/BusinessEntityType.java @@ -256,7 +256,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -292,4 +292,18 @@ public interface Builder extends ThingBuilder { protected BusinessEntityType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BusinessEntityType businessEntityType = (BusinessEntityType) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BusinessEvent.java b/src/main/java/org/schema/BusinessEvent.java index 38980050..a398384c 100644 --- a/src/main/java/org/schema/BusinessEvent.java +++ b/src/main/java/org/schema/BusinessEvent.java @@ -496,7 +496,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -583,4 +583,18 @@ public interface Builder extends ThingBuilder { protected BusinessEvent(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BusinessEvent businessEvent = (BusinessEvent) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BusinessFunction.java b/src/main/java/org/schema/BusinessFunction.java index 7495b666..920bd628 100644 --- a/src/main/java/org/schema/BusinessFunction.java +++ b/src/main/java/org/schema/BusinessFunction.java @@ -259,7 +259,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -295,4 +295,18 @@ public interface Builder extends ThingBuilder { protected BusinessFunction(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BusinessFunction businessFunction = (BusinessFunction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/BuyAction.java b/src/main/java/org/schema/BuyAction.java index b95629f1..ce441418 100644 --- a/src/main/java/org/schema/BuyAction.java +++ b/src/main/java/org/schema/BuyAction.java @@ -72,9 +72,93 @@ public BuyAction build() { */ - @NotNull public Builder price(@NotNull Number number) { - if (this.price == null) this.price = new NumberOrString(); - this.price.setNumber(number); + @NotNull public Builder price(@NotNull Integer integer) { + if (this.price == null) this.price = new Number(); + this.price.setInteger(integer); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Long price) { + if (this.price == null) this.price = new Number(); + this.price.setLong(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Float price) { + if (this.price == null) this.price = new Number(); + this.price.setFloat(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Double price) { + if (this.price == null) this.price = new Number(); + this.price.setDouble(price); return this; } /** @@ -101,7 +185,7 @@ public BuyAction build() { */ @NotNull public Builder price(@NotNull String price) { - if (this.price == null) this.price = new NumberOrString(); + if (this.price == null) this.price = new Number(); this.price.setString(price); return this; } @@ -375,7 +459,10 @@ public Builder id(long id) { Object value = entry.getValue(); if (value instanceof java.util.Map) { value = ThingDeserializer.fromMap((java.util.Map)value); } if ("seller".equals(key) && value instanceof Participant) { seller((Participant)value); continue; } - if ("price".equals(key) && value instanceof Number) { price((Number)value); continue; } + if ("price".equals(key) && value instanceof Integer) { price((Integer)value); continue; } + if ("price".equals(key) && value instanceof Long) { price((Long)value); continue; } + if ("price".equals(key) && value instanceof Float) { price((Float)value); continue; } + if ("price".equals(key) && value instanceof Double) { price((Double)value); continue; } if ("price".equals(key) && value instanceof String) { price((String)value); continue; } if ("priceSpecification".equals(key) && value instanceof PriceSpecification) { priceSpecification((PriceSpecification)value); continue; } if ("agent".equals(key) && value instanceof Organization) { agent((Organization)value); continue; } @@ -394,11 +481,11 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Participant seller; - private NumberOrString price; + private Number price; private PriceSpecification priceSpecification; private OrganizationOrPerson agent; private java.util.Date endTime; @@ -418,7 +505,10 @@ public Builder id(long id) { } public interface Builder extends ThingBuilder { @NotNull Builder seller(@NotNull Participant participant); - @NotNull Builder price(@NotNull Number number); + @NotNull Builder price(@NotNull Integer integer); + @NotNull Builder price(@NotNull Long price); + @NotNull Builder price(@NotNull Float price); + @NotNull Builder price(@NotNull Double price); @NotNull Builder price(@NotNull String price); @NotNull Builder priceSpecification(@NotNull PriceSpecification priceSpecification); @NotNull Builder priceSpecification(@NotNull PriceSpecification.Builder priceSpecification); @@ -448,9 +538,25 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected BuyAction(Participant seller, NumberOrString price, PriceSpecification priceSpecification, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected BuyAction(Participant seller, Number price, PriceSpecification priceSpecification, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(price, priceSpecification, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); mySeller = seller; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (mySeller != null ? mySeller.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + BuyAction buyAction = (BuyAction) o; + if (!super.equals(o)) return false; + if (mySeller != null ? !mySeller.equals(buyAction.mySeller) : buyAction.mySeller != null) return false; + return true; + } + private Participant mySeller; } diff --git a/src/main/java/org/schema/CDFormat.java b/src/main/java/org/schema/CDFormat.java index 0c153c3c..bef3d743 100644 --- a/src/main/java/org/schema/CDFormat.java +++ b/src/main/java/org/schema/CDFormat.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected CDFormat() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CDFormat cDFormat = (CDFormat) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CT.java b/src/main/java/org/schema/CT.java index c2f20d05..b5e6546a 100644 --- a/src/main/java/org/schema/CT.java +++ b/src/main/java/org/schema/CT.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected CT() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CT cT = (CT) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CableOrSatelliteService.java b/src/main/java/org/schema/CableOrSatelliteService.java index f15b7ce0..20b52a87 100644 --- a/src/main/java/org/schema/CableOrSatelliteService.java +++ b/src/main/java/org/schema/CableOrSatelliteService.java @@ -324,7 +324,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -377,4 +377,18 @@ public interface Builder extends ThingBuilder { protected CableOrSatelliteService(AggregateRating aggregateRating, ServiceChannel availableChannel, Thing serviceOutput, Review review, AdministrativeArea serviceArea, String serviceType, OrganizationOrPerson provider, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, availableChannel, serviceOutput, review, serviceArea, serviceType, provider, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CableOrSatelliteService cableOrSatelliteService = (CableOrSatelliteService) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CafeOrCoffeeShop.java b/src/main/java/org/schema/CafeOrCoffeeShop.java index 1352a5c7..7bd792ac 100644 --- a/src/main/java/org/schema/CafeOrCoffeeShop.java +++ b/src/main/java/org/schema/CafeOrCoffeeShop.java @@ -540,7 +540,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BooleanOrString acceptsReservations; @@ -636,4 +636,18 @@ public interface Builder extends ThingBuilder { protected CafeOrCoffeeShop(BooleanOrString acceptsReservations, String menu, String servesCuisine, Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(acceptsReservations, menu, servesCuisine, parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CafeOrCoffeeShop cafeOrCoffeeShop = (CafeOrCoffeeShop) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Campground.java b/src/main/java/org/schema/Campground.java index c95c8ab1..faf85686 100644 --- a/src/main/java/org/schema/Campground.java +++ b/src/main/java/org/schema/Campground.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected Campground(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Campground campground = (Campground) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Canal.java b/src/main/java/org/schema/Canal.java index 1a89e47c..5935c566 100644 --- a/src/main/java/org/schema/Canal.java +++ b/src/main/java/org/schema/Canal.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected Canal(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Canal canal = (Canal) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CancelAction.java b/src/main/java/org/schema/CancelAction.java index 672a4d1c..3af4a1ec 100644 --- a/src/main/java/org/schema/CancelAction.java +++ b/src/main/java/org/schema/CancelAction.java @@ -316,7 +316,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private java.util.Date scheduledTime; @@ -367,4 +367,18 @@ public interface Builder extends ThingBuilder { protected CancelAction(java.util.Date scheduledTime, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(scheduledTime, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CancelAction cancelAction = (CancelAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Car.java b/src/main/java/org/schema/Car.java index 7e830d86..8e6622f9 100644 --- a/src/main/java/org/schema/Car.java +++ b/src/main/java/org/schema/Car.java @@ -65,16 +65,40 @@ Typical unit code(s): C62 /** * The number or type of airbags in the vehicle. */ - @NotNull public Builder numberOfAirbags(@NotNull Number number) { - if (this.numberOfAirbags == null) this.numberOfAirbags = new NumberOrString(); - this.numberOfAirbags.setNumber(number); + @NotNull public Builder numberOfAirbags(@NotNull Integer integer) { + if (this.numberOfAirbags == null) this.numberOfAirbags = new Number(); + this.numberOfAirbags.setInteger(integer); + return this; + } + /** + * The number or type of airbags in the vehicle. + */ + @NotNull public Builder numberOfAirbags(@NotNull Long numberOfAirbags) { + if (this.numberOfAirbags == null) this.numberOfAirbags = new Number(); + this.numberOfAirbags.setLong(numberOfAirbags); + return this; + } + /** + * The number or type of airbags in the vehicle. + */ + @NotNull public Builder numberOfAirbags(@NotNull Float numberOfAirbags) { + if (this.numberOfAirbags == null) this.numberOfAirbags = new Number(); + this.numberOfAirbags.setFloat(numberOfAirbags); + return this; + } + /** + * The number or type of airbags in the vehicle. + */ + @NotNull public Builder numberOfAirbags(@NotNull Double numberOfAirbags) { + if (this.numberOfAirbags == null) this.numberOfAirbags = new Number(); + this.numberOfAirbags.setDouble(numberOfAirbags); return this; } /** * The number or type of airbags in the vehicle. */ @NotNull public Builder numberOfAirbags(@NotNull String numberOfAirbags) { - if (this.numberOfAirbags == null) this.numberOfAirbags = new NumberOrString(); + if (this.numberOfAirbags == null) this.numberOfAirbags = new Number(); this.numberOfAirbags.setString(numberOfAirbags); return this; } @@ -1006,7 +1030,10 @@ public Builder id(long id) { if (value instanceof java.util.Map) { value = ThingDeserializer.fromMap((java.util.Map)value); } if ("numberOfDoors".equals(key) && value instanceof Number) { numberOfDoors((Number)value); continue; } if ("numberOfDoors".equals(key) && value instanceof QuantitativeValue) { numberOfDoors((QuantitativeValue)value); continue; } - if ("numberOfAirbags".equals(key) && value instanceof Number) { numberOfAirbags((Number)value); continue; } + if ("numberOfAirbags".equals(key) && value instanceof Integer) { numberOfAirbags((Integer)value); continue; } + if ("numberOfAirbags".equals(key) && value instanceof Long) { numberOfAirbags((Long)value); continue; } + if ("numberOfAirbags".equals(key) && value instanceof Float) { numberOfAirbags((Float)value); continue; } + if ("numberOfAirbags".equals(key) && value instanceof Double) { numberOfAirbags((Double)value); continue; } if ("numberOfAirbags".equals(key) && value instanceof String) { numberOfAirbags((String)value); continue; } if ("numberOfAxles".equals(key) && value instanceof Number) { numberOfAxles((Number)value); continue; } if ("numberOfAxles".equals(key) && value instanceof QuantitativeValue) { numberOfAxles((QuantitativeValue)value); continue; } @@ -1083,11 +1110,11 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private NumberOrQuantitativeValue numberOfDoors; - private NumberOrString numberOfAirbags; + private Number numberOfAirbags; private NumberOrQuantitativeValue numberOfAxles; private EngineSpecification vehicleEngine; private QuantitativeValue fuelConsumption; @@ -1153,7 +1180,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder numberOfDoors(@NotNull Number number); @NotNull Builder numberOfDoors(@NotNull QuantitativeValue quantitativeValue); @NotNull Builder numberOfDoors(@NotNull QuantitativeValue.Builder quantitativeValue); - @NotNull Builder numberOfAirbags(@NotNull Number number); + @NotNull Builder numberOfAirbags(@NotNull Integer integer); + @NotNull Builder numberOfAirbags(@NotNull Long numberOfAirbags); + @NotNull Builder numberOfAirbags(@NotNull Float numberOfAirbags); + @NotNull Builder numberOfAirbags(@NotNull Double numberOfAirbags); @NotNull Builder numberOfAirbags(@NotNull String numberOfAirbags); @NotNull Builder numberOfAxles(@NotNull Number number); @NotNull Builder numberOfAxles(@NotNull QuantitativeValue quantitativeValue); @@ -1272,7 +1302,21 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected Car(NumberOrQuantitativeValue numberOfDoors, NumberOrString numberOfAirbags, NumberOrQuantitativeValue numberOfAxles, EngineSpecification vehicleEngine, QuantitativeValue fuelConsumption, QuantitativeValue fuelEfficiency, NumberOrQuantitativeValue numberOfForwardGears, String vin, QuantitativeValue cargoVolume, String vehicleConfiguration, String knownVehicleDamages, java.util.Date dateVehicleFirstRegistered, DriveWheelConfigurationValueOrString driveWheelConfiguration, QualitativeValueOrString fuelType, String vehicleInteriorColor, String vehicleInteriorType, QuantitativeValue mileageFromOdometer, java.util.Date vehicleModelDate, NumberOrQuantitativeValue numberOfPreviousOwners, java.util.Date productionDate, java.util.Date purchaseDate, NumberOrQuantitativeValue vehicleSeatingCapacity, QualitativeValueOrString vehicleTransmission, SteeringPositionValue steeringPosition, AggregateRating aggregateRating, Audience audience, String award, BrandOrOrganization brand, PhysicalActivityCategoryOrStringOrThing category, String color, DistanceOrQuantitativeValue depth, String gtin12, String gtin13, String gtin14, String gtin8, DistanceOrQuantitativeValue height, Product isAccessoryOrSparePartFor, Product isConsumableFor, Product isRelatedTo, Product isSimilarTo, OfferItemCondition itemCondition, ImageObjectOrString logo, Organization manufacturer, ProductModelOrString model, String mpn, Offer offers, String productID, java.util.Date releaseDate, Review review, String sku, QuantitativeValue weight, DistanceOrQuantitativeValue width, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected Car(NumberOrQuantitativeValue numberOfDoors, Number numberOfAirbags, NumberOrQuantitativeValue numberOfAxles, EngineSpecification vehicleEngine, QuantitativeValue fuelConsumption, QuantitativeValue fuelEfficiency, NumberOrQuantitativeValue numberOfForwardGears, String vin, QuantitativeValue cargoVolume, String vehicleConfiguration, String knownVehicleDamages, java.util.Date dateVehicleFirstRegistered, DriveWheelConfigurationValueOrString driveWheelConfiguration, QualitativeValueOrString fuelType, String vehicleInteriorColor, String vehicleInteriorType, QuantitativeValue mileageFromOdometer, java.util.Date vehicleModelDate, NumberOrQuantitativeValue numberOfPreviousOwners, java.util.Date productionDate, java.util.Date purchaseDate, NumberOrQuantitativeValue vehicleSeatingCapacity, QualitativeValueOrString vehicleTransmission, SteeringPositionValue steeringPosition, AggregateRating aggregateRating, Audience audience, String award, BrandOrOrganization brand, PhysicalActivityCategoryOrStringOrThing category, String color, DistanceOrQuantitativeValue depth, String gtin12, String gtin13, String gtin14, String gtin8, DistanceOrQuantitativeValue height, Product isAccessoryOrSparePartFor, Product isConsumableFor, Product isRelatedTo, Product isSimilarTo, OfferItemCondition itemCondition, ImageObjectOrString logo, Organization manufacturer, ProductModelOrString model, String mpn, Offer offers, String productID, java.util.Date releaseDate, Review review, String sku, QuantitativeValue weight, DistanceOrQuantitativeValue width, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(numberOfDoors, numberOfAirbags, numberOfAxles, vehicleEngine, fuelConsumption, fuelEfficiency, numberOfForwardGears, vin, cargoVolume, vehicleConfiguration, knownVehicleDamages, dateVehicleFirstRegistered, driveWheelConfiguration, fuelType, vehicleInteriorColor, vehicleInteriorType, mileageFromOdometer, vehicleModelDate, numberOfPreviousOwners, productionDate, purchaseDate, vehicleSeatingCapacity, vehicleTransmission, steeringPosition, aggregateRating, audience, award, brand, category, color, depth, gtin12, gtin13, gtin14, gtin8, height, isAccessoryOrSparePartFor, isConsumableFor, isRelatedTo, isSimilarTo, itemCondition, logo, manufacturer, model, mpn, offers, productID, releaseDate, review, sku, weight, width, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Car car = (Car) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CarUsageType.java b/src/main/java/org/schema/CarUsageType.java index 2021edb1..129eadc0 100644 --- a/src/main/java/org/schema/CarUsageType.java +++ b/src/main/java/org/schema/CarUsageType.java @@ -426,7 +426,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private QualitativeValue equal; @@ -494,4 +494,18 @@ public interface Builder extends ThingBuilder { protected CarUsageType(QualitativeValue equal, QualitativeValue greater, QualitativeValue greaterOrEqual, QualitativeValue lesser, QualitativeValue lesserOrEqual, QualitativeValue nonEqual, EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue valueReference, PropertyValue additionalProperty, EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(equal, greater, greaterOrEqual, lesser, lesserOrEqual, nonEqual, valueReference, additionalProperty, supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CarUsageType carUsageType = (CarUsageType) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Cardiovascular.java b/src/main/java/org/schema/Cardiovascular.java index 2b7bd83e..448ec5d9 100644 --- a/src/main/java/org/schema/Cardiovascular.java +++ b/src/main/java/org/schema/Cardiovascular.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Cardiovascular() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Cardiovascular cardiovascular = (Cardiovascular) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CardiovascularExam.java b/src/main/java/org/schema/CardiovascularExam.java index 08f25740..ba372ccc 100644 --- a/src/main/java/org/schema/CardiovascularExam.java +++ b/src/main/java/org/schema/CardiovascularExam.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected CardiovascularExam() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CardiovascularExam cardiovascularExam = (CardiovascularExam) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CaseSeries.java b/src/main/java/org/schema/CaseSeries.java index d1d1bbc4..e4a97282 100644 --- a/src/main/java/org/schema/CaseSeries.java +++ b/src/main/java/org/schema/CaseSeries.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected CaseSeries() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CaseSeries caseSeries = (CaseSeries) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Casino.java b/src/main/java/org/schema/Casino.java index b9e957cd..f3349e4d 100644 --- a/src/main/java/org/schema/Casino.java +++ b/src/main/java/org/schema/Casino.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected Casino(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Casino casino = (Casino) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CassetteFormat.java b/src/main/java/org/schema/CassetteFormat.java index b320bcbd..8f492df6 100644 --- a/src/main/java/org/schema/CassetteFormat.java +++ b/src/main/java/org/schema/CassetteFormat.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected CassetteFormat() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CassetteFormat cassetteFormat = (CassetteFormat) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CatholicChurch.java b/src/main/java/org/schema/CatholicChurch.java index ec7d27e4..e876f51d 100644 --- a/src/main/java/org/schema/CatholicChurch.java +++ b/src/main/java/org/schema/CatholicChurch.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected CatholicChurch(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CatholicChurch catholicChurch = (CatholicChurch) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Cemetery.java b/src/main/java/org/schema/Cemetery.java index 6232bf4e..05bda503 100644 --- a/src/main/java/org/schema/Cemetery.java +++ b/src/main/java/org/schema/Cemetery.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected Cemetery(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Cemetery cemetery = (Cemetery) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CheckAction.java b/src/main/java/org/schema/CheckAction.java index c400e799..8d0f2f7a 100644 --- a/src/main/java/org/schema/CheckAction.java +++ b/src/main/java/org/schema/CheckAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected CheckAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CheckAction checkAction = (CheckAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CheckInAction.java b/src/main/java/org/schema/CheckInAction.java index 8220e431..00cc8f16 100644 --- a/src/main/java/org/schema/CheckInAction.java +++ b/src/main/java/org/schema/CheckInAction.java @@ -391,7 +391,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Thing about; @@ -454,4 +454,18 @@ public interface Builder extends ThingBuilder { protected CheckInAction(Thing about, LanguageOrString inLanguage, AudienceOrOrganizationOrPerson recipient, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(about, inLanguage, recipient, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CheckInAction checkInAction = (CheckInAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CheckOutAction.java b/src/main/java/org/schema/CheckOutAction.java index 770cf9ce..0af8715b 100644 --- a/src/main/java/org/schema/CheckOutAction.java +++ b/src/main/java/org/schema/CheckOutAction.java @@ -391,7 +391,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Thing about; @@ -454,4 +454,18 @@ public interface Builder extends ThingBuilder { protected CheckOutAction(Thing about, LanguageOrString inLanguage, AudienceOrOrganizationOrPerson recipient, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(about, inLanguage, recipient, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CheckOutAction checkOutAction = (CheckOutAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CheckoutPage.java b/src/main/java/org/schema/CheckoutPage.java index 52b920bb..32f92906 100644 --- a/src/main/java/org/schema/CheckoutPage.java +++ b/src/main/java/org/schema/CheckoutPage.java @@ -1266,7 +1266,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BreadcrumbListOrString breadcrumb; @@ -1507,4 +1507,18 @@ public interface Builder extends ThingBuilder { protected CheckoutPage(BreadcrumbListOrString breadcrumb, java.util.Date lastReviewed, WebPageElement mainContentOfPage, ImageObject primaryImageOfPage, String relatedLink, OrganizationOrPerson reviewedBy, String significantLink, Specialty specialty, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(breadcrumb, lastReviewed, mainContentOfPage, primaryImageOfPage, relatedLink, reviewedBy, significantLink, specialty, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CheckoutPage checkoutPage = (CheckoutPage) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ChildCare.java b/src/main/java/org/schema/ChildCare.java index 42b00e7d..01ed619d 100644 --- a/src/main/java/org/schema/ChildCare.java +++ b/src/main/java/org/schema/ChildCare.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected ChildCare(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ChildCare childCare = (ChildCare) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ChildrensEvent.java b/src/main/java/org/schema/ChildrensEvent.java index 883487ac..d82be95a 100644 --- a/src/main/java/org/schema/ChildrensEvent.java +++ b/src/main/java/org/schema/ChildrensEvent.java @@ -496,7 +496,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -583,4 +583,18 @@ public interface Builder extends ThingBuilder { protected ChildrensEvent(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ChildrensEvent childrensEvent = (ChildrensEvent) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Chiropractic.java b/src/main/java/org/schema/Chiropractic.java index 68dba895..f38d5194 100644 --- a/src/main/java/org/schema/Chiropractic.java +++ b/src/main/java/org/schema/Chiropractic.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Chiropractic() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Chiropractic chiropractic = (Chiropractic) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ChooseAction.java b/src/main/java/org/schema/ChooseAction.java index d8ccec1a..074c7e3d 100644 --- a/src/main/java/org/schema/ChooseAction.java +++ b/src/main/java/org/schema/ChooseAction.java @@ -338,7 +338,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private StringOrThing actionOption; @@ -392,5 +392,21 @@ protected ChooseAction(StringOrThing actionOption, OrganizationOrPerson agent, j super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myActionOption = actionOption; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myActionOption != null ? myActionOption.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ChooseAction chooseAction = (ChooseAction) o; + if (!super.equals(o)) return false; + if (myActionOption != null ? !myActionOption.equals(chooseAction.myActionOption) : chooseAction.myActionOption != null) return false; + return true; + } + private StringOrThing myActionOption; } diff --git a/src/main/java/org/schema/Church.java b/src/main/java/org/schema/Church.java index 65984f24..41aa7542 100644 --- a/src/main/java/org/schema/Church.java +++ b/src/main/java/org/schema/Church.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected Church(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Church church = (Church) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/City.java b/src/main/java/org/schema/City.java index 64cecc7d..a1ce9109 100644 --- a/src/main/java/org/schema/City.java +++ b/src/main/java/org/schema/City.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected City(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + City city = (City) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CityHall.java b/src/main/java/org/schema/CityHall.java index 7ece80ab..227bc790 100644 --- a/src/main/java/org/schema/CityHall.java +++ b/src/main/java/org/schema/CityHall.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected CityHall(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CityHall cityHall = (CityHall) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CivicStructure.java b/src/main/java/org/schema/CivicStructure.java index cece979a..6eb88461 100644 --- a/src/main/java/org/schema/CivicStructure.java +++ b/src/main/java/org/schema/CivicStructure.java @@ -474,7 +474,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -555,5 +555,21 @@ protected CivicStructure(String openingHours, PostalAddress address, AggregateRa super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myOpeningHours = openingHours; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myOpeningHours != null ? myOpeningHours.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CivicStructure civicStructure = (CivicStructure) o; + if (!super.equals(o)) return false; + if (myOpeningHours != null ? !myOpeningHours.equals(civicStructure.myOpeningHours) : civicStructure.myOpeningHours != null) return false; + return true; + } + private String myOpeningHours; } diff --git a/src/main/java/org/schema/Clinician.java b/src/main/java/org/schema/Clinician.java index fb961154..5064841a 100644 --- a/src/main/java/org/schema/Clinician.java +++ b/src/main/java/org/schema/Clinician.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Clinician() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Clinician clinician = (Clinician) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Clip.java b/src/main/java/org/schema/Clip.java index d60eb601..fcdd1682 100644 --- a/src/main/java/org/schema/Clip.java +++ b/src/main/java/org/schema/Clip.java @@ -1278,7 +1278,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person actor; @@ -1521,6 +1521,34 @@ protected Clip(Person actor, Position clipNumber, Person director, MusicGroupOrP myPartOfSeason = partOfSeason; myPartOfSeries = partOfSeries; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myActor != null ? myActor.hashCode() : 0); + result = 31 * result + (myClipNumber != null ? myClipNumber.hashCode() : 0); + result = 31 * result + (myDirector != null ? myDirector.hashCode() : 0); + result = 31 * result + (myMusicBy != null ? myMusicBy.hashCode() : 0); + result = 31 * result + (myPartOfEpisode != null ? myPartOfEpisode.hashCode() : 0); + result = 31 * result + (myPartOfSeason != null ? myPartOfSeason.hashCode() : 0); + result = 31 * result + (myPartOfSeries != null ? myPartOfSeries.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Clip clip = (Clip) o; + if (!super.equals(o)) return false; + if (myActor != null ? !myActor.equals(clip.myActor) : clip.myActor != null) return false; + if (myClipNumber != null ? !myClipNumber.equals(clip.myClipNumber) : clip.myClipNumber != null) return false; + if (myDirector != null ? !myDirector.equals(clip.myDirector) : clip.myDirector != null) return false; + if (myMusicBy != null ? !myMusicBy.equals(clip.myMusicBy) : clip.myMusicBy != null) return false; + if (myPartOfEpisode != null ? !myPartOfEpisode.equals(clip.myPartOfEpisode) : clip.myPartOfEpisode != null) return false; + if (myPartOfSeason != null ? !myPartOfSeason.equals(clip.myPartOfSeason) : clip.myPartOfSeason != null) return false; + if (myPartOfSeries != null ? !myPartOfSeries.equals(clip.myPartOfSeries) : clip.myPartOfSeries != null) return false; + return true; + } + private Person myActor; private Position myClipNumber; private Person myDirector; diff --git a/src/main/java/org/schema/ClothingStore.java b/src/main/java/org/schema/ClothingStore.java index c02bdce2..ccd90ac8 100644 --- a/src/main/java/org/schema/ClothingStore.java +++ b/src/main/java/org/schema/ClothingStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected ClothingStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ClothingStore clothingStore = (ClothingStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CoOp.java b/src/main/java/org/schema/CoOp.java index 3545a96c..85323756 100644 --- a/src/main/java/org/schema/CoOp.java +++ b/src/main/java/org/schema/CoOp.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected CoOp() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CoOp coOp = (CoOp) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Code.java b/src/main/java/org/schema/Code.java index 07ec0421..a5ee9a45 100644 --- a/src/main/java/org/schema/Code.java +++ b/src/main/java/org/schema/Code.java @@ -1146,7 +1146,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String schemaVersion; @@ -1363,4 +1363,18 @@ public interface Builder extends ThingBuilder { protected Code(String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Code code = (Code) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CohortStudy.java b/src/main/java/org/schema/CohortStudy.java index 069e1beb..6ea0c295 100644 --- a/src/main/java/org/schema/CohortStudy.java +++ b/src/main/java/org/schema/CohortStudy.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected CohortStudy() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CohortStudy cohortStudy = (CohortStudy) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CollectionPage.java b/src/main/java/org/schema/CollectionPage.java index 3aa0cae8..830e1d27 100644 --- a/src/main/java/org/schema/CollectionPage.java +++ b/src/main/java/org/schema/CollectionPage.java @@ -1266,7 +1266,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BreadcrumbListOrString breadcrumb; @@ -1507,4 +1507,18 @@ public interface Builder extends ThingBuilder { protected CollectionPage(BreadcrumbListOrString breadcrumb, java.util.Date lastReviewed, WebPageElement mainContentOfPage, ImageObject primaryImageOfPage, String relatedLink, OrganizationOrPerson reviewedBy, String significantLink, Specialty specialty, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(breadcrumb, lastReviewed, mainContentOfPage, primaryImageOfPage, relatedLink, reviewedBy, significantLink, specialty, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CollectionPage collectionPage = (CollectionPage) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CollegeOrUniversity.java b/src/main/java/org/schema/CollegeOrUniversity.java index 26b95f3b..c9542ffe 100644 --- a/src/main/java/org/schema/CollegeOrUniversity.java +++ b/src/main/java/org/schema/CollegeOrUniversity.java @@ -674,7 +674,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person alumni; @@ -800,4 +800,18 @@ public interface Builder extends ThingBuilder { protected CollegeOrUniversity(Person alumni, PostalAddress address, AggregateRating aggregateRating, String award, BrandOrOrganization brand, ContactPoint contactPoint, Organization department, String duns, String email, Person employee, Event event, String faxNumber, Person founder, java.util.Date dissolutionDate, java.util.Date foundingDate, String globalLocationNumber, Place hasPOS, String isicV4, String legalName, ImageObjectOrString logo, Offer makesOffer, OrganizationOrPerson member, OrganizationOrProgramMembership memberOf, String naics, QuantitativeValue numberOfEmployees, OwnershipInfoOrProduct owns, Review review, Demand seeks, Organization subOrganization, String taxID, String telephone, String vatID, Place foundingLocation, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(alumni, address, aggregateRating, award, brand, contactPoint, department, duns, email, employee, event, faxNumber, founder, dissolutionDate, foundingDate, globalLocationNumber, hasPOS, isicV4, legalName, logo, makesOffer, member, memberOf, naics, numberOfEmployees, owns, review, seeks, subOrganization, taxID, telephone, vatID, foundingLocation, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CollegeOrUniversity collegeOrUniversity = (CollegeOrUniversity) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ComedyClub.java b/src/main/java/org/schema/ComedyClub.java index 2c24615f..13f65c3e 100644 --- a/src/main/java/org/schema/ComedyClub.java +++ b/src/main/java/org/schema/ComedyClub.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected ComedyClub(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ComedyClub comedyClub = (ComedyClub) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ComedyEvent.java b/src/main/java/org/schema/ComedyEvent.java index e3e45c31..c1eafbe9 100644 --- a/src/main/java/org/schema/ComedyEvent.java +++ b/src/main/java/org/schema/ComedyEvent.java @@ -496,7 +496,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -583,4 +583,18 @@ public interface Builder extends ThingBuilder { protected ComedyEvent(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ComedyEvent comedyEvent = (ComedyEvent) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Comment.java b/src/main/java/org/schema/Comment.java index b362e0fe..bacb0095 100644 --- a/src/main/java/org/schema/Comment.java +++ b/src/main/java/org/schema/Comment.java @@ -1194,7 +1194,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Integer upvoteCount; @@ -1421,6 +1421,26 @@ protected Comment(Integer upvoteCount, Integer downvoteCount, Question parentIte myDownvoteCount = downvoteCount; myParentItem = parentItem; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myUpvoteCount != null ? myUpvoteCount.hashCode() : 0); + result = 31 * result + (myDownvoteCount != null ? myDownvoteCount.hashCode() : 0); + result = 31 * result + (myParentItem != null ? myParentItem.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Comment comment = (Comment) o; + if (!super.equals(o)) return false; + if (myUpvoteCount != null ? !myUpvoteCount.equals(comment.myUpvoteCount) : comment.myUpvoteCount != null) return false; + if (myDownvoteCount != null ? !myDownvoteCount.equals(comment.myDownvoteCount) : comment.myDownvoteCount != null) return false; + if (myParentItem != null ? !myParentItem.equals(comment.myParentItem) : comment.myParentItem != null) return false; + return true; + } + private Integer myUpvoteCount; private Integer myDownvoteCount; private Question myParentItem; diff --git a/src/main/java/org/schema/CommentAction.java b/src/main/java/org/schema/CommentAction.java index 7150f8b4..820f8a0e 100644 --- a/src/main/java/org/schema/CommentAction.java +++ b/src/main/java/org/schema/CommentAction.java @@ -411,7 +411,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Comment resultComment; @@ -478,5 +478,21 @@ protected CommentAction(Comment resultComment, Thing about, LanguageOrString inL super(about, inLanguage, recipient, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myResultComment = resultComment; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myResultComment != null ? myResultComment.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CommentAction commentAction = (CommentAction) o; + if (!super.equals(o)) return false; + if (myResultComment != null ? !myResultComment.equals(commentAction.myResultComment) : commentAction.myResultComment != null) return false; + return true; + } + private Comment myResultComment; } diff --git a/src/main/java/org/schema/CommunicateAction.java b/src/main/java/org/schema/CommunicateAction.java index bf0dbcc0..9a049a8f 100644 --- a/src/main/java/org/schema/CommunicateAction.java +++ b/src/main/java/org/schema/CommunicateAction.java @@ -409,7 +409,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Thing about; @@ -475,6 +475,26 @@ protected CommunicateAction(Thing about, LanguageOrString inLanguage, AudienceOr myInLanguage = inLanguage; myRecipient = recipient; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAbout != null ? myAbout.hashCode() : 0); + result = 31 * result + (myInLanguage != null ? myInLanguage.hashCode() : 0); + result = 31 * result + (myRecipient != null ? myRecipient.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CommunicateAction communicateAction = (CommunicateAction) o; + if (!super.equals(o)) return false; + if (myAbout != null ? !myAbout.equals(communicateAction.myAbout) : communicateAction.myAbout != null) return false; + if (myInLanguage != null ? !myInLanguage.equals(communicateAction.myInLanguage) : communicateAction.myInLanguage != null) return false; + if (myRecipient != null ? !myRecipient.equals(communicateAction.myRecipient) : communicateAction.myRecipient != null) return false; + return true; + } + private Thing myAbout; private LanguageOrString myInLanguage; private AudienceOrOrganizationOrPerson myRecipient; diff --git a/src/main/java/org/schema/CommunityHealth.java b/src/main/java/org/schema/CommunityHealth.java index 849d4629..fe8743ba 100644 --- a/src/main/java/org/schema/CommunityHealth.java +++ b/src/main/java/org/schema/CommunityHealth.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected CommunityHealth() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CommunityHealth communityHealth = (CommunityHealth) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CompilationAlbum.java b/src/main/java/org/schema/CompilationAlbum.java index d90588da..56bd1c95 100644 --- a/src/main/java/org/schema/CompilationAlbum.java +++ b/src/main/java/org/schema/CompilationAlbum.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected CompilationAlbum() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CompilationAlbum compilationAlbum = (CompilationAlbum) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Completed.java b/src/main/java/org/schema/Completed.java index e4c8564b..cc99b614 100644 --- a/src/main/java/org/schema/Completed.java +++ b/src/main/java/org/schema/Completed.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Completed() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Completed completed = (Completed) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CompletedActionStatus.java b/src/main/java/org/schema/CompletedActionStatus.java index 8d04b112..1229d146 100644 --- a/src/main/java/org/schema/CompletedActionStatus.java +++ b/src/main/java/org/schema/CompletedActionStatus.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected CompletedActionStatus() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CompletedActionStatus completedActionStatus = (CompletedActionStatus) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ComputerStore.java b/src/main/java/org/schema/ComputerStore.java index 34b3a452..64c2b184 100644 --- a/src/main/java/org/schema/ComputerStore.java +++ b/src/main/java/org/schema/ComputerStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected ComputerStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ComputerStore computerStore = (ComputerStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ConfirmAction.java b/src/main/java/org/schema/ConfirmAction.java index b0c3951c..a48b1c19 100644 --- a/src/main/java/org/schema/ConfirmAction.java +++ b/src/main/java/org/schema/ConfirmAction.java @@ -405,7 +405,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Event event; @@ -471,4 +471,18 @@ public interface Builder extends ThingBuilder { protected ConfirmAction(Event event, Thing about, LanguageOrString inLanguage, AudienceOrOrganizationOrPerson recipient, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(event, about, inLanguage, recipient, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ConfirmAction confirmAction = (ConfirmAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ConsumeAction.java b/src/main/java/org/schema/ConsumeAction.java index 38046844..353e99e9 100644 --- a/src/main/java/org/schema/ConsumeAction.java +++ b/src/main/java/org/schema/ConsumeAction.java @@ -328,7 +328,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Offer expectsAcceptanceOf; @@ -381,5 +381,21 @@ protected ConsumeAction(Offer expectsAcceptanceOf, OrganizationOrPerson agent, j super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myExpectsAcceptanceOf = expectsAcceptanceOf; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myExpectsAcceptanceOf != null ? myExpectsAcceptanceOf.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ConsumeAction consumeAction = (ConsumeAction) o; + if (!super.equals(o)) return false; + if (myExpectsAcceptanceOf != null ? !myExpectsAcceptanceOf.equals(consumeAction.myExpectsAcceptanceOf) : consumeAction.myExpectsAcceptanceOf != null) return false; + return true; + } + private Offer myExpectsAcceptanceOf; } diff --git a/src/main/java/org/schema/ContactPage.java b/src/main/java/org/schema/ContactPage.java index 8f048eea..ef0ff52f 100644 --- a/src/main/java/org/schema/ContactPage.java +++ b/src/main/java/org/schema/ContactPage.java @@ -1266,7 +1266,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BreadcrumbListOrString breadcrumb; @@ -1507,4 +1507,18 @@ public interface Builder extends ThingBuilder { protected ContactPage(BreadcrumbListOrString breadcrumb, java.util.Date lastReviewed, WebPageElement mainContentOfPage, ImageObject primaryImageOfPage, String relatedLink, OrganizationOrPerson reviewedBy, String significantLink, Specialty specialty, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(breadcrumb, lastReviewed, mainContentOfPage, primaryImageOfPage, relatedLink, reviewedBy, significantLink, specialty, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ContactPage contactPage = (ContactPage) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ContactPoint.java b/src/main/java/org/schema/ContactPoint.java index 0ade0b84..8e2baea9 100644 --- a/src/main/java/org/schema/ContactPoint.java +++ b/src/main/java/org/schema/ContactPoint.java @@ -382,7 +382,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AdministrativeArea areaServed; @@ -446,6 +446,38 @@ protected ContactPoint(AdministrativeArea areaServed, Language availableLanguage myProductSupported = productSupported; myTelephone = telephone; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAreaServed != null ? myAreaServed.hashCode() : 0); + result = 31 * result + (myAvailableLanguage != null ? myAvailableLanguage.hashCode() : 0); + result = 31 * result + (myContactOption != null ? myContactOption.hashCode() : 0); + result = 31 * result + (myContactType != null ? myContactType.hashCode() : 0); + result = 31 * result + (myEmail != null ? myEmail.hashCode() : 0); + result = 31 * result + (myFaxNumber != null ? myFaxNumber.hashCode() : 0); + result = 31 * result + (myHoursAvailable != null ? myHoursAvailable.hashCode() : 0); + result = 31 * result + (myProductSupported != null ? myProductSupported.hashCode() : 0); + result = 31 * result + (myTelephone != null ? myTelephone.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ContactPoint contactPoint = (ContactPoint) o; + if (!super.equals(o)) return false; + if (myAreaServed != null ? !myAreaServed.equals(contactPoint.myAreaServed) : contactPoint.myAreaServed != null) return false; + if (myAvailableLanguage != null ? !myAvailableLanguage.equals(contactPoint.myAvailableLanguage) : contactPoint.myAvailableLanguage != null) return false; + if (myContactOption != null ? !myContactOption.equals(contactPoint.myContactOption) : contactPoint.myContactOption != null) return false; + if (myContactType != null ? !myContactType.equals(contactPoint.myContactType) : contactPoint.myContactType != null) return false; + if (myEmail != null ? !myEmail.equals(contactPoint.myEmail) : contactPoint.myEmail != null) return false; + if (myFaxNumber != null ? !myFaxNumber.equals(contactPoint.myFaxNumber) : contactPoint.myFaxNumber != null) return false; + if (myHoursAvailable != null ? !myHoursAvailable.equals(contactPoint.myHoursAvailable) : contactPoint.myHoursAvailable != null) return false; + if (myProductSupported != null ? !myProductSupported.equals(contactPoint.myProductSupported) : contactPoint.myProductSupported != null) return false; + if (myTelephone != null ? !myTelephone.equals(contactPoint.myTelephone) : contactPoint.myTelephone != null) return false; + return true; + } + private AdministrativeArea myAreaServed; private Language myAvailableLanguage; private ContactPointOption myContactOption; diff --git a/src/main/java/org/schema/ContactPointOption.java b/src/main/java/org/schema/ContactPointOption.java index 2caad117..d5342ae6 100644 --- a/src/main/java/org/schema/ContactPointOption.java +++ b/src/main/java/org/schema/ContactPointOption.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected ContactPointOption(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ContactPointOption contactPointOption = (ContactPointOption) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ContactPointOrPlace.java b/src/main/java/org/schema/ContactPointOrPlace.java index e40936a8..6ea6d8c0 100644 --- a/src/main/java/org/schema/ContactPointOrPlace.java +++ b/src/main/java/org/schema/ContactPointOrPlace.java @@ -44,4 +44,21 @@ private void clear() { myContactPoint = null; myPlace = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myContactPoint != null ? myContactPoint.hashCode() : 0); + result = 31 * result + (myPlace != null ? myPlace.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ContactPointOrPlace contactPointOrPlace = (ContactPointOrPlace) o; + if (myContactPoint != null ? !myContactPoint.equals(contactPointOrPlace.myContactPoint) : contactPointOrPlace.myContactPoint != null) return false; + if (myPlace != null ? !myPlace.equals(contactPointOrPlace.myPlace) : contactPointOrPlace.myPlace != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Continent.java b/src/main/java/org/schema/Continent.java index ff376bd1..3e4eefde 100644 --- a/src/main/java/org/schema/Continent.java +++ b/src/main/java/org/schema/Continent.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected Continent(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Continent continent = (Continent) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ControlAction.java b/src/main/java/org/schema/ControlAction.java index 98a379cc..068d7201 100644 --- a/src/main/java/org/schema/ControlAction.java +++ b/src/main/java/org/schema/ControlAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected ControlAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ControlAction controlAction = (ControlAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ConvenienceStore.java b/src/main/java/org/schema/ConvenienceStore.java index d8a04956..612837ca 100644 --- a/src/main/java/org/schema/ConvenienceStore.java +++ b/src/main/java/org/schema/ConvenienceStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected ConvenienceStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ConvenienceStore convenienceStore = (ConvenienceStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CookAction.java b/src/main/java/org/schema/CookAction.java index 0bd43030..5312db64 100644 --- a/src/main/java/org/schema/CookAction.java +++ b/src/main/java/org/schema/CookAction.java @@ -384,7 +384,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private FoodEstablishmentOrPlace foodEstablishment; @@ -447,6 +447,26 @@ protected CookAction(FoodEstablishmentOrPlace foodEstablishment, FoodEvent foodE myFoodEvent = foodEvent; myRecipe = recipe; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myFoodEstablishment != null ? myFoodEstablishment.hashCode() : 0); + result = 31 * result + (myFoodEvent != null ? myFoodEvent.hashCode() : 0); + result = 31 * result + (myRecipe != null ? myRecipe.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CookAction cookAction = (CookAction) o; + if (!super.equals(o)) return false; + if (myFoodEstablishment != null ? !myFoodEstablishment.equals(cookAction.myFoodEstablishment) : cookAction.myFoodEstablishment != null) return false; + if (myFoodEvent != null ? !myFoodEvent.equals(cookAction.myFoodEvent) : cookAction.myFoodEvent != null) return false; + if (myRecipe != null ? !myRecipe.equals(cookAction.myRecipe) : cookAction.myRecipe != null) return false; + return true; + } + private FoodEstablishmentOrPlace myFoodEstablishment; private FoodEvent myFoodEvent; private Recipe myRecipe; diff --git a/src/main/java/org/schema/Corporation.java b/src/main/java/org/schema/Corporation.java index 5f2cf8d3..aba1e8ff 100644 --- a/src/main/java/org/schema/Corporation.java +++ b/src/main/java/org/schema/Corporation.java @@ -675,7 +675,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String tickerSymbol; @@ -801,5 +801,21 @@ protected Corporation(String tickerSymbol, PostalAddress address, AggregateRatin super(address, aggregateRating, award, brand, contactPoint, department, duns, email, employee, event, faxNumber, founder, dissolutionDate, foundingDate, globalLocationNumber, hasPOS, isicV4, legalName, logo, makesOffer, member, memberOf, naics, numberOfEmployees, owns, review, seeks, subOrganization, taxID, telephone, vatID, foundingLocation, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myTickerSymbol = tickerSymbol; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myTickerSymbol != null ? myTickerSymbol.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Corporation corporation = (Corporation) o; + if (!super.equals(o)) return false; + if (myTickerSymbol != null ? !myTickerSymbol.equals(corporation.myTickerSymbol) : corporation.myTickerSymbol != null) return false; + return true; + } + private String myTickerSymbol; } diff --git a/src/main/java/org/schema/Country.java b/src/main/java/org/schema/Country.java index 2578aa1d..dc3926a0 100644 --- a/src/main/java/org/schema/Country.java +++ b/src/main/java/org/schema/Country.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected Country(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Country country = (Country) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Courthouse.java b/src/main/java/org/schema/Courthouse.java index 7e76c00d..ec5a6ee4 100644 --- a/src/main/java/org/schema/Courthouse.java +++ b/src/main/java/org/schema/Courthouse.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected Courthouse(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Courthouse courthouse = (Courthouse) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CreateAction.java b/src/main/java/org/schema/CreateAction.java index ebf76481..9b15bc52 100644 --- a/src/main/java/org/schema/CreateAction.java +++ b/src/main/java/org/schema/CreateAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected CreateAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CreateAction createAction = (CreateAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CreativeWork.java b/src/main/java/org/schema/CreativeWork.java index d375eca0..aeafc9d0 100644 --- a/src/main/java/org/schema/CreativeWork.java +++ b/src/main/java/org/schema/CreativeWork.java @@ -1528,7 +1528,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String schemaVersion; @@ -1808,6 +1808,146 @@ protected CreativeWork(String schemaVersion, Thing about, String accessibilityAP myTranslator = translator; myReleasedEvent = releasedEvent; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (mySchemaVersion != null ? mySchemaVersion.hashCode() : 0); + result = 31 * result + (myAbout != null ? myAbout.hashCode() : 0); + result = 31 * result + (myAccessibilityAPI != null ? myAccessibilityAPI.hashCode() : 0); + result = 31 * result + (myAccessibilityControl != null ? myAccessibilityControl.hashCode() : 0); + result = 31 * result + (myAccessibilityFeature != null ? myAccessibilityFeature.hashCode() : 0); + result = 31 * result + (myAccessibilityHazard != null ? myAccessibilityHazard.hashCode() : 0); + result = 31 * result + (myAccountablePerson != null ? myAccountablePerson.hashCode() : 0); + result = 31 * result + (myAggregateRating != null ? myAggregateRating.hashCode() : 0); + result = 31 * result + (myAlternativeHeadline != null ? myAlternativeHeadline.hashCode() : 0); + result = 31 * result + (myAssociatedMedia != null ? myAssociatedMedia.hashCode() : 0); + result = 31 * result + (myAudience != null ? myAudience.hashCode() : 0); + result = 31 * result + (myAudio != null ? myAudio.hashCode() : 0); + result = 31 * result + (myAuthor != null ? myAuthor.hashCode() : 0); + result = 31 * result + (myAward != null ? myAward.hashCode() : 0); + result = 31 * result + (myCitation != null ? myCitation.hashCode() : 0); + result = 31 * result + (myComment != null ? myComment.hashCode() : 0); + result = 31 * result + (myContentLocation != null ? myContentLocation.hashCode() : 0); + result = 31 * result + (myContentRating != null ? myContentRating.hashCode() : 0); + result = 31 * result + (myContributor != null ? myContributor.hashCode() : 0); + result = 31 * result + (myCopyrightHolder != null ? myCopyrightHolder.hashCode() : 0); + result = 31 * result + (myCopyrightYear != null ? myCopyrightYear.hashCode() : 0); + result = 31 * result + (myCreator != null ? myCreator.hashCode() : 0); + result = 31 * result + (myDateCreated != null ? myDateCreated.hashCode() : 0); + result = 31 * result + (myDateModified != null ? myDateModified.hashCode() : 0); + result = 31 * result + (myDatePublished != null ? myDatePublished.hashCode() : 0); + result = 31 * result + (myDiscussionUrl != null ? myDiscussionUrl.hashCode() : 0); + result = 31 * result + (myEditor != null ? myEditor.hashCode() : 0); + result = 31 * result + (myEducationalAlignment != null ? myEducationalAlignment.hashCode() : 0); + result = 31 * result + (myEducationalUse != null ? myEducationalUse.hashCode() : 0); + result = 31 * result + (myEncoding != null ? myEncoding.hashCode() : 0); + result = 31 * result + (myGenre != null ? myGenre.hashCode() : 0); + result = 31 * result + (myHeadline != null ? myHeadline.hashCode() : 0); + result = 31 * result + (myInLanguage != null ? myInLanguage.hashCode() : 0); + result = 31 * result + (myInteractivityType != null ? myInteractivityType.hashCode() : 0); + result = 31 * result + (myIsBasedOnUrl != null ? myIsBasedOnUrl.hashCode() : 0); + result = 31 * result + (myIsFamilyFriendly != null ? myIsFamilyFriendly.hashCode() : 0); + result = 31 * result + (myKeywords != null ? myKeywords.hashCode() : 0); + result = 31 * result + (myLicense != null ? myLicense.hashCode() : 0); + result = 31 * result + (myLearningResourceType != null ? myLearningResourceType.hashCode() : 0); + result = 31 * result + (myMainEntity != null ? myMainEntity.hashCode() : 0); + result = 31 * result + (myMentions != null ? myMentions.hashCode() : 0); + result = 31 * result + (myOffers != null ? myOffers.hashCode() : 0); + result = 31 * result + (myProducer != null ? myProducer.hashCode() : 0); + result = 31 * result + (myPublication != null ? myPublication.hashCode() : 0); + result = 31 * result + (myPublisher != null ? myPublisher.hashCode() : 0); + result = 31 * result + (myPublishingPrinciples != null ? myPublishingPrinciples.hashCode() : 0); + result = 31 * result + (myRecordedAt != null ? myRecordedAt.hashCode() : 0); + result = 31 * result + (myReview != null ? myReview.hashCode() : 0); + result = 31 * result + (mySourceOrganization != null ? mySourceOrganization.hashCode() : 0); + result = 31 * result + (myText != null ? myText.hashCode() : 0); + result = 31 * result + (myThumbnailUrl != null ? myThumbnailUrl.hashCode() : 0); + result = 31 * result + (myTimeRequired != null ? myTimeRequired.hashCode() : 0); + result = 31 * result + (myTypicalAgeRange != null ? myTypicalAgeRange.hashCode() : 0); + result = 31 * result + (myVersion != null ? myVersion.hashCode() : 0); + result = 31 * result + (myVideo != null ? myVideo.hashCode() : 0); + result = 31 * result + (myProvider != null ? myProvider.hashCode() : 0); + result = 31 * result + (myCommentCount != null ? myCommentCount.hashCode() : 0); + result = 31 * result + (myHasPart != null ? myHasPart.hashCode() : 0); + result = 31 * result + (myWorkExample != null ? myWorkExample.hashCode() : 0); + result = 31 * result + (myExampleOfWork != null ? myExampleOfWork.hashCode() : 0); + result = 31 * result + (myCharacter != null ? myCharacter.hashCode() : 0); + result = 31 * result + (myTranslator != null ? myTranslator.hashCode() : 0); + result = 31 * result + (myReleasedEvent != null ? myReleasedEvent.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CreativeWork creativeWork = (CreativeWork) o; + if (!super.equals(o)) return false; + if (mySchemaVersion != null ? !mySchemaVersion.equals(creativeWork.mySchemaVersion) : creativeWork.mySchemaVersion != null) return false; + if (myAbout != null ? !myAbout.equals(creativeWork.myAbout) : creativeWork.myAbout != null) return false; + if (myAccessibilityAPI != null ? !myAccessibilityAPI.equals(creativeWork.myAccessibilityAPI) : creativeWork.myAccessibilityAPI != null) return false; + if (myAccessibilityControl != null ? !myAccessibilityControl.equals(creativeWork.myAccessibilityControl) : creativeWork.myAccessibilityControl != null) return false; + if (myAccessibilityFeature != null ? !myAccessibilityFeature.equals(creativeWork.myAccessibilityFeature) : creativeWork.myAccessibilityFeature != null) return false; + if (myAccessibilityHazard != null ? !myAccessibilityHazard.equals(creativeWork.myAccessibilityHazard) : creativeWork.myAccessibilityHazard != null) return false; + if (myAccountablePerson != null ? !myAccountablePerson.equals(creativeWork.myAccountablePerson) : creativeWork.myAccountablePerson != null) return false; + if (myAggregateRating != null ? !myAggregateRating.equals(creativeWork.myAggregateRating) : creativeWork.myAggregateRating != null) return false; + if (myAlternativeHeadline != null ? !myAlternativeHeadline.equals(creativeWork.myAlternativeHeadline) : creativeWork.myAlternativeHeadline != null) return false; + if (myAssociatedMedia != null ? !myAssociatedMedia.equals(creativeWork.myAssociatedMedia) : creativeWork.myAssociatedMedia != null) return false; + if (myAudience != null ? !myAudience.equals(creativeWork.myAudience) : creativeWork.myAudience != null) return false; + if (myAudio != null ? !myAudio.equals(creativeWork.myAudio) : creativeWork.myAudio != null) return false; + if (myAuthor != null ? !myAuthor.equals(creativeWork.myAuthor) : creativeWork.myAuthor != null) return false; + if (myAward != null ? !myAward.equals(creativeWork.myAward) : creativeWork.myAward != null) return false; + if (myCitation != null ? !myCitation.equals(creativeWork.myCitation) : creativeWork.myCitation != null) return false; + if (myComment != null ? !myComment.equals(creativeWork.myComment) : creativeWork.myComment != null) return false; + if (myContentLocation != null ? !myContentLocation.equals(creativeWork.myContentLocation) : creativeWork.myContentLocation != null) return false; + if (myContentRating != null ? !myContentRating.equals(creativeWork.myContentRating) : creativeWork.myContentRating != null) return false; + if (myContributor != null ? !myContributor.equals(creativeWork.myContributor) : creativeWork.myContributor != null) return false; + if (myCopyrightHolder != null ? !myCopyrightHolder.equals(creativeWork.myCopyrightHolder) : creativeWork.myCopyrightHolder != null) return false; + if (myCopyrightYear != null ? !myCopyrightYear.equals(creativeWork.myCopyrightYear) : creativeWork.myCopyrightYear != null) return false; + if (myCreator != null ? !myCreator.equals(creativeWork.myCreator) : creativeWork.myCreator != null) return false; + if (myDateCreated != null ? !myDateCreated.equals(creativeWork.myDateCreated) : creativeWork.myDateCreated != null) return false; + if (myDateModified != null ? !myDateModified.equals(creativeWork.myDateModified) : creativeWork.myDateModified != null) return false; + if (myDatePublished != null ? !myDatePublished.equals(creativeWork.myDatePublished) : creativeWork.myDatePublished != null) return false; + if (myDiscussionUrl != null ? !myDiscussionUrl.equals(creativeWork.myDiscussionUrl) : creativeWork.myDiscussionUrl != null) return false; + if (myEditor != null ? !myEditor.equals(creativeWork.myEditor) : creativeWork.myEditor != null) return false; + if (myEducationalAlignment != null ? !myEducationalAlignment.equals(creativeWork.myEducationalAlignment) : creativeWork.myEducationalAlignment != null) return false; + if (myEducationalUse != null ? !myEducationalUse.equals(creativeWork.myEducationalUse) : creativeWork.myEducationalUse != null) return false; + if (myEncoding != null ? !myEncoding.equals(creativeWork.myEncoding) : creativeWork.myEncoding != null) return false; + if (myGenre != null ? !myGenre.equals(creativeWork.myGenre) : creativeWork.myGenre != null) return false; + if (myHeadline != null ? !myHeadline.equals(creativeWork.myHeadline) : creativeWork.myHeadline != null) return false; + if (myInLanguage != null ? !myInLanguage.equals(creativeWork.myInLanguage) : creativeWork.myInLanguage != null) return false; + if (myInteractivityType != null ? !myInteractivityType.equals(creativeWork.myInteractivityType) : creativeWork.myInteractivityType != null) return false; + if (myIsBasedOnUrl != null ? !myIsBasedOnUrl.equals(creativeWork.myIsBasedOnUrl) : creativeWork.myIsBasedOnUrl != null) return false; + if (myIsFamilyFriendly != null ? !myIsFamilyFriendly.equals(creativeWork.myIsFamilyFriendly) : creativeWork.myIsFamilyFriendly != null) return false; + if (myKeywords != null ? !myKeywords.equals(creativeWork.myKeywords) : creativeWork.myKeywords != null) return false; + if (myLicense != null ? !myLicense.equals(creativeWork.myLicense) : creativeWork.myLicense != null) return false; + if (myLearningResourceType != null ? !myLearningResourceType.equals(creativeWork.myLearningResourceType) : creativeWork.myLearningResourceType != null) return false; + if (myMainEntity != null ? !myMainEntity.equals(creativeWork.myMainEntity) : creativeWork.myMainEntity != null) return false; + if (myMentions != null ? !myMentions.equals(creativeWork.myMentions) : creativeWork.myMentions != null) return false; + if (myOffers != null ? !myOffers.equals(creativeWork.myOffers) : creativeWork.myOffers != null) return false; + if (myProducer != null ? !myProducer.equals(creativeWork.myProducer) : creativeWork.myProducer != null) return false; + if (myPublication != null ? !myPublication.equals(creativeWork.myPublication) : creativeWork.myPublication != null) return false; + if (myPublisher != null ? !myPublisher.equals(creativeWork.myPublisher) : creativeWork.myPublisher != null) return false; + if (myPublishingPrinciples != null ? !myPublishingPrinciples.equals(creativeWork.myPublishingPrinciples) : creativeWork.myPublishingPrinciples != null) return false; + if (myRecordedAt != null ? !myRecordedAt.equals(creativeWork.myRecordedAt) : creativeWork.myRecordedAt != null) return false; + if (myReview != null ? !myReview.equals(creativeWork.myReview) : creativeWork.myReview != null) return false; + if (mySourceOrganization != null ? !mySourceOrganization.equals(creativeWork.mySourceOrganization) : creativeWork.mySourceOrganization != null) return false; + if (myText != null ? !myText.equals(creativeWork.myText) : creativeWork.myText != null) return false; + if (myThumbnailUrl != null ? !myThumbnailUrl.equals(creativeWork.myThumbnailUrl) : creativeWork.myThumbnailUrl != null) return false; + if (myTimeRequired != null ? !myTimeRequired.equals(creativeWork.myTimeRequired) : creativeWork.myTimeRequired != null) return false; + if (myTypicalAgeRange != null ? !myTypicalAgeRange.equals(creativeWork.myTypicalAgeRange) : creativeWork.myTypicalAgeRange != null) return false; + if (myVersion != null ? !myVersion.equals(creativeWork.myVersion) : creativeWork.myVersion != null) return false; + if (myVideo != null ? !myVideo.equals(creativeWork.myVideo) : creativeWork.myVideo != null) return false; + if (myProvider != null ? !myProvider.equals(creativeWork.myProvider) : creativeWork.myProvider != null) return false; + if (myCommentCount != null ? !myCommentCount.equals(creativeWork.myCommentCount) : creativeWork.myCommentCount != null) return false; + if (myHasPart != null ? !myHasPart.equals(creativeWork.myHasPart) : creativeWork.myHasPart != null) return false; + if (myWorkExample != null ? !myWorkExample.equals(creativeWork.myWorkExample) : creativeWork.myWorkExample != null) return false; + if (myExampleOfWork != null ? !myExampleOfWork.equals(creativeWork.myExampleOfWork) : creativeWork.myExampleOfWork != null) return false; + if (myCharacter != null ? !myCharacter.equals(creativeWork.myCharacter) : creativeWork.myCharacter != null) return false; + if (myTranslator != null ? !myTranslator.equals(creativeWork.myTranslator) : creativeWork.myTranslator != null) return false; + if (myReleasedEvent != null ? !myReleasedEvent.equals(creativeWork.myReleasedEvent) : creativeWork.myReleasedEvent != null) return false; + return true; + } + private String mySchemaVersion; private Thing myAbout; private String myAccessibilityAPI; diff --git a/src/main/java/org/schema/CreativeWorkOrString.java b/src/main/java/org/schema/CreativeWorkOrString.java index fdc5c999..53b119e0 100644 --- a/src/main/java/org/schema/CreativeWorkOrString.java +++ b/src/main/java/org/schema/CreativeWorkOrString.java @@ -39,4 +39,21 @@ private void clear() { myCreativeWork = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myCreativeWork != null ? myCreativeWork.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CreativeWorkOrString creativeWorkOrString = (CreativeWorkOrString) o; + if (myCreativeWork != null ? !myCreativeWork.equals(creativeWorkOrString.myCreativeWork) : creativeWorkOrString.myCreativeWork != null) return false; + if (myString != null ? !myString.equals(creativeWorkOrString.myString) : creativeWorkOrString.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CreativeWorkSeason.java b/src/main/java/org/schema/CreativeWorkSeason.java index 9acb883a..41cfa378 100644 --- a/src/main/java/org/schema/CreativeWorkSeason.java +++ b/src/main/java/org/schema/CreativeWorkSeason.java @@ -1322,7 +1322,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person actor; @@ -1574,6 +1574,40 @@ protected CreativeWorkSeason(Person actor, Person director, java.util.Date endDa myStartDate = startDate; myTrailer = trailer; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myActor != null ? myActor.hashCode() : 0); + result = 31 * result + (myDirector != null ? myDirector.hashCode() : 0); + result = 31 * result + (myEndDate != null ? myEndDate.hashCode() : 0); + result = 31 * result + (myEpisode != null ? myEpisode.hashCode() : 0); + result = 31 * result + (myNumberOfEpisodes != null ? myNumberOfEpisodes.hashCode() : 0); + result = 31 * result + (myPartOfSeries != null ? myPartOfSeries.hashCode() : 0); + result = 31 * result + (myProductionCompany != null ? myProductionCompany.hashCode() : 0); + result = 31 * result + (mySeasonNumber != null ? mySeasonNumber.hashCode() : 0); + result = 31 * result + (myStartDate != null ? myStartDate.hashCode() : 0); + result = 31 * result + (myTrailer != null ? myTrailer.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CreativeWorkSeason creativeWorkSeason = (CreativeWorkSeason) o; + if (!super.equals(o)) return false; + if (myActor != null ? !myActor.equals(creativeWorkSeason.myActor) : creativeWorkSeason.myActor != null) return false; + if (myDirector != null ? !myDirector.equals(creativeWorkSeason.myDirector) : creativeWorkSeason.myDirector != null) return false; + if (myEndDate != null ? !myEndDate.equals(creativeWorkSeason.myEndDate) : creativeWorkSeason.myEndDate != null) return false; + if (myEpisode != null ? !myEpisode.equals(creativeWorkSeason.myEpisode) : creativeWorkSeason.myEpisode != null) return false; + if (myNumberOfEpisodes != null ? !myNumberOfEpisodes.equals(creativeWorkSeason.myNumberOfEpisodes) : creativeWorkSeason.myNumberOfEpisodes != null) return false; + if (myPartOfSeries != null ? !myPartOfSeries.equals(creativeWorkSeason.myPartOfSeries) : creativeWorkSeason.myPartOfSeries != null) return false; + if (myProductionCompany != null ? !myProductionCompany.equals(creativeWorkSeason.myProductionCompany) : creativeWorkSeason.myProductionCompany != null) return false; + if (mySeasonNumber != null ? !mySeasonNumber.equals(creativeWorkSeason.mySeasonNumber) : creativeWorkSeason.mySeasonNumber != null) return false; + if (myStartDate != null ? !myStartDate.equals(creativeWorkSeason.myStartDate) : creativeWorkSeason.myStartDate != null) return false; + if (myTrailer != null ? !myTrailer.equals(creativeWorkSeason.myTrailer) : creativeWorkSeason.myTrailer != null) return false; + return true; + } + private Person myActor; private Person myDirector; private java.util.Date myEndDate; diff --git a/src/main/java/org/schema/CreativeWorkSeries.java b/src/main/java/org/schema/CreativeWorkSeries.java index 25952032..aee2502c 100644 --- a/src/main/java/org/schema/CreativeWorkSeries.java +++ b/src/main/java/org/schema/CreativeWorkSeries.java @@ -1198,7 +1198,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private java.util.Date endDate; @@ -1421,6 +1421,24 @@ protected CreativeWorkSeries(java.util.Date endDate, java.util.Date startDate, S myEndDate = endDate; myStartDate = startDate; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myEndDate != null ? myEndDate.hashCode() : 0); + result = 31 * result + (myStartDate != null ? myStartDate.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CreativeWorkSeries creativeWorkSeries = (CreativeWorkSeries) o; + if (!super.equals(o)) return false; + if (myEndDate != null ? !myEndDate.equals(creativeWorkSeries.myEndDate) : creativeWorkSeries.myEndDate != null) return false; + if (myStartDate != null ? !myStartDate.equals(creativeWorkSeries.myStartDate) : creativeWorkSeries.myStartDate != null) return false; + return true; + } + private java.util.Date myEndDate; private java.util.Date myStartDate; } diff --git a/src/main/java/org/schema/CreditCard.java b/src/main/java/org/schema/CreditCard.java index d1543e63..5932b2e4 100644 --- a/src/main/java/org/schema/CreditCard.java +++ b/src/main/java/org/schema/CreditCard.java @@ -257,7 +257,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -293,4 +293,18 @@ public interface Builder extends ThingBuilder { protected CreditCard(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CreditCard creditCard = (CreditCard) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Crematorium.java b/src/main/java/org/schema/Crematorium.java index b56c1a91..765e6ba4 100644 --- a/src/main/java/org/schema/Crematorium.java +++ b/src/main/java/org/schema/Crematorium.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected Crematorium(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Crematorium crematorium = (Crematorium) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/CrossSectional.java b/src/main/java/org/schema/CrossSectional.java index b0c17199..94221f02 100644 --- a/src/main/java/org/schema/CrossSectional.java +++ b/src/main/java/org/schema/CrossSectional.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected CrossSectional() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CrossSectional crossSectional = (CrossSectional) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DDxElement.java b/src/main/java/org/schema/DDxElement.java index fa4e99ea..4f263219 100644 --- a/src/main/java/org/schema/DDxElement.java +++ b/src/main/java/org/schema/DDxElement.java @@ -341,7 +341,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalCondition diagnosis; @@ -398,6 +398,24 @@ protected DDxElement(MedicalCondition diagnosis, MedicalSignOrSymptom distinguis myDiagnosis = diagnosis; myDistinguishingSign = distinguishingSign; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDiagnosis != null ? myDiagnosis.hashCode() : 0); + result = 31 * result + (myDistinguishingSign != null ? myDistinguishingSign.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DDxElement dDxElement = (DDxElement) o; + if (!super.equals(o)) return false; + if (myDiagnosis != null ? !myDiagnosis.equals(dDxElement.myDiagnosis) : dDxElement.myDiagnosis != null) return false; + if (myDistinguishingSign != null ? !myDistinguishingSign.equals(dDxElement.myDistinguishingSign) : dDxElement.myDistinguishingSign != null) return false; + return true; + } + private MedicalCondition myDiagnosis; private MedicalSignOrSymptom myDistinguishingSign; } diff --git a/src/main/java/org/schema/DJMixAlbum.java b/src/main/java/org/schema/DJMixAlbum.java index 31406c57..7789dc7f 100644 --- a/src/main/java/org/schema/DJMixAlbum.java +++ b/src/main/java/org/schema/DJMixAlbum.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected DJMixAlbum() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DJMixAlbum dJMixAlbum = (DJMixAlbum) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DVDFormat.java b/src/main/java/org/schema/DVDFormat.java index 4c5f095a..5c3aae8f 100644 --- a/src/main/java/org/schema/DVDFormat.java +++ b/src/main/java/org/schema/DVDFormat.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected DVDFormat() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DVDFormat dVDFormat = (DVDFormat) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DamagedCondition.java b/src/main/java/org/schema/DamagedCondition.java index f045fca3..fa0ff3fc 100644 --- a/src/main/java/org/schema/DamagedCondition.java +++ b/src/main/java/org/schema/DamagedCondition.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected DamagedCondition() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DamagedCondition damagedCondition = (DamagedCondition) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DanceEvent.java b/src/main/java/org/schema/DanceEvent.java index d28dbbcb..0bbbe6fa 100644 --- a/src/main/java/org/schema/DanceEvent.java +++ b/src/main/java/org/schema/DanceEvent.java @@ -496,7 +496,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -583,4 +583,18 @@ public interface Builder extends ThingBuilder { protected DanceEvent(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DanceEvent danceEvent = (DanceEvent) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DanceGroup.java b/src/main/java/org/schema/DanceGroup.java index a9199ca7..182216ec 100644 --- a/src/main/java/org/schema/DanceGroup.java +++ b/src/main/java/org/schema/DanceGroup.java @@ -660,7 +660,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -783,4 +783,18 @@ public interface Builder extends ThingBuilder { protected DanceGroup(PostalAddress address, AggregateRating aggregateRating, String award, BrandOrOrganization brand, ContactPoint contactPoint, Organization department, String duns, String email, Person employee, Event event, String faxNumber, Person founder, java.util.Date dissolutionDate, java.util.Date foundingDate, String globalLocationNumber, Place hasPOS, String isicV4, String legalName, ImageObjectOrString logo, Offer makesOffer, OrganizationOrPerson member, OrganizationOrProgramMembership memberOf, String naics, QuantitativeValue numberOfEmployees, OwnershipInfoOrProduct owns, Review review, Demand seeks, Organization subOrganization, String taxID, String telephone, String vatID, Place foundingLocation, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, award, brand, contactPoint, department, duns, email, employee, event, faxNumber, founder, dissolutionDate, foundingDate, globalLocationNumber, hasPOS, isicV4, legalName, logo, makesOffer, member, memberOf, naics, numberOfEmployees, owns, review, seeks, subOrganization, taxID, telephone, vatID, foundingLocation, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DanceGroup danceGroup = (DanceGroup) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DataCatalog.java b/src/main/java/org/schema/DataCatalog.java index d29f4fde..df310214 100644 --- a/src/main/java/org/schema/DataCatalog.java +++ b/src/main/java/org/schema/DataCatalog.java @@ -1168,7 +1168,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Dataset dataset; @@ -1389,5 +1389,21 @@ protected DataCatalog(Dataset dataset, String schemaVersion, Thing about, String super(schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myDataset = dataset; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDataset != null ? myDataset.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DataCatalog dataCatalog = (DataCatalog) o; + if (!super.equals(o)) return false; + if (myDataset != null ? !myDataset.equals(dataCatalog.myDataset) : dataCatalog.myDataset != null) return false; + return true; + } + private Dataset myDataset; } diff --git a/src/main/java/org/schema/DataDownload.java b/src/main/java/org/schema/DataDownload.java index 3e120956..79876945 100644 --- a/src/main/java/org/schema/DataDownload.java +++ b/src/main/java/org/schema/DataDownload.java @@ -1350,7 +1350,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private NewsArticle associatedArticle; @@ -1610,4 +1610,18 @@ public interface Builder extends ThingBuilder { protected DataDownload(NewsArticle associatedArticle, String bitrate, String contentSize, String contentUrl, Duration duration, String embedUrl, CreativeWork encodesCreativeWork, String encodingFormat, java.util.Date expires, DistanceOrQuantitativeValue height, String playerType, Organization productionCompany, Place regionsAllowed, Boolean requiresSubscription, java.util.Date uploadDate, DistanceOrQuantitativeValue width, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(associatedArticle, bitrate, contentSize, contentUrl, duration, embedUrl, encodesCreativeWork, encodingFormat, expires, height, playerType, productionCompany, regionsAllowed, requiresSubscription, uploadDate, width, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DataDownload dataDownload = (DataDownload) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DataType.java b/src/main/java/org/schema/DataType.java deleted file mode 100644 index 88579ee1..00000000 --- a/src/main/java/org/schema/DataType.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2015-2016 JetBrains s.r.o. - * - * 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. - * - * This is auto-generated file. Do not edit. - */ - -package org.schema; - -import com.fasterxml.jackson.databind.annotation.*; -import com.fasterxml.jackson.annotation.*; -import org.jetbrains.annotations.*; - -/** - * The basic data types such as Integers, Strings, etc. - */ -public class DataType { - /** - * Builder for {@link DataType} - */ - static final class DataTypeThingBuilder implements Builder { - /** - * Creates new {@link DataType} instance. - */ - public DataType build() { - return new DataType(); - } - - @Override public void fromMap(java.util.Map map) { - for (java.util.Map.Entry entry : map.entrySet()) { - final String key = entry.getKey(); - Object value = entry.getValue(); - if (value instanceof java.util.Map) { value = ThingDeserializer.fromMap((java.util.Map)value); } - - } - } - } - public interface Builder extends ThingBuilder { - - } - - protected DataType() { - super(); - } -} diff --git a/src/main/java/org/schema/Dataset.java b/src/main/java/org/schema/Dataset.java index bd7b4bbd..330a4533 100644 --- a/src/main/java/org/schema/Dataset.java +++ b/src/main/java/org/schema/Dataset.java @@ -1223,7 +1223,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private DataCatalog includedDataCatalog; @@ -1455,6 +1455,28 @@ protected Dataset(DataCatalog includedDataCatalog, DataDownload distribution, Pl mySpatial = spatial; myDatasetTimeInterval = datasetTimeInterval; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myIncludedDataCatalog != null ? myIncludedDataCatalog.hashCode() : 0); + result = 31 * result + (myDistribution != null ? myDistribution.hashCode() : 0); + result = 31 * result + (mySpatial != null ? mySpatial.hashCode() : 0); + result = 31 * result + (myDatasetTimeInterval != null ? myDatasetTimeInterval.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Dataset dataset = (Dataset) o; + if (!super.equals(o)) return false; + if (myIncludedDataCatalog != null ? !myIncludedDataCatalog.equals(dataset.myIncludedDataCatalog) : dataset.myIncludedDataCatalog != null) return false; + if (myDistribution != null ? !myDistribution.equals(dataset.myDistribution) : dataset.myDistribution != null) return false; + if (mySpatial != null ? !mySpatial.equals(dataset.mySpatial) : dataset.mySpatial != null) return false; + if (myDatasetTimeInterval != null ? !myDatasetTimeInterval.equals(dataset.myDatasetTimeInterval) : dataset.myDatasetTimeInterval != null) return false; + return true; + } + private DataCatalog myIncludedDataCatalog; private DataDownload myDistribution; private Place mySpatial; diff --git a/src/main/java/org/schema/DatasetClass.java b/src/main/java/org/schema/DatasetClass.java index 3e4ccfd4..aca81e81 100644 --- a/src/main/java/org/schema/DatasetClass.java +++ b/src/main/java/org/schema/DatasetClass.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected DatasetClass() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DatasetClass datasetClass = (DatasetClass) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DatedMoneySpecification.java b/src/main/java/org/schema/DatedMoneySpecification.java index 6cc5e0cc..0a72a99d 100644 --- a/src/main/java/org/schema/DatedMoneySpecification.java +++ b/src/main/java/org/schema/DatedMoneySpecification.java @@ -311,7 +311,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Number amount; @@ -358,6 +358,28 @@ protected DatedMoneySpecification(Number amount, String currency, java.util.Date myStartDate = startDate; myEndDate = endDate; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAmount != null ? myAmount.hashCode() : 0); + result = 31 * result + (myCurrency != null ? myCurrency.hashCode() : 0); + result = 31 * result + (myStartDate != null ? myStartDate.hashCode() : 0); + result = 31 * result + (myEndDate != null ? myEndDate.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DatedMoneySpecification datedMoneySpecification = (DatedMoneySpecification) o; + if (!super.equals(o)) return false; + if (myAmount != null ? !myAmount.equals(datedMoneySpecification.myAmount) : datedMoneySpecification.myAmount != null) return false; + if (myCurrency != null ? !myCurrency.equals(datedMoneySpecification.myCurrency) : datedMoneySpecification.myCurrency != null) return false; + if (myStartDate != null ? !myStartDate.equals(datedMoneySpecification.myStartDate) : datedMoneySpecification.myStartDate != null) return false; + if (myEndDate != null ? !myEndDate.equals(datedMoneySpecification.myEndDate) : datedMoneySpecification.myEndDate != null) return false; + return true; + } + private Number myAmount; private String myCurrency; private java.util.Date myStartDate; diff --git a/src/main/java/org/schema/DayOfWeek.java b/src/main/java/org/schema/DayOfWeek.java index 23d948ea..3a651aac 100644 --- a/src/main/java/org/schema/DayOfWeek.java +++ b/src/main/java/org/schema/DayOfWeek.java @@ -259,7 +259,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -295,4 +295,18 @@ public interface Builder extends ThingBuilder { protected DayOfWeek(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DayOfWeek dayOfWeek = (DayOfWeek) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DaySpa.java b/src/main/java/org/schema/DaySpa.java index ce8bfc83..2c715b0a 100644 --- a/src/main/java/org/schema/DaySpa.java +++ b/src/main/java/org/schema/DaySpa.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected DaySpa(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DaySpa daySpa = (DaySpa) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DeactivateAction.java b/src/main/java/org/schema/DeactivateAction.java index faa80247..b067b753 100644 --- a/src/main/java/org/schema/DeactivateAction.java +++ b/src/main/java/org/schema/DeactivateAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected DeactivateAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DeactivateAction deactivateAction = (DeactivateAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DefenceEstablishment.java b/src/main/java/org/schema/DefenceEstablishment.java index e8ef254c..5a65477f 100644 --- a/src/main/java/org/schema/DefenceEstablishment.java +++ b/src/main/java/org/schema/DefenceEstablishment.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected DefenceEstablishment(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DefenceEstablishment defenceEstablishment = (DefenceEstablishment) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DeleteAction.java b/src/main/java/org/schema/DeleteAction.java index 54360ced..be7b90c3 100644 --- a/src/main/java/org/schema/DeleteAction.java +++ b/src/main/java/org/schema/DeleteAction.java @@ -322,7 +322,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Thing targetCollection; @@ -374,4 +374,18 @@ public interface Builder extends ThingBuilder { protected DeleteAction(Thing targetCollection, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(targetCollection, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DeleteAction deleteAction = (DeleteAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DeliveryChargeSpecification.java b/src/main/java/org/schema/DeliveryChargeSpecification.java index 96effff9..405f015b 100644 --- a/src/main/java/org/schema/DeliveryChargeSpecification.java +++ b/src/main/java/org/schema/DeliveryChargeSpecification.java @@ -269,9 +269,93 @@ public DeliveryChargeSpecification build() { */ - @NotNull public Builder price(@NotNull Number number) { - if (this.price == null) this.price = new NumberOrString(); - this.price.setNumber(number); + @NotNull public Builder price(@NotNull Integer integer) { + if (this.price == null) this.price = new Number(); + this.price.setInteger(integer); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Long price) { + if (this.price == null) this.price = new Number(); + this.price.setLong(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Float price) { + if (this.price == null) this.price = new Number(); + this.price.setFloat(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Double price) { + if (this.price == null) this.price = new Number(); + this.price.setDouble(price); return this; } /** @@ -298,7 +382,7 @@ public DeliveryChargeSpecification build() { */ @NotNull public Builder price(@NotNull String price) { - if (this.price == null) this.price = new NumberOrString(); + if (this.price == null) this.price = new Number(); this.price.setString(price); return this; } @@ -520,7 +604,10 @@ public Builder id(long id) { if ("minPrice".equals(key) && value instanceof Float) { minPrice((Float)value); continue; } if ("minPrice".equals(key) && value instanceof Double) { minPrice((Double)value); continue; } if ("minPrice".equals(key) && value instanceof String) { minPrice((String)value); continue; } - if ("price".equals(key) && value instanceof Number) { price((Number)value); continue; } + if ("price".equals(key) && value instanceof Integer) { price((Integer)value); continue; } + if ("price".equals(key) && value instanceof Long) { price((Long)value); continue; } + if ("price".equals(key) && value instanceof Float) { price((Float)value); continue; } + if ("price".equals(key) && value instanceof Double) { price((Double)value); continue; } if ("price".equals(key) && value instanceof String) { price((String)value); continue; } if ("validFrom".equals(key) && value instanceof java.util.Date) { validFrom((java.util.Date)value); continue; } if ("validThrough".equals(key) && value instanceof java.util.Date) { validThrough((java.util.Date)value); continue; } @@ -535,7 +622,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private DeliveryMethod appliesToDeliveryMethod; @@ -545,7 +632,7 @@ public Builder id(long id) { private PriceSpecification eligibleTransactionVolume; private Number maxPrice; private Number minPrice; - private NumberOrString price; + private Number price; private java.util.Date validFrom; private java.util.Date validThrough; private Boolean valueAddedTaxIncluded; @@ -587,7 +674,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder minPrice(@NotNull Float minPrice); @NotNull Builder minPrice(@NotNull Double minPrice); @NotNull Builder minPrice(@NotNull String minPrice); - @NotNull Builder price(@NotNull Number number); + @NotNull Builder price(@NotNull Integer integer); + @NotNull Builder price(@NotNull Long price); + @NotNull Builder price(@NotNull Float price); + @NotNull Builder price(@NotNull Double price); @NotNull Builder price(@NotNull String price); @NotNull Builder validFrom(@NotNull java.util.Date date); @NotNull Builder validThrough(@NotNull java.util.Date date); @@ -607,12 +697,32 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected DeliveryChargeSpecification(DeliveryMethod appliesToDeliveryMethod, GeoShapeOrPlaceOrString eligibleRegion, GeoShapeOrPlaceOrString ineligibleRegion, QuantitativeValue eligibleQuantity, PriceSpecification eligibleTransactionVolume, Number maxPrice, Number minPrice, NumberOrString price, java.util.Date validFrom, java.util.Date validThrough, Boolean valueAddedTaxIncluded, String priceCurrency, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected DeliveryChargeSpecification(DeliveryMethod appliesToDeliveryMethod, GeoShapeOrPlaceOrString eligibleRegion, GeoShapeOrPlaceOrString ineligibleRegion, QuantitativeValue eligibleQuantity, PriceSpecification eligibleTransactionVolume, Number maxPrice, Number minPrice, Number price, java.util.Date validFrom, java.util.Date validThrough, Boolean valueAddedTaxIncluded, String priceCurrency, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(eligibleQuantity, eligibleTransactionVolume, maxPrice, minPrice, price, validFrom, validThrough, valueAddedTaxIncluded, priceCurrency, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myAppliesToDeliveryMethod = appliesToDeliveryMethod; myEligibleRegion = eligibleRegion; myIneligibleRegion = ineligibleRegion; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAppliesToDeliveryMethod != null ? myAppliesToDeliveryMethod.hashCode() : 0); + result = 31 * result + (myEligibleRegion != null ? myEligibleRegion.hashCode() : 0); + result = 31 * result + (myIneligibleRegion != null ? myIneligibleRegion.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DeliveryChargeSpecification deliveryChargeSpecification = (DeliveryChargeSpecification) o; + if (!super.equals(o)) return false; + if (myAppliesToDeliveryMethod != null ? !myAppliesToDeliveryMethod.equals(deliveryChargeSpecification.myAppliesToDeliveryMethod) : deliveryChargeSpecification.myAppliesToDeliveryMethod != null) return false; + if (myEligibleRegion != null ? !myEligibleRegion.equals(deliveryChargeSpecification.myEligibleRegion) : deliveryChargeSpecification.myEligibleRegion != null) return false; + if (myIneligibleRegion != null ? !myIneligibleRegion.equals(deliveryChargeSpecification.myIneligibleRegion) : deliveryChargeSpecification.myIneligibleRegion != null) return false; + return true; + } + private DeliveryMethod myAppliesToDeliveryMethod; private GeoShapeOrPlaceOrString myEligibleRegion; private GeoShapeOrPlaceOrString myIneligibleRegion; diff --git a/src/main/java/org/schema/DeliveryEvent.java b/src/main/java/org/schema/DeliveryEvent.java index c9fc9752..6585115e 100644 --- a/src/main/java/org/schema/DeliveryEvent.java +++ b/src/main/java/org/schema/DeliveryEvent.java @@ -560,7 +560,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String accessCode; @@ -660,6 +660,28 @@ protected DeliveryEvent(String accessCode, java.util.Date availableFrom, java.ut myAvailableThrough = availableThrough; myHasDeliveryMethod = hasDeliveryMethod; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAccessCode != null ? myAccessCode.hashCode() : 0); + result = 31 * result + (myAvailableFrom != null ? myAvailableFrom.hashCode() : 0); + result = 31 * result + (myAvailableThrough != null ? myAvailableThrough.hashCode() : 0); + result = 31 * result + (myHasDeliveryMethod != null ? myHasDeliveryMethod.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DeliveryEvent deliveryEvent = (DeliveryEvent) o; + if (!super.equals(o)) return false; + if (myAccessCode != null ? !myAccessCode.equals(deliveryEvent.myAccessCode) : deliveryEvent.myAccessCode != null) return false; + if (myAvailableFrom != null ? !myAvailableFrom.equals(deliveryEvent.myAvailableFrom) : deliveryEvent.myAvailableFrom != null) return false; + if (myAvailableThrough != null ? !myAvailableThrough.equals(deliveryEvent.myAvailableThrough) : deliveryEvent.myAvailableThrough != null) return false; + if (myHasDeliveryMethod != null ? !myHasDeliveryMethod.equals(deliveryEvent.myHasDeliveryMethod) : deliveryEvent.myHasDeliveryMethod != null) return false; + return true; + } + private String myAccessCode; private java.util.Date myAvailableFrom; private java.util.Date myAvailableThrough; diff --git a/src/main/java/org/schema/DeliveryMethod.java b/src/main/java/org/schema/DeliveryMethod.java index 6228b803..ab044deb 100644 --- a/src/main/java/org/schema/DeliveryMethod.java +++ b/src/main/java/org/schema/DeliveryMethod.java @@ -259,7 +259,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -295,4 +295,18 @@ public interface Builder extends ThingBuilder { protected DeliveryMethod(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DeliveryMethod deliveryMethod = (DeliveryMethod) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Demand.java b/src/main/java/org/schema/Demand.java index 5f1f0f73..14d97a16 100644 --- a/src/main/java/org/schema/Demand.java +++ b/src/main/java/org/schema/Demand.java @@ -805,7 +805,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PaymentMethod acceptedPaymentMethod; @@ -951,6 +951,80 @@ protected Demand(PaymentMethod acceptedPaymentMethod, QuantitativeValue advanceB myValidThrough = validThrough; myWarranty = warranty; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAcceptedPaymentMethod != null ? myAcceptedPaymentMethod.hashCode() : 0); + result = 31 * result + (myAdvanceBookingRequirement != null ? myAdvanceBookingRequirement.hashCode() : 0); + result = 31 * result + (myAvailability != null ? myAvailability.hashCode() : 0); + result = 31 * result + (myAvailabilityEnds != null ? myAvailabilityEnds.hashCode() : 0); + result = 31 * result + (myAvailabilityStarts != null ? myAvailabilityStarts.hashCode() : 0); + result = 31 * result + (myAvailableAtOrFrom != null ? myAvailableAtOrFrom.hashCode() : 0); + result = 31 * result + (myAvailableDeliveryMethod != null ? myAvailableDeliveryMethod.hashCode() : 0); + result = 31 * result + (myBusinessFunction != null ? myBusinessFunction.hashCode() : 0); + result = 31 * result + (myDeliveryLeadTime != null ? myDeliveryLeadTime.hashCode() : 0); + result = 31 * result + (myEligibleCustomerType != null ? myEligibleCustomerType.hashCode() : 0); + result = 31 * result + (myEligibleDuration != null ? myEligibleDuration.hashCode() : 0); + result = 31 * result + (myEligibleQuantity != null ? myEligibleQuantity.hashCode() : 0); + result = 31 * result + (myEligibleRegion != null ? myEligibleRegion.hashCode() : 0); + result = 31 * result + (myIneligibleRegion != null ? myIneligibleRegion.hashCode() : 0); + result = 31 * result + (myEligibleTransactionVolume != null ? myEligibleTransactionVolume.hashCode() : 0); + result = 31 * result + (myGtin12 != null ? myGtin12.hashCode() : 0); + result = 31 * result + (myGtin13 != null ? myGtin13.hashCode() : 0); + result = 31 * result + (myGtin14 != null ? myGtin14.hashCode() : 0); + result = 31 * result + (myGtin8 != null ? myGtin8.hashCode() : 0); + result = 31 * result + (myIncludesObject != null ? myIncludesObject.hashCode() : 0); + result = 31 * result + (myInventoryLevel != null ? myInventoryLevel.hashCode() : 0); + result = 31 * result + (myItemCondition != null ? myItemCondition.hashCode() : 0); + result = 31 * result + (myItemOffered != null ? myItemOffered.hashCode() : 0); + result = 31 * result + (myMpn != null ? myMpn.hashCode() : 0); + result = 31 * result + (myPriceSpecification != null ? myPriceSpecification.hashCode() : 0); + result = 31 * result + (mySeller != null ? mySeller.hashCode() : 0); + result = 31 * result + (mySku != null ? mySku.hashCode() : 0); + result = 31 * result + (myValidFrom != null ? myValidFrom.hashCode() : 0); + result = 31 * result + (myValidThrough != null ? myValidThrough.hashCode() : 0); + result = 31 * result + (myWarranty != null ? myWarranty.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Demand demand = (Demand) o; + if (!super.equals(o)) return false; + if (myAcceptedPaymentMethod != null ? !myAcceptedPaymentMethod.equals(demand.myAcceptedPaymentMethod) : demand.myAcceptedPaymentMethod != null) return false; + if (myAdvanceBookingRequirement != null ? !myAdvanceBookingRequirement.equals(demand.myAdvanceBookingRequirement) : demand.myAdvanceBookingRequirement != null) return false; + if (myAvailability != null ? !myAvailability.equals(demand.myAvailability) : demand.myAvailability != null) return false; + if (myAvailabilityEnds != null ? !myAvailabilityEnds.equals(demand.myAvailabilityEnds) : demand.myAvailabilityEnds != null) return false; + if (myAvailabilityStarts != null ? !myAvailabilityStarts.equals(demand.myAvailabilityStarts) : demand.myAvailabilityStarts != null) return false; + if (myAvailableAtOrFrom != null ? !myAvailableAtOrFrom.equals(demand.myAvailableAtOrFrom) : demand.myAvailableAtOrFrom != null) return false; + if (myAvailableDeliveryMethod != null ? !myAvailableDeliveryMethod.equals(demand.myAvailableDeliveryMethod) : demand.myAvailableDeliveryMethod != null) return false; + if (myBusinessFunction != null ? !myBusinessFunction.equals(demand.myBusinessFunction) : demand.myBusinessFunction != null) return false; + if (myDeliveryLeadTime != null ? !myDeliveryLeadTime.equals(demand.myDeliveryLeadTime) : demand.myDeliveryLeadTime != null) return false; + if (myEligibleCustomerType != null ? !myEligibleCustomerType.equals(demand.myEligibleCustomerType) : demand.myEligibleCustomerType != null) return false; + if (myEligibleDuration != null ? !myEligibleDuration.equals(demand.myEligibleDuration) : demand.myEligibleDuration != null) return false; + if (myEligibleQuantity != null ? !myEligibleQuantity.equals(demand.myEligibleQuantity) : demand.myEligibleQuantity != null) return false; + if (myEligibleRegion != null ? !myEligibleRegion.equals(demand.myEligibleRegion) : demand.myEligibleRegion != null) return false; + if (myIneligibleRegion != null ? !myIneligibleRegion.equals(demand.myIneligibleRegion) : demand.myIneligibleRegion != null) return false; + if (myEligibleTransactionVolume != null ? !myEligibleTransactionVolume.equals(demand.myEligibleTransactionVolume) : demand.myEligibleTransactionVolume != null) return false; + if (myGtin12 != null ? !myGtin12.equals(demand.myGtin12) : demand.myGtin12 != null) return false; + if (myGtin13 != null ? !myGtin13.equals(demand.myGtin13) : demand.myGtin13 != null) return false; + if (myGtin14 != null ? !myGtin14.equals(demand.myGtin14) : demand.myGtin14 != null) return false; + if (myGtin8 != null ? !myGtin8.equals(demand.myGtin8) : demand.myGtin8 != null) return false; + if (myIncludesObject != null ? !myIncludesObject.equals(demand.myIncludesObject) : demand.myIncludesObject != null) return false; + if (myInventoryLevel != null ? !myInventoryLevel.equals(demand.myInventoryLevel) : demand.myInventoryLevel != null) return false; + if (myItemCondition != null ? !myItemCondition.equals(demand.myItemCondition) : demand.myItemCondition != null) return false; + if (myItemOffered != null ? !myItemOffered.equals(demand.myItemOffered) : demand.myItemOffered != null) return false; + if (myMpn != null ? !myMpn.equals(demand.myMpn) : demand.myMpn != null) return false; + if (myPriceSpecification != null ? !myPriceSpecification.equals(demand.myPriceSpecification) : demand.myPriceSpecification != null) return false; + if (mySeller != null ? !mySeller.equals(demand.mySeller) : demand.mySeller != null) return false; + if (mySku != null ? !mySku.equals(demand.mySku) : demand.mySku != null) return false; + if (myValidFrom != null ? !myValidFrom.equals(demand.myValidFrom) : demand.myValidFrom != null) return false; + if (myValidThrough != null ? !myValidThrough.equals(demand.myValidThrough) : demand.myValidThrough != null) return false; + if (myWarranty != null ? !myWarranty.equals(demand.myWarranty) : demand.myWarranty != null) return false; + return true; + } + private PaymentMethod myAcceptedPaymentMethod; private QuantitativeValue myAdvanceBookingRequirement; private ItemAvailability myAvailability; diff --git a/src/main/java/org/schema/DemoAlbum.java b/src/main/java/org/schema/DemoAlbum.java index 5f6096e5..2b0285db 100644 --- a/src/main/java/org/schema/DemoAlbum.java +++ b/src/main/java/org/schema/DemoAlbum.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected DemoAlbum() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DemoAlbum demoAlbum = (DemoAlbum) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Dentist.java b/src/main/java/org/schema/Dentist.java index 644ad375..e92127a2 100644 --- a/src/main/java/org/schema/Dentist.java +++ b/src/main/java/org/schema/Dentist.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected Dentist(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Dentist dentist = (Dentist) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Dentistry.java b/src/main/java/org/schema/Dentistry.java index 7bc756bd..0697db08 100644 --- a/src/main/java/org/schema/Dentistry.java +++ b/src/main/java/org/schema/Dentistry.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Dentistry() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Dentistry dentistry = (Dentistry) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DepartAction.java b/src/main/java/org/schema/DepartAction.java index ab1e2374..f9776eff 100644 --- a/src/main/java/org/schema/DepartAction.java +++ b/src/main/java/org/schema/DepartAction.java @@ -336,7 +336,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Place fromLocation; @@ -391,4 +391,18 @@ public interface Builder extends ThingBuilder { protected DepartAction(Place fromLocation, Place toLocation, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(fromLocation, toLocation, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DepartAction departAction = (DepartAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DepartmentStore.java b/src/main/java/org/schema/DepartmentStore.java index 284a1e31..aa57e6ef 100644 --- a/src/main/java/org/schema/DepartmentStore.java +++ b/src/main/java/org/schema/DepartmentStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected DepartmentStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DepartmentStore departmentStore = (DepartmentStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Dermatologic.java b/src/main/java/org/schema/Dermatologic.java index 3984a2b7..5ddf48c5 100644 --- a/src/main/java/org/schema/Dermatologic.java +++ b/src/main/java/org/schema/Dermatologic.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Dermatologic() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Dermatologic dermatologic = (Dermatologic) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Diagnostic.java b/src/main/java/org/schema/Diagnostic.java index 889e1fd9..483eac8e 100644 --- a/src/main/java/org/schema/Diagnostic.java +++ b/src/main/java/org/schema/Diagnostic.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Diagnostic() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Diagnostic diagnostic = (Diagnostic) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DiagnosticLab.java b/src/main/java/org/schema/DiagnosticLab.java index 0442d3d2..58d5ae4d 100644 --- a/src/main/java/org/schema/DiagnosticLab.java +++ b/src/main/java/org/schema/DiagnosticLab.java @@ -526,7 +526,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalTest availableTest; @@ -619,5 +619,21 @@ protected DiagnosticLab(MedicalTest availableTest, Organization parentOrganizati super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myAvailableTest = availableTest; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAvailableTest != null ? myAvailableTest.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DiagnosticLab diagnosticLab = (DiagnosticLab) o; + if (!super.equals(o)) return false; + if (myAvailableTest != null ? !myAvailableTest.equals(diagnosticLab.myAvailableTest) : diagnosticLab.myAvailableTest != null) return false; + return true; + } + private MedicalTest myAvailableTest; } diff --git a/src/main/java/org/schema/DiagnosticProcedure.java b/src/main/java/org/schema/DiagnosticProcedure.java index e3ff8d34..73e1e4ef 100644 --- a/src/main/java/org/schema/DiagnosticProcedure.java +++ b/src/main/java/org/schema/DiagnosticProcedure.java @@ -365,7 +365,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Drug affectedBy; @@ -428,4 +428,18 @@ public interface Builder extends ThingBuilder { protected DiagnosticProcedure(Drug affectedBy, String normalRange, MedicalSign signDetected, MedicalCondition usedToDiagnose, MedicalDevice usesDevice, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(affectedBy, normalRange, signDetected, usedToDiagnose, usesDevice, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DiagnosticProcedure diagnosticProcedure = (DiagnosticProcedure) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Diet.java b/src/main/java/org/schema/Diet.java index c136c27b..468bc857 100644 --- a/src/main/java/org/schema/Diet.java +++ b/src/main/java/org/schema/Diet.java @@ -491,7 +491,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String dietFeatures; @@ -579,6 +579,34 @@ protected Diet(String dietFeatures, OrganizationOrPerson endorsers, String exper myProprietaryName = proprietaryName; myRisks = risks; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDietFeatures != null ? myDietFeatures.hashCode() : 0); + result = 31 * result + (myEndorsers != null ? myEndorsers.hashCode() : 0); + result = 31 * result + (myExpertConsiderations != null ? myExpertConsiderations.hashCode() : 0); + result = 31 * result + (myOverview != null ? myOverview.hashCode() : 0); + result = 31 * result + (myPhysiologicalBenefits != null ? myPhysiologicalBenefits.hashCode() : 0); + result = 31 * result + (myProprietaryName != null ? myProprietaryName.hashCode() : 0); + result = 31 * result + (myRisks != null ? myRisks.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Diet diet = (Diet) o; + if (!super.equals(o)) return false; + if (myDietFeatures != null ? !myDietFeatures.equals(diet.myDietFeatures) : diet.myDietFeatures != null) return false; + if (myEndorsers != null ? !myEndorsers.equals(diet.myEndorsers) : diet.myEndorsers != null) return false; + if (myExpertConsiderations != null ? !myExpertConsiderations.equals(diet.myExpertConsiderations) : diet.myExpertConsiderations != null) return false; + if (myOverview != null ? !myOverview.equals(diet.myOverview) : diet.myOverview != null) return false; + if (myPhysiologicalBenefits != null ? !myPhysiologicalBenefits.equals(diet.myPhysiologicalBenefits) : diet.myPhysiologicalBenefits != null) return false; + if (myProprietaryName != null ? !myProprietaryName.equals(diet.myProprietaryName) : diet.myProprietaryName != null) return false; + if (myRisks != null ? !myRisks.equals(diet.myRisks) : diet.myRisks != null) return false; + return true; + } + private String myDietFeatures; private OrganizationOrPerson myEndorsers; private String myExpertConsiderations; diff --git a/src/main/java/org/schema/DietNutrition.java b/src/main/java/org/schema/DietNutrition.java index 34829a3c..7015d1b0 100644 --- a/src/main/java/org/schema/DietNutrition.java +++ b/src/main/java/org/schema/DietNutrition.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected DietNutrition() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DietNutrition dietNutrition = (DietNutrition) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DietarySupplement.java b/src/main/java/org/schema/DietarySupplement.java index 0bd56afd..12618dd1 100644 --- a/src/main/java/org/schema/DietarySupplement.java +++ b/src/main/java/org/schema/DietarySupplement.java @@ -563,7 +563,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String activeIngredient; @@ -667,6 +667,44 @@ protected DietarySupplement(String activeIngredient, String background, String d mySafetyConsideration = safetyConsideration; myTargetPopulation = targetPopulation; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myActiveIngredient != null ? myActiveIngredient.hashCode() : 0); + result = 31 * result + (myBackground != null ? myBackground.hashCode() : 0); + result = 31 * result + (myDosageForm != null ? myDosageForm.hashCode() : 0); + result = 31 * result + (myIsProprietary != null ? myIsProprietary.hashCode() : 0); + result = 31 * result + (myLegalStatus != null ? myLegalStatus.hashCode() : 0); + result = 31 * result + (myManufacturer != null ? myManufacturer.hashCode() : 0); + result = 31 * result + (myMaximumIntake != null ? myMaximumIntake.hashCode() : 0); + result = 31 * result + (myMechanismOfAction != null ? myMechanismOfAction.hashCode() : 0); + result = 31 * result + (myNonProprietaryName != null ? myNonProprietaryName.hashCode() : 0); + result = 31 * result + (myRecommendedIntake != null ? myRecommendedIntake.hashCode() : 0); + result = 31 * result + (mySafetyConsideration != null ? mySafetyConsideration.hashCode() : 0); + result = 31 * result + (myTargetPopulation != null ? myTargetPopulation.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DietarySupplement dietarySupplement = (DietarySupplement) o; + if (!super.equals(o)) return false; + if (myActiveIngredient != null ? !myActiveIngredient.equals(dietarySupplement.myActiveIngredient) : dietarySupplement.myActiveIngredient != null) return false; + if (myBackground != null ? !myBackground.equals(dietarySupplement.myBackground) : dietarySupplement.myBackground != null) return false; + if (myDosageForm != null ? !myDosageForm.equals(dietarySupplement.myDosageForm) : dietarySupplement.myDosageForm != null) return false; + if (myIsProprietary != null ? !myIsProprietary.equals(dietarySupplement.myIsProprietary) : dietarySupplement.myIsProprietary != null) return false; + if (myLegalStatus != null ? !myLegalStatus.equals(dietarySupplement.myLegalStatus) : dietarySupplement.myLegalStatus != null) return false; + if (myManufacturer != null ? !myManufacturer.equals(dietarySupplement.myManufacturer) : dietarySupplement.myManufacturer != null) return false; + if (myMaximumIntake != null ? !myMaximumIntake.equals(dietarySupplement.myMaximumIntake) : dietarySupplement.myMaximumIntake != null) return false; + if (myMechanismOfAction != null ? !myMechanismOfAction.equals(dietarySupplement.myMechanismOfAction) : dietarySupplement.myMechanismOfAction != null) return false; + if (myNonProprietaryName != null ? !myNonProprietaryName.equals(dietarySupplement.myNonProprietaryName) : dietarySupplement.myNonProprietaryName != null) return false; + if (myRecommendedIntake != null ? !myRecommendedIntake.equals(dietarySupplement.myRecommendedIntake) : dietarySupplement.myRecommendedIntake != null) return false; + if (mySafetyConsideration != null ? !mySafetyConsideration.equals(dietarySupplement.mySafetyConsideration) : dietarySupplement.mySafetyConsideration != null) return false; + if (myTargetPopulation != null ? !myTargetPopulation.equals(dietarySupplement.myTargetPopulation) : dietarySupplement.myTargetPopulation != null) return false; + return true; + } + private String myActiveIngredient; private String myBackground; private String myDosageForm; diff --git a/src/main/java/org/schema/DigitalAudioTapeFormat.java b/src/main/java/org/schema/DigitalAudioTapeFormat.java index d13653eb..e270dc71 100644 --- a/src/main/java/org/schema/DigitalAudioTapeFormat.java +++ b/src/main/java/org/schema/DigitalAudioTapeFormat.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected DigitalAudioTapeFormat() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DigitalAudioTapeFormat digitalAudioTapeFormat = (DigitalAudioTapeFormat) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DigitalFormat.java b/src/main/java/org/schema/DigitalFormat.java index 760db271..23b54fc0 100644 --- a/src/main/java/org/schema/DigitalFormat.java +++ b/src/main/java/org/schema/DigitalFormat.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected DigitalFormat() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DigitalFormat digitalFormat = (DigitalFormat) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DisagreeAction.java b/src/main/java/org/schema/DisagreeAction.java index 7379e5ad..0e49271e 100644 --- a/src/main/java/org/schema/DisagreeAction.java +++ b/src/main/java/org/schema/DisagreeAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected DisagreeAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DisagreeAction disagreeAction = (DisagreeAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Discontinued.java b/src/main/java/org/schema/Discontinued.java index 45839dfa..ad9bb673 100644 --- a/src/main/java/org/schema/Discontinued.java +++ b/src/main/java/org/schema/Discontinued.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Discontinued() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Discontinued discontinued = (Discontinued) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DiscoverAction.java b/src/main/java/org/schema/DiscoverAction.java index 258a0705..0a3edfe2 100644 --- a/src/main/java/org/schema/DiscoverAction.java +++ b/src/main/java/org/schema/DiscoverAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected DiscoverAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DiscoverAction discoverAction = (DiscoverAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DislikeAction.java b/src/main/java/org/schema/DislikeAction.java index 8c87e675..334396ba 100644 --- a/src/main/java/org/schema/DislikeAction.java +++ b/src/main/java/org/schema/DislikeAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected DislikeAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DislikeAction dislikeAction = (DislikeAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Distance.java b/src/main/java/org/schema/Distance.java index 04a3864e..17cfae4f 100644 --- a/src/main/java/org/schema/Distance.java +++ b/src/main/java/org/schema/Distance.java @@ -216,7 +216,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String additionalType; @@ -247,4 +247,18 @@ public interface Builder extends ThingBuilder { protected Distance(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Distance distance = (Distance) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DistanceOrQuantitativeValue.java b/src/main/java/org/schema/DistanceOrQuantitativeValue.java index 2072efb6..f52c81b3 100644 --- a/src/main/java/org/schema/DistanceOrQuantitativeValue.java +++ b/src/main/java/org/schema/DistanceOrQuantitativeValue.java @@ -44,4 +44,21 @@ private void clear() { myDistance = null; myQuantitativeValue = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDistance != null ? myDistance.hashCode() : 0); + result = 31 * result + (myQuantitativeValue != null ? myQuantitativeValue.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DistanceOrQuantitativeValue distanceOrQuantitativeValue = (DistanceOrQuantitativeValue) o; + if (myDistance != null ? !myDistance.equals(distanceOrQuantitativeValue.myDistance) : distanceOrQuantitativeValue.myDistance != null) return false; + if (myQuantitativeValue != null ? !myQuantitativeValue.equals(distanceOrQuantitativeValue.myQuantitativeValue) : distanceOrQuantitativeValue.myQuantitativeValue != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DistanceOrString.java b/src/main/java/org/schema/DistanceOrString.java index a873687f..aeb960fe 100644 --- a/src/main/java/org/schema/DistanceOrString.java +++ b/src/main/java/org/schema/DistanceOrString.java @@ -39,4 +39,21 @@ private void clear() { myDistance = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDistance != null ? myDistance.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DistanceOrString distanceOrString = (DistanceOrString) o; + if (myDistance != null ? !myDistance.equals(distanceOrString.myDistance) : distanceOrString.myDistance != null) return false; + if (myString != null ? !myString.equals(distanceOrString.myString) : distanceOrString.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DonateAction.java b/src/main/java/org/schema/DonateAction.java index cab4ed56..67db068e 100644 --- a/src/main/java/org/schema/DonateAction.java +++ b/src/main/java/org/schema/DonateAction.java @@ -107,9 +107,93 @@ public DonateAction build() { */ - @NotNull public Builder price(@NotNull Number number) { - if (this.price == null) this.price = new NumberOrString(); - this.price.setNumber(number); + @NotNull public Builder price(@NotNull Integer integer) { + if (this.price == null) this.price = new Number(); + this.price.setInteger(integer); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Long price) { + if (this.price == null) this.price = new Number(); + this.price.setLong(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Float price) { + if (this.price == null) this.price = new Number(); + this.price.setFloat(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Double price) { + if (this.price == null) this.price = new Number(); + this.price.setDouble(price); return this; } /** @@ -136,7 +220,7 @@ public DonateAction build() { */ @NotNull public Builder price(@NotNull String price) { - if (this.price == null) this.price = new NumberOrString(); + if (this.price == null) this.price = new Number(); this.price.setString(price); return this; } @@ -412,7 +496,10 @@ public Builder id(long id) { if ("recipient".equals(key) && value instanceof Audience) { recipient((Audience)value); continue; } if ("recipient".equals(key) && value instanceof Organization) { recipient((Organization)value); continue; } if ("recipient".equals(key) && value instanceof Person) { recipient((Person)value); continue; } - if ("price".equals(key) && value instanceof Number) { price((Number)value); continue; } + if ("price".equals(key) && value instanceof Integer) { price((Integer)value); continue; } + if ("price".equals(key) && value instanceof Long) { price((Long)value); continue; } + if ("price".equals(key) && value instanceof Float) { price((Float)value); continue; } + if ("price".equals(key) && value instanceof Double) { price((Double)value); continue; } if ("price".equals(key) && value instanceof String) { price((String)value); continue; } if ("priceSpecification".equals(key) && value instanceof PriceSpecification) { priceSpecification((PriceSpecification)value); continue; } if ("agent".equals(key) && value instanceof Organization) { agent((Organization)value); continue; } @@ -431,11 +518,11 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AudienceOrOrganizationOrPerson recipient; - private NumberOrString price; + private Number price; private PriceSpecification priceSpecification; private OrganizationOrPerson agent; private java.util.Date endTime; @@ -460,7 +547,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder recipient(@NotNull Organization.Builder organization); @NotNull Builder recipient(@NotNull Person person); @NotNull Builder recipient(@NotNull Person.Builder person); - @NotNull Builder price(@NotNull Number number); + @NotNull Builder price(@NotNull Integer integer); + @NotNull Builder price(@NotNull Long price); + @NotNull Builder price(@NotNull Float price); + @NotNull Builder price(@NotNull Double price); @NotNull Builder price(@NotNull String price); @NotNull Builder priceSpecification(@NotNull PriceSpecification priceSpecification); @NotNull Builder priceSpecification(@NotNull PriceSpecification.Builder priceSpecification); @@ -490,9 +580,25 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected DonateAction(AudienceOrOrganizationOrPerson recipient, NumberOrString price, PriceSpecification priceSpecification, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected DonateAction(AudienceOrOrganizationOrPerson recipient, Number price, PriceSpecification priceSpecification, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(price, priceSpecification, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myRecipient = recipient; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myRecipient != null ? myRecipient.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DonateAction donateAction = (DonateAction) o; + if (!super.equals(o)) return false; + if (myRecipient != null ? !myRecipient.equals(donateAction.myRecipient) : donateAction.myRecipient != null) return false; + return true; + } + private AudienceOrOrganizationOrPerson myRecipient; } diff --git a/src/main/java/org/schema/DoseSchedule.java b/src/main/java/org/schema/DoseSchedule.java index f487cf6a..e43ab79b 100644 --- a/src/main/java/org/schema/DoseSchedule.java +++ b/src/main/java/org/schema/DoseSchedule.java @@ -393,7 +393,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String doseUnit; @@ -458,6 +458,28 @@ protected DoseSchedule(String doseUnit, Number doseValue, String frequency, Stri myFrequency = frequency; myTargetPopulation = targetPopulation; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDoseUnit != null ? myDoseUnit.hashCode() : 0); + result = 31 * result + (myDoseValue != null ? myDoseValue.hashCode() : 0); + result = 31 * result + (myFrequency != null ? myFrequency.hashCode() : 0); + result = 31 * result + (myTargetPopulation != null ? myTargetPopulation.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DoseSchedule doseSchedule = (DoseSchedule) o; + if (!super.equals(o)) return false; + if (myDoseUnit != null ? !myDoseUnit.equals(doseSchedule.myDoseUnit) : doseSchedule.myDoseUnit != null) return false; + if (myDoseValue != null ? !myDoseValue.equals(doseSchedule.myDoseValue) : doseSchedule.myDoseValue != null) return false; + if (myFrequency != null ? !myFrequency.equals(doseSchedule.myFrequency) : doseSchedule.myFrequency != null) return false; + if (myTargetPopulation != null ? !myTargetPopulation.equals(doseSchedule.myTargetPopulation) : doseSchedule.myTargetPopulation != null) return false; + return true; + } + private String myDoseUnit; private Number myDoseValue; private String myFrequency; diff --git a/src/main/java/org/schema/DoubleBlindedTrial.java b/src/main/java/org/schema/DoubleBlindedTrial.java index 36eab22e..8c2a186a 100644 --- a/src/main/java/org/schema/DoubleBlindedTrial.java +++ b/src/main/java/org/schema/DoubleBlindedTrial.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected DoubleBlindedTrial() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DoubleBlindedTrial doubleBlindedTrial = (DoubleBlindedTrial) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DownloadAction.java b/src/main/java/org/schema/DownloadAction.java index bc92e28e..9594527b 100644 --- a/src/main/java/org/schema/DownloadAction.java +++ b/src/main/java/org/schema/DownloadAction.java @@ -336,7 +336,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Place fromLocation; @@ -391,4 +391,18 @@ public interface Builder extends ThingBuilder { protected DownloadAction(Place fromLocation, Place toLocation, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(fromLocation, toLocation, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DownloadAction downloadAction = (DownloadAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DrawAction.java b/src/main/java/org/schema/DrawAction.java index 7d71deb5..7eaae39b 100644 --- a/src/main/java/org/schema/DrawAction.java +++ b/src/main/java/org/schema/DrawAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected DrawAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DrawAction drawAction = (DrawAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DrinkAction.java b/src/main/java/org/schema/DrinkAction.java index 2b2f556e..0e74d9d5 100644 --- a/src/main/java/org/schema/DrinkAction.java +++ b/src/main/java/org/schema/DrinkAction.java @@ -322,7 +322,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Offer expectsAcceptanceOf; @@ -374,4 +374,18 @@ public interface Builder extends ThingBuilder { protected DrinkAction(Offer expectsAcceptanceOf, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(expectsAcceptanceOf, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DrinkAction drinkAction = (DrinkAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DriveWheelConfigurationValue.java b/src/main/java/org/schema/DriveWheelConfigurationValue.java index 047e78fb..83aef991 100644 --- a/src/main/java/org/schema/DriveWheelConfigurationValue.java +++ b/src/main/java/org/schema/DriveWheelConfigurationValue.java @@ -426,7 +426,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private QualitativeValue equal; @@ -494,4 +494,18 @@ public interface Builder extends ThingBuilder { protected DriveWheelConfigurationValue(QualitativeValue equal, QualitativeValue greater, QualitativeValue greaterOrEqual, QualitativeValue lesser, QualitativeValue lesserOrEqual, QualitativeValue nonEqual, EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue valueReference, PropertyValue additionalProperty, EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(equal, greater, greaterOrEqual, lesser, lesserOrEqual, nonEqual, valueReference, additionalProperty, supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DriveWheelConfigurationValue driveWheelConfigurationValue = (DriveWheelConfigurationValue) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DriveWheelConfigurationValueOrString.java b/src/main/java/org/schema/DriveWheelConfigurationValueOrString.java index 3f67da26..241932eb 100644 --- a/src/main/java/org/schema/DriveWheelConfigurationValueOrString.java +++ b/src/main/java/org/schema/DriveWheelConfigurationValueOrString.java @@ -39,4 +39,21 @@ private void clear() { myDriveWheelConfigurationValue = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDriveWheelConfigurationValue != null ? myDriveWheelConfigurationValue.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DriveWheelConfigurationValueOrString driveWheelConfigurationValueOrString = (DriveWheelConfigurationValueOrString) o; + if (myDriveWheelConfigurationValue != null ? !myDriveWheelConfigurationValue.equals(driveWheelConfigurationValueOrString.myDriveWheelConfigurationValue) : driveWheelConfigurationValueOrString.myDriveWheelConfigurationValue != null) return false; + if (myString != null ? !myString.equals(driveWheelConfigurationValueOrString.myString) : driveWheelConfigurationValueOrString.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DrivingSchoolVehicleUsage.java b/src/main/java/org/schema/DrivingSchoolVehicleUsage.java index be9b6b28..b8aa7550 100644 --- a/src/main/java/org/schema/DrivingSchoolVehicleUsage.java +++ b/src/main/java/org/schema/DrivingSchoolVehicleUsage.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected DrivingSchoolVehicleUsage() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DrivingSchoolVehicleUsage drivingSchoolVehicleUsage = (DrivingSchoolVehicleUsage) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Drug.java b/src/main/java/org/schema/Drug.java index 5f923bce..299add20 100644 --- a/src/main/java/org/schema/Drug.java +++ b/src/main/java/org/schema/Drug.java @@ -795,7 +795,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String activeIngredient; @@ -947,6 +947,72 @@ protected Drug(String activeIngredient, String administrationRoute, String alcoh myRelatedDrug = relatedDrug; myWarning = warning; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myActiveIngredient != null ? myActiveIngredient.hashCode() : 0); + result = 31 * result + (myAdministrationRoute != null ? myAdministrationRoute.hashCode() : 0); + result = 31 * result + (myAlcoholWarning != null ? myAlcoholWarning.hashCode() : 0); + result = 31 * result + (myAvailableStrength != null ? myAvailableStrength.hashCode() : 0); + result = 31 * result + (myBreastfeedingWarning != null ? myBreastfeedingWarning.hashCode() : 0); + result = 31 * result + (myClinicalPharmacology != null ? myClinicalPharmacology.hashCode() : 0); + result = 31 * result + (myCost != null ? myCost.hashCode() : 0); + result = 31 * result + (myDosageForm != null ? myDosageForm.hashCode() : 0); + result = 31 * result + (myDoseSchedule != null ? myDoseSchedule.hashCode() : 0); + result = 31 * result + (myDrugClass != null ? myDrugClass.hashCode() : 0); + result = 31 * result + (myFoodWarning != null ? myFoodWarning.hashCode() : 0); + result = 31 * result + (myInteractingDrug != null ? myInteractingDrug.hashCode() : 0); + result = 31 * result + (myIsAvailableGenerically != null ? myIsAvailableGenerically.hashCode() : 0); + result = 31 * result + (myIsProprietary != null ? myIsProprietary.hashCode() : 0); + result = 31 * result + (myLabelDetails != null ? myLabelDetails.hashCode() : 0); + result = 31 * result + (myLegalStatus != null ? myLegalStatus.hashCode() : 0); + result = 31 * result + (myManufacturer != null ? myManufacturer.hashCode() : 0); + result = 31 * result + (myMechanismOfAction != null ? myMechanismOfAction.hashCode() : 0); + result = 31 * result + (myNonProprietaryName != null ? myNonProprietaryName.hashCode() : 0); + result = 31 * result + (myOverdosage != null ? myOverdosage.hashCode() : 0); + result = 31 * result + (myPregnancyCategory != null ? myPregnancyCategory.hashCode() : 0); + result = 31 * result + (myPregnancyWarning != null ? myPregnancyWarning.hashCode() : 0); + result = 31 * result + (myPrescribingInfo != null ? myPrescribingInfo.hashCode() : 0); + result = 31 * result + (myPrescriptionStatus != null ? myPrescriptionStatus.hashCode() : 0); + result = 31 * result + (myRelatedDrug != null ? myRelatedDrug.hashCode() : 0); + result = 31 * result + (myWarning != null ? myWarning.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Drug drug = (Drug) o; + if (!super.equals(o)) return false; + if (myActiveIngredient != null ? !myActiveIngredient.equals(drug.myActiveIngredient) : drug.myActiveIngredient != null) return false; + if (myAdministrationRoute != null ? !myAdministrationRoute.equals(drug.myAdministrationRoute) : drug.myAdministrationRoute != null) return false; + if (myAlcoholWarning != null ? !myAlcoholWarning.equals(drug.myAlcoholWarning) : drug.myAlcoholWarning != null) return false; + if (myAvailableStrength != null ? !myAvailableStrength.equals(drug.myAvailableStrength) : drug.myAvailableStrength != null) return false; + if (myBreastfeedingWarning != null ? !myBreastfeedingWarning.equals(drug.myBreastfeedingWarning) : drug.myBreastfeedingWarning != null) return false; + if (myClinicalPharmacology != null ? !myClinicalPharmacology.equals(drug.myClinicalPharmacology) : drug.myClinicalPharmacology != null) return false; + if (myCost != null ? !myCost.equals(drug.myCost) : drug.myCost != null) return false; + if (myDosageForm != null ? !myDosageForm.equals(drug.myDosageForm) : drug.myDosageForm != null) return false; + if (myDoseSchedule != null ? !myDoseSchedule.equals(drug.myDoseSchedule) : drug.myDoseSchedule != null) return false; + if (myDrugClass != null ? !myDrugClass.equals(drug.myDrugClass) : drug.myDrugClass != null) return false; + if (myFoodWarning != null ? !myFoodWarning.equals(drug.myFoodWarning) : drug.myFoodWarning != null) return false; + if (myInteractingDrug != null ? !myInteractingDrug.equals(drug.myInteractingDrug) : drug.myInteractingDrug != null) return false; + if (myIsAvailableGenerically != null ? !myIsAvailableGenerically.equals(drug.myIsAvailableGenerically) : drug.myIsAvailableGenerically != null) return false; + if (myIsProprietary != null ? !myIsProprietary.equals(drug.myIsProprietary) : drug.myIsProprietary != null) return false; + if (myLabelDetails != null ? !myLabelDetails.equals(drug.myLabelDetails) : drug.myLabelDetails != null) return false; + if (myLegalStatus != null ? !myLegalStatus.equals(drug.myLegalStatus) : drug.myLegalStatus != null) return false; + if (myManufacturer != null ? !myManufacturer.equals(drug.myManufacturer) : drug.myManufacturer != null) return false; + if (myMechanismOfAction != null ? !myMechanismOfAction.equals(drug.myMechanismOfAction) : drug.myMechanismOfAction != null) return false; + if (myNonProprietaryName != null ? !myNonProprietaryName.equals(drug.myNonProprietaryName) : drug.myNonProprietaryName != null) return false; + if (myOverdosage != null ? !myOverdosage.equals(drug.myOverdosage) : drug.myOverdosage != null) return false; + if (myPregnancyCategory != null ? !myPregnancyCategory.equals(drug.myPregnancyCategory) : drug.myPregnancyCategory != null) return false; + if (myPregnancyWarning != null ? !myPregnancyWarning.equals(drug.myPregnancyWarning) : drug.myPregnancyWarning != null) return false; + if (myPrescribingInfo != null ? !myPrescribingInfo.equals(drug.myPrescribingInfo) : drug.myPrescribingInfo != null) return false; + if (myPrescriptionStatus != null ? !myPrescriptionStatus.equals(drug.myPrescriptionStatus) : drug.myPrescriptionStatus != null) return false; + if (myRelatedDrug != null ? !myRelatedDrug.equals(drug.myRelatedDrug) : drug.myRelatedDrug != null) return false; + if (myWarning != null ? !myWarning.equals(drug.myWarning) : drug.myWarning != null) return false; + return true; + } + private String myActiveIngredient; private String myAdministrationRoute; private String myAlcoholWarning; diff --git a/src/main/java/org/schema/DrugClass.java b/src/main/java/org/schema/DrugClass.java index 25c8daad..610b4361 100644 --- a/src/main/java/org/schema/DrugClass.java +++ b/src/main/java/org/schema/DrugClass.java @@ -391,7 +391,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Drug drug; @@ -459,5 +459,21 @@ protected DrugClass(Drug drug, MedicalEntity adverseOutcome, MedicalContraindica super(adverseOutcome, contraindication, duplicateTherapy, indication, seriousAdverseOutcome, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myDrug = drug; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDrug != null ? myDrug.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DrugClass drugClass = (DrugClass) o; + if (!super.equals(o)) return false; + if (myDrug != null ? !myDrug.equals(drugClass.myDrug) : drugClass.myDrug != null) return false; + return true; + } + private Drug myDrug; } diff --git a/src/main/java/org/schema/DrugCost.java b/src/main/java/org/schema/DrugCost.java index eef5e717..4e295ee1 100644 --- a/src/main/java/org/schema/DrugCost.java +++ b/src/main/java/org/schema/DrugCost.java @@ -53,7 +53,7 @@ public String getCostOrigin() { /** * The cost per unit of the drug. */ - public NumberOrString getCostPerUnit() { + public Number getCostPerUnit() { return myCostPerUnit; } /** @@ -115,16 +115,40 @@ public DrugCost build() { /** * The cost per unit of the drug. */ - @NotNull public Builder costPerUnit(@NotNull Number number) { - if (this.costPerUnit == null) this.costPerUnit = new NumberOrString(); - this.costPerUnit.setNumber(number); + @NotNull public Builder costPerUnit(@NotNull Integer integer) { + if (this.costPerUnit == null) this.costPerUnit = new Number(); + this.costPerUnit.setInteger(integer); + return this; + } + /** + * The cost per unit of the drug. + */ + @NotNull public Builder costPerUnit(@NotNull Long costPerUnit) { + if (this.costPerUnit == null) this.costPerUnit = new Number(); + this.costPerUnit.setLong(costPerUnit); + return this; + } + /** + * The cost per unit of the drug. + */ + @NotNull public Builder costPerUnit(@NotNull Float costPerUnit) { + if (this.costPerUnit == null) this.costPerUnit = new Number(); + this.costPerUnit.setFloat(costPerUnit); + return this; + } + /** + * The cost per unit of the drug. + */ + @NotNull public Builder costPerUnit(@NotNull Double costPerUnit) { + if (this.costPerUnit == null) this.costPerUnit = new Number(); + this.costPerUnit.setDouble(costPerUnit); return this; } /** * The cost per unit of the drug. */ @NotNull public Builder costPerUnit(@NotNull String costPerUnit) { - if (this.costPerUnit == null) this.costPerUnit = new NumberOrString(); + if (this.costPerUnit == null) this.costPerUnit = new Number(); this.costPerUnit.setString(costPerUnit); return this; } @@ -388,7 +412,10 @@ public Builder id(long id) { if ("costCategory".equals(key) && value instanceof DrugCostCategory) { costCategory((DrugCostCategory)value); continue; } if ("costCurrency".equals(key) && value instanceof String) { costCurrency((String)value); continue; } if ("costOrigin".equals(key) && value instanceof String) { costOrigin((String)value); continue; } - if ("costPerUnit".equals(key) && value instanceof Number) { costPerUnit((Number)value); continue; } + if ("costPerUnit".equals(key) && value instanceof Integer) { costPerUnit((Integer)value); continue; } + if ("costPerUnit".equals(key) && value instanceof Long) { costPerUnit((Long)value); continue; } + if ("costPerUnit".equals(key) && value instanceof Float) { costPerUnit((Float)value); continue; } + if ("costPerUnit".equals(key) && value instanceof Double) { costPerUnit((Double)value); continue; } if ("costPerUnit".equals(key) && value instanceof String) { costPerUnit((String)value); continue; } if ("drugUnit".equals(key) && value instanceof String) { drugUnit((String)value); continue; } if ("code".equals(key) && value instanceof MedicalCode) { code((MedicalCode)value); continue; } @@ -406,14 +433,14 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AdministrativeArea applicableLocation; private DrugCostCategory costCategory; private String costCurrency; private String costOrigin; - private NumberOrString costPerUnit; + private Number costPerUnit; private String drugUnit; private MedicalCode code; private MedicalGuideline guideline; @@ -438,7 +465,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder costCategory(@NotNull DrugCostCategory.Builder drugCostCategory); @NotNull Builder costCurrency(@NotNull String costCurrency); @NotNull Builder costOrigin(@NotNull String costOrigin); - @NotNull Builder costPerUnit(@NotNull Number number); + @NotNull Builder costPerUnit(@NotNull Integer integer); + @NotNull Builder costPerUnit(@NotNull Long costPerUnit); + @NotNull Builder costPerUnit(@NotNull Float costPerUnit); + @NotNull Builder costPerUnit(@NotNull Double costPerUnit); @NotNull Builder costPerUnit(@NotNull String costPerUnit); @NotNull Builder drugUnit(@NotNull String drugUnit); @NotNull Builder code(@NotNull MedicalCode medicalCode); @@ -467,7 +497,7 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected DrugCost(AdministrativeArea applicableLocation, DrugCostCategory costCategory, String costCurrency, String costOrigin, NumberOrString costPerUnit, String drugUnit, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected DrugCost(AdministrativeArea applicableLocation, DrugCostCategory costCategory, String costCurrency, String costOrigin, Number costPerUnit, String drugUnit, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myApplicableLocation = applicableLocation; myCostCategory = costCategory; @@ -476,10 +506,36 @@ protected DrugCost(AdministrativeArea applicableLocation, DrugCostCategory costC myCostPerUnit = costPerUnit; myDrugUnit = drugUnit; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myApplicableLocation != null ? myApplicableLocation.hashCode() : 0); + result = 31 * result + (myCostCategory != null ? myCostCategory.hashCode() : 0); + result = 31 * result + (myCostCurrency != null ? myCostCurrency.hashCode() : 0); + result = 31 * result + (myCostOrigin != null ? myCostOrigin.hashCode() : 0); + result = 31 * result + (myCostPerUnit != null ? myCostPerUnit.hashCode() : 0); + result = 31 * result + (myDrugUnit != null ? myDrugUnit.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DrugCost drugCost = (DrugCost) o; + if (!super.equals(o)) return false; + if (myApplicableLocation != null ? !myApplicableLocation.equals(drugCost.myApplicableLocation) : drugCost.myApplicableLocation != null) return false; + if (myCostCategory != null ? !myCostCategory.equals(drugCost.myCostCategory) : drugCost.myCostCategory != null) return false; + if (myCostCurrency != null ? !myCostCurrency.equals(drugCost.myCostCurrency) : drugCost.myCostCurrency != null) return false; + if (myCostOrigin != null ? !myCostOrigin.equals(drugCost.myCostOrigin) : drugCost.myCostOrigin != null) return false; + if (myCostPerUnit != null ? !myCostPerUnit.equals(drugCost.myCostPerUnit) : drugCost.myCostPerUnit != null) return false; + if (myDrugUnit != null ? !myDrugUnit.equals(drugCost.myDrugUnit) : drugCost.myDrugUnit != null) return false; + return true; + } + private AdministrativeArea myApplicableLocation; private DrugCostCategory myCostCategory; private String myCostCurrency; private String myCostOrigin; - private NumberOrString myCostPerUnit; + private Number myCostPerUnit; private String myDrugUnit; } diff --git a/src/main/java/org/schema/DrugCostCategory.java b/src/main/java/org/schema/DrugCostCategory.java index 3f1db5e0..447bf189 100644 --- a/src/main/java/org/schema/DrugCostCategory.java +++ b/src/main/java/org/schema/DrugCostCategory.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected DrugCostCategory(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DrugCostCategory drugCostCategory = (DrugCostCategory) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DrugLegalStatus.java b/src/main/java/org/schema/DrugLegalStatus.java index 886077e5..fb506c90 100644 --- a/src/main/java/org/schema/DrugLegalStatus.java +++ b/src/main/java/org/schema/DrugLegalStatus.java @@ -321,7 +321,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AdministrativeArea applicableLocation; @@ -374,5 +374,21 @@ protected DrugLegalStatus(AdministrativeArea applicableLocation, MedicalCode cod super(code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myApplicableLocation = applicableLocation; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myApplicableLocation != null ? myApplicableLocation.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DrugLegalStatus drugLegalStatus = (DrugLegalStatus) o; + if (!super.equals(o)) return false; + if (myApplicableLocation != null ? !myApplicableLocation.equals(drugLegalStatus.myApplicableLocation) : drugLegalStatus.myApplicableLocation != null) return false; + return true; + } + private AdministrativeArea myApplicableLocation; } diff --git a/src/main/java/org/schema/DrugPregnancyCategory.java b/src/main/java/org/schema/DrugPregnancyCategory.java index 58ec22cf..57e1d150 100644 --- a/src/main/java/org/schema/DrugPregnancyCategory.java +++ b/src/main/java/org/schema/DrugPregnancyCategory.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected DrugPregnancyCategory(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DrugPregnancyCategory drugPregnancyCategory = (DrugPregnancyCategory) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DrugPrescriptionStatus.java b/src/main/java/org/schema/DrugPrescriptionStatus.java index 77b37c46..a9ff675c 100644 --- a/src/main/java/org/schema/DrugPrescriptionStatus.java +++ b/src/main/java/org/schema/DrugPrescriptionStatus.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected DrugPrescriptionStatus(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DrugPrescriptionStatus drugPrescriptionStatus = (DrugPrescriptionStatus) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DrugStrength.java b/src/main/java/org/schema/DrugStrength.java index 276dde93..55348b9c 100644 --- a/src/main/java/org/schema/DrugStrength.java +++ b/src/main/java/org/schema/DrugStrength.java @@ -400,7 +400,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String activeIngredient; @@ -466,6 +466,28 @@ protected DrugStrength(String activeIngredient, AdministrativeArea availableIn, myStrengthUnit = strengthUnit; myStrengthValue = strengthValue; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myActiveIngredient != null ? myActiveIngredient.hashCode() : 0); + result = 31 * result + (myAvailableIn != null ? myAvailableIn.hashCode() : 0); + result = 31 * result + (myStrengthUnit != null ? myStrengthUnit.hashCode() : 0); + result = 31 * result + (myStrengthValue != null ? myStrengthValue.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DrugStrength drugStrength = (DrugStrength) o; + if (!super.equals(o)) return false; + if (myActiveIngredient != null ? !myActiveIngredient.equals(drugStrength.myActiveIngredient) : drugStrength.myActiveIngredient != null) return false; + if (myAvailableIn != null ? !myAvailableIn.equals(drugStrength.myAvailableIn) : drugStrength.myAvailableIn != null) return false; + if (myStrengthUnit != null ? !myStrengthUnit.equals(drugStrength.myStrengthUnit) : drugStrength.myStrengthUnit != null) return false; + if (myStrengthValue != null ? !myStrengthValue.equals(drugStrength.myStrengthValue) : drugStrength.myStrengthValue != null) return false; + return true; + } + private String myActiveIngredient; private AdministrativeArea myAvailableIn; private String myStrengthUnit; diff --git a/src/main/java/org/schema/DryCleaningOrLaundry.java b/src/main/java/org/schema/DryCleaningOrLaundry.java index 3f94e70e..22cdfcc1 100644 --- a/src/main/java/org/schema/DryCleaningOrLaundry.java +++ b/src/main/java/org/schema/DryCleaningOrLaundry.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected DryCleaningOrLaundry(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DryCleaningOrLaundry dryCleaningOrLaundry = (DryCleaningOrLaundry) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Duration.java b/src/main/java/org/schema/Duration.java index 020670e5..562e8881 100644 --- a/src/main/java/org/schema/Duration.java +++ b/src/main/java/org/schema/Duration.java @@ -216,7 +216,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String additionalType; @@ -247,4 +247,18 @@ public interface Builder extends ThingBuilder { protected Duration(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Duration duration = (Duration) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/DurationOrString.java b/src/main/java/org/schema/DurationOrString.java index 4bc99d5b..cf3af82c 100644 --- a/src/main/java/org/schema/DurationOrString.java +++ b/src/main/java/org/schema/DurationOrString.java @@ -39,4 +39,21 @@ private void clear() { myDuration = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDuration != null ? myDuration.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + DurationOrString durationOrString = (DurationOrString) o; + if (myDuration != null ? !myDuration.equals(durationOrString.myDuration) : durationOrString.myDuration != null) return false; + if (myString != null ? !myString.equals(durationOrString.myString) : durationOrString.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EBook.java b/src/main/java/org/schema/EBook.java index 9544d1c4..31652458 100644 --- a/src/main/java/org/schema/EBook.java +++ b/src/main/java/org/schema/EBook.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected EBook() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EBook eBook = (EBook) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EPRelease.java b/src/main/java/org/schema/EPRelease.java index b4af7e37..231d2812 100644 --- a/src/main/java/org/schema/EPRelease.java +++ b/src/main/java/org/schema/EPRelease.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected EPRelease() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EPRelease ePRelease = (EPRelease) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Ear.java b/src/main/java/org/schema/Ear.java index 76919ee5..fd7222f9 100644 --- a/src/main/java/org/schema/Ear.java +++ b/src/main/java/org/schema/Ear.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Ear() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Ear ear = (Ear) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EatAction.java b/src/main/java/org/schema/EatAction.java index 9da04824..50ee5f86 100644 --- a/src/main/java/org/schema/EatAction.java +++ b/src/main/java/org/schema/EatAction.java @@ -322,7 +322,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Offer expectsAcceptanceOf; @@ -374,4 +374,18 @@ public interface Builder extends ThingBuilder { protected EatAction(Offer expectsAcceptanceOf, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(expectsAcceptanceOf, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EatAction eatAction = (EatAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EducationEvent.java b/src/main/java/org/schema/EducationEvent.java index 511e50ce..67dfb5e2 100644 --- a/src/main/java/org/schema/EducationEvent.java +++ b/src/main/java/org/schema/EducationEvent.java @@ -496,7 +496,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -583,4 +583,18 @@ public interface Builder extends ThingBuilder { protected EducationEvent(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EducationEvent educationEvent = (EducationEvent) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EducationalAudience.java b/src/main/java/org/schema/EducationalAudience.java index cacec0a3..29b5168b 100644 --- a/src/main/java/org/schema/EducationalAudience.java +++ b/src/main/java/org/schema/EducationalAudience.java @@ -253,7 +253,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String educationalRole; @@ -292,5 +292,21 @@ protected EducationalAudience(String educationalRole, String audienceType, Admin super(audienceType, geographicArea, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myEducationalRole = educationalRole; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myEducationalRole != null ? myEducationalRole.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EducationalAudience educationalAudience = (EducationalAudience) o; + if (!super.equals(o)) return false; + if (myEducationalRole != null ? !myEducationalRole.equals(educationalAudience.myEducationalRole) : educationalAudience.myEducationalRole != null) return false; + return true; + } + private String myEducationalRole; } diff --git a/src/main/java/org/schema/EducationalOrganization.java b/src/main/java/org/schema/EducationalOrganization.java index ff452ab5..d13464dd 100644 --- a/src/main/java/org/schema/EducationalOrganization.java +++ b/src/main/java/org/schema/EducationalOrganization.java @@ -680,7 +680,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person alumni; @@ -807,5 +807,21 @@ protected EducationalOrganization(Person alumni, PostalAddress address, Aggregat super(address, aggregateRating, award, brand, contactPoint, department, duns, email, employee, event, faxNumber, founder, dissolutionDate, foundingDate, globalLocationNumber, hasPOS, isicV4, legalName, logo, makesOffer, member, memberOf, naics, numberOfEmployees, owns, review, seeks, subOrganization, taxID, telephone, vatID, foundingLocation, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myAlumni = alumni; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAlumni != null ? myAlumni.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EducationalOrganization educationalOrganization = (EducationalOrganization) o; + if (!super.equals(o)) return false; + if (myAlumni != null ? !myAlumni.equals(educationalOrganization.myAlumni) : educationalOrganization.myAlumni != null) return false; + return true; + } + private Person myAlumni; } diff --git a/src/main/java/org/schema/Electrician.java b/src/main/java/org/schema/Electrician.java index c1529cad..f1693451 100644 --- a/src/main/java/org/schema/Electrician.java +++ b/src/main/java/org/schema/Electrician.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected Electrician(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Electrician electrician = (Electrician) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ElectronicsStore.java b/src/main/java/org/schema/ElectronicsStore.java index 11e135e0..718ee112 100644 --- a/src/main/java/org/schema/ElectronicsStore.java +++ b/src/main/java/org/schema/ElectronicsStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected ElectronicsStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ElectronicsStore electronicsStore = (ElectronicsStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ElementarySchool.java b/src/main/java/org/schema/ElementarySchool.java index 94524b00..b2d838ff 100644 --- a/src/main/java/org/schema/ElementarySchool.java +++ b/src/main/java/org/schema/ElementarySchool.java @@ -674,7 +674,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person alumni; @@ -800,4 +800,18 @@ public interface Builder extends ThingBuilder { protected ElementarySchool(Person alumni, PostalAddress address, AggregateRating aggregateRating, String award, BrandOrOrganization brand, ContactPoint contactPoint, Organization department, String duns, String email, Person employee, Event event, String faxNumber, Person founder, java.util.Date dissolutionDate, java.util.Date foundingDate, String globalLocationNumber, Place hasPOS, String isicV4, String legalName, ImageObjectOrString logo, Offer makesOffer, OrganizationOrPerson member, OrganizationOrProgramMembership memberOf, String naics, QuantitativeValue numberOfEmployees, OwnershipInfoOrProduct owns, Review review, Demand seeks, Organization subOrganization, String taxID, String telephone, String vatID, Place foundingLocation, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(alumni, address, aggregateRating, award, brand, contactPoint, department, duns, email, employee, event, faxNumber, founder, dissolutionDate, foundingDate, globalLocationNumber, hasPOS, isicV4, legalName, logo, makesOffer, member, memberOf, naics, numberOfEmployees, owns, review, seeks, subOrganization, taxID, telephone, vatID, foundingLocation, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ElementarySchool elementarySchool = (ElementarySchool) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EmailMessage.java b/src/main/java/org/schema/EmailMessage.java index b649b4c2..55a35dd3 100644 --- a/src/main/java/org/schema/EmailMessage.java +++ b/src/main/java/org/schema/EmailMessage.java @@ -1146,7 +1146,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String schemaVersion; @@ -1363,4 +1363,18 @@ public interface Builder extends ThingBuilder { protected EmailMessage(String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EmailMessage emailMessage = (EmailMessage) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Embassy.java b/src/main/java/org/schema/Embassy.java index 594c2d27..c59baafa 100644 --- a/src/main/java/org/schema/Embassy.java +++ b/src/main/java/org/schema/Embassy.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected Embassy(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Embassy embassy = (Embassy) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Emergency.java b/src/main/java/org/schema/Emergency.java index 42239459..fa70fdb1 100644 --- a/src/main/java/org/schema/Emergency.java +++ b/src/main/java/org/schema/Emergency.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Emergency() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Emergency emergency = (Emergency) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EmergencyService.java b/src/main/java/org/schema/EmergencyService.java index 6e80c81a..cfd65897 100644 --- a/src/main/java/org/schema/EmergencyService.java +++ b/src/main/java/org/schema/EmergencyService.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected EmergencyService(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EmergencyService emergencyService = (EmergencyService) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EmployeeRole.java b/src/main/java/org/schema/EmployeeRole.java index fb434913..39aa9fc8 100644 --- a/src/main/java/org/schema/EmployeeRole.java +++ b/src/main/java/org/schema/EmployeeRole.java @@ -291,7 +291,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String salaryCurrency; @@ -335,5 +335,21 @@ protected EmployeeRole(String salaryCurrency, Number numberedPosition, java.util super(numberedPosition, startDate, roleName, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); mySalaryCurrency = salaryCurrency; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (mySalaryCurrency != null ? mySalaryCurrency.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EmployeeRole employeeRole = (EmployeeRole) o; + if (!super.equals(o)) return false; + if (mySalaryCurrency != null ? !mySalaryCurrency.equals(employeeRole.mySalaryCurrency) : employeeRole.mySalaryCurrency != null) return false; + return true; + } + private String mySalaryCurrency; } diff --git a/src/main/java/org/schema/EmploymentAgency.java b/src/main/java/org/schema/EmploymentAgency.java index 6373900c..2aef7f89 100644 --- a/src/main/java/org/schema/EmploymentAgency.java +++ b/src/main/java/org/schema/EmploymentAgency.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected EmploymentAgency(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EmploymentAgency employmentAgency = (EmploymentAgency) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Endocrine.java b/src/main/java/org/schema/Endocrine.java index 0132443e..8f3f3584 100644 --- a/src/main/java/org/schema/Endocrine.java +++ b/src/main/java/org/schema/Endocrine.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Endocrine() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Endocrine endocrine = (Endocrine) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EndorseAction.java b/src/main/java/org/schema/EndorseAction.java index cd9ea620..2747c337 100644 --- a/src/main/java/org/schema/EndorseAction.java +++ b/src/main/java/org/schema/EndorseAction.java @@ -344,7 +344,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson endorsee; @@ -399,5 +399,21 @@ protected EndorseAction(OrganizationOrPerson endorsee, OrganizationOrPerson agen super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myEndorsee = endorsee; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myEndorsee != null ? myEndorsee.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EndorseAction endorseAction = (EndorseAction) o; + if (!super.equals(o)) return false; + if (myEndorsee != null ? !myEndorsee.equals(endorseAction.myEndorsee) : endorseAction.myEndorsee != null) return false; + return true; + } + private OrganizationOrPerson myEndorsee; } diff --git a/src/main/java/org/schema/Energy.java b/src/main/java/org/schema/Energy.java index 3bdde954..cb4797cb 100644 --- a/src/main/java/org/schema/Energy.java +++ b/src/main/java/org/schema/Energy.java @@ -216,7 +216,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String additionalType; @@ -247,4 +247,18 @@ public interface Builder extends ThingBuilder { protected Energy(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Energy energy = (Energy) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EngineSpecification.java b/src/main/java/org/schema/EngineSpecification.java index 6aa0fd35..4471e036 100644 --- a/src/main/java/org/schema/EngineSpecification.java +++ b/src/main/java/org/schema/EngineSpecification.java @@ -247,7 +247,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private QualitativeValueOrString fuelType; @@ -283,5 +283,21 @@ protected EngineSpecification(QualitativeValueOrString fuelType, String addition super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myFuelType = fuelType; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myFuelType != null ? myFuelType.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EngineSpecification engineSpecification = (EngineSpecification) o; + if (!super.equals(o)) return false; + if (myFuelType != null ? !myFuelType.equals(engineSpecification.myFuelType) : engineSpecification.myFuelType != null) return false; + return true; + } + private QualitativeValueOrString myFuelType; } diff --git a/src/main/java/org/schema/EnrollingByInvitation.java b/src/main/java/org/schema/EnrollingByInvitation.java index 47a3fb63..de7c0056 100644 --- a/src/main/java/org/schema/EnrollingByInvitation.java +++ b/src/main/java/org/schema/EnrollingByInvitation.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected EnrollingByInvitation() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EnrollingByInvitation enrollingByInvitation = (EnrollingByInvitation) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EntertainmentBusiness.java b/src/main/java/org/schema/EntertainmentBusiness.java index 84e46b68..b4f470bf 100644 --- a/src/main/java/org/schema/EntertainmentBusiness.java +++ b/src/main/java/org/schema/EntertainmentBusiness.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected EntertainmentBusiness(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EntertainmentBusiness entertainmentBusiness = (EntertainmentBusiness) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EntryPoint.java b/src/main/java/org/schema/EntryPoint.java index 13c6e7b0..c81040eb 100644 --- a/src/main/java/org/schema/EntryPoint.java +++ b/src/main/java/org/schema/EntryPoint.java @@ -293,7 +293,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String httpMethod; @@ -340,6 +340,30 @@ protected EntryPoint(String httpMethod, String encodingType, String contentType, myActionApplication = actionApplication; myUrlTemplate = urlTemplate; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myHttpMethod != null ? myHttpMethod.hashCode() : 0); + result = 31 * result + (myEncodingType != null ? myEncodingType.hashCode() : 0); + result = 31 * result + (myContentType != null ? myContentType.hashCode() : 0); + result = 31 * result + (myActionApplication != null ? myActionApplication.hashCode() : 0); + result = 31 * result + (myUrlTemplate != null ? myUrlTemplate.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EntryPoint entryPoint = (EntryPoint) o; + if (!super.equals(o)) return false; + if (myHttpMethod != null ? !myHttpMethod.equals(entryPoint.myHttpMethod) : entryPoint.myHttpMethod != null) return false; + if (myEncodingType != null ? !myEncodingType.equals(entryPoint.myEncodingType) : entryPoint.myEncodingType != null) return false; + if (myContentType != null ? !myContentType.equals(entryPoint.myContentType) : entryPoint.myContentType != null) return false; + if (myActionApplication != null ? !myActionApplication.equals(entryPoint.myActionApplication) : entryPoint.myActionApplication != null) return false; + if (myUrlTemplate != null ? !myUrlTemplate.equals(entryPoint.myUrlTemplate) : entryPoint.myUrlTemplate != null) return false; + return true; + } + private String myHttpMethod; private String myEncodingType; private String myContentType; diff --git a/src/main/java/org/schema/Enumeration.java b/src/main/java/org/schema/Enumeration.java index 4cf23e06..978178f4 100644 --- a/src/main/java/org/schema/Enumeration.java +++ b/src/main/java/org/schema/Enumeration.java @@ -252,7 +252,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -289,5 +289,21 @@ protected Enumeration(EnumerationOrProperty supersededBy, String additionalType, super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); mySupersededBy = supersededBy; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (mySupersededBy != null ? mySupersededBy.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Enumeration enumeration = (Enumeration) o; + if (!super.equals(o)) return false; + if (mySupersededBy != null ? !mySupersededBy.equals(enumeration.mySupersededBy) : enumeration.mySupersededBy != null) return false; + return true; + } + private EnumerationOrProperty mySupersededBy; } diff --git a/src/main/java/org/schema/EnumerationOrProperty.java b/src/main/java/org/schema/EnumerationOrProperty.java index 9aa0425f..227f7b43 100644 --- a/src/main/java/org/schema/EnumerationOrProperty.java +++ b/src/main/java/org/schema/EnumerationOrProperty.java @@ -44,4 +44,21 @@ private void clear() { myEnumeration = null; myProperty = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myEnumeration != null ? myEnumeration.hashCode() : 0); + result = 31 * result + (myProperty != null ? myProperty.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EnumerationOrProperty enumerationOrProperty = (EnumerationOrProperty) o; + if (myEnumeration != null ? !myEnumeration.equals(enumerationOrProperty.myEnumeration) : enumerationOrProperty.myEnumeration != null) return false; + if (myProperty != null ? !myProperty.equals(enumerationOrProperty.myProperty) : enumerationOrProperty.myProperty != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue.java b/src/main/java/org/schema/EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue.java index 25023d0d..5b891d97 100644 --- a/src/main/java/org/schema/EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue.java +++ b/src/main/java/org/schema/EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue.java @@ -62,4 +62,27 @@ private void clear() { myQuantitativeValue = null; myStructuredValue = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myEnumeration != null ? myEnumeration.hashCode() : 0); + result = 31 * result + (myPropertyValue != null ? myPropertyValue.hashCode() : 0); + result = 31 * result + (myQualitativeValue != null ? myQualitativeValue.hashCode() : 0); + result = 31 * result + (myQuantitativeValue != null ? myQuantitativeValue.hashCode() : 0); + result = 31 * result + (myStructuredValue != null ? myStructuredValue.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue enumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue = (EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue) o; + if (myEnumeration != null ? !myEnumeration.equals(enumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue.myEnumeration) : enumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue.myEnumeration != null) return false; + if (myPropertyValue != null ? !myPropertyValue.equals(enumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue.myPropertyValue) : enumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue.myPropertyValue != null) return false; + if (myQualitativeValue != null ? !myQualitativeValue.equals(enumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue.myQualitativeValue) : enumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue.myQualitativeValue != null) return false; + if (myQuantitativeValue != null ? !myQuantitativeValue.equals(enumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue.myQuantitativeValue) : enumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue.myQuantitativeValue != null) return false; + if (myStructuredValue != null ? !myStructuredValue.equals(enumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue.myStructuredValue) : enumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue.myStructuredValue != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Episode.java b/src/main/java/org/schema/Episode.java index 1cfa261c..2fd2a178 100644 --- a/src/main/java/org/schema/Episode.java +++ b/src/main/java/org/schema/Episode.java @@ -1314,7 +1314,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person actor; @@ -1563,6 +1563,36 @@ protected Episode(Person actor, Person director, IntegerOrString episodeNumber, myProductionCompany = productionCompany; myTrailer = trailer; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myActor != null ? myActor.hashCode() : 0); + result = 31 * result + (myDirector != null ? myDirector.hashCode() : 0); + result = 31 * result + (myEpisodeNumber != null ? myEpisodeNumber.hashCode() : 0); + result = 31 * result + (myMusicBy != null ? myMusicBy.hashCode() : 0); + result = 31 * result + (myPartOfSeason != null ? myPartOfSeason.hashCode() : 0); + result = 31 * result + (myPartOfSeries != null ? myPartOfSeries.hashCode() : 0); + result = 31 * result + (myProductionCompany != null ? myProductionCompany.hashCode() : 0); + result = 31 * result + (myTrailer != null ? myTrailer.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Episode episode = (Episode) o; + if (!super.equals(o)) return false; + if (myActor != null ? !myActor.equals(episode.myActor) : episode.myActor != null) return false; + if (myDirector != null ? !myDirector.equals(episode.myDirector) : episode.myDirector != null) return false; + if (myEpisodeNumber != null ? !myEpisodeNumber.equals(episode.myEpisodeNumber) : episode.myEpisodeNumber != null) return false; + if (myMusicBy != null ? !myMusicBy.equals(episode.myMusicBy) : episode.myMusicBy != null) return false; + if (myPartOfSeason != null ? !myPartOfSeason.equals(episode.myPartOfSeason) : episode.myPartOfSeason != null) return false; + if (myPartOfSeries != null ? !myPartOfSeries.equals(episode.myPartOfSeries) : episode.myPartOfSeries != null) return false; + if (myProductionCompany != null ? !myProductionCompany.equals(episode.myProductionCompany) : episode.myProductionCompany != null) return false; + if (myTrailer != null ? !myTrailer.equals(episode.myTrailer) : episode.myTrailer != null) return false; + return true; + } + private Person myActor; private Person myDirector; private IntegerOrString myEpisodeNumber; diff --git a/src/main/java/org/schema/Event.java b/src/main/java/org/schema/Event.java index 0a496a2a..fc6015ad 100644 --- a/src/main/java/org/schema/Event.java +++ b/src/main/java/org/schema/Event.java @@ -609,7 +609,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -714,6 +714,56 @@ protected Event(AggregateRating aggregateRating, OrganizationOrPerson organizer, myTypicalAgeRange = typicalAgeRange; myWorkPerformed = workPerformed; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAggregateRating != null ? myAggregateRating.hashCode() : 0); + result = 31 * result + (myOrganizer != null ? myOrganizer.hashCode() : 0); + result = 31 * result + (myAttendee != null ? myAttendee.hashCode() : 0); + result = 31 * result + (myDoorTime != null ? myDoorTime.hashCode() : 0); + result = 31 * result + (myDuration != null ? myDuration.hashCode() : 0); + result = 31 * result + (myEndDate != null ? myEndDate.hashCode() : 0); + result = 31 * result + (myEventStatus != null ? myEventStatus.hashCode() : 0); + result = 31 * result + (myInLanguage != null ? myInLanguage.hashCode() : 0); + result = 31 * result + (myOffers != null ? myOffers.hashCode() : 0); + result = 31 * result + (myPerformer != null ? myPerformer.hashCode() : 0); + result = 31 * result + (myPreviousStartDate != null ? myPreviousStartDate.hashCode() : 0); + result = 31 * result + (myRecordedIn != null ? myRecordedIn.hashCode() : 0); + result = 31 * result + (myReview != null ? myReview.hashCode() : 0); + result = 31 * result + (myStartDate != null ? myStartDate.hashCode() : 0); + result = 31 * result + (mySubEvent != null ? mySubEvent.hashCode() : 0); + result = 31 * result + (mySuperEvent != null ? mySuperEvent.hashCode() : 0); + result = 31 * result + (myTypicalAgeRange != null ? myTypicalAgeRange.hashCode() : 0); + result = 31 * result + (myWorkPerformed != null ? myWorkPerformed.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Event event = (Event) o; + if (!super.equals(o)) return false; + if (myAggregateRating != null ? !myAggregateRating.equals(event.myAggregateRating) : event.myAggregateRating != null) return false; + if (myOrganizer != null ? !myOrganizer.equals(event.myOrganizer) : event.myOrganizer != null) return false; + if (myAttendee != null ? !myAttendee.equals(event.myAttendee) : event.myAttendee != null) return false; + if (myDoorTime != null ? !myDoorTime.equals(event.myDoorTime) : event.myDoorTime != null) return false; + if (myDuration != null ? !myDuration.equals(event.myDuration) : event.myDuration != null) return false; + if (myEndDate != null ? !myEndDate.equals(event.myEndDate) : event.myEndDate != null) return false; + if (myEventStatus != null ? !myEventStatus.equals(event.myEventStatus) : event.myEventStatus != null) return false; + if (myInLanguage != null ? !myInLanguage.equals(event.myInLanguage) : event.myInLanguage != null) return false; + if (myOffers != null ? !myOffers.equals(event.myOffers) : event.myOffers != null) return false; + if (myPerformer != null ? !myPerformer.equals(event.myPerformer) : event.myPerformer != null) return false; + if (myPreviousStartDate != null ? !myPreviousStartDate.equals(event.myPreviousStartDate) : event.myPreviousStartDate != null) return false; + if (myRecordedIn != null ? !myRecordedIn.equals(event.myRecordedIn) : event.myRecordedIn != null) return false; + if (myReview != null ? !myReview.equals(event.myReview) : event.myReview != null) return false; + if (myStartDate != null ? !myStartDate.equals(event.myStartDate) : event.myStartDate != null) return false; + if (mySubEvent != null ? !mySubEvent.equals(event.mySubEvent) : event.mySubEvent != null) return false; + if (mySuperEvent != null ? !mySuperEvent.equals(event.mySuperEvent) : event.mySuperEvent != null) return false; + if (myTypicalAgeRange != null ? !myTypicalAgeRange.equals(event.myTypicalAgeRange) : event.myTypicalAgeRange != null) return false; + if (myWorkPerformed != null ? !myWorkPerformed.equals(event.myWorkPerformed) : event.myWorkPerformed != null) return false; + return true; + } + private AggregateRating myAggregateRating; private OrganizationOrPerson myOrganizer; private OrganizationOrPerson myAttendee; diff --git a/src/main/java/org/schema/EventCancelled.java b/src/main/java/org/schema/EventCancelled.java index c409e628..2c44b0ce 100644 --- a/src/main/java/org/schema/EventCancelled.java +++ b/src/main/java/org/schema/EventCancelled.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected EventCancelled() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EventCancelled eventCancelled = (EventCancelled) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EventPostponed.java b/src/main/java/org/schema/EventPostponed.java index f0f2c619..9da656e9 100644 --- a/src/main/java/org/schema/EventPostponed.java +++ b/src/main/java/org/schema/EventPostponed.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected EventPostponed() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EventPostponed eventPostponed = (EventPostponed) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EventRescheduled.java b/src/main/java/org/schema/EventRescheduled.java index 552dcb5a..aff76bc4 100644 --- a/src/main/java/org/schema/EventRescheduled.java +++ b/src/main/java/org/schema/EventRescheduled.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected EventRescheduled() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EventRescheduled eventRescheduled = (EventRescheduled) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EventReservation.java b/src/main/java/org/schema/EventReservation.java index 8d516def..21af8950 100644 --- a/src/main/java/org/schema/EventReservation.java +++ b/src/main/java/org/schema/EventReservation.java @@ -168,30 +168,40 @@ public EventReservation build() { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull Number number) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setNumber(number); + @NotNull public Builder totalPrice(@NotNull Integer integer) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setInteger(integer); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification priceSpecification) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setPriceSpecification(priceSpecification); + @NotNull public Builder totalPrice(@NotNull Long totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setLong(totalPrice); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification) { - return this.totalPrice(priceSpecification.build()); + @NotNull public Builder totalPrice(@NotNull Float totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setFloat(totalPrice); + return this; + } + /** + * The total price for the reservation or ticket, including applicable taxes, shipping, etc. + */ + @NotNull public Builder totalPrice(@NotNull Double totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setDouble(totalPrice); + return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ @NotNull public Builder totalPrice(@NotNull String totalPrice) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); + if (this.totalPrice == null) this.totalPrice = new Number(); this.totalPrice.setString(totalPrice); return this; } @@ -412,8 +422,10 @@ public Builder id(long id) { if ("modifiedTime".equals(key) && value instanceof java.util.Date) { modifiedTime((java.util.Date)value); continue; } if ("programMembershipUsed".equals(key) && value instanceof ProgramMembership) { programMembershipUsed((ProgramMembership)value); continue; } if ("reservedTicket".equals(key) && value instanceof Ticket) { reservedTicket((Ticket)value); continue; } - if ("totalPrice".equals(key) && value instanceof Number) { totalPrice((Number)value); continue; } - if ("totalPrice".equals(key) && value instanceof PriceSpecification) { totalPrice((PriceSpecification)value); continue; } + if ("totalPrice".equals(key) && value instanceof Integer) { totalPrice((Integer)value); continue; } + if ("totalPrice".equals(key) && value instanceof Long) { totalPrice((Long)value); continue; } + if ("totalPrice".equals(key) && value instanceof Float) { totalPrice((Float)value); continue; } + if ("totalPrice".equals(key) && value instanceof Double) { totalPrice((Double)value); continue; } if ("totalPrice".equals(key) && value instanceof String) { totalPrice((String)value); continue; } if ("priceCurrency".equals(key) && value instanceof String) { priceCurrency((String)value); continue; } if ("broker".equals(key) && value instanceof Organization) { broker((Organization)value); continue; } @@ -427,7 +439,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String reservationId; @@ -439,7 +451,7 @@ public Builder id(long id) { private java.util.Date modifiedTime; private ProgramMembership programMembershipUsed; private Ticket reservedTicket; - private NumberOrPriceSpecificationOrString totalPrice; + private Number totalPrice; private String priceCurrency; private OrganizationOrPerson broker; private String additionalType; @@ -472,9 +484,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder programMembershipUsed(@NotNull ProgramMembership.Builder programMembership); @NotNull Builder reservedTicket(@NotNull Ticket ticket); @NotNull Builder reservedTicket(@NotNull Ticket.Builder ticket); - @NotNull Builder totalPrice(@NotNull Number number); - @NotNull Builder totalPrice(@NotNull PriceSpecification priceSpecification); - @NotNull Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(@NotNull Integer integer); + @NotNull Builder totalPrice(@NotNull Long totalPrice); + @NotNull Builder totalPrice(@NotNull Float totalPrice); + @NotNull Builder totalPrice(@NotNull Double totalPrice); @NotNull Builder totalPrice(@NotNull String totalPrice); @NotNull Builder priceCurrency(@NotNull String priceCurrency); @NotNull Builder broker(@NotNull Organization organization); @@ -495,7 +508,21 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected EventReservation(String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, NumberOrPriceSpecificationOrString totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected EventReservation(String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, Number totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(reservationId, reservationStatus, reservationFor, underName, provider, bookingTime, modifiedTime, programMembershipUsed, reservedTicket, totalPrice, priceCurrency, broker, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EventReservation eventReservation = (EventReservation) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EventScheduled.java b/src/main/java/org/schema/EventScheduled.java index 2400c43f..056d880b 100644 --- a/src/main/java/org/schema/EventScheduled.java +++ b/src/main/java/org/schema/EventScheduled.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected EventScheduled() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EventScheduled eventScheduled = (EventScheduled) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EventStatusType.java b/src/main/java/org/schema/EventStatusType.java index c95dacd3..fde88e9e 100644 --- a/src/main/java/org/schema/EventStatusType.java +++ b/src/main/java/org/schema/EventStatusType.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected EventStatusType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EventStatusType eventStatusType = (EventStatusType) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EventVenue.java b/src/main/java/org/schema/EventVenue.java index 6aff56eb..089ae80c 100644 --- a/src/main/java/org/schema/EventVenue.java +++ b/src/main/java/org/schema/EventVenue.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected EventVenue(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EventVenue eventVenue = (EventVenue) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EvidenceLevelA.java b/src/main/java/org/schema/EvidenceLevelA.java index 4d24a35d..3d468cfd 100644 --- a/src/main/java/org/schema/EvidenceLevelA.java +++ b/src/main/java/org/schema/EvidenceLevelA.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected EvidenceLevelA() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EvidenceLevelA evidenceLevelA = (EvidenceLevelA) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EvidenceLevelB.java b/src/main/java/org/schema/EvidenceLevelB.java index 1d057e22..31f0a5ed 100644 --- a/src/main/java/org/schema/EvidenceLevelB.java +++ b/src/main/java/org/schema/EvidenceLevelB.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected EvidenceLevelB() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EvidenceLevelB evidenceLevelB = (EvidenceLevelB) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/EvidenceLevelC.java b/src/main/java/org/schema/EvidenceLevelC.java index 203d9083..b840f12b 100644 --- a/src/main/java/org/schema/EvidenceLevelC.java +++ b/src/main/java/org/schema/EvidenceLevelC.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected EvidenceLevelC() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EvidenceLevelC evidenceLevelC = (EvidenceLevelC) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ExerciseAction.java b/src/main/java/org/schema/ExerciseAction.java index 67c2bf67..2bf54228 100644 --- a/src/main/java/org/schema/ExerciseAction.java +++ b/src/main/java/org/schema/ExerciseAction.java @@ -550,7 +550,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Place exerciseCourse; @@ -648,6 +648,42 @@ protected ExerciseAction(Place exerciseCourse, Diet exerciseRelatedDiet, Distanc mySportsTeam = sportsTeam; myToLocation = toLocation; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myExerciseCourse != null ? myExerciseCourse.hashCode() : 0); + result = 31 * result + (myExerciseRelatedDiet != null ? myExerciseRelatedDiet.hashCode() : 0); + result = 31 * result + (myDistance != null ? myDistance.hashCode() : 0); + result = 31 * result + (myExercisePlan != null ? myExercisePlan.hashCode() : 0); + result = 31 * result + (myExerciseType != null ? myExerciseType.hashCode() : 0); + result = 31 * result + (myFromLocation != null ? myFromLocation.hashCode() : 0); + result = 31 * result + (myOpponent != null ? myOpponent.hashCode() : 0); + result = 31 * result + (mySportsActivityLocation != null ? mySportsActivityLocation.hashCode() : 0); + result = 31 * result + (mySportsEvent != null ? mySportsEvent.hashCode() : 0); + result = 31 * result + (mySportsTeam != null ? mySportsTeam.hashCode() : 0); + result = 31 * result + (myToLocation != null ? myToLocation.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ExerciseAction exerciseAction = (ExerciseAction) o; + if (!super.equals(o)) return false; + if (myExerciseCourse != null ? !myExerciseCourse.equals(exerciseAction.myExerciseCourse) : exerciseAction.myExerciseCourse != null) return false; + if (myExerciseRelatedDiet != null ? !myExerciseRelatedDiet.equals(exerciseAction.myExerciseRelatedDiet) : exerciseAction.myExerciseRelatedDiet != null) return false; + if (myDistance != null ? !myDistance.equals(exerciseAction.myDistance) : exerciseAction.myDistance != null) return false; + if (myExercisePlan != null ? !myExercisePlan.equals(exerciseAction.myExercisePlan) : exerciseAction.myExercisePlan != null) return false; + if (myExerciseType != null ? !myExerciseType.equals(exerciseAction.myExerciseType) : exerciseAction.myExerciseType != null) return false; + if (myFromLocation != null ? !myFromLocation.equals(exerciseAction.myFromLocation) : exerciseAction.myFromLocation != null) return false; + if (myOpponent != null ? !myOpponent.equals(exerciseAction.myOpponent) : exerciseAction.myOpponent != null) return false; + if (mySportsActivityLocation != null ? !mySportsActivityLocation.equals(exerciseAction.mySportsActivityLocation) : exerciseAction.mySportsActivityLocation != null) return false; + if (mySportsEvent != null ? !mySportsEvent.equals(exerciseAction.mySportsEvent) : exerciseAction.mySportsEvent != null) return false; + if (mySportsTeam != null ? !mySportsTeam.equals(exerciseAction.mySportsTeam) : exerciseAction.mySportsTeam != null) return false; + if (myToLocation != null ? !myToLocation.equals(exerciseAction.myToLocation) : exerciseAction.myToLocation != null) return false; + return true; + } + private Place myExerciseCourse; private Diet myExerciseRelatedDiet; private Distance myDistance; diff --git a/src/main/java/org/schema/ExerciseGym.java b/src/main/java/org/schema/ExerciseGym.java index b42a040d..f53d44dd 100644 --- a/src/main/java/org/schema/ExerciseGym.java +++ b/src/main/java/org/schema/ExerciseGym.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected ExerciseGym(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ExerciseGym exerciseGym = (ExerciseGym) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ExercisePlan.java b/src/main/java/org/schema/ExercisePlan.java index f6e16992..ce3b17b9 100644 --- a/src/main/java/org/schema/ExercisePlan.java +++ b/src/main/java/org/schema/ExercisePlan.java @@ -632,7 +632,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Duration activityDuration; @@ -743,6 +743,36 @@ protected ExercisePlan(Duration activityDuration, String activityFrequency, Stri myRestPeriods = restPeriods; myWorkload = workload; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myActivityDuration != null ? myActivityDuration.hashCode() : 0); + result = 31 * result + (myActivityFrequency != null ? myActivityFrequency.hashCode() : 0); + result = 31 * result + (myAdditionalVariable != null ? myAdditionalVariable.hashCode() : 0); + result = 31 * result + (myExerciseType != null ? myExerciseType.hashCode() : 0); + result = 31 * result + (myIntensity != null ? myIntensity.hashCode() : 0); + result = 31 * result + (myRepetitions != null ? myRepetitions.hashCode() : 0); + result = 31 * result + (myRestPeriods != null ? myRestPeriods.hashCode() : 0); + result = 31 * result + (myWorkload != null ? myWorkload.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ExercisePlan exercisePlan = (ExercisePlan) o; + if (!super.equals(o)) return false; + if (myActivityDuration != null ? !myActivityDuration.equals(exercisePlan.myActivityDuration) : exercisePlan.myActivityDuration != null) return false; + if (myActivityFrequency != null ? !myActivityFrequency.equals(exercisePlan.myActivityFrequency) : exercisePlan.myActivityFrequency != null) return false; + if (myAdditionalVariable != null ? !myAdditionalVariable.equals(exercisePlan.myAdditionalVariable) : exercisePlan.myAdditionalVariable != null) return false; + if (myExerciseType != null ? !myExerciseType.equals(exercisePlan.myExerciseType) : exercisePlan.myExerciseType != null) return false; + if (myIntensity != null ? !myIntensity.equals(exercisePlan.myIntensity) : exercisePlan.myIntensity != null) return false; + if (myRepetitions != null ? !myRepetitions.equals(exercisePlan.myRepetitions) : exercisePlan.myRepetitions != null) return false; + if (myRestPeriods != null ? !myRestPeriods.equals(exercisePlan.myRestPeriods) : exercisePlan.myRestPeriods != null) return false; + if (myWorkload != null ? !myWorkload.equals(exercisePlan.myWorkload) : exercisePlan.myWorkload != null) return false; + return true; + } + private Duration myActivityDuration; private String myActivityFrequency; private String myAdditionalVariable; diff --git a/src/main/java/org/schema/Eye.java b/src/main/java/org/schema/Eye.java index 8f58cf66..e07e4ad1 100644 --- a/src/main/java/org/schema/Eye.java +++ b/src/main/java/org/schema/Eye.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Eye() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Eye eye = (Eye) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/FDAcategoryA.java b/src/main/java/org/schema/FDAcategoryA.java index 9f19020e..8a273eaf 100644 --- a/src/main/java/org/schema/FDAcategoryA.java +++ b/src/main/java/org/schema/FDAcategoryA.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected FDAcategoryA() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FDAcategoryA fDAcategoryA = (FDAcategoryA) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/FDAcategoryB.java b/src/main/java/org/schema/FDAcategoryB.java index a6c9cf85..a9fad75f 100644 --- a/src/main/java/org/schema/FDAcategoryB.java +++ b/src/main/java/org/schema/FDAcategoryB.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected FDAcategoryB() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FDAcategoryB fDAcategoryB = (FDAcategoryB) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/FDAcategoryC.java b/src/main/java/org/schema/FDAcategoryC.java index 9d057fa2..7a8d406f 100644 --- a/src/main/java/org/schema/FDAcategoryC.java +++ b/src/main/java/org/schema/FDAcategoryC.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected FDAcategoryC() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FDAcategoryC fDAcategoryC = (FDAcategoryC) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/FDAcategoryD.java b/src/main/java/org/schema/FDAcategoryD.java index 610ebc8c..1557fd4a 100644 --- a/src/main/java/org/schema/FDAcategoryD.java +++ b/src/main/java/org/schema/FDAcategoryD.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected FDAcategoryD() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FDAcategoryD fDAcategoryD = (FDAcategoryD) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/FDAcategoryX.java b/src/main/java/org/schema/FDAcategoryX.java index 1586d99e..d430e0e8 100644 --- a/src/main/java/org/schema/FDAcategoryX.java +++ b/src/main/java/org/schema/FDAcategoryX.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected FDAcategoryX() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FDAcategoryX fDAcategoryX = (FDAcategoryX) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/FDAnotEvaluated.java b/src/main/java/org/schema/FDAnotEvaluated.java index 9c2646db..e86719b8 100644 --- a/src/main/java/org/schema/FDAnotEvaluated.java +++ b/src/main/java/org/schema/FDAnotEvaluated.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected FDAnotEvaluated() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FDAnotEvaluated fDAnotEvaluated = (FDAnotEvaluated) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/FailedActionStatus.java b/src/main/java/org/schema/FailedActionStatus.java index 621c3607..452da280 100644 --- a/src/main/java/org/schema/FailedActionStatus.java +++ b/src/main/java/org/schema/FailedActionStatus.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected FailedActionStatus() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FailedActionStatus failedActionStatus = (FailedActionStatus) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/FastFoodRestaurant.java b/src/main/java/org/schema/FastFoodRestaurant.java index ddb53491..6c19ae3f 100644 --- a/src/main/java/org/schema/FastFoodRestaurant.java +++ b/src/main/java/org/schema/FastFoodRestaurant.java @@ -540,7 +540,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BooleanOrString acceptsReservations; @@ -636,4 +636,18 @@ public interface Builder extends ThingBuilder { protected FastFoodRestaurant(BooleanOrString acceptsReservations, String menu, String servesCuisine, Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(acceptsReservations, menu, servesCuisine, parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FastFoodRestaurant fastFoodRestaurant = (FastFoodRestaurant) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Festival.java b/src/main/java/org/schema/Festival.java index f4eedd47..e140600b 100644 --- a/src/main/java/org/schema/Festival.java +++ b/src/main/java/org/schema/Festival.java @@ -496,7 +496,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -583,4 +583,18 @@ public interface Builder extends ThingBuilder { protected Festival(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Festival festival = (Festival) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/FilmAction.java b/src/main/java/org/schema/FilmAction.java index 629afca4..75a7aeba 100644 --- a/src/main/java/org/schema/FilmAction.java +++ b/src/main/java/org/schema/FilmAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected FilmAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FilmAction filmAction = (FilmAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/FinancialService.java b/src/main/java/org/schema/FinancialService.java index 30d32f6a..a90b7420 100644 --- a/src/main/java/org/schema/FinancialService.java +++ b/src/main/java/org/schema/FinancialService.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected FinancialService(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FinancialService financialService = (FinancialService) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/FindAction.java b/src/main/java/org/schema/FindAction.java index 1dcef82b..408cf6b9 100644 --- a/src/main/java/org/schema/FindAction.java +++ b/src/main/java/org/schema/FindAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected FindAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FindAction findAction = (FindAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/FireStation.java b/src/main/java/org/schema/FireStation.java index 9740e960..6d0f301d 100644 --- a/src/main/java/org/schema/FireStation.java +++ b/src/main/java/org/schema/FireStation.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected FireStation(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FireStation fireStation = (FireStation) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Flexibility.java b/src/main/java/org/schema/Flexibility.java index 87dea949..6880b6db 100644 --- a/src/main/java/org/schema/Flexibility.java +++ b/src/main/java/org/schema/Flexibility.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Flexibility() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Flexibility flexibility = (Flexibility) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Flight.java b/src/main/java/org/schema/Flight.java index 00425057..245c5a27 100644 --- a/src/main/java/org/schema/Flight.java +++ b/src/main/java/org/schema/Flight.java @@ -545,7 +545,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Participant seller; @@ -639,6 +639,54 @@ protected Flight(Participant seller, OrganizationOrPerson provider, String fligh myFlightDistance = flightDistance; myWebCheckinTime = webCheckinTime; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (mySeller != null ? mySeller.hashCode() : 0); + result = 31 * result + (myProvider != null ? myProvider.hashCode() : 0); + result = 31 * result + (myFlightNumber != null ? myFlightNumber.hashCode() : 0); + result = 31 * result + (myDepartureTime != null ? myDepartureTime.hashCode() : 0); + result = 31 * result + (myArrivalTime != null ? myArrivalTime.hashCode() : 0); + result = 31 * result + (myDepartureAirport != null ? myDepartureAirport.hashCode() : 0); + result = 31 * result + (myArrivalAirport != null ? myArrivalAirport.hashCode() : 0); + result = 31 * result + (myDepartureGate != null ? myDepartureGate.hashCode() : 0); + result = 31 * result + (myArrivalGate != null ? myArrivalGate.hashCode() : 0); + result = 31 * result + (myBoardingPolicy != null ? myBoardingPolicy.hashCode() : 0); + result = 31 * result + (myDepartureTerminal != null ? myDepartureTerminal.hashCode() : 0); + result = 31 * result + (myArrivalTerminal != null ? myArrivalTerminal.hashCode() : 0); + result = 31 * result + (myAircraft != null ? myAircraft.hashCode() : 0); + result = 31 * result + (myMealService != null ? myMealService.hashCode() : 0); + result = 31 * result + (myEstimatedFlightDuration != null ? myEstimatedFlightDuration.hashCode() : 0); + result = 31 * result + (myFlightDistance != null ? myFlightDistance.hashCode() : 0); + result = 31 * result + (myWebCheckinTime != null ? myWebCheckinTime.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Flight flight = (Flight) o; + if (!super.equals(o)) return false; + if (mySeller != null ? !mySeller.equals(flight.mySeller) : flight.mySeller != null) return false; + if (myProvider != null ? !myProvider.equals(flight.myProvider) : flight.myProvider != null) return false; + if (myFlightNumber != null ? !myFlightNumber.equals(flight.myFlightNumber) : flight.myFlightNumber != null) return false; + if (myDepartureTime != null ? !myDepartureTime.equals(flight.myDepartureTime) : flight.myDepartureTime != null) return false; + if (myArrivalTime != null ? !myArrivalTime.equals(flight.myArrivalTime) : flight.myArrivalTime != null) return false; + if (myDepartureAirport != null ? !myDepartureAirport.equals(flight.myDepartureAirport) : flight.myDepartureAirport != null) return false; + if (myArrivalAirport != null ? !myArrivalAirport.equals(flight.myArrivalAirport) : flight.myArrivalAirport != null) return false; + if (myDepartureGate != null ? !myDepartureGate.equals(flight.myDepartureGate) : flight.myDepartureGate != null) return false; + if (myArrivalGate != null ? !myArrivalGate.equals(flight.myArrivalGate) : flight.myArrivalGate != null) return false; + if (myBoardingPolicy != null ? !myBoardingPolicy.equals(flight.myBoardingPolicy) : flight.myBoardingPolicy != null) return false; + if (myDepartureTerminal != null ? !myDepartureTerminal.equals(flight.myDepartureTerminal) : flight.myDepartureTerminal != null) return false; + if (myArrivalTerminal != null ? !myArrivalTerminal.equals(flight.myArrivalTerminal) : flight.myArrivalTerminal != null) return false; + if (myAircraft != null ? !myAircraft.equals(flight.myAircraft) : flight.myAircraft != null) return false; + if (myMealService != null ? !myMealService.equals(flight.myMealService) : flight.myMealService != null) return false; + if (myEstimatedFlightDuration != null ? !myEstimatedFlightDuration.equals(flight.myEstimatedFlightDuration) : flight.myEstimatedFlightDuration != null) return false; + if (myFlightDistance != null ? !myFlightDistance.equals(flight.myFlightDistance) : flight.myFlightDistance != null) return false; + if (myWebCheckinTime != null ? !myWebCheckinTime.equals(flight.myWebCheckinTime) : flight.myWebCheckinTime != null) return false; + return true; + } + private Participant mySeller; private OrganizationOrPerson myProvider; private String myFlightNumber; diff --git a/src/main/java/org/schema/FlightReservation.java b/src/main/java/org/schema/FlightReservation.java index 8c637d32..f7371a2d 100644 --- a/src/main/java/org/schema/FlightReservation.java +++ b/src/main/java/org/schema/FlightReservation.java @@ -235,30 +235,40 @@ public FlightReservation build() { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull Number number) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setNumber(number); + @NotNull public Builder totalPrice(@NotNull Integer integer) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setInteger(integer); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification priceSpecification) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setPriceSpecification(priceSpecification); + @NotNull public Builder totalPrice(@NotNull Long totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setLong(totalPrice); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification) { - return this.totalPrice(priceSpecification.build()); + @NotNull public Builder totalPrice(@NotNull Float totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setFloat(totalPrice); + return this; + } + /** + * The total price for the reservation or ticket, including applicable taxes, shipping, etc. + */ + @NotNull public Builder totalPrice(@NotNull Double totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setDouble(totalPrice); + return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ @NotNull public Builder totalPrice(@NotNull String totalPrice) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); + if (this.totalPrice == null) this.totalPrice = new Number(); this.totalPrice.setString(totalPrice); return this; } @@ -484,8 +494,10 @@ public Builder id(long id) { if ("modifiedTime".equals(key) && value instanceof java.util.Date) { modifiedTime((java.util.Date)value); continue; } if ("programMembershipUsed".equals(key) && value instanceof ProgramMembership) { programMembershipUsed((ProgramMembership)value); continue; } if ("reservedTicket".equals(key) && value instanceof Ticket) { reservedTicket((Ticket)value); continue; } - if ("totalPrice".equals(key) && value instanceof Number) { totalPrice((Number)value); continue; } - if ("totalPrice".equals(key) && value instanceof PriceSpecification) { totalPrice((PriceSpecification)value); continue; } + if ("totalPrice".equals(key) && value instanceof Integer) { totalPrice((Integer)value); continue; } + if ("totalPrice".equals(key) && value instanceof Long) { totalPrice((Long)value); continue; } + if ("totalPrice".equals(key) && value instanceof Float) { totalPrice((Float)value); continue; } + if ("totalPrice".equals(key) && value instanceof Double) { totalPrice((Double)value); continue; } if ("totalPrice".equals(key) && value instanceof String) { totalPrice((String)value); continue; } if ("priceCurrency".equals(key) && value instanceof String) { priceCurrency((String)value); continue; } if ("broker".equals(key) && value instanceof Organization) { broker((Organization)value); continue; } @@ -499,7 +511,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String boardingGroup; @@ -515,7 +527,7 @@ public Builder id(long id) { private java.util.Date modifiedTime; private ProgramMembership programMembershipUsed; private Ticket reservedTicket; - private NumberOrPriceSpecificationOrString totalPrice; + private Number totalPrice; private String priceCurrency; private OrganizationOrPerson broker; private String additionalType; @@ -554,9 +566,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder programMembershipUsed(@NotNull ProgramMembership.Builder programMembership); @NotNull Builder reservedTicket(@NotNull Ticket ticket); @NotNull Builder reservedTicket(@NotNull Ticket.Builder ticket); - @NotNull Builder totalPrice(@NotNull Number number); - @NotNull Builder totalPrice(@NotNull PriceSpecification priceSpecification); - @NotNull Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(@NotNull Integer integer); + @NotNull Builder totalPrice(@NotNull Long totalPrice); + @NotNull Builder totalPrice(@NotNull Float totalPrice); + @NotNull Builder totalPrice(@NotNull Double totalPrice); @NotNull Builder totalPrice(@NotNull String totalPrice); @NotNull Builder priceCurrency(@NotNull String priceCurrency); @NotNull Builder broker(@NotNull Organization organization); @@ -577,13 +590,35 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected FlightReservation(String boardingGroup, String passengerSequenceNumber, String securityScreening, QualitativeValueOrString passengerPriorityStatus, String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, NumberOrPriceSpecificationOrString totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected FlightReservation(String boardingGroup, String passengerSequenceNumber, String securityScreening, QualitativeValueOrString passengerPriorityStatus, String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, Number totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(reservationId, reservationStatus, reservationFor, underName, provider, bookingTime, modifiedTime, programMembershipUsed, reservedTicket, totalPrice, priceCurrency, broker, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myBoardingGroup = boardingGroup; myPassengerSequenceNumber = passengerSequenceNumber; mySecurityScreening = securityScreening; myPassengerPriorityStatus = passengerPriorityStatus; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBoardingGroup != null ? myBoardingGroup.hashCode() : 0); + result = 31 * result + (myPassengerSequenceNumber != null ? myPassengerSequenceNumber.hashCode() : 0); + result = 31 * result + (mySecurityScreening != null ? mySecurityScreening.hashCode() : 0); + result = 31 * result + (myPassengerPriorityStatus != null ? myPassengerPriorityStatus.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FlightReservation flightReservation = (FlightReservation) o; + if (!super.equals(o)) return false; + if (myBoardingGroup != null ? !myBoardingGroup.equals(flightReservation.myBoardingGroup) : flightReservation.myBoardingGroup != null) return false; + if (myPassengerSequenceNumber != null ? !myPassengerSequenceNumber.equals(flightReservation.myPassengerSequenceNumber) : flightReservation.myPassengerSequenceNumber != null) return false; + if (mySecurityScreening != null ? !mySecurityScreening.equals(flightReservation.mySecurityScreening) : flightReservation.mySecurityScreening != null) return false; + if (myPassengerPriorityStatus != null ? !myPassengerPriorityStatus.equals(flightReservation.myPassengerPriorityStatus) : flightReservation.myPassengerPriorityStatus != null) return false; + return true; + } + private String myBoardingGroup; private String myPassengerSequenceNumber; private String mySecurityScreening; diff --git a/src/main/java/org/schema/Florist.java b/src/main/java/org/schema/Florist.java index e7cfef0e..801f4f6c 100644 --- a/src/main/java/org/schema/Florist.java +++ b/src/main/java/org/schema/Florist.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected Florist(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Florist florist = (Florist) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/FollowAction.java b/src/main/java/org/schema/FollowAction.java index a95b647d..976510dd 100644 --- a/src/main/java/org/schema/FollowAction.java +++ b/src/main/java/org/schema/FollowAction.java @@ -344,7 +344,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson followee; @@ -399,5 +399,21 @@ protected FollowAction(OrganizationOrPerson followee, OrganizationOrPerson agent super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myFollowee = followee; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myFollowee != null ? myFollowee.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FollowAction followAction = (FollowAction) o; + if (!super.equals(o)) return false; + if (myFollowee != null ? !myFollowee.equals(followAction.myFollowee) : followAction.myFollowee != null) return false; + return true; + } + private OrganizationOrPerson myFollowee; } diff --git a/src/main/java/org/schema/FoodEstablishment.java b/src/main/java/org/schema/FoodEstablishment.java index 38be34c0..e3992162 100644 --- a/src/main/java/org/schema/FoodEstablishment.java +++ b/src/main/java/org/schema/FoodEstablishment.java @@ -558,7 +558,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BooleanOrString acceptsReservations; @@ -657,6 +657,26 @@ protected FoodEstablishment(BooleanOrString acceptsReservations, String menu, St myMenu = menu; myServesCuisine = servesCuisine; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAcceptsReservations != null ? myAcceptsReservations.hashCode() : 0); + result = 31 * result + (myMenu != null ? myMenu.hashCode() : 0); + result = 31 * result + (myServesCuisine != null ? myServesCuisine.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FoodEstablishment foodEstablishment = (FoodEstablishment) o; + if (!super.equals(o)) return false; + if (myAcceptsReservations != null ? !myAcceptsReservations.equals(foodEstablishment.myAcceptsReservations) : foodEstablishment.myAcceptsReservations != null) return false; + if (myMenu != null ? !myMenu.equals(foodEstablishment.myMenu) : foodEstablishment.myMenu != null) return false; + if (myServesCuisine != null ? !myServesCuisine.equals(foodEstablishment.myServesCuisine) : foodEstablishment.myServesCuisine != null) return false; + return true; + } + private BooleanOrString myAcceptsReservations; private String myMenu; private String myServesCuisine; diff --git a/src/main/java/org/schema/FoodEstablishmentOrPlace.java b/src/main/java/org/schema/FoodEstablishmentOrPlace.java index d3d09323..7f679081 100644 --- a/src/main/java/org/schema/FoodEstablishmentOrPlace.java +++ b/src/main/java/org/schema/FoodEstablishmentOrPlace.java @@ -44,4 +44,21 @@ private void clear() { myFoodEstablishment = null; myPlace = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myFoodEstablishment != null ? myFoodEstablishment.hashCode() : 0); + result = 31 * result + (myPlace != null ? myPlace.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FoodEstablishmentOrPlace foodEstablishmentOrPlace = (FoodEstablishmentOrPlace) o; + if (myFoodEstablishment != null ? !myFoodEstablishment.equals(foodEstablishmentOrPlace.myFoodEstablishment) : foodEstablishmentOrPlace.myFoodEstablishment != null) return false; + if (myPlace != null ? !myPlace.equals(foodEstablishmentOrPlace.myPlace) : foodEstablishmentOrPlace.myPlace != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/FoodEstablishmentReservation.java b/src/main/java/org/schema/FoodEstablishmentReservation.java index 9d60d340..510c47e3 100644 --- a/src/main/java/org/schema/FoodEstablishmentReservation.java +++ b/src/main/java/org/schema/FoodEstablishmentReservation.java @@ -214,30 +214,40 @@ public FoodEstablishmentReservation build() { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull Number number) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setNumber(number); + @NotNull public Builder totalPrice(@NotNull Integer integer) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setInteger(integer); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification priceSpecification) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setPriceSpecification(priceSpecification); + @NotNull public Builder totalPrice(@NotNull Long totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setLong(totalPrice); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification) { - return this.totalPrice(priceSpecification.build()); + @NotNull public Builder totalPrice(@NotNull Float totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setFloat(totalPrice); + return this; + } + /** + * The total price for the reservation or ticket, including applicable taxes, shipping, etc. + */ + @NotNull public Builder totalPrice(@NotNull Double totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setDouble(totalPrice); + return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ @NotNull public Builder totalPrice(@NotNull String totalPrice) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); + if (this.totalPrice == null) this.totalPrice = new Number(); this.totalPrice.setString(totalPrice); return this; } @@ -461,8 +471,10 @@ public Builder id(long id) { if ("modifiedTime".equals(key) && value instanceof java.util.Date) { modifiedTime((java.util.Date)value); continue; } if ("programMembershipUsed".equals(key) && value instanceof ProgramMembership) { programMembershipUsed((ProgramMembership)value); continue; } if ("reservedTicket".equals(key) && value instanceof Ticket) { reservedTicket((Ticket)value); continue; } - if ("totalPrice".equals(key) && value instanceof Number) { totalPrice((Number)value); continue; } - if ("totalPrice".equals(key) && value instanceof PriceSpecification) { totalPrice((PriceSpecification)value); continue; } + if ("totalPrice".equals(key) && value instanceof Integer) { totalPrice((Integer)value); continue; } + if ("totalPrice".equals(key) && value instanceof Long) { totalPrice((Long)value); continue; } + if ("totalPrice".equals(key) && value instanceof Float) { totalPrice((Float)value); continue; } + if ("totalPrice".equals(key) && value instanceof Double) { totalPrice((Double)value); continue; } if ("totalPrice".equals(key) && value instanceof String) { totalPrice((String)value); continue; } if ("priceCurrency".equals(key) && value instanceof String) { priceCurrency((String)value); continue; } if ("broker".equals(key) && value instanceof Organization) { broker((Organization)value); continue; } @@ -476,7 +488,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private java.util.Date startTime; @@ -490,7 +502,7 @@ public Builder id(long id) { private java.util.Date modifiedTime; private ProgramMembership programMembershipUsed; private Ticket reservedTicket; - private NumberOrPriceSpecificationOrString totalPrice; + private Number totalPrice; private String priceCurrency; private OrganizationOrPerson broker; private String additionalType; @@ -527,9 +539,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder programMembershipUsed(@NotNull ProgramMembership.Builder programMembership); @NotNull Builder reservedTicket(@NotNull Ticket ticket); @NotNull Builder reservedTicket(@NotNull Ticket.Builder ticket); - @NotNull Builder totalPrice(@NotNull Number number); - @NotNull Builder totalPrice(@NotNull PriceSpecification priceSpecification); - @NotNull Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(@NotNull Integer integer); + @NotNull Builder totalPrice(@NotNull Long totalPrice); + @NotNull Builder totalPrice(@NotNull Float totalPrice); + @NotNull Builder totalPrice(@NotNull Double totalPrice); @NotNull Builder totalPrice(@NotNull String totalPrice); @NotNull Builder priceCurrency(@NotNull String priceCurrency); @NotNull Builder broker(@NotNull Organization organization); @@ -550,11 +563,29 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected FoodEstablishmentReservation(java.util.Date startTime, IntegerOrQuantitativeValue partySize, String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, NumberOrPriceSpecificationOrString totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected FoodEstablishmentReservation(java.util.Date startTime, IntegerOrQuantitativeValue partySize, String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, Number totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(reservationId, reservationStatus, reservationFor, underName, provider, bookingTime, modifiedTime, programMembershipUsed, reservedTicket, totalPrice, priceCurrency, broker, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myStartTime = startTime; myPartySize = partySize; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myStartTime != null ? myStartTime.hashCode() : 0); + result = 31 * result + (myPartySize != null ? myPartySize.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FoodEstablishmentReservation foodEstablishmentReservation = (FoodEstablishmentReservation) o; + if (!super.equals(o)) return false; + if (myStartTime != null ? !myStartTime.equals(foodEstablishmentReservation.myStartTime) : foodEstablishmentReservation.myStartTime != null) return false; + if (myPartySize != null ? !myPartySize.equals(foodEstablishmentReservation.myPartySize) : foodEstablishmentReservation.myPartySize != null) return false; + return true; + } + private java.util.Date myStartTime; private IntegerOrQuantitativeValue myPartySize; } diff --git a/src/main/java/org/schema/FoodEvent.java b/src/main/java/org/schema/FoodEvent.java index f8b0db40..c8e22692 100644 --- a/src/main/java/org/schema/FoodEvent.java +++ b/src/main/java/org/schema/FoodEvent.java @@ -496,7 +496,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -583,4 +583,18 @@ public interface Builder extends ThingBuilder { protected FoodEvent(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FoodEvent foodEvent = (FoodEvent) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/FourWheelDriveConfiguration.java b/src/main/java/org/schema/FourWheelDriveConfiguration.java index 0df7f43a..e99cde0c 100644 --- a/src/main/java/org/schema/FourWheelDriveConfiguration.java +++ b/src/main/java/org/schema/FourWheelDriveConfiguration.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected FourWheelDriveConfiguration() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FourWheelDriveConfiguration fourWheelDriveConfiguration = (FourWheelDriveConfiguration) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/FrontWheelDriveConfiguration.java b/src/main/java/org/schema/FrontWheelDriveConfiguration.java index 58ddb3f2..a4f11122 100644 --- a/src/main/java/org/schema/FrontWheelDriveConfiguration.java +++ b/src/main/java/org/schema/FrontWheelDriveConfiguration.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected FrontWheelDriveConfiguration() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FrontWheelDriveConfiguration frontWheelDriveConfiguration = (FrontWheelDriveConfiguration) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Fungus.java b/src/main/java/org/schema/Fungus.java index 7453bb72..c7efe0fb 100644 --- a/src/main/java/org/schema/Fungus.java +++ b/src/main/java/org/schema/Fungus.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Fungus() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Fungus fungus = (Fungus) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/FurnitureStore.java b/src/main/java/org/schema/FurnitureStore.java index 72d73bfd..fbca4635 100644 --- a/src/main/java/org/schema/FurnitureStore.java +++ b/src/main/java/org/schema/FurnitureStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected FurnitureStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FurnitureStore furnitureStore = (FurnitureStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Game.java b/src/main/java/org/schema/Game.java index 3b733209..b1fe5bf8 100644 --- a/src/main/java/org/schema/Game.java +++ b/src/main/java/org/schema/Game.java @@ -1271,7 +1271,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private QuantitativeValue numberOfPlayers; @@ -1511,6 +1511,30 @@ protected Game(QuantitativeValue numberOfPlayers, Thing quest, Thing gameItem, T myCharacterAttribute = characterAttribute; myGameLocation = gameLocation; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myNumberOfPlayers != null ? myNumberOfPlayers.hashCode() : 0); + result = 31 * result + (myQuest != null ? myQuest.hashCode() : 0); + result = 31 * result + (myGameItem != null ? myGameItem.hashCode() : 0); + result = 31 * result + (myCharacterAttribute != null ? myCharacterAttribute.hashCode() : 0); + result = 31 * result + (myGameLocation != null ? myGameLocation.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Game game = (Game) o; + if (!super.equals(o)) return false; + if (myNumberOfPlayers != null ? !myNumberOfPlayers.equals(game.myNumberOfPlayers) : game.myNumberOfPlayers != null) return false; + if (myQuest != null ? !myQuest.equals(game.myQuest) : game.myQuest != null) return false; + if (myGameItem != null ? !myGameItem.equals(game.myGameItem) : game.myGameItem != null) return false; + if (myCharacterAttribute != null ? !myCharacterAttribute.equals(game.myCharacterAttribute) : game.myCharacterAttribute != null) return false; + if (myGameLocation != null ? !myGameLocation.equals(game.myGameLocation) : game.myGameLocation != null) return false; + return true; + } + private QuantitativeValue myNumberOfPlayers; private Thing myQuest; private Thing myGameItem; diff --git a/src/main/java/org/schema/GamePlayMode.java b/src/main/java/org/schema/GamePlayMode.java index 1bfd7e15..1c2d0c08 100644 --- a/src/main/java/org/schema/GamePlayMode.java +++ b/src/main/java/org/schema/GamePlayMode.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected GamePlayMode(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GamePlayMode gamePlayMode = (GamePlayMode) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/GameServer.java b/src/main/java/org/schema/GameServer.java index 36816435..3951d1cd 100644 --- a/src/main/java/org/schema/GameServer.java +++ b/src/main/java/org/schema/GameServer.java @@ -270,7 +270,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private GameServerStatus serverStatus; @@ -312,6 +312,26 @@ protected GameServer(GameServerStatus serverStatus, Integer playersOnline, Video myPlayersOnline = playersOnline; myGame = game; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myServerStatus != null ? myServerStatus.hashCode() : 0); + result = 31 * result + (myPlayersOnline != null ? myPlayersOnline.hashCode() : 0); + result = 31 * result + (myGame != null ? myGame.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GameServer gameServer = (GameServer) o; + if (!super.equals(o)) return false; + if (myServerStatus != null ? !myServerStatus.equals(gameServer.myServerStatus) : gameServer.myServerStatus != null) return false; + if (myPlayersOnline != null ? !myPlayersOnline.equals(gameServer.myPlayersOnline) : gameServer.myPlayersOnline != null) return false; + if (myGame != null ? !myGame.equals(gameServer.myGame) : gameServer.myGame != null) return false; + return true; + } + private GameServerStatus myServerStatus; private Integer myPlayersOnline; private VideoGame myGame; diff --git a/src/main/java/org/schema/GameServerStatus.java b/src/main/java/org/schema/GameServerStatus.java index 0ff6a09d..0b92b05b 100644 --- a/src/main/java/org/schema/GameServerStatus.java +++ b/src/main/java/org/schema/GameServerStatus.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected GameServerStatus(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GameServerStatus gameServerStatus = (GameServerStatus) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/GardenStore.java b/src/main/java/org/schema/GardenStore.java index d8e7edf0..08c33c0a 100644 --- a/src/main/java/org/schema/GardenStore.java +++ b/src/main/java/org/schema/GardenStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected GardenStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GardenStore gardenStore = (GardenStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/GasStation.java b/src/main/java/org/schema/GasStation.java index ed32556a..96a22fd7 100644 --- a/src/main/java/org/schema/GasStation.java +++ b/src/main/java/org/schema/GasStation.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected GasStation(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GasStation gasStation = (GasStation) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Gastroenterologic.java b/src/main/java/org/schema/Gastroenterologic.java index bb4e4a5f..42f728d0 100644 --- a/src/main/java/org/schema/Gastroenterologic.java +++ b/src/main/java/org/schema/Gastroenterologic.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Gastroenterologic() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Gastroenterologic gastroenterologic = (Gastroenterologic) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/GatedResidenceCommunity.java b/src/main/java/org/schema/GatedResidenceCommunity.java index 5caf11a7..686fbb1b 100644 --- a/src/main/java/org/schema/GatedResidenceCommunity.java +++ b/src/main/java/org/schema/GatedResidenceCommunity.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected GatedResidenceCommunity(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GatedResidenceCommunity gatedResidenceCommunity = (GatedResidenceCommunity) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/GeneralContractor.java b/src/main/java/org/schema/GeneralContractor.java index 8fd99df9..e94f1d0f 100644 --- a/src/main/java/org/schema/GeneralContractor.java +++ b/src/main/java/org/schema/GeneralContractor.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected GeneralContractor(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GeneralContractor generalContractor = (GeneralContractor) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Genetic.java b/src/main/java/org/schema/Genetic.java index 6e6df00a..672d9835 100644 --- a/src/main/java/org/schema/Genetic.java +++ b/src/main/java/org/schema/Genetic.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Genetic() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Genetic genetic = (Genetic) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Genitourinary.java b/src/main/java/org/schema/Genitourinary.java index 0cd5dd85..8e62e46a 100644 --- a/src/main/java/org/schema/Genitourinary.java +++ b/src/main/java/org/schema/Genitourinary.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Genitourinary() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Genitourinary genitourinary = (Genitourinary) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/GeoCoordinates.java b/src/main/java/org/schema/GeoCoordinates.java index f8f07ba5..9a443050 100644 --- a/src/main/java/org/schema/GeoCoordinates.java +++ b/src/main/java/org/schema/GeoCoordinates.java @@ -29,19 +29,19 @@ public class GeoCoordinates extends StructuredValue { /** * The elevation of a location. */ - public NumberOrString getElevation() { + public Number getElevation() { return myElevation; } /** * The latitude of a location. For example 37.42242. */ - public NumberOrString getLatitude() { + public Number getLatitude() { return myLatitude; } /** * The longitude of a location. For example -122.08585. */ - public NumberOrString getLongitude() { + public Number getLongitude() { return myLongitude; } /** @@ -57,48 +57,120 @@ public GeoCoordinates build() { /** * The elevation of a location. */ - @NotNull public Builder elevation(@NotNull Number number) { - if (this.elevation == null) this.elevation = new NumberOrString(); - this.elevation.setNumber(number); + @NotNull public Builder elevation(@NotNull Integer integer) { + if (this.elevation == null) this.elevation = new Number(); + this.elevation.setInteger(integer); + return this; + } + /** + * The elevation of a location. + */ + @NotNull public Builder elevation(@NotNull Long elevation) { + if (this.elevation == null) this.elevation = new Number(); + this.elevation.setLong(elevation); + return this; + } + /** + * The elevation of a location. + */ + @NotNull public Builder elevation(@NotNull Float elevation) { + if (this.elevation == null) this.elevation = new Number(); + this.elevation.setFloat(elevation); + return this; + } + /** + * The elevation of a location. + */ + @NotNull public Builder elevation(@NotNull Double elevation) { + if (this.elevation == null) this.elevation = new Number(); + this.elevation.setDouble(elevation); return this; } /** * The elevation of a location. */ @NotNull public Builder elevation(@NotNull String elevation) { - if (this.elevation == null) this.elevation = new NumberOrString(); + if (this.elevation == null) this.elevation = new Number(); this.elevation.setString(elevation); return this; } /** * The latitude of a location. For example 37.42242. */ - @NotNull public Builder latitude(@NotNull Number number) { - if (this.latitude == null) this.latitude = new NumberOrString(); - this.latitude.setNumber(number); + @NotNull public Builder latitude(@NotNull Integer integer) { + if (this.latitude == null) this.latitude = new Number(); + this.latitude.setInteger(integer); + return this; + } + /** + * The latitude of a location. For example 37.42242. + */ + @NotNull public Builder latitude(@NotNull Long latitude) { + if (this.latitude == null) this.latitude = new Number(); + this.latitude.setLong(latitude); + return this; + } + /** + * The latitude of a location. For example 37.42242. + */ + @NotNull public Builder latitude(@NotNull Float latitude) { + if (this.latitude == null) this.latitude = new Number(); + this.latitude.setFloat(latitude); + return this; + } + /** + * The latitude of a location. For example 37.42242. + */ + @NotNull public Builder latitude(@NotNull Double latitude) { + if (this.latitude == null) this.latitude = new Number(); + this.latitude.setDouble(latitude); return this; } /** * The latitude of a location. For example 37.42242. */ @NotNull public Builder latitude(@NotNull String latitude) { - if (this.latitude == null) this.latitude = new NumberOrString(); + if (this.latitude == null) this.latitude = new Number(); this.latitude.setString(latitude); return this; } /** * The longitude of a location. For example -122.08585. */ - @NotNull public Builder longitude(@NotNull Number number) { - if (this.longitude == null) this.longitude = new NumberOrString(); - this.longitude.setNumber(number); + @NotNull public Builder longitude(@NotNull Integer integer) { + if (this.longitude == null) this.longitude = new Number(); + this.longitude.setInteger(integer); + return this; + } + /** + * The longitude of a location. For example -122.08585. + */ + @NotNull public Builder longitude(@NotNull Long longitude) { + if (this.longitude == null) this.longitude = new Number(); + this.longitude.setLong(longitude); + return this; + } + /** + * The longitude of a location. For example -122.08585. + */ + @NotNull public Builder longitude(@NotNull Float longitude) { + if (this.longitude == null) this.longitude = new Number(); + this.longitude.setFloat(longitude); + return this; + } + /** + * The longitude of a location. For example -122.08585. + */ + @NotNull public Builder longitude(@NotNull Double longitude) { + if (this.longitude == null) this.longitude = new Number(); + this.longitude.setDouble(longitude); return this; } /** * The longitude of a location. For example -122.08585. */ @NotNull public Builder longitude(@NotNull String longitude) { - if (this.longitude == null) this.longitude = new NumberOrString(); + if (this.longitude == null) this.longitude = new Number(); this.longitude.setString(longitude); return this; } @@ -273,11 +345,20 @@ public Builder id(long id) { final String key = entry.getKey(); Object value = entry.getValue(); if (value instanceof java.util.Map) { value = ThingDeserializer.fromMap((java.util.Map)value); } - if ("elevation".equals(key) && value instanceof Number) { elevation((Number)value); continue; } + if ("elevation".equals(key) && value instanceof Integer) { elevation((Integer)value); continue; } + if ("elevation".equals(key) && value instanceof Long) { elevation((Long)value); continue; } + if ("elevation".equals(key) && value instanceof Float) { elevation((Float)value); continue; } + if ("elevation".equals(key) && value instanceof Double) { elevation((Double)value); continue; } if ("elevation".equals(key) && value instanceof String) { elevation((String)value); continue; } - if ("latitude".equals(key) && value instanceof Number) { latitude((Number)value); continue; } + if ("latitude".equals(key) && value instanceof Integer) { latitude((Integer)value); continue; } + if ("latitude".equals(key) && value instanceof Long) { latitude((Long)value); continue; } + if ("latitude".equals(key) && value instanceof Float) { latitude((Float)value); continue; } + if ("latitude".equals(key) && value instanceof Double) { latitude((Double)value); continue; } if ("latitude".equals(key) && value instanceof String) { latitude((String)value); continue; } - if ("longitude".equals(key) && value instanceof Number) { longitude((Number)value); continue; } + if ("longitude".equals(key) && value instanceof Integer) { longitude((Integer)value); continue; } + if ("longitude".equals(key) && value instanceof Long) { longitude((Long)value); continue; } + if ("longitude".equals(key) && value instanceof Float) { longitude((Float)value); continue; } + if ("longitude".equals(key) && value instanceof Double) { longitude((Double)value); continue; } if ("longitude".equals(key) && value instanceof String) { longitude((String)value); continue; } if ("additionalType".equals(key) && value instanceof String) { additionalType((String)value); continue; } if ("alternateName".equals(key) && value instanceof String) { alternateName((String)value); continue; } @@ -288,12 +369,12 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } - private NumberOrString elevation; - private NumberOrString latitude; - private NumberOrString longitude; + private Number elevation; + private Number latitude; + private Number longitude; private String additionalType; private String alternateName; private String description; @@ -305,11 +386,20 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - @NotNull Builder elevation(@NotNull Number number); + @NotNull Builder elevation(@NotNull Integer integer); + @NotNull Builder elevation(@NotNull Long elevation); + @NotNull Builder elevation(@NotNull Float elevation); + @NotNull Builder elevation(@NotNull Double elevation); @NotNull Builder elevation(@NotNull String elevation); - @NotNull Builder latitude(@NotNull Number number); + @NotNull Builder latitude(@NotNull Integer integer); + @NotNull Builder latitude(@NotNull Long latitude); + @NotNull Builder latitude(@NotNull Float latitude); + @NotNull Builder latitude(@NotNull Double latitude); @NotNull Builder latitude(@NotNull String latitude); - @NotNull Builder longitude(@NotNull Number number); + @NotNull Builder longitude(@NotNull Integer integer); + @NotNull Builder longitude(@NotNull Long longitude); + @NotNull Builder longitude(@NotNull Float longitude); + @NotNull Builder longitude(@NotNull Double longitude); @NotNull Builder longitude(@NotNull String longitude); @NotNull Builder additionalType(@NotNull String additionalType); @NotNull Builder alternateName(@NotNull String alternateName); @@ -325,13 +415,33 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected GeoCoordinates(NumberOrString elevation, NumberOrString latitude, NumberOrString longitude, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected GeoCoordinates(Number elevation, Number latitude, Number longitude, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myElevation = elevation; myLatitude = latitude; myLongitude = longitude; } - private NumberOrString myElevation; - private NumberOrString myLatitude; - private NumberOrString myLongitude; + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myElevation != null ? myElevation.hashCode() : 0); + result = 31 * result + (myLatitude != null ? myLatitude.hashCode() : 0); + result = 31 * result + (myLongitude != null ? myLongitude.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GeoCoordinates geoCoordinates = (GeoCoordinates) o; + if (!super.equals(o)) return false; + if (myElevation != null ? !myElevation.equals(geoCoordinates.myElevation) : geoCoordinates.myElevation != null) return false; + if (myLatitude != null ? !myLatitude.equals(geoCoordinates.myLatitude) : geoCoordinates.myLatitude != null) return false; + if (myLongitude != null ? !myLongitude.equals(geoCoordinates.myLongitude) : geoCoordinates.myLongitude != null) return false; + return true; + } + + private Number myElevation; + private Number myLatitude; + private Number myLongitude; } diff --git a/src/main/java/org/schema/GeoCoordinatesOrGeoShape.java b/src/main/java/org/schema/GeoCoordinatesOrGeoShape.java index d17a0424..37611d7a 100644 --- a/src/main/java/org/schema/GeoCoordinatesOrGeoShape.java +++ b/src/main/java/org/schema/GeoCoordinatesOrGeoShape.java @@ -44,4 +44,21 @@ private void clear() { myGeoCoordinates = null; myGeoShape = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myGeoCoordinates != null ? myGeoCoordinates.hashCode() : 0); + result = 31 * result + (myGeoShape != null ? myGeoShape.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GeoCoordinatesOrGeoShape geoCoordinatesOrGeoShape = (GeoCoordinatesOrGeoShape) o; + if (myGeoCoordinates != null ? !myGeoCoordinates.equals(geoCoordinatesOrGeoShape.myGeoCoordinates) : geoCoordinatesOrGeoShape.myGeoCoordinates != null) return false; + if (myGeoShape != null ? !myGeoShape.equals(geoCoordinatesOrGeoShape.myGeoShape) : geoCoordinatesOrGeoShape.myGeoShape != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/GeoShape.java b/src/main/java/org/schema/GeoShape.java index 61549a05..cbb225d6 100644 --- a/src/main/java/org/schema/GeoShape.java +++ b/src/main/java/org/schema/GeoShape.java @@ -42,7 +42,7 @@ public String getCircle() { /** * The elevation of a location. */ - public NumberOrString getElevation() { + public Number getElevation() { return myElevation; } /** @@ -84,16 +84,40 @@ public GeoShape build() { /** * The elevation of a location. */ - @NotNull public Builder elevation(@NotNull Number number) { - if (this.elevation == null) this.elevation = new NumberOrString(); - this.elevation.setNumber(number); + @NotNull public Builder elevation(@NotNull Integer integer) { + if (this.elevation == null) this.elevation = new Number(); + this.elevation.setInteger(integer); + return this; + } + /** + * The elevation of a location. + */ + @NotNull public Builder elevation(@NotNull Long elevation) { + if (this.elevation == null) this.elevation = new Number(); + this.elevation.setLong(elevation); + return this; + } + /** + * The elevation of a location. + */ + @NotNull public Builder elevation(@NotNull Float elevation) { + if (this.elevation == null) this.elevation = new Number(); + this.elevation.setFloat(elevation); + return this; + } + /** + * The elevation of a location. + */ + @NotNull public Builder elevation(@NotNull Double elevation) { + if (this.elevation == null) this.elevation = new Number(); + this.elevation.setDouble(elevation); return this; } /** * The elevation of a location. */ @NotNull public Builder elevation(@NotNull String elevation) { - if (this.elevation == null) this.elevation = new NumberOrString(); + if (this.elevation == null) this.elevation = new Number(); this.elevation.setString(elevation); return this; } @@ -284,7 +308,10 @@ public Builder id(long id) { if (value instanceof java.util.Map) { value = ThingDeserializer.fromMap((java.util.Map)value); } if ("box".equals(key) && value instanceof String) { box((String)value); continue; } if ("circle".equals(key) && value instanceof String) { circle((String)value); continue; } - if ("elevation".equals(key) && value instanceof Number) { elevation((Number)value); continue; } + if ("elevation".equals(key) && value instanceof Integer) { elevation((Integer)value); continue; } + if ("elevation".equals(key) && value instanceof Long) { elevation((Long)value); continue; } + if ("elevation".equals(key) && value instanceof Float) { elevation((Float)value); continue; } + if ("elevation".equals(key) && value instanceof Double) { elevation((Double)value); continue; } if ("elevation".equals(key) && value instanceof String) { elevation((String)value); continue; } if ("line".equals(key) && value instanceof String) { line((String)value); continue; } if ("polygon".equals(key) && value instanceof String) { polygon((String)value); continue; } @@ -297,12 +324,12 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String box; private String circle; - private NumberOrString elevation; + private Number elevation; private String line; private String polygon; private String additionalType; @@ -318,7 +345,10 @@ public Builder id(long id) { public interface Builder extends ThingBuilder { @NotNull Builder box(@NotNull String box); @NotNull Builder circle(@NotNull String circle); - @NotNull Builder elevation(@NotNull Number number); + @NotNull Builder elevation(@NotNull Integer integer); + @NotNull Builder elevation(@NotNull Long elevation); + @NotNull Builder elevation(@NotNull Float elevation); + @NotNull Builder elevation(@NotNull Double elevation); @NotNull Builder elevation(@NotNull String elevation); @NotNull Builder line(@NotNull String line); @NotNull Builder polygon(@NotNull String polygon); @@ -336,7 +366,7 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected GeoShape(String box, String circle, NumberOrString elevation, String line, String polygon, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected GeoShape(String box, String circle, Number elevation, String line, String polygon, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myBox = box; myCircle = circle; @@ -344,9 +374,33 @@ protected GeoShape(String box, String circle, NumberOrString elevation, String l myLine = line; myPolygon = polygon; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBox != null ? myBox.hashCode() : 0); + result = 31 * result + (myCircle != null ? myCircle.hashCode() : 0); + result = 31 * result + (myElevation != null ? myElevation.hashCode() : 0); + result = 31 * result + (myLine != null ? myLine.hashCode() : 0); + result = 31 * result + (myPolygon != null ? myPolygon.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GeoShape geoShape = (GeoShape) o; + if (!super.equals(o)) return false; + if (myBox != null ? !myBox.equals(geoShape.myBox) : geoShape.myBox != null) return false; + if (myCircle != null ? !myCircle.equals(geoShape.myCircle) : geoShape.myCircle != null) return false; + if (myElevation != null ? !myElevation.equals(geoShape.myElevation) : geoShape.myElevation != null) return false; + if (myLine != null ? !myLine.equals(geoShape.myLine) : geoShape.myLine != null) return false; + if (myPolygon != null ? !myPolygon.equals(geoShape.myPolygon) : geoShape.myPolygon != null) return false; + return true; + } + private String myBox; private String myCircle; - private NumberOrString myElevation; + private Number myElevation; private String myLine; private String myPolygon; } diff --git a/src/main/java/org/schema/GeoShapeOrPlaceOrString.java b/src/main/java/org/schema/GeoShapeOrPlaceOrString.java index 16fa4ef1..6cd22229 100644 --- a/src/main/java/org/schema/GeoShapeOrPlaceOrString.java +++ b/src/main/java/org/schema/GeoShapeOrPlaceOrString.java @@ -44,4 +44,23 @@ private void clear() { myPlace = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myGeoShape != null ? myGeoShape.hashCode() : 0); + result = 31 * result + (myPlace != null ? myPlace.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GeoShapeOrPlaceOrString geoShapeOrPlaceOrString = (GeoShapeOrPlaceOrString) o; + if (myGeoShape != null ? !myGeoShape.equals(geoShapeOrPlaceOrString.myGeoShape) : geoShapeOrPlaceOrString.myGeoShape != null) return false; + if (myPlace != null ? !myPlace.equals(geoShapeOrPlaceOrString.myPlace) : geoShapeOrPlaceOrString.myPlace != null) return false; + if (myString != null ? !myString.equals(geoShapeOrPlaceOrString.myString) : geoShapeOrPlaceOrString.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Geriatric.java b/src/main/java/org/schema/Geriatric.java index 3fe68e5f..cff279f2 100644 --- a/src/main/java/org/schema/Geriatric.java +++ b/src/main/java/org/schema/Geriatric.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Geriatric() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Geriatric geriatric = (Geriatric) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/GiveAction.java b/src/main/java/org/schema/GiveAction.java index df5fb3e4..f39ccefe 100644 --- a/src/main/java/org/schema/GiveAction.java +++ b/src/main/java/org/schema/GiveAction.java @@ -387,7 +387,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AudienceOrOrganizationOrPerson recipient; @@ -450,5 +450,21 @@ protected GiveAction(AudienceOrOrganizationOrPerson recipient, Place fromLocatio super(fromLocation, toLocation, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myRecipient = recipient; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myRecipient != null ? myRecipient.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GiveAction giveAction = (GiveAction) o; + if (!super.equals(o)) return false; + if (myRecipient != null ? !myRecipient.equals(giveAction.myRecipient) : giveAction.myRecipient != null) return false; + return true; + } + private AudienceOrOrganizationOrPerson myRecipient; } diff --git a/src/main/java/org/schema/GolfCourse.java b/src/main/java/org/schema/GolfCourse.java index da720a97..55670da6 100644 --- a/src/main/java/org/schema/GolfCourse.java +++ b/src/main/java/org/schema/GolfCourse.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected GolfCourse(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GolfCourse golfCourse = (GolfCourse) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/GoodRelationsClass.java b/src/main/java/org/schema/GoodRelationsClass.java index 56517db4..cca4f581 100644 --- a/src/main/java/org/schema/GoodRelationsClass.java +++ b/src/main/java/org/schema/GoodRelationsClass.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected GoodRelationsClass() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GoodRelationsClass goodRelationsClass = (GoodRelationsClass) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/GoodRelationsProperties.java b/src/main/java/org/schema/GoodRelationsProperties.java index 3ed7e882..28d4e7a5 100644 --- a/src/main/java/org/schema/GoodRelationsProperties.java +++ b/src/main/java/org/schema/GoodRelationsProperties.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected GoodRelationsProperties() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GoodRelationsProperties goodRelationsProperties = (GoodRelationsProperties) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/GovernmentBuilding.java b/src/main/java/org/schema/GovernmentBuilding.java index 24bc6b0a..4b152991 100644 --- a/src/main/java/org/schema/GovernmentBuilding.java +++ b/src/main/java/org/schema/GovernmentBuilding.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected GovernmentBuilding(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GovernmentBuilding governmentBuilding = (GovernmentBuilding) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/GovernmentOffice.java b/src/main/java/org/schema/GovernmentOffice.java index 9c7abdc4..1e24a215 100644 --- a/src/main/java/org/schema/GovernmentOffice.java +++ b/src/main/java/org/schema/GovernmentOffice.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected GovernmentOffice(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GovernmentOffice governmentOffice = (GovernmentOffice) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/GovernmentOrganization.java b/src/main/java/org/schema/GovernmentOrganization.java index 2f57243f..8d6ae37b 100644 --- a/src/main/java/org/schema/GovernmentOrganization.java +++ b/src/main/java/org/schema/GovernmentOrganization.java @@ -660,7 +660,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -783,4 +783,18 @@ public interface Builder extends ThingBuilder { protected GovernmentOrganization(PostalAddress address, AggregateRating aggregateRating, String award, BrandOrOrganization brand, ContactPoint contactPoint, Organization department, String duns, String email, Person employee, Event event, String faxNumber, Person founder, java.util.Date dissolutionDate, java.util.Date foundingDate, String globalLocationNumber, Place hasPOS, String isicV4, String legalName, ImageObjectOrString logo, Offer makesOffer, OrganizationOrPerson member, OrganizationOrProgramMembership memberOf, String naics, QuantitativeValue numberOfEmployees, OwnershipInfoOrProduct owns, Review review, Demand seeks, Organization subOrganization, String taxID, String telephone, String vatID, Place foundingLocation, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, award, brand, contactPoint, department, duns, email, employee, event, faxNumber, founder, dissolutionDate, foundingDate, globalLocationNumber, hasPOS, isicV4, legalName, logo, makesOffer, member, memberOf, naics, numberOfEmployees, owns, review, seeks, subOrganization, taxID, telephone, vatID, foundingLocation, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GovernmentOrganization governmentOrganization = (GovernmentOrganization) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/GovernmentPermit.java b/src/main/java/org/schema/GovernmentPermit.java index 69e6815b..9f1331bd 100644 --- a/src/main/java/org/schema/GovernmentPermit.java +++ b/src/main/java/org/schema/GovernmentPermit.java @@ -302,7 +302,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Service issuedThrough; @@ -352,4 +352,18 @@ public interface Builder extends ThingBuilder { protected GovernmentPermit(Service issuedThrough, Audience permitAudience, Duration validFor, java.util.Date validFrom, AdministrativeArea validIn, java.util.Date validUntil, Organization issuedBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(issuedThrough, permitAudience, validFor, validFrom, validIn, validUntil, issuedBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GovernmentPermit governmentPermit = (GovernmentPermit) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/GovernmentService.java b/src/main/java/org/schema/GovernmentService.java index 82e47541..be6c8f50 100644 --- a/src/main/java/org/schema/GovernmentService.java +++ b/src/main/java/org/schema/GovernmentService.java @@ -344,7 +344,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization serviceOperator; @@ -401,5 +401,21 @@ protected GovernmentService(Organization serviceOperator, AggregateRating aggreg super(aggregateRating, availableChannel, serviceOutput, review, serviceArea, serviceType, provider, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myServiceOperator = serviceOperator; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myServiceOperator != null ? myServiceOperator.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GovernmentService governmentService = (GovernmentService) o; + if (!super.equals(o)) return false; + if (myServiceOperator != null ? !myServiceOperator.equals(governmentService.myServiceOperator) : governmentService.myServiceOperator != null) return false; + return true; + } + private Organization myServiceOperator; } diff --git a/src/main/java/org/schema/GroceryStore.java b/src/main/java/org/schema/GroceryStore.java index a27acc96..209858c5 100644 --- a/src/main/java/org/schema/GroceryStore.java +++ b/src/main/java/org/schema/GroceryStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected GroceryStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GroceryStore groceryStore = (GroceryStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/GroupBoardingPolicy.java b/src/main/java/org/schema/GroupBoardingPolicy.java index bc85fabb..7788cebc 100644 --- a/src/main/java/org/schema/GroupBoardingPolicy.java +++ b/src/main/java/org/schema/GroupBoardingPolicy.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected GroupBoardingPolicy() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + GroupBoardingPolicy groupBoardingPolicy = (GroupBoardingPolicy) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Gynecologic.java b/src/main/java/org/schema/Gynecologic.java index 968b158c..6fab8a90 100644 --- a/src/main/java/org/schema/Gynecologic.java +++ b/src/main/java/org/schema/Gynecologic.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Gynecologic() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Gynecologic gynecologic = (Gynecologic) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/HVACBusiness.java b/src/main/java/org/schema/HVACBusiness.java index cd84e30c..b38a995f 100644 --- a/src/main/java/org/schema/HVACBusiness.java +++ b/src/main/java/org/schema/HVACBusiness.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected HVACBusiness(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + HVACBusiness hVACBusiness = (HVACBusiness) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/HairSalon.java b/src/main/java/org/schema/HairSalon.java index e288a142..b954cca1 100644 --- a/src/main/java/org/schema/HairSalon.java +++ b/src/main/java/org/schema/HairSalon.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected HairSalon(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + HairSalon hairSalon = (HairSalon) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Hardcover.java b/src/main/java/org/schema/Hardcover.java index bcb1c009..aade5031 100644 --- a/src/main/java/org/schema/Hardcover.java +++ b/src/main/java/org/schema/Hardcover.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Hardcover() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Hardcover hardcover = (Hardcover) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/HardwareStore.java b/src/main/java/org/schema/HardwareStore.java index 305f36eb..342c035e 100644 --- a/src/main/java/org/schema/HardwareStore.java +++ b/src/main/java/org/schema/HardwareStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected HardwareStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + HardwareStore hardwareStore = (HardwareStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Head.java b/src/main/java/org/schema/Head.java index 673d6dcd..08437cae 100644 --- a/src/main/java/org/schema/Head.java +++ b/src/main/java/org/schema/Head.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Head() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Head head = (Head) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/HealthAndBeautyBusiness.java b/src/main/java/org/schema/HealthAndBeautyBusiness.java index bcc46547..a5189ba3 100644 --- a/src/main/java/org/schema/HealthAndBeautyBusiness.java +++ b/src/main/java/org/schema/HealthAndBeautyBusiness.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected HealthAndBeautyBusiness(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + HealthAndBeautyBusiness healthAndBeautyBusiness = (HealthAndBeautyBusiness) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/HealthClub.java b/src/main/java/org/schema/HealthClub.java index b28f0a92..297d635f 100644 --- a/src/main/java/org/schema/HealthClub.java +++ b/src/main/java/org/schema/HealthClub.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected HealthClub(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + HealthClub healthClub = (HealthClub) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/HearingImpairedSupported.java b/src/main/java/org/schema/HearingImpairedSupported.java index 77d318bb..67d00436 100644 --- a/src/main/java/org/schema/HearingImpairedSupported.java +++ b/src/main/java/org/schema/HearingImpairedSupported.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected HearingImpairedSupported() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + HearingImpairedSupported hearingImpairedSupported = (HearingImpairedSupported) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Hematologic.java b/src/main/java/org/schema/Hematologic.java index 1e352e31..d45f5bbb 100644 --- a/src/main/java/org/schema/Hematologic.java +++ b/src/main/java/org/schema/Hematologic.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Hematologic() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Hematologic hematologic = (Hematologic) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/HighSchool.java b/src/main/java/org/schema/HighSchool.java index a0899bdb..93b45b55 100644 --- a/src/main/java/org/schema/HighSchool.java +++ b/src/main/java/org/schema/HighSchool.java @@ -674,7 +674,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person alumni; @@ -800,4 +800,18 @@ public interface Builder extends ThingBuilder { protected HighSchool(Person alumni, PostalAddress address, AggregateRating aggregateRating, String award, BrandOrOrganization brand, ContactPoint contactPoint, Organization department, String duns, String email, Person employee, Event event, String faxNumber, Person founder, java.util.Date dissolutionDate, java.util.Date foundingDate, String globalLocationNumber, Place hasPOS, String isicV4, String legalName, ImageObjectOrString logo, Offer makesOffer, OrganizationOrPerson member, OrganizationOrProgramMembership memberOf, String naics, QuantitativeValue numberOfEmployees, OwnershipInfoOrProduct owns, Review review, Demand seeks, Organization subOrganization, String taxID, String telephone, String vatID, Place foundingLocation, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(alumni, address, aggregateRating, award, brand, contactPoint, department, duns, email, employee, event, faxNumber, founder, dissolutionDate, foundingDate, globalLocationNumber, hasPOS, isicV4, legalName, logo, makesOffer, member, memberOf, naics, numberOfEmployees, owns, review, seeks, subOrganization, taxID, telephone, vatID, foundingLocation, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + HighSchool highSchool = (HighSchool) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/HinduTemple.java b/src/main/java/org/schema/HinduTemple.java index 768558d1..240a7d1d 100644 --- a/src/main/java/org/schema/HinduTemple.java +++ b/src/main/java/org/schema/HinduTemple.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected HinduTemple(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + HinduTemple hinduTemple = (HinduTemple) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/HobbyShop.java b/src/main/java/org/schema/HobbyShop.java index 934c1039..727ab1b7 100644 --- a/src/main/java/org/schema/HobbyShop.java +++ b/src/main/java/org/schema/HobbyShop.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected HobbyShop(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + HobbyShop hobbyShop = (HobbyShop) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/HomeAndConstructionBusiness.java b/src/main/java/org/schema/HomeAndConstructionBusiness.java index 398e5f5a..3ff91b08 100644 --- a/src/main/java/org/schema/HomeAndConstructionBusiness.java +++ b/src/main/java/org/schema/HomeAndConstructionBusiness.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected HomeAndConstructionBusiness(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + HomeAndConstructionBusiness homeAndConstructionBusiness = (HomeAndConstructionBusiness) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/HomeGoodsStore.java b/src/main/java/org/schema/HomeGoodsStore.java index 55fba089..abb6d783 100644 --- a/src/main/java/org/schema/HomeGoodsStore.java +++ b/src/main/java/org/schema/HomeGoodsStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected HomeGoodsStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + HomeGoodsStore homeGoodsStore = (HomeGoodsStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Homeopathic.java b/src/main/java/org/schema/Homeopathic.java index 3788c958..93333f8b 100644 --- a/src/main/java/org/schema/Homeopathic.java +++ b/src/main/java/org/schema/Homeopathic.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Homeopathic() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Homeopathic homeopathic = (Homeopathic) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Hospital.java b/src/main/java/org/schema/Hospital.java index 0d3fb776..1eec9a7e 100644 --- a/src/main/java/org/schema/Hospital.java +++ b/src/main/java/org/schema/Hospital.java @@ -577,7 +577,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalProcedureOrMedicalTestOrMedicalTherapy availableService; @@ -678,6 +678,24 @@ protected Hospital(MedicalProcedureOrMedicalTestOrMedicalTherapy availableServic myAvailableService = availableService; myMedicalSpecialty = medicalSpecialty; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAvailableService != null ? myAvailableService.hashCode() : 0); + result = 31 * result + (myMedicalSpecialty != null ? myMedicalSpecialty.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Hospital hospital = (Hospital) o; + if (!super.equals(o)) return false; + if (myAvailableService != null ? !myAvailableService.equals(hospital.myAvailableService) : hospital.myAvailableService != null) return false; + if (myMedicalSpecialty != null ? !myMedicalSpecialty.equals(hospital.myMedicalSpecialty) : hospital.myMedicalSpecialty != null) return false; + return true; + } + private MedicalProcedureOrMedicalTestOrMedicalTherapy myAvailableService; private MedicalSpecialty myMedicalSpecialty; } diff --git a/src/main/java/org/schema/Hostel.java b/src/main/java/org/schema/Hostel.java index c811994a..889390cb 100644 --- a/src/main/java/org/schema/Hostel.java +++ b/src/main/java/org/schema/Hostel.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected Hostel(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Hostel hostel = (Hostel) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Hotel.java b/src/main/java/org/schema/Hotel.java index c98a21a7..2a0c48da 100644 --- a/src/main/java/org/schema/Hotel.java +++ b/src/main/java/org/schema/Hotel.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected Hotel(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Hotel hotel = (Hotel) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/HousePainter.java b/src/main/java/org/schema/HousePainter.java index 8ed031ae..6c321b67 100644 --- a/src/main/java/org/schema/HousePainter.java +++ b/src/main/java/org/schema/HousePainter.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected HousePainter(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + HousePainter housePainter = (HousePainter) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/IceCreamShop.java b/src/main/java/org/schema/IceCreamShop.java index 3e55513c..81597c65 100644 --- a/src/main/java/org/schema/IceCreamShop.java +++ b/src/main/java/org/schema/IceCreamShop.java @@ -540,7 +540,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BooleanOrString acceptsReservations; @@ -636,4 +636,18 @@ public interface Builder extends ThingBuilder { protected IceCreamShop(BooleanOrString acceptsReservations, String menu, String servesCuisine, Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(acceptsReservations, menu, servesCuisine, parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + IceCreamShop iceCreamShop = (IceCreamShop) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/IgnoreAction.java b/src/main/java/org/schema/IgnoreAction.java index d60c1a23..a90ce742 100644 --- a/src/main/java/org/schema/IgnoreAction.java +++ b/src/main/java/org/schema/IgnoreAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected IgnoreAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + IgnoreAction ignoreAction = (IgnoreAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ImageGallery.java b/src/main/java/org/schema/ImageGallery.java index 52c250d7..64fa2ea4 100644 --- a/src/main/java/org/schema/ImageGallery.java +++ b/src/main/java/org/schema/ImageGallery.java @@ -1266,7 +1266,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BreadcrumbListOrString breadcrumb; @@ -1507,4 +1507,18 @@ public interface Builder extends ThingBuilder { protected ImageGallery(BreadcrumbListOrString breadcrumb, java.util.Date lastReviewed, WebPageElement mainContentOfPage, ImageObject primaryImageOfPage, String relatedLink, OrganizationOrPerson reviewedBy, String significantLink, Specialty specialty, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(breadcrumb, lastReviewed, mainContentOfPage, primaryImageOfPage, relatedLink, reviewedBy, significantLink, specialty, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ImageGallery imageGallery = (ImageGallery) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ImageObject.java b/src/main/java/org/schema/ImageObject.java index 6a834ca7..d41a2cb3 100644 --- a/src/main/java/org/schema/ImageObject.java +++ b/src/main/java/org/schema/ImageObject.java @@ -1427,7 +1427,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String caption; @@ -1702,6 +1702,28 @@ protected ImageObject(String caption, PropertyValueOrString exifData, Boolean re myRepresentativeOfPage = representativeOfPage; myThumbnail = thumbnail; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myCaption != null ? myCaption.hashCode() : 0); + result = 31 * result + (myExifData != null ? myExifData.hashCode() : 0); + result = 31 * result + (myRepresentativeOfPage != null ? myRepresentativeOfPage.hashCode() : 0); + result = 31 * result + (myThumbnail != null ? myThumbnail.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ImageObject imageObject = (ImageObject) o; + if (!super.equals(o)) return false; + if (myCaption != null ? !myCaption.equals(imageObject.myCaption) : imageObject.myCaption != null) return false; + if (myExifData != null ? !myExifData.equals(imageObject.myExifData) : imageObject.myExifData != null) return false; + if (myRepresentativeOfPage != null ? !myRepresentativeOfPage.equals(imageObject.myRepresentativeOfPage) : imageObject.myRepresentativeOfPage != null) return false; + if (myThumbnail != null ? !myThumbnail.equals(imageObject.myThumbnail) : imageObject.myThumbnail != null) return false; + return true; + } + private String myCaption; private PropertyValueOrString myExifData; private Boolean myRepresentativeOfPage; diff --git a/src/main/java/org/schema/ImageObjectOrPhotograph.java b/src/main/java/org/schema/ImageObjectOrPhotograph.java index 1106fd5d..befa5437 100644 --- a/src/main/java/org/schema/ImageObjectOrPhotograph.java +++ b/src/main/java/org/schema/ImageObjectOrPhotograph.java @@ -44,4 +44,21 @@ private void clear() { myImageObject = null; myPhotograph = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myImageObject != null ? myImageObject.hashCode() : 0); + result = 31 * result + (myPhotograph != null ? myPhotograph.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ImageObjectOrPhotograph imageObjectOrPhotograph = (ImageObjectOrPhotograph) o; + if (myImageObject != null ? !myImageObject.equals(imageObjectOrPhotograph.myImageObject) : imageObjectOrPhotograph.myImageObject != null) return false; + if (myPhotograph != null ? !myPhotograph.equals(imageObjectOrPhotograph.myPhotograph) : imageObjectOrPhotograph.myPhotograph != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ImageObjectOrString.java b/src/main/java/org/schema/ImageObjectOrString.java index 139d3241..08ba1d2b 100644 --- a/src/main/java/org/schema/ImageObjectOrString.java +++ b/src/main/java/org/schema/ImageObjectOrString.java @@ -39,4 +39,21 @@ private void clear() { myImageObject = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myImageObject != null ? myImageObject.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ImageObjectOrString imageObjectOrString = (ImageObjectOrString) o; + if (myImageObject != null ? !myImageObject.equals(imageObjectOrString.myImageObject) : imageObjectOrString.myImageObject != null) return false; + if (myString != null ? !myString.equals(imageObjectOrString.myString) : imageObjectOrString.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ImagingTest.java b/src/main/java/org/schema/ImagingTest.java index 4e9425eb..e7e2e325 100644 --- a/src/main/java/org/schema/ImagingTest.java +++ b/src/main/java/org/schema/ImagingTest.java @@ -385,7 +385,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalImagingTechnique imagingTechnique; @@ -452,5 +452,21 @@ protected ImagingTest(MedicalImagingTechnique imagingTechnique, Drug affectedBy, super(affectedBy, normalRange, signDetected, usedToDiagnose, usesDevice, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myImagingTechnique = imagingTechnique; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myImagingTechnique != null ? myImagingTechnique.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ImagingTest imagingTest = (ImagingTest) o; + if (!super.equals(o)) return false; + if (myImagingTechnique != null ? !myImagingTechnique.equals(imagingTest.myImagingTechnique) : imagingTest.myImagingTechnique != null) return false; + return true; + } + private MedicalImagingTechnique myImagingTechnique; } diff --git a/src/main/java/org/schema/InStock.java b/src/main/java/org/schema/InStock.java index 02e8ec42..94def5cd 100644 --- a/src/main/java/org/schema/InStock.java +++ b/src/main/java/org/schema/InStock.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected InStock() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + InStock inStock = (InStock) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/InStoreOnly.java b/src/main/java/org/schema/InStoreOnly.java index f3f700c0..c1eb6f3b 100644 --- a/src/main/java/org/schema/InStoreOnly.java +++ b/src/main/java/org/schema/InStoreOnly.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected InStoreOnly() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + InStoreOnly inStoreOnly = (InStoreOnly) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/IndividualProduct.java b/src/main/java/org/schema/IndividualProduct.java index 7fcbd9d0..0e5262bc 100644 --- a/src/main/java/org/schema/IndividualProduct.java +++ b/src/main/java/org/schema/IndividualProduct.java @@ -694,7 +694,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -819,4 +819,18 @@ public interface Builder extends ThingBuilder { protected IndividualProduct(AggregateRating aggregateRating, Audience audience, String award, BrandOrOrganization brand, PhysicalActivityCategoryOrStringOrThing category, String color, DistanceOrQuantitativeValue depth, String gtin12, String gtin13, String gtin14, String gtin8, DistanceOrQuantitativeValue height, Product isAccessoryOrSparePartFor, Product isConsumableFor, Product isRelatedTo, Product isSimilarTo, OfferItemCondition itemCondition, ImageObjectOrString logo, Organization manufacturer, ProductModelOrString model, String mpn, Offer offers, String productID, java.util.Date releaseDate, Review review, String sku, QuantitativeValue weight, DistanceOrQuantitativeValue width, PropertyValue additionalProperty, java.util.Date productionDate, java.util.Date purchaseDate, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, audience, award, brand, category, color, depth, gtin12, gtin13, gtin14, gtin8, height, isAccessoryOrSparePartFor, isConsumableFor, isRelatedTo, isSimilarTo, itemCondition, logo, manufacturer, model, mpn, offers, productID, releaseDate, review, sku, weight, width, additionalProperty, productionDate, purchaseDate, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + IndividualProduct individualProduct = (IndividualProduct) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Infectious.java b/src/main/java/org/schema/Infectious.java index fe587d42..ac573af3 100644 --- a/src/main/java/org/schema/Infectious.java +++ b/src/main/java/org/schema/Infectious.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Infectious() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Infectious infectious = (Infectious) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/InfectiousAgentClass.java b/src/main/java/org/schema/InfectiousAgentClass.java index 363f3a0c..6250a3b6 100644 --- a/src/main/java/org/schema/InfectiousAgentClass.java +++ b/src/main/java/org/schema/InfectiousAgentClass.java @@ -247,7 +247,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -283,4 +283,18 @@ public interface Builder extends ThingBuilder { protected InfectiousAgentClass(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + InfectiousAgentClass infectiousAgentClass = (InfectiousAgentClass) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/InfectiousDisease.java b/src/main/java/org/schema/InfectiousDisease.java index 7bbe0b1f..79d7d8d8 100644 --- a/src/main/java/org/schema/InfectiousDisease.java +++ b/src/main/java/org/schema/InfectiousDisease.java @@ -568,7 +568,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String infectiousAgent; @@ -673,6 +673,26 @@ protected InfectiousDisease(String infectiousAgent, InfectiousAgentClass infecti myInfectiousAgentClass = infectiousAgentClass; myTransmissionMethod = transmissionMethod; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myInfectiousAgent != null ? myInfectiousAgent.hashCode() : 0); + result = 31 * result + (myInfectiousAgentClass != null ? myInfectiousAgentClass.hashCode() : 0); + result = 31 * result + (myTransmissionMethod != null ? myTransmissionMethod.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + InfectiousDisease infectiousDisease = (InfectiousDisease) o; + if (!super.equals(o)) return false; + if (myInfectiousAgent != null ? !myInfectiousAgent.equals(infectiousDisease.myInfectiousAgent) : infectiousDisease.myInfectiousAgent != null) return false; + if (myInfectiousAgentClass != null ? !myInfectiousAgentClass.equals(infectiousDisease.myInfectiousAgentClass) : infectiousDisease.myInfectiousAgentClass != null) return false; + if (myTransmissionMethod != null ? !myTransmissionMethod.equals(infectiousDisease.myTransmissionMethod) : infectiousDisease.myTransmissionMethod != null) return false; + return true; + } + private String myInfectiousAgent; private InfectiousAgentClass myInfectiousAgentClass; private String myTransmissionMethod; diff --git a/src/main/java/org/schema/InformAction.java b/src/main/java/org/schema/InformAction.java index d57336a5..1a1a99e9 100644 --- a/src/main/java/org/schema/InformAction.java +++ b/src/main/java/org/schema/InformAction.java @@ -411,7 +411,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Event event; @@ -478,5 +478,21 @@ protected InformAction(Event event, Thing about, LanguageOrString inLanguage, Au super(about, inLanguage, recipient, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myEvent = event; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myEvent != null ? myEvent.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + InformAction informAction = (InformAction) o; + if (!super.equals(o)) return false; + if (myEvent != null ? !myEvent.equals(informAction.myEvent) : informAction.myEvent != null) return false; + return true; + } + private Event myEvent; } diff --git a/src/main/java/org/schema/InsertAction.java b/src/main/java/org/schema/InsertAction.java index f68f15e5..e9a92fcc 100644 --- a/src/main/java/org/schema/InsertAction.java +++ b/src/main/java/org/schema/InsertAction.java @@ -342,7 +342,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Place toLocation; @@ -398,5 +398,21 @@ protected InsertAction(Place toLocation, Thing targetCollection, OrganizationOrP super(targetCollection, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myToLocation = toLocation; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myToLocation != null ? myToLocation.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + InsertAction insertAction = (InsertAction) o; + if (!super.equals(o)) return false; + if (myToLocation != null ? !myToLocation.equals(insertAction.myToLocation) : insertAction.myToLocation != null) return false; + return true; + } + private Place myToLocation; } diff --git a/src/main/java/org/schema/InstallAction.java b/src/main/java/org/schema/InstallAction.java index 89d86c87..5d006b23 100644 --- a/src/main/java/org/schema/InstallAction.java +++ b/src/main/java/org/schema/InstallAction.java @@ -322,7 +322,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Offer expectsAcceptanceOf; @@ -374,4 +374,18 @@ public interface Builder extends ThingBuilder { protected InstallAction(Offer expectsAcceptanceOf, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(expectsAcceptanceOf, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + InstallAction installAction = (InstallAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/InsuranceAgency.java b/src/main/java/org/schema/InsuranceAgency.java index c3112be1..fae1f69c 100644 --- a/src/main/java/org/schema/InsuranceAgency.java +++ b/src/main/java/org/schema/InsuranceAgency.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected InsuranceAgency(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + InsuranceAgency insuranceAgency = (InsuranceAgency) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Intangible.java b/src/main/java/org/schema/Intangible.java index 24e47a2e..1afb864b 100644 --- a/src/main/java/org/schema/Intangible.java +++ b/src/main/java/org/schema/Intangible.java @@ -216,7 +216,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String additionalType; @@ -247,4 +247,18 @@ public interface Builder extends ThingBuilder { protected Intangible(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Intangible intangible = (Intangible) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Integer.java b/src/main/java/org/schema/Integer.java deleted file mode 100644 index 5d6d4cc3..00000000 --- a/src/main/java/org/schema/Integer.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2015-2016 JetBrains s.r.o. - * - * 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. - * - * This is auto-generated file. Do not edit. - */ - -package org.schema; - -import com.fasterxml.jackson.databind.annotation.*; -import com.fasterxml.jackson.annotation.*; -import org.jetbrains.annotations.*; - -/** - * Data type: Integer. - */ -public class Integer extends Number { - /** - * Builder for {@link Integer} - */ - static final class IntegerThingBuilder implements Builder { - /** - * Creates new {@link Integer} instance. - */ - public Integer build() { - return new Integer(); - } - - @Override public void fromMap(java.util.Map map) { - for (java.util.Map.Entry entry : map.entrySet()) { - final String key = entry.getKey(); - Object value = entry.getValue(); - if (value instanceof java.util.Map) { value = ThingDeserializer.fromMap((java.util.Map)value); } - - } - } - } - public interface Builder extends ThingBuilder { - - } - - protected Integer() { - super(); - } -} diff --git a/src/main/java/org/schema/IntegerOrQuantitativeValue.java b/src/main/java/org/schema/IntegerOrQuantitativeValue.java index 76cec3f6..f6229516 100644 --- a/src/main/java/org/schema/IntegerOrQuantitativeValue.java +++ b/src/main/java/org/schema/IntegerOrQuantitativeValue.java @@ -43,4 +43,21 @@ private void clear() { myInteger = null; myQuantitativeValue = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myInteger != null ? myInteger.hashCode() : 0); + result = 31 * result + (myQuantitativeValue != null ? myQuantitativeValue.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + IntegerOrQuantitativeValue integerOrQuantitativeValue = (IntegerOrQuantitativeValue) o; + if (myInteger != null ? !myInteger.equals(integerOrQuantitativeValue.myInteger) : integerOrQuantitativeValue.myInteger != null) return false; + if (myQuantitativeValue != null ? !myQuantitativeValue.equals(integerOrQuantitativeValue.myQuantitativeValue) : integerOrQuantitativeValue.myQuantitativeValue != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/IntegerOrString.java b/src/main/java/org/schema/IntegerOrString.java index 1928f7e2..0028e868 100644 --- a/src/main/java/org/schema/IntegerOrString.java +++ b/src/main/java/org/schema/IntegerOrString.java @@ -39,4 +39,21 @@ private void clear() { myInteger = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myInteger != null ? myInteger.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + IntegerOrString integerOrString = (IntegerOrString) o; + if (myInteger != null ? !myInteger.equals(integerOrString.myInteger) : integerOrString.myInteger != null) return false; + if (myString != null ? !myString.equals(integerOrString.myString) : integerOrString.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/InteractAction.java b/src/main/java/org/schema/InteractAction.java index 279a5c3c..acc1b54f 100644 --- a/src/main/java/org/schema/InteractAction.java +++ b/src/main/java/org/schema/InteractAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected InteractAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + InteractAction interactAction = (InteractAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/InteractionCount.java b/src/main/java/org/schema/InteractionCount.java index 4a34b243..d1383d0b 100644 --- a/src/main/java/org/schema/InteractionCount.java +++ b/src/main/java/org/schema/InteractionCount.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected InteractionCount() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + InteractionCount interactionCount = (InteractionCount) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/InternationalTrial.java b/src/main/java/org/schema/InternationalTrial.java index f71fdd37..39953548 100644 --- a/src/main/java/org/schema/InternationalTrial.java +++ b/src/main/java/org/schema/InternationalTrial.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected InternationalTrial() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + InternationalTrial internationalTrial = (InternationalTrial) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/InternetCafe.java b/src/main/java/org/schema/InternetCafe.java index 95d72c52..3d06f083 100644 --- a/src/main/java/org/schema/InternetCafe.java +++ b/src/main/java/org/schema/InternetCafe.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected InternetCafe(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + InternetCafe internetCafe = (InternetCafe) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/InviteAction.java b/src/main/java/org/schema/InviteAction.java index d7e7317a..3333fef7 100644 --- a/src/main/java/org/schema/InviteAction.java +++ b/src/main/java/org/schema/InviteAction.java @@ -411,7 +411,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Event event; @@ -478,5 +478,21 @@ protected InviteAction(Event event, Thing about, LanguageOrString inLanguage, Au super(about, inLanguage, recipient, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myEvent = event; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myEvent != null ? myEvent.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + InviteAction inviteAction = (InviteAction) o; + if (!super.equals(o)) return false; + if (myEvent != null ? !myEvent.equals(inviteAction.myEvent) : inviteAction.myEvent != null) return false; + return true; + } + private Event myEvent; } diff --git a/src/main/java/org/schema/Invoice.java b/src/main/java/org/schema/Invoice.java index 2be5f67d..eaa5a861 100644 --- a/src/main/java/org/schema/Invoice.java +++ b/src/main/java/org/schema/Invoice.java @@ -510,7 +510,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String confirmationNumber; @@ -597,6 +597,48 @@ protected Invoice(String confirmationNumber, OrganizationOrPerson customer, java myPaymentStatus = paymentStatus; myReferencesOrder = referencesOrder; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myConfirmationNumber != null ? myConfirmationNumber.hashCode() : 0); + result = 31 * result + (myCustomer != null ? myCustomer.hashCode() : 0); + result = 31 * result + (myPaymentDue != null ? myPaymentDue.hashCode() : 0); + result = 31 * result + (myPaymentMethod != null ? myPaymentMethod.hashCode() : 0); + result = 31 * result + (myPaymentMethodId != null ? myPaymentMethodId.hashCode() : 0); + result = 31 * result + (myProvider != null ? myProvider.hashCode() : 0); + result = 31 * result + (myBroker != null ? myBroker.hashCode() : 0); + result = 31 * result + (myTotalPaymentDue != null ? myTotalPaymentDue.hashCode() : 0); + result = 31 * result + (myMinimumPaymentDue != null ? myMinimumPaymentDue.hashCode() : 0); + result = 31 * result + (myAccountId != null ? myAccountId.hashCode() : 0); + result = 31 * result + (myScheduledPaymentDate != null ? myScheduledPaymentDate.hashCode() : 0); + result = 31 * result + (myBillingPeriod != null ? myBillingPeriod.hashCode() : 0); + result = 31 * result + (myPaymentStatus != null ? myPaymentStatus.hashCode() : 0); + result = 31 * result + (myReferencesOrder != null ? myReferencesOrder.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Invoice invoice = (Invoice) o; + if (!super.equals(o)) return false; + if (myConfirmationNumber != null ? !myConfirmationNumber.equals(invoice.myConfirmationNumber) : invoice.myConfirmationNumber != null) return false; + if (myCustomer != null ? !myCustomer.equals(invoice.myCustomer) : invoice.myCustomer != null) return false; + if (myPaymentDue != null ? !myPaymentDue.equals(invoice.myPaymentDue) : invoice.myPaymentDue != null) return false; + if (myPaymentMethod != null ? !myPaymentMethod.equals(invoice.myPaymentMethod) : invoice.myPaymentMethod != null) return false; + if (myPaymentMethodId != null ? !myPaymentMethodId.equals(invoice.myPaymentMethodId) : invoice.myPaymentMethodId != null) return false; + if (myProvider != null ? !myProvider.equals(invoice.myProvider) : invoice.myProvider != null) return false; + if (myBroker != null ? !myBroker.equals(invoice.myBroker) : invoice.myBroker != null) return false; + if (myTotalPaymentDue != null ? !myTotalPaymentDue.equals(invoice.myTotalPaymentDue) : invoice.myTotalPaymentDue != null) return false; + if (myMinimumPaymentDue != null ? !myMinimumPaymentDue.equals(invoice.myMinimumPaymentDue) : invoice.myMinimumPaymentDue != null) return false; + if (myAccountId != null ? !myAccountId.equals(invoice.myAccountId) : invoice.myAccountId != null) return false; + if (myScheduledPaymentDate != null ? !myScheduledPaymentDate.equals(invoice.myScheduledPaymentDate) : invoice.myScheduledPaymentDate != null) return false; + if (myBillingPeriod != null ? !myBillingPeriod.equals(invoice.myBillingPeriod) : invoice.myBillingPeriod != null) return false; + if (myPaymentStatus != null ? !myPaymentStatus.equals(invoice.myPaymentStatus) : invoice.myPaymentStatus != null) return false; + if (myReferencesOrder != null ? !myReferencesOrder.equals(invoice.myReferencesOrder) : invoice.myReferencesOrder != null) return false; + return true; + } + private String myConfirmationNumber; private OrganizationOrPerson myCustomer; private java.util.Date myPaymentDue; diff --git a/src/main/java/org/schema/ItemAvailability.java b/src/main/java/org/schema/ItemAvailability.java index 4e1290e1..0ac710ba 100644 --- a/src/main/java/org/schema/ItemAvailability.java +++ b/src/main/java/org/schema/ItemAvailability.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected ItemAvailability(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ItemAvailability itemAvailability = (ItemAvailability) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ItemList.java b/src/main/java/org/schema/ItemList.java index c2b17f0d..472c9012 100644 --- a/src/main/java/org/schema/ItemList.java +++ b/src/main/java/org/schema/ItemList.java @@ -329,7 +329,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Integer numberOfItems; @@ -375,6 +375,26 @@ protected ItemList(Integer numberOfItems, ItemListOrderTypeOrString itemListOrde myItemListOrder = itemListOrder; myItemListElement = itemListElement; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myNumberOfItems != null ? myNumberOfItems.hashCode() : 0); + result = 31 * result + (myItemListOrder != null ? myItemListOrder.hashCode() : 0); + result = 31 * result + (myItemListElement != null ? myItemListElement.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ItemList itemList = (ItemList) o; + if (!super.equals(o)) return false; + if (myNumberOfItems != null ? !myNumberOfItems.equals(itemList.myNumberOfItems) : itemList.myNumberOfItems != null) return false; + if (myItemListOrder != null ? !myItemListOrder.equals(itemList.myItemListOrder) : itemList.myItemListOrder != null) return false; + if (myItemListElement != null ? !myItemListElement.equals(itemList.myItemListElement) : itemList.myItemListElement != null) return false; + return true; + } + private Integer myNumberOfItems; private ItemListOrderTypeOrString myItemListOrder; private ListItemOrStringOrThing myItemListElement; diff --git a/src/main/java/org/schema/ItemListOrMusicRecording.java b/src/main/java/org/schema/ItemListOrMusicRecording.java index d3fa1d22..d9894cb2 100644 --- a/src/main/java/org/schema/ItemListOrMusicRecording.java +++ b/src/main/java/org/schema/ItemListOrMusicRecording.java @@ -44,4 +44,21 @@ private void clear() { myItemList = null; myMusicRecording = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myItemList != null ? myItemList.hashCode() : 0); + result = 31 * result + (myMusicRecording != null ? myMusicRecording.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ItemListOrMusicRecording itemListOrMusicRecording = (ItemListOrMusicRecording) o; + if (myItemList != null ? !myItemList.equals(itemListOrMusicRecording.myItemList) : itemListOrMusicRecording.myItemList != null) return false; + if (myMusicRecording != null ? !myMusicRecording.equals(itemListOrMusicRecording.myMusicRecording) : itemListOrMusicRecording.myMusicRecording != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ItemListOrString.java b/src/main/java/org/schema/ItemListOrString.java index 53ab4aca..f932ffd3 100644 --- a/src/main/java/org/schema/ItemListOrString.java +++ b/src/main/java/org/schema/ItemListOrString.java @@ -39,4 +39,21 @@ private void clear() { myItemList = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myItemList != null ? myItemList.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ItemListOrString itemListOrString = (ItemListOrString) o; + if (myItemList != null ? !myItemList.equals(itemListOrString.myItemList) : itemListOrString.myItemList != null) return false; + if (myString != null ? !myString.equals(itemListOrString.myString) : itemListOrString.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ItemListOrderAscending.java b/src/main/java/org/schema/ItemListOrderAscending.java index 221eb164..a3cfdd58 100644 --- a/src/main/java/org/schema/ItemListOrderAscending.java +++ b/src/main/java/org/schema/ItemListOrderAscending.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected ItemListOrderAscending() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ItemListOrderAscending itemListOrderAscending = (ItemListOrderAscending) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ItemListOrderDescending.java b/src/main/java/org/schema/ItemListOrderDescending.java index db803192..5a5799e6 100644 --- a/src/main/java/org/schema/ItemListOrderDescending.java +++ b/src/main/java/org/schema/ItemListOrderDescending.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected ItemListOrderDescending() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ItemListOrderDescending itemListOrderDescending = (ItemListOrderDescending) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ItemListOrderType.java b/src/main/java/org/schema/ItemListOrderType.java index 998aa3f8..38c5821e 100644 --- a/src/main/java/org/schema/ItemListOrderType.java +++ b/src/main/java/org/schema/ItemListOrderType.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected ItemListOrderType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ItemListOrderType itemListOrderType = (ItemListOrderType) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ItemListOrderTypeOrString.java b/src/main/java/org/schema/ItemListOrderTypeOrString.java index 931e1260..186d10da 100644 --- a/src/main/java/org/schema/ItemListOrderTypeOrString.java +++ b/src/main/java/org/schema/ItemListOrderTypeOrString.java @@ -39,4 +39,21 @@ private void clear() { myItemListOrderType = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myItemListOrderType != null ? myItemListOrderType.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ItemListOrderTypeOrString itemListOrderTypeOrString = (ItemListOrderTypeOrString) o; + if (myItemListOrderType != null ? !myItemListOrderType.equals(itemListOrderTypeOrString.myItemListOrderType) : itemListOrderTypeOrString.myItemListOrderType != null) return false; + if (myString != null ? !myString.equals(itemListOrderTypeOrString.myString) : itemListOrderTypeOrString.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ItemListUnordered.java b/src/main/java/org/schema/ItemListUnordered.java index 8a621016..b28a6a19 100644 --- a/src/main/java/org/schema/ItemListUnordered.java +++ b/src/main/java/org/schema/ItemListUnordered.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected ItemListUnordered() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ItemListUnordered itemListUnordered = (ItemListUnordered) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ItemPage.java b/src/main/java/org/schema/ItemPage.java index 9f0b4a21..6a014d89 100644 --- a/src/main/java/org/schema/ItemPage.java +++ b/src/main/java/org/schema/ItemPage.java @@ -1266,7 +1266,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BreadcrumbListOrString breadcrumb; @@ -1507,4 +1507,18 @@ public interface Builder extends ThingBuilder { protected ItemPage(BreadcrumbListOrString breadcrumb, java.util.Date lastReviewed, WebPageElement mainContentOfPage, ImageObject primaryImageOfPage, String relatedLink, OrganizationOrPerson reviewedBy, String significantLink, Specialty specialty, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(breadcrumb, lastReviewed, mainContentOfPage, primaryImageOfPage, relatedLink, reviewedBy, significantLink, specialty, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ItemPage itemPage = (ItemPage) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/JewelryStore.java b/src/main/java/org/schema/JewelryStore.java index bdff57b1..1bec5829 100644 --- a/src/main/java/org/schema/JewelryStore.java +++ b/src/main/java/org/schema/JewelryStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected JewelryStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + JewelryStore jewelryStore = (JewelryStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/JobPosting.java b/src/main/java/org/schema/JobPosting.java index d6bd4bfd..2a1ddc70 100644 --- a/src/main/java/org/schema/JobPosting.java +++ b/src/main/java/org/schema/JobPosting.java @@ -29,7 +29,7 @@ public class JobPosting extends Intangible { /** * The base salary of the job or of an employee in an EmployeeRole. */ - public NumberOrPriceSpecification getBaseSalary() { + public Number getBaseSalary() { return myBaseSalary; } /** @@ -148,24 +148,42 @@ public JobPosting build() { /** * The base salary of the job or of an employee in an EmployeeRole. */ - @NotNull public Builder baseSalary(@NotNull Number number) { - if (this.baseSalary == null) this.baseSalary = new NumberOrPriceSpecification(); - this.baseSalary.setNumber(number); + @NotNull public Builder baseSalary(@NotNull Integer integer) { + if (this.baseSalary == null) this.baseSalary = new Number(); + this.baseSalary.setInteger(integer); return this; } /** * The base salary of the job or of an employee in an EmployeeRole. */ - @NotNull public Builder baseSalary(@NotNull PriceSpecification priceSpecification) { - if (this.baseSalary == null) this.baseSalary = new NumberOrPriceSpecification(); - this.baseSalary.setPriceSpecification(priceSpecification); + @NotNull public Builder baseSalary(@NotNull Long baseSalary) { + if (this.baseSalary == null) this.baseSalary = new Number(); + this.baseSalary.setLong(baseSalary); return this; } /** * The base salary of the job or of an employee in an EmployeeRole. */ - @NotNull public Builder baseSalary(@NotNull PriceSpecification.Builder priceSpecification) { - return this.baseSalary(priceSpecification.build()); + @NotNull public Builder baseSalary(@NotNull Float baseSalary) { + if (this.baseSalary == null) this.baseSalary = new Number(); + this.baseSalary.setFloat(baseSalary); + return this; + } + /** + * The base salary of the job or of an employee in an EmployeeRole. + */ + @NotNull public Builder baseSalary(@NotNull Double baseSalary) { + if (this.baseSalary == null) this.baseSalary = new Number(); + this.baseSalary.setDouble(baseSalary); + return this; + } + /** + * The base salary of the job or of an employee in an EmployeeRole. + */ + @NotNull public Builder baseSalary(@NotNull String baseSalary) { + if (this.baseSalary == null) this.baseSalary = new Number(); + this.baseSalary.setString(baseSalary); + return this; } /** * Description of benefits associated with the job. @@ -469,8 +487,11 @@ public Builder id(long id) { final String key = entry.getKey(); Object value = entry.getValue(); if (value instanceof java.util.Map) { value = ThingDeserializer.fromMap((java.util.Map)value); } - if ("baseSalary".equals(key) && value instanceof Number) { baseSalary((Number)value); continue; } - if ("baseSalary".equals(key) && value instanceof PriceSpecification) { baseSalary((PriceSpecification)value); continue; } + if ("baseSalary".equals(key) && value instanceof Integer) { baseSalary((Integer)value); continue; } + if ("baseSalary".equals(key) && value instanceof Long) { baseSalary((Long)value); continue; } + if ("baseSalary".equals(key) && value instanceof Float) { baseSalary((Float)value); continue; } + if ("baseSalary".equals(key) && value instanceof Double) { baseSalary((Double)value); continue; } + if ("baseSalary".equals(key) && value instanceof String) { baseSalary((String)value); continue; } if ("jobBenefits".equals(key) && value instanceof String) { jobBenefits((String)value); continue; } if ("datePosted".equals(key) && value instanceof java.util.Date) { datePosted((java.util.Date)value); continue; } if ("educationRequirements".equals(key) && value instanceof String) { educationRequirements((String)value); continue; } @@ -497,10 +518,10 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } - private NumberOrPriceSpecification baseSalary; + private Number baseSalary; private String jobBenefits; private java.util.Date datePosted; private String educationRequirements; @@ -529,9 +550,11 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - @NotNull Builder baseSalary(@NotNull Number number); - @NotNull Builder baseSalary(@NotNull PriceSpecification priceSpecification); - @NotNull Builder baseSalary(@NotNull PriceSpecification.Builder priceSpecification); + @NotNull Builder baseSalary(@NotNull Integer integer); + @NotNull Builder baseSalary(@NotNull Long baseSalary); + @NotNull Builder baseSalary(@NotNull Float baseSalary); + @NotNull Builder baseSalary(@NotNull Double baseSalary); + @NotNull Builder baseSalary(@NotNull String baseSalary); @NotNull Builder jobBenefits(@NotNull String jobBenefits); @NotNull Builder datePosted(@NotNull java.util.Date date); @NotNull Builder educationRequirements(@NotNull String educationRequirements); @@ -565,7 +588,7 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected JobPosting(NumberOrPriceSpecification baseSalary, String jobBenefits, java.util.Date datePosted, String educationRequirements, String employmentType, String experienceRequirements, Organization hiringOrganization, String incentiveCompensation, String industry, Place jobLocation, String occupationalCategory, String qualifications, String responsibilities, String salaryCurrency, String skills, String specialCommitments, String title, String workHours, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected JobPosting(Number baseSalary, String jobBenefits, java.util.Date datePosted, String educationRequirements, String employmentType, String experienceRequirements, Organization hiringOrganization, String incentiveCompensation, String industry, Place jobLocation, String occupationalCategory, String qualifications, String responsibilities, String salaryCurrency, String skills, String specialCommitments, String title, String workHours, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myBaseSalary = baseSalary; myJobBenefits = jobBenefits; @@ -586,7 +609,57 @@ protected JobPosting(NumberOrPriceSpecification baseSalary, String jobBenefits, myTitle = title; myWorkHours = workHours; } - private NumberOrPriceSpecification myBaseSalary; + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBaseSalary != null ? myBaseSalary.hashCode() : 0); + result = 31 * result + (myJobBenefits != null ? myJobBenefits.hashCode() : 0); + result = 31 * result + (myDatePosted != null ? myDatePosted.hashCode() : 0); + result = 31 * result + (myEducationRequirements != null ? myEducationRequirements.hashCode() : 0); + result = 31 * result + (myEmploymentType != null ? myEmploymentType.hashCode() : 0); + result = 31 * result + (myExperienceRequirements != null ? myExperienceRequirements.hashCode() : 0); + result = 31 * result + (myHiringOrganization != null ? myHiringOrganization.hashCode() : 0); + result = 31 * result + (myIncentiveCompensation != null ? myIncentiveCompensation.hashCode() : 0); + result = 31 * result + (myIndustry != null ? myIndustry.hashCode() : 0); + result = 31 * result + (myJobLocation != null ? myJobLocation.hashCode() : 0); + result = 31 * result + (myOccupationalCategory != null ? myOccupationalCategory.hashCode() : 0); + result = 31 * result + (myQualifications != null ? myQualifications.hashCode() : 0); + result = 31 * result + (myResponsibilities != null ? myResponsibilities.hashCode() : 0); + result = 31 * result + (mySalaryCurrency != null ? mySalaryCurrency.hashCode() : 0); + result = 31 * result + (mySkills != null ? mySkills.hashCode() : 0); + result = 31 * result + (mySpecialCommitments != null ? mySpecialCommitments.hashCode() : 0); + result = 31 * result + (myTitle != null ? myTitle.hashCode() : 0); + result = 31 * result + (myWorkHours != null ? myWorkHours.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + JobPosting jobPosting = (JobPosting) o; + if (!super.equals(o)) return false; + if (myBaseSalary != null ? !myBaseSalary.equals(jobPosting.myBaseSalary) : jobPosting.myBaseSalary != null) return false; + if (myJobBenefits != null ? !myJobBenefits.equals(jobPosting.myJobBenefits) : jobPosting.myJobBenefits != null) return false; + if (myDatePosted != null ? !myDatePosted.equals(jobPosting.myDatePosted) : jobPosting.myDatePosted != null) return false; + if (myEducationRequirements != null ? !myEducationRequirements.equals(jobPosting.myEducationRequirements) : jobPosting.myEducationRequirements != null) return false; + if (myEmploymentType != null ? !myEmploymentType.equals(jobPosting.myEmploymentType) : jobPosting.myEmploymentType != null) return false; + if (myExperienceRequirements != null ? !myExperienceRequirements.equals(jobPosting.myExperienceRequirements) : jobPosting.myExperienceRequirements != null) return false; + if (myHiringOrganization != null ? !myHiringOrganization.equals(jobPosting.myHiringOrganization) : jobPosting.myHiringOrganization != null) return false; + if (myIncentiveCompensation != null ? !myIncentiveCompensation.equals(jobPosting.myIncentiveCompensation) : jobPosting.myIncentiveCompensation != null) return false; + if (myIndustry != null ? !myIndustry.equals(jobPosting.myIndustry) : jobPosting.myIndustry != null) return false; + if (myJobLocation != null ? !myJobLocation.equals(jobPosting.myJobLocation) : jobPosting.myJobLocation != null) return false; + if (myOccupationalCategory != null ? !myOccupationalCategory.equals(jobPosting.myOccupationalCategory) : jobPosting.myOccupationalCategory != null) return false; + if (myQualifications != null ? !myQualifications.equals(jobPosting.myQualifications) : jobPosting.myQualifications != null) return false; + if (myResponsibilities != null ? !myResponsibilities.equals(jobPosting.myResponsibilities) : jobPosting.myResponsibilities != null) return false; + if (mySalaryCurrency != null ? !mySalaryCurrency.equals(jobPosting.mySalaryCurrency) : jobPosting.mySalaryCurrency != null) return false; + if (mySkills != null ? !mySkills.equals(jobPosting.mySkills) : jobPosting.mySkills != null) return false; + if (mySpecialCommitments != null ? !mySpecialCommitments.equals(jobPosting.mySpecialCommitments) : jobPosting.mySpecialCommitments != null) return false; + if (myTitle != null ? !myTitle.equals(jobPosting.myTitle) : jobPosting.myTitle != null) return false; + if (myWorkHours != null ? !myWorkHours.equals(jobPosting.myWorkHours) : jobPosting.myWorkHours != null) return false; + return true; + } + + private Number myBaseSalary; private String myJobBenefits; private java.util.Date myDatePosted; private String myEducationRequirements; diff --git a/src/main/java/org/schema/JoinAction.java b/src/main/java/org/schema/JoinAction.java index 6ea1fda3..8c614691 100644 --- a/src/main/java/org/schema/JoinAction.java +++ b/src/main/java/org/schema/JoinAction.java @@ -328,7 +328,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Event event; @@ -381,5 +381,21 @@ protected JoinAction(Event event, OrganizationOrPerson agent, java.util.Date end super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myEvent = event; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myEvent != null ? myEvent.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + JoinAction joinAction = (JoinAction) o; + if (!super.equals(o)) return false; + if (myEvent != null ? !myEvent.equals(joinAction.myEvent) : joinAction.myEvent != null) return false; + return true; + } + private Event myEvent; } diff --git a/src/main/java/org/schema/Joint.java b/src/main/java/org/schema/Joint.java index 5c484467..2ce23c9a 100644 --- a/src/main/java/org/schema/Joint.java +++ b/src/main/java/org/schema/Joint.java @@ -445,7 +445,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String biomechnicalClass; @@ -526,6 +526,26 @@ protected Joint(String biomechnicalClass, String functionalClass, String structu myFunctionalClass = functionalClass; myStructuralClass = structuralClass; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBiomechnicalClass != null ? myBiomechnicalClass.hashCode() : 0); + result = 31 * result + (myFunctionalClass != null ? myFunctionalClass.hashCode() : 0); + result = 31 * result + (myStructuralClass != null ? myStructuralClass.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Joint joint = (Joint) o; + if (!super.equals(o)) return false; + if (myBiomechnicalClass != null ? !myBiomechnicalClass.equals(joint.myBiomechnicalClass) : joint.myBiomechnicalClass != null) return false; + if (myFunctionalClass != null ? !myFunctionalClass.equals(joint.myFunctionalClass) : joint.myFunctionalClass != null) return false; + if (myStructuralClass != null ? !myStructuralClass.equals(joint.myStructuralClass) : joint.myStructuralClass != null) return false; + return true; + } + private String myBiomechnicalClass; private String myFunctionalClass; private String myStructuralClass; diff --git a/src/main/java/org/schema/LRMIClass.java b/src/main/java/org/schema/LRMIClass.java index 3ee08e02..0ed01ddb 100644 --- a/src/main/java/org/schema/LRMIClass.java +++ b/src/main/java/org/schema/LRMIClass.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected LRMIClass() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LRMIClass lRMIClass = (LRMIClass) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LaboratoryScience.java b/src/main/java/org/schema/LaboratoryScience.java index aa4d04b0..2ee55246 100644 --- a/src/main/java/org/schema/LaboratoryScience.java +++ b/src/main/java/org/schema/LaboratoryScience.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected LaboratoryScience() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LaboratoryScience laboratoryScience = (LaboratoryScience) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LakeBodyOfWater.java b/src/main/java/org/schema/LakeBodyOfWater.java index a7d82cfa..ef7e92b5 100644 --- a/src/main/java/org/schema/LakeBodyOfWater.java +++ b/src/main/java/org/schema/LakeBodyOfWater.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected LakeBodyOfWater(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LakeBodyOfWater lakeBodyOfWater = (LakeBodyOfWater) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Landform.java b/src/main/java/org/schema/Landform.java index 3e5b9671..a0d5f5e6 100644 --- a/src/main/java/org/schema/Landform.java +++ b/src/main/java/org/schema/Landform.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected Landform(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Landform landform = (Landform) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LandmarksOrHistoricalBuildings.java b/src/main/java/org/schema/LandmarksOrHistoricalBuildings.java index 11a6bdbb..a64add91 100644 --- a/src/main/java/org/schema/LandmarksOrHistoricalBuildings.java +++ b/src/main/java/org/schema/LandmarksOrHistoricalBuildings.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected LandmarksOrHistoricalBuildings(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LandmarksOrHistoricalBuildings landmarksOrHistoricalBuildings = (LandmarksOrHistoricalBuildings) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Language.java b/src/main/java/org/schema/Language.java index 77db1fc6..bad3e982 100644 --- a/src/main/java/org/schema/Language.java +++ b/src/main/java/org/schema/Language.java @@ -216,7 +216,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String additionalType; @@ -247,4 +247,18 @@ public interface Builder extends ThingBuilder { protected Language(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Language language = (Language) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LanguageOrString.java b/src/main/java/org/schema/LanguageOrString.java index 63fcf4eb..53085bb6 100644 --- a/src/main/java/org/schema/LanguageOrString.java +++ b/src/main/java/org/schema/LanguageOrString.java @@ -39,4 +39,21 @@ private void clear() { myLanguage = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myLanguage != null ? myLanguage.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LanguageOrString languageOrString = (LanguageOrString) o; + if (myLanguage != null ? !myLanguage.equals(languageOrString.myLanguage) : languageOrString.myLanguage != null) return false; + if (myString != null ? !myString.equals(languageOrString.myString) : languageOrString.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LaserDiscFormat.java b/src/main/java/org/schema/LaserDiscFormat.java index 47513294..e7557d17 100644 --- a/src/main/java/org/schema/LaserDiscFormat.java +++ b/src/main/java/org/schema/LaserDiscFormat.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected LaserDiscFormat() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LaserDiscFormat laserDiscFormat = (LaserDiscFormat) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LeaveAction.java b/src/main/java/org/schema/LeaveAction.java index 07d613e2..78d4c5d1 100644 --- a/src/main/java/org/schema/LeaveAction.java +++ b/src/main/java/org/schema/LeaveAction.java @@ -328,7 +328,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Event event; @@ -381,5 +381,21 @@ protected LeaveAction(Event event, OrganizationOrPerson agent, java.util.Date en super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myEvent = event; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myEvent != null ? myEvent.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LeaveAction leaveAction = (LeaveAction) o; + if (!super.equals(o)) return false; + if (myEvent != null ? !myEvent.equals(leaveAction.myEvent) : leaveAction.myEvent != null) return false; + return true; + } + private Event myEvent; } diff --git a/src/main/java/org/schema/LeftHandDriving.java b/src/main/java/org/schema/LeftHandDriving.java index 8ea56952..16e88011 100644 --- a/src/main/java/org/schema/LeftHandDriving.java +++ b/src/main/java/org/schema/LeftHandDriving.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected LeftHandDriving() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LeftHandDriving leftHandDriving = (LeftHandDriving) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LegislativeBuilding.java b/src/main/java/org/schema/LegislativeBuilding.java index 02dfef75..8237ec43 100644 --- a/src/main/java/org/schema/LegislativeBuilding.java +++ b/src/main/java/org/schema/LegislativeBuilding.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected LegislativeBuilding(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LegislativeBuilding legislativeBuilding = (LegislativeBuilding) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LeisureTimeActivity.java b/src/main/java/org/schema/LeisureTimeActivity.java index 46fcd845..73a6ab94 100644 --- a/src/main/java/org/schema/LeisureTimeActivity.java +++ b/src/main/java/org/schema/LeisureTimeActivity.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected LeisureTimeActivity() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LeisureTimeActivity leisureTimeActivity = (LeisureTimeActivity) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LendAction.java b/src/main/java/org/schema/LendAction.java index 8f3ad9f9..de4921aa 100644 --- a/src/main/java/org/schema/LendAction.java +++ b/src/main/java/org/schema/LendAction.java @@ -356,7 +356,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person borrower; @@ -415,5 +415,21 @@ protected LendAction(Person borrower, Place fromLocation, Place toLocation, Orga super(fromLocation, toLocation, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myBorrower = borrower; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBorrower != null ? myBorrower.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LendAction lendAction = (LendAction) o; + if (!super.equals(o)) return false; + if (myBorrower != null ? !myBorrower.equals(lendAction.myBorrower) : lendAction.myBorrower != null) return false; + return true; + } + private Person myBorrower; } diff --git a/src/main/java/org/schema/Library.java b/src/main/java/org/schema/Library.java index e0db7444..d64515f1 100644 --- a/src/main/java/org/schema/Library.java +++ b/src/main/java/org/schema/Library.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected Library(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Library library = (Library) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LifestyleModification.java b/src/main/java/org/schema/LifestyleModification.java index 143fe820..33793345 100644 --- a/src/main/java/org/schema/LifestyleModification.java +++ b/src/main/java/org/schema/LifestyleModification.java @@ -371,7 +371,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalEntity adverseOutcome; @@ -435,4 +435,18 @@ public interface Builder extends ThingBuilder { protected LifestyleModification(MedicalEntity adverseOutcome, MedicalContraindication contraindication, MedicalTherapy duplicateTherapy, MedicalIndication indication, MedicalEntity seriousAdverseOutcome, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(adverseOutcome, contraindication, duplicateTherapy, indication, seriousAdverseOutcome, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LifestyleModification lifestyleModification = (LifestyleModification) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Ligament.java b/src/main/java/org/schema/Ligament.java index 95300478..e1e78c2c 100644 --- a/src/main/java/org/schema/Ligament.java +++ b/src/main/java/org/schema/Ligament.java @@ -403,7 +403,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String associatedPathophysiology; @@ -475,4 +475,18 @@ public interface Builder extends ThingBuilder { protected Ligament(String associatedPathophysiology, String bodyLocation, AnatomicalStructure connectedTo, ImageObject diagram, String function, IsPartOf partOfSystem, MedicalCondition relatedCondition, MedicalTherapy relatedTherapy, AnatomicalStructure subStructure, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(associatedPathophysiology, bodyLocation, connectedTo, diagram, function, partOfSystem, relatedCondition, relatedTherapy, subStructure, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Ligament ligament = (Ligament) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LikeAction.java b/src/main/java/org/schema/LikeAction.java index b68a1b93..afd80616 100644 --- a/src/main/java/org/schema/LikeAction.java +++ b/src/main/java/org/schema/LikeAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected LikeAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LikeAction likeAction = (LikeAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LimitedAvailability.java b/src/main/java/org/schema/LimitedAvailability.java index 0ef59ea3..ed288384 100644 --- a/src/main/java/org/schema/LimitedAvailability.java +++ b/src/main/java/org/schema/LimitedAvailability.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected LimitedAvailability() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LimitedAvailability limitedAvailability = (LimitedAvailability) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LiquorStore.java b/src/main/java/org/schema/LiquorStore.java index c3db341d..a53d6b07 100644 --- a/src/main/java/org/schema/LiquorStore.java +++ b/src/main/java/org/schema/LiquorStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected LiquorStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LiquorStore liquorStore = (LiquorStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ListItem.java b/src/main/java/org/schema/ListItem.java index a940335c..fe9b9ee2 100644 --- a/src/main/java/org/schema/ListItem.java +++ b/src/main/java/org/schema/ListItem.java @@ -276,7 +276,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Thing item; @@ -319,6 +319,26 @@ protected ListItem(Thing item, ListItem previousItem, ListItem nextItem, String myPreviousItem = previousItem; myNextItem = nextItem; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myItem != null ? myItem.hashCode() : 0); + result = 31 * result + (myPreviousItem != null ? myPreviousItem.hashCode() : 0); + result = 31 * result + (myNextItem != null ? myNextItem.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListItem listItem = (ListItem) o; + if (!super.equals(o)) return false; + if (myItem != null ? !myItem.equals(listItem.myItem) : listItem.myItem != null) return false; + if (myPreviousItem != null ? !myPreviousItem.equals(listItem.myPreviousItem) : listItem.myPreviousItem != null) return false; + if (myNextItem != null ? !myNextItem.equals(listItem.myNextItem) : listItem.myNextItem != null) return false; + return true; + } + private Thing myItem; private ListItem myPreviousItem; private ListItem myNextItem; diff --git a/src/main/java/org/schema/ListItemOrStringOrThing.java b/src/main/java/org/schema/ListItemOrStringOrThing.java index 6375916b..b9195ef8 100644 --- a/src/main/java/org/schema/ListItemOrStringOrThing.java +++ b/src/main/java/org/schema/ListItemOrStringOrThing.java @@ -44,4 +44,23 @@ private void clear() { myString = null; myThing = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myListItem != null ? myListItem.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + result = 31 * result + (myThing != null ? myThing.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListItemOrStringOrThing listItemOrStringOrThing = (ListItemOrStringOrThing) o; + if (myListItem != null ? !myListItem.equals(listItemOrStringOrThing.myListItem) : listItemOrStringOrThing.myListItem != null) return false; + if (myString != null ? !myString.equals(listItemOrStringOrThing.myString) : listItemOrStringOrThing.myString != null) return false; + if (myThing != null ? !myThing.equals(listItemOrStringOrThing.myThing) : listItemOrStringOrThing.myThing != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ListenAction.java b/src/main/java/org/schema/ListenAction.java index 173bab75..54233412 100644 --- a/src/main/java/org/schema/ListenAction.java +++ b/src/main/java/org/schema/ListenAction.java @@ -322,7 +322,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Offer expectsAcceptanceOf; @@ -374,4 +374,18 @@ public interface Builder extends ThingBuilder { protected ListenAction(Offer expectsAcceptanceOf, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(expectsAcceptanceOf, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ListenAction listenAction = (ListenAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LiteraryEvent.java b/src/main/java/org/schema/LiteraryEvent.java index 97feb487..bcc4f570 100644 --- a/src/main/java/org/schema/LiteraryEvent.java +++ b/src/main/java/org/schema/LiteraryEvent.java @@ -496,7 +496,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -583,4 +583,18 @@ public interface Builder extends ThingBuilder { protected LiteraryEvent(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LiteraryEvent literaryEvent = (LiteraryEvent) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LiveAlbum.java b/src/main/java/org/schema/LiveAlbum.java index 75a6bd36..330637df 100644 --- a/src/main/java/org/schema/LiveAlbum.java +++ b/src/main/java/org/schema/LiveAlbum.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected LiveAlbum() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LiveAlbum liveAlbum = (LiveAlbum) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LocalBusiness.java b/src/main/java/org/schema/LocalBusiness.java index 393c7c7a..c29bd55b 100644 --- a/src/main/java/org/schema/LocalBusiness.java +++ b/src/main/java/org/schema/LocalBusiness.java @@ -536,7 +536,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -630,6 +630,30 @@ protected LocalBusiness(Organization parentOrganization, String currenciesAccept myPaymentAccepted = paymentAccepted; myPriceRange = priceRange; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myParentOrganization != null ? myParentOrganization.hashCode() : 0); + result = 31 * result + (myCurrenciesAccepted != null ? myCurrenciesAccepted.hashCode() : 0); + result = 31 * result + (myOpeningHours != null ? myOpeningHours.hashCode() : 0); + result = 31 * result + (myPaymentAccepted != null ? myPaymentAccepted.hashCode() : 0); + result = 31 * result + (myPriceRange != null ? myPriceRange.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LocalBusiness localBusiness = (LocalBusiness) o; + if (!super.equals(o)) return false; + if (myParentOrganization != null ? !myParentOrganization.equals(localBusiness.myParentOrganization) : localBusiness.myParentOrganization != null) return false; + if (myCurrenciesAccepted != null ? !myCurrenciesAccepted.equals(localBusiness.myCurrenciesAccepted) : localBusiness.myCurrenciesAccepted != null) return false; + if (myOpeningHours != null ? !myOpeningHours.equals(localBusiness.myOpeningHours) : localBusiness.myOpeningHours != null) return false; + if (myPaymentAccepted != null ? !myPaymentAccepted.equals(localBusiness.myPaymentAccepted) : localBusiness.myPaymentAccepted != null) return false; + if (myPriceRange != null ? !myPriceRange.equals(localBusiness.myPriceRange) : localBusiness.myPriceRange != null) return false; + return true; + } + private Organization myParentOrganization; private String myCurrenciesAccepted; private String myOpeningHours; diff --git a/src/main/java/org/schema/LockerDelivery.java b/src/main/java/org/schema/LockerDelivery.java index ee92db54..7c9e96d8 100644 --- a/src/main/java/org/schema/LockerDelivery.java +++ b/src/main/java/org/schema/LockerDelivery.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected LockerDelivery(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LockerDelivery lockerDelivery = (LockerDelivery) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Locksmith.java b/src/main/java/org/schema/Locksmith.java index da57b12d..576c0f84 100644 --- a/src/main/java/org/schema/Locksmith.java +++ b/src/main/java/org/schema/Locksmith.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected Locksmith(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Locksmith locksmith = (Locksmith) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LodgingBusiness.java b/src/main/java/org/schema/LodgingBusiness.java index 2aacc862..5926645a 100644 --- a/src/main/java/org/schema/LodgingBusiness.java +++ b/src/main/java/org/schema/LodgingBusiness.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected LodgingBusiness(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LodgingBusiness lodgingBusiness = (LodgingBusiness) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LodgingReservation.java b/src/main/java/org/schema/LodgingReservation.java index eb2faa5f..7072697c 100644 --- a/src/main/java/org/schema/LodgingReservation.java +++ b/src/main/java/org/schema/LodgingReservation.java @@ -293,30 +293,40 @@ public LodgingReservation build() { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull Number number) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setNumber(number); + @NotNull public Builder totalPrice(@NotNull Integer integer) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setInteger(integer); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification priceSpecification) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setPriceSpecification(priceSpecification); + @NotNull public Builder totalPrice(@NotNull Long totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setLong(totalPrice); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification) { - return this.totalPrice(priceSpecification.build()); + @NotNull public Builder totalPrice(@NotNull Float totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setFloat(totalPrice); + return this; + } + /** + * The total price for the reservation or ticket, including applicable taxes, shipping, etc. + */ + @NotNull public Builder totalPrice(@NotNull Double totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setDouble(totalPrice); + return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ @NotNull public Builder totalPrice(@NotNull String totalPrice) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); + if (this.totalPrice == null) this.totalPrice = new Number(); this.totalPrice.setString(totalPrice); return this; } @@ -546,8 +556,10 @@ public Builder id(long id) { if ("modifiedTime".equals(key) && value instanceof java.util.Date) { modifiedTime((java.util.Date)value); continue; } if ("programMembershipUsed".equals(key) && value instanceof ProgramMembership) { programMembershipUsed((ProgramMembership)value); continue; } if ("reservedTicket".equals(key) && value instanceof Ticket) { reservedTicket((Ticket)value); continue; } - if ("totalPrice".equals(key) && value instanceof Number) { totalPrice((Number)value); continue; } - if ("totalPrice".equals(key) && value instanceof PriceSpecification) { totalPrice((PriceSpecification)value); continue; } + if ("totalPrice".equals(key) && value instanceof Integer) { totalPrice((Integer)value); continue; } + if ("totalPrice".equals(key) && value instanceof Long) { totalPrice((Long)value); continue; } + if ("totalPrice".equals(key) && value instanceof Float) { totalPrice((Float)value); continue; } + if ("totalPrice".equals(key) && value instanceof Double) { totalPrice((Double)value); continue; } if ("totalPrice".equals(key) && value instanceof String) { totalPrice((String)value); continue; } if ("priceCurrency".equals(key) && value instanceof String) { priceCurrency((String)value); continue; } if ("broker".equals(key) && value instanceof Organization) { broker((Organization)value); continue; } @@ -561,7 +573,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private java.util.Date checkinTime; @@ -579,7 +591,7 @@ public Builder id(long id) { private java.util.Date modifiedTime; private ProgramMembership programMembershipUsed; private Ticket reservedTicket; - private NumberOrPriceSpecificationOrString totalPrice; + private Number totalPrice; private String priceCurrency; private OrganizationOrPerson broker; private String additionalType; @@ -624,9 +636,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder programMembershipUsed(@NotNull ProgramMembership.Builder programMembership); @NotNull Builder reservedTicket(@NotNull Ticket ticket); @NotNull Builder reservedTicket(@NotNull Ticket.Builder ticket); - @NotNull Builder totalPrice(@NotNull Number number); - @NotNull Builder totalPrice(@NotNull PriceSpecification priceSpecification); - @NotNull Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(@NotNull Integer integer); + @NotNull Builder totalPrice(@NotNull Long totalPrice); + @NotNull Builder totalPrice(@NotNull Float totalPrice); + @NotNull Builder totalPrice(@NotNull Double totalPrice); @NotNull Builder totalPrice(@NotNull String totalPrice); @NotNull Builder priceCurrency(@NotNull String priceCurrency); @NotNull Builder broker(@NotNull Organization organization); @@ -647,7 +660,7 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected LodgingReservation(java.util.Date checkinTime, java.util.Date checkoutTime, QualitativeValueOrString lodgingUnitType, String lodgingUnitDescription, IntegerOrQuantitativeValue numAdults, IntegerOrQuantitativeValue numChildren, String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, NumberOrPriceSpecificationOrString totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected LodgingReservation(java.util.Date checkinTime, java.util.Date checkoutTime, QualitativeValueOrString lodgingUnitType, String lodgingUnitDescription, IntegerOrQuantitativeValue numAdults, IntegerOrQuantitativeValue numChildren, String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, Number totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(reservationId, reservationStatus, reservationFor, underName, provider, bookingTime, modifiedTime, programMembershipUsed, reservedTicket, totalPrice, priceCurrency, broker, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myCheckinTime = checkinTime; myCheckoutTime = checkoutTime; @@ -656,6 +669,32 @@ protected LodgingReservation(java.util.Date checkinTime, java.util.Date checkout myNumAdults = numAdults; myNumChildren = numChildren; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myCheckinTime != null ? myCheckinTime.hashCode() : 0); + result = 31 * result + (myCheckoutTime != null ? myCheckoutTime.hashCode() : 0); + result = 31 * result + (myLodgingUnitType != null ? myLodgingUnitType.hashCode() : 0); + result = 31 * result + (myLodgingUnitDescription != null ? myLodgingUnitDescription.hashCode() : 0); + result = 31 * result + (myNumAdults != null ? myNumAdults.hashCode() : 0); + result = 31 * result + (myNumChildren != null ? myNumChildren.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LodgingReservation lodgingReservation = (LodgingReservation) o; + if (!super.equals(o)) return false; + if (myCheckinTime != null ? !myCheckinTime.equals(lodgingReservation.myCheckinTime) : lodgingReservation.myCheckinTime != null) return false; + if (myCheckoutTime != null ? !myCheckoutTime.equals(lodgingReservation.myCheckoutTime) : lodgingReservation.myCheckoutTime != null) return false; + if (myLodgingUnitType != null ? !myLodgingUnitType.equals(lodgingReservation.myLodgingUnitType) : lodgingReservation.myLodgingUnitType != null) return false; + if (myLodgingUnitDescription != null ? !myLodgingUnitDescription.equals(lodgingReservation.myLodgingUnitDescription) : lodgingReservation.myLodgingUnitDescription != null) return false; + if (myNumAdults != null ? !myNumAdults.equals(lodgingReservation.myNumAdults) : lodgingReservation.myNumAdults != null) return false; + if (myNumChildren != null ? !myNumChildren.equals(lodgingReservation.myNumChildren) : lodgingReservation.myNumChildren != null) return false; + return true; + } + private java.util.Date myCheckinTime; private java.util.Date myCheckoutTime; private QualitativeValueOrString myLodgingUnitType; diff --git a/src/main/java/org/schema/Longitudinal.java b/src/main/java/org/schema/Longitudinal.java index e3882fee..f09ab029 100644 --- a/src/main/java/org/schema/Longitudinal.java +++ b/src/main/java/org/schema/Longitudinal.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Longitudinal() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Longitudinal longitudinal = (Longitudinal) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LoseAction.java b/src/main/java/org/schema/LoseAction.java index 43ee225e..1ad3e01f 100644 --- a/src/main/java/org/schema/LoseAction.java +++ b/src/main/java/org/schema/LoseAction.java @@ -328,7 +328,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person winner; @@ -381,5 +381,21 @@ protected LoseAction(Person winner, OrganizationOrPerson agent, java.util.Date e super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myWinner = winner; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myWinner != null ? myWinner.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LoseAction loseAction = (LoseAction) o; + if (!super.equals(o)) return false; + if (myWinner != null ? !myWinner.equals(loseAction.myWinner) : loseAction.myWinner != null) return false; + return true; + } + private Person myWinner; } diff --git a/src/main/java/org/schema/Lung.java b/src/main/java/org/schema/Lung.java index bb64b328..193ee071 100644 --- a/src/main/java/org/schema/Lung.java +++ b/src/main/java/org/schema/Lung.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Lung() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Lung lung = (Lung) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/LymphaticVessel.java b/src/main/java/org/schema/LymphaticVessel.java index 81afcf5c..7283f781 100644 --- a/src/main/java/org/schema/LymphaticVessel.java +++ b/src/main/java/org/schema/LymphaticVessel.java @@ -479,7 +479,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Vessel originatesFrom; @@ -565,6 +565,26 @@ protected LymphaticVessel(Vessel originatesFrom, AnatomicalStructureOrAnatomical myRegionDrained = regionDrained; myRunsTo = runsTo; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myOriginatesFrom != null ? myOriginatesFrom.hashCode() : 0); + result = 31 * result + (myRegionDrained != null ? myRegionDrained.hashCode() : 0); + result = 31 * result + (myRunsTo != null ? myRunsTo.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + LymphaticVessel lymphaticVessel = (LymphaticVessel) o; + if (!super.equals(o)) return false; + if (myOriginatesFrom != null ? !myOriginatesFrom.equals(lymphaticVessel.myOriginatesFrom) : lymphaticVessel.myOriginatesFrom != null) return false; + if (myRegionDrained != null ? !myRegionDrained.equals(lymphaticVessel.myRegionDrained) : lymphaticVessel.myRegionDrained != null) return false; + if (myRunsTo != null ? !myRunsTo.equals(lymphaticVessel.myRunsTo) : lymphaticVessel.myRunsTo != null) return false; + return true; + } + private Vessel myOriginatesFrom; private AnatomicalStructureOrAnatomicalSystem myRegionDrained; private Vessel myRunsTo; diff --git a/src/main/java/org/schema/MBZ.java b/src/main/java/org/schema/MBZ.java index 81d8c310..7776fc6c 100644 --- a/src/main/java/org/schema/MBZ.java +++ b/src/main/java/org/schema/MBZ.java @@ -54,4 +54,18 @@ public interface Builder extends ThingBuilder { protected MBZ() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MBZ mBZ = (MBZ) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MRI.java b/src/main/java/org/schema/MRI.java index 5686b07f..1111add6 100644 --- a/src/main/java/org/schema/MRI.java +++ b/src/main/java/org/schema/MRI.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected MRI() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MRI mRI = (MRI) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Map.java b/src/main/java/org/schema/Map.java index 72f0992d..72c954f2 100644 --- a/src/main/java/org/schema/Map.java +++ b/src/main/java/org/schema/Map.java @@ -1166,7 +1166,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MapCategoryType mapType; @@ -1387,5 +1387,21 @@ protected Map(MapCategoryType mapType, String schemaVersion, Thing about, String super(schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myMapType = mapType; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myMapType != null ? myMapType.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Map map = (Map) o; + if (!super.equals(o)) return false; + if (myMapType != null ? !myMapType.equals(map.myMapType) : map.myMapType != null) return false; + return true; + } + private MapCategoryType myMapType; } diff --git a/src/main/java/org/schema/MapCategoryType.java b/src/main/java/org/schema/MapCategoryType.java index 4e910695..60d51150 100644 --- a/src/main/java/org/schema/MapCategoryType.java +++ b/src/main/java/org/schema/MapCategoryType.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected MapCategoryType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MapCategoryType mapCategoryType = (MapCategoryType) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MapOrString.java b/src/main/java/org/schema/MapOrString.java index 325f16c9..76c22608 100644 --- a/src/main/java/org/schema/MapOrString.java +++ b/src/main/java/org/schema/MapOrString.java @@ -39,4 +39,21 @@ private void clear() { myMap = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myMap != null ? myMap.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MapOrString mapOrString = (MapOrString) o; + if (myMap != null ? !myMap.equals(mapOrString.myMap) : mapOrString.myMap != null) return false; + if (myString != null ? !myString.equals(mapOrString.myString) : mapOrString.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MarryAction.java b/src/main/java/org/schema/MarryAction.java index 9cb3dce3..0ebff9e8 100644 --- a/src/main/java/org/schema/MarryAction.java +++ b/src/main/java/org/schema/MarryAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected MarryAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MarryAction marryAction = (MarryAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Mass.java b/src/main/java/org/schema/Mass.java index 880d251b..65c0869f 100644 --- a/src/main/java/org/schema/Mass.java +++ b/src/main/java/org/schema/Mass.java @@ -216,7 +216,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String additionalType; @@ -247,4 +247,18 @@ public interface Builder extends ThingBuilder { protected Mass(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Mass mass = (Mass) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MaximumDoseSchedule.java b/src/main/java/org/schema/MaximumDoseSchedule.java index 781fb26d..62f3bc5f 100644 --- a/src/main/java/org/schema/MaximumDoseSchedule.java +++ b/src/main/java/org/schema/MaximumDoseSchedule.java @@ -369,7 +369,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String doseUnit; @@ -430,4 +430,18 @@ public interface Builder extends ThingBuilder { protected MaximumDoseSchedule(String doseUnit, Number doseValue, String frequency, String targetPopulation, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(doseUnit, doseValue, frequency, targetPopulation, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MaximumDoseSchedule maximumDoseSchedule = (MaximumDoseSchedule) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MediaObject.java b/src/main/java/org/schema/MediaObject.java index 44853e7a..39b34519 100644 --- a/src/main/java/org/schema/MediaObject.java +++ b/src/main/java/org/schema/MediaObject.java @@ -1446,7 +1446,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private NewsArticle associatedArticle; @@ -1722,6 +1722,52 @@ protected MediaObject(NewsArticle associatedArticle, String bitrate, String cont myUploadDate = uploadDate; myWidth = width; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAssociatedArticle != null ? myAssociatedArticle.hashCode() : 0); + result = 31 * result + (myBitrate != null ? myBitrate.hashCode() : 0); + result = 31 * result + (myContentSize != null ? myContentSize.hashCode() : 0); + result = 31 * result + (myContentUrl != null ? myContentUrl.hashCode() : 0); + result = 31 * result + (myDuration != null ? myDuration.hashCode() : 0); + result = 31 * result + (myEmbedUrl != null ? myEmbedUrl.hashCode() : 0); + result = 31 * result + (myEncodesCreativeWork != null ? myEncodesCreativeWork.hashCode() : 0); + result = 31 * result + (myEncodingFormat != null ? myEncodingFormat.hashCode() : 0); + result = 31 * result + (myExpires != null ? myExpires.hashCode() : 0); + result = 31 * result + (myHeight != null ? myHeight.hashCode() : 0); + result = 31 * result + (myPlayerType != null ? myPlayerType.hashCode() : 0); + result = 31 * result + (myProductionCompany != null ? myProductionCompany.hashCode() : 0); + result = 31 * result + (myRegionsAllowed != null ? myRegionsAllowed.hashCode() : 0); + result = 31 * result + (myRequiresSubscription != null ? myRequiresSubscription.hashCode() : 0); + result = 31 * result + (myUploadDate != null ? myUploadDate.hashCode() : 0); + result = 31 * result + (myWidth != null ? myWidth.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MediaObject mediaObject = (MediaObject) o; + if (!super.equals(o)) return false; + if (myAssociatedArticle != null ? !myAssociatedArticle.equals(mediaObject.myAssociatedArticle) : mediaObject.myAssociatedArticle != null) return false; + if (myBitrate != null ? !myBitrate.equals(mediaObject.myBitrate) : mediaObject.myBitrate != null) return false; + if (myContentSize != null ? !myContentSize.equals(mediaObject.myContentSize) : mediaObject.myContentSize != null) return false; + if (myContentUrl != null ? !myContentUrl.equals(mediaObject.myContentUrl) : mediaObject.myContentUrl != null) return false; + if (myDuration != null ? !myDuration.equals(mediaObject.myDuration) : mediaObject.myDuration != null) return false; + if (myEmbedUrl != null ? !myEmbedUrl.equals(mediaObject.myEmbedUrl) : mediaObject.myEmbedUrl != null) return false; + if (myEncodesCreativeWork != null ? !myEncodesCreativeWork.equals(mediaObject.myEncodesCreativeWork) : mediaObject.myEncodesCreativeWork != null) return false; + if (myEncodingFormat != null ? !myEncodingFormat.equals(mediaObject.myEncodingFormat) : mediaObject.myEncodingFormat != null) return false; + if (myExpires != null ? !myExpires.equals(mediaObject.myExpires) : mediaObject.myExpires != null) return false; + if (myHeight != null ? !myHeight.equals(mediaObject.myHeight) : mediaObject.myHeight != null) return false; + if (myPlayerType != null ? !myPlayerType.equals(mediaObject.myPlayerType) : mediaObject.myPlayerType != null) return false; + if (myProductionCompany != null ? !myProductionCompany.equals(mediaObject.myProductionCompany) : mediaObject.myProductionCompany != null) return false; + if (myRegionsAllowed != null ? !myRegionsAllowed.equals(mediaObject.myRegionsAllowed) : mediaObject.myRegionsAllowed != null) return false; + if (myRequiresSubscription != null ? !myRequiresSubscription.equals(mediaObject.myRequiresSubscription) : mediaObject.myRequiresSubscription != null) return false; + if (myUploadDate != null ? !myUploadDate.equals(mediaObject.myUploadDate) : mediaObject.myUploadDate != null) return false; + if (myWidth != null ? !myWidth.equals(mediaObject.myWidth) : mediaObject.myWidth != null) return false; + return true; + } + private NewsArticle myAssociatedArticle; private String myBitrate; private String myContentSize; diff --git a/src/main/java/org/schema/MedicalAudience.java b/src/main/java/org/schema/MedicalAudience.java index 1fd19e07..5240814f 100644 --- a/src/main/java/org/schema/MedicalAudience.java +++ b/src/main/java/org/schema/MedicalAudience.java @@ -375,7 +375,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalCondition healthCondition; @@ -434,4 +434,18 @@ public interface Builder extends ThingBuilder { protected MedicalAudience(MedicalCondition healthCondition, String requiredGender, Integer requiredMaxAge, Integer requiredMinAge, String suggestedGender, Number suggestedMaxAge, Number suggestedMinAge, String audienceType, AdministrativeArea geographicArea, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(healthCondition, requiredGender, requiredMaxAge, requiredMinAge, suggestedGender, suggestedMaxAge, suggestedMinAge, audienceType, geographicArea, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalAudience medicalAudience = (MedicalAudience) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalCause.java b/src/main/java/org/schema/MedicalCause.java index 7f5e04eb..7e8f01be 100644 --- a/src/main/java/org/schema/MedicalCause.java +++ b/src/main/java/org/schema/MedicalCause.java @@ -321,7 +321,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalEntity causeOf; @@ -374,5 +374,21 @@ protected MedicalCause(MedicalEntity causeOf, MedicalCode code, MedicalGuideline super(code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myCauseOf = causeOf; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myCauseOf != null ? myCauseOf.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalCause medicalCause = (MedicalCause) o; + if (!super.equals(o)) return false; + if (myCauseOf != null ? !myCauseOf.equals(medicalCause.myCauseOf) : medicalCause.myCauseOf != null) return false; + return true; + } + private MedicalEntity myCauseOf; } diff --git a/src/main/java/org/schema/MedicalClinic.java b/src/main/java/org/schema/MedicalClinic.java index e87a142b..51eb3bca 100644 --- a/src/main/java/org/schema/MedicalClinic.java +++ b/src/main/java/org/schema/MedicalClinic.java @@ -577,7 +577,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalProcedureOrMedicalTestOrMedicalTherapy availableService; @@ -678,6 +678,24 @@ protected MedicalClinic(MedicalProcedureOrMedicalTestOrMedicalTherapy availableS myAvailableService = availableService; myMedicalSpecialty = medicalSpecialty; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAvailableService != null ? myAvailableService.hashCode() : 0); + result = 31 * result + (myMedicalSpecialty != null ? myMedicalSpecialty.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalClinic medicalClinic = (MedicalClinic) o; + if (!super.equals(o)) return false; + if (myAvailableService != null ? !myAvailableService.equals(medicalClinic.myAvailableService) : medicalClinic.myAvailableService != null) return false; + if (myMedicalSpecialty != null ? !myMedicalSpecialty.equals(medicalClinic.myMedicalSpecialty) : medicalClinic.myMedicalSpecialty != null) return false; + return true; + } + private MedicalProcedureOrMedicalTestOrMedicalTherapy myAvailableService; private MedicalSpecialty myMedicalSpecialty; } diff --git a/src/main/java/org/schema/MedicalCode.java b/src/main/java/org/schema/MedicalCode.java index 3f3d1ee2..684e3f35 100644 --- a/src/main/java/org/schema/MedicalCode.java +++ b/src/main/java/org/schema/MedicalCode.java @@ -329,7 +329,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String codeValue; @@ -384,6 +384,24 @@ protected MedicalCode(String codeValue, String codingSystem, MedicalCode code, M myCodeValue = codeValue; myCodingSystem = codingSystem; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myCodeValue != null ? myCodeValue.hashCode() : 0); + result = 31 * result + (myCodingSystem != null ? myCodingSystem.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalCode medicalCode = (MedicalCode) o; + if (!super.equals(o)) return false; + if (myCodeValue != null ? !myCodeValue.equals(medicalCode.myCodeValue) : medicalCode.myCodeValue != null) return false; + if (myCodingSystem != null ? !myCodingSystem.equals(medicalCode.myCodingSystem) : medicalCode.myCodingSystem != null) return false; + return true; + } + private String myCodeValue; private String myCodingSystem; } diff --git a/src/main/java/org/schema/MedicalCondition.java b/src/main/java/org/schema/MedicalCondition.java index 18260828..7b90a6e3 100644 --- a/src/main/java/org/schema/MedicalCondition.java +++ b/src/main/java/org/schema/MedicalCondition.java @@ -616,7 +616,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy associatedAnatomy; @@ -727,6 +727,52 @@ protected MedicalCondition(AnatomicalStructureOrAnatomicalSystemOrSuperficialAna mySubtype = subtype; myTypicalTest = typicalTest; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAssociatedAnatomy != null ? myAssociatedAnatomy.hashCode() : 0); + result = 31 * result + (myCause != null ? myCause.hashCode() : 0); + result = 31 * result + (myDifferentialDiagnosis != null ? myDifferentialDiagnosis.hashCode() : 0); + result = 31 * result + (myEpidemiology != null ? myEpidemiology.hashCode() : 0); + result = 31 * result + (myExpectedPrognosis != null ? myExpectedPrognosis.hashCode() : 0); + result = 31 * result + (myNaturalProgression != null ? myNaturalProgression.hashCode() : 0); + result = 31 * result + (myPathophysiology != null ? myPathophysiology.hashCode() : 0); + result = 31 * result + (myPossibleComplication != null ? myPossibleComplication.hashCode() : 0); + result = 31 * result + (myPossibleTreatment != null ? myPossibleTreatment.hashCode() : 0); + result = 31 * result + (myPrimaryPrevention != null ? myPrimaryPrevention.hashCode() : 0); + result = 31 * result + (myRiskFactor != null ? myRiskFactor.hashCode() : 0); + result = 31 * result + (mySecondaryPrevention != null ? mySecondaryPrevention.hashCode() : 0); + result = 31 * result + (mySignOrSymptom != null ? mySignOrSymptom.hashCode() : 0); + result = 31 * result + (myStage != null ? myStage.hashCode() : 0); + result = 31 * result + (mySubtype != null ? mySubtype.hashCode() : 0); + result = 31 * result + (myTypicalTest != null ? myTypicalTest.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalCondition medicalCondition = (MedicalCondition) o; + if (!super.equals(o)) return false; + if (myAssociatedAnatomy != null ? !myAssociatedAnatomy.equals(medicalCondition.myAssociatedAnatomy) : medicalCondition.myAssociatedAnatomy != null) return false; + if (myCause != null ? !myCause.equals(medicalCondition.myCause) : medicalCondition.myCause != null) return false; + if (myDifferentialDiagnosis != null ? !myDifferentialDiagnosis.equals(medicalCondition.myDifferentialDiagnosis) : medicalCondition.myDifferentialDiagnosis != null) return false; + if (myEpidemiology != null ? !myEpidemiology.equals(medicalCondition.myEpidemiology) : medicalCondition.myEpidemiology != null) return false; + if (myExpectedPrognosis != null ? !myExpectedPrognosis.equals(medicalCondition.myExpectedPrognosis) : medicalCondition.myExpectedPrognosis != null) return false; + if (myNaturalProgression != null ? !myNaturalProgression.equals(medicalCondition.myNaturalProgression) : medicalCondition.myNaturalProgression != null) return false; + if (myPathophysiology != null ? !myPathophysiology.equals(medicalCondition.myPathophysiology) : medicalCondition.myPathophysiology != null) return false; + if (myPossibleComplication != null ? !myPossibleComplication.equals(medicalCondition.myPossibleComplication) : medicalCondition.myPossibleComplication != null) return false; + if (myPossibleTreatment != null ? !myPossibleTreatment.equals(medicalCondition.myPossibleTreatment) : medicalCondition.myPossibleTreatment != null) return false; + if (myPrimaryPrevention != null ? !myPrimaryPrevention.equals(medicalCondition.myPrimaryPrevention) : medicalCondition.myPrimaryPrevention != null) return false; + if (myRiskFactor != null ? !myRiskFactor.equals(medicalCondition.myRiskFactor) : medicalCondition.myRiskFactor != null) return false; + if (mySecondaryPrevention != null ? !mySecondaryPrevention.equals(medicalCondition.mySecondaryPrevention) : medicalCondition.mySecondaryPrevention != null) return false; + if (mySignOrSymptom != null ? !mySignOrSymptom.equals(medicalCondition.mySignOrSymptom) : medicalCondition.mySignOrSymptom != null) return false; + if (myStage != null ? !myStage.equals(medicalCondition.myStage) : medicalCondition.myStage != null) return false; + if (mySubtype != null ? !mySubtype.equals(medicalCondition.mySubtype) : medicalCondition.mySubtype != null) return false; + if (myTypicalTest != null ? !myTypicalTest.equals(medicalCondition.myTypicalTest) : medicalCondition.myTypicalTest != null) return false; + return true; + } + private AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy myAssociatedAnatomy; private MedicalCause myCause; private DDxElement myDifferentialDiagnosis; diff --git a/src/main/java/org/schema/MedicalConditionStage.java b/src/main/java/org/schema/MedicalConditionStage.java index b0e1e681..2f3525b9 100644 --- a/src/main/java/org/schema/MedicalConditionStage.java +++ b/src/main/java/org/schema/MedicalConditionStage.java @@ -366,7 +366,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Number stageAsNumber; @@ -425,6 +425,24 @@ protected MedicalConditionStage(Number stageAsNumber, String subStageSuffix, Med myStageAsNumber = stageAsNumber; mySubStageSuffix = subStageSuffix; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myStageAsNumber != null ? myStageAsNumber.hashCode() : 0); + result = 31 * result + (mySubStageSuffix != null ? mySubStageSuffix.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalConditionStage medicalConditionStage = (MedicalConditionStage) o; + if (!super.equals(o)) return false; + if (myStageAsNumber != null ? !myStageAsNumber.equals(medicalConditionStage.myStageAsNumber) : medicalConditionStage.myStageAsNumber != null) return false; + if (mySubStageSuffix != null ? !mySubStageSuffix.equals(medicalConditionStage.mySubStageSuffix) : medicalConditionStage.mySubStageSuffix != null) return false; + return true; + } + private Number myStageAsNumber; private String mySubStageSuffix; } diff --git a/src/main/java/org/schema/MedicalContraindication.java b/src/main/java/org/schema/MedicalContraindication.java index e1d2b032..96ba18a5 100644 --- a/src/main/java/org/schema/MedicalContraindication.java +++ b/src/main/java/org/schema/MedicalContraindication.java @@ -301,7 +301,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalCode code; @@ -350,4 +350,18 @@ public interface Builder extends ThingBuilder { protected MedicalContraindication(MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalContraindication medicalContraindication = (MedicalContraindication) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalDevice.java b/src/main/java/org/schema/MedicalDevice.java index 566d3964..07a4dec7 100644 --- a/src/main/java/org/schema/MedicalDevice.java +++ b/src/main/java/org/schema/MedicalDevice.java @@ -459,7 +459,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalEntity adverseOutcome; @@ -539,6 +539,36 @@ protected MedicalDevice(MedicalEntity adverseOutcome, MedicalContraindication co myPurpose = purpose; mySeriousAdverseOutcome = seriousAdverseOutcome; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAdverseOutcome != null ? myAdverseOutcome.hashCode() : 0); + result = 31 * result + (myContraindication != null ? myContraindication.hashCode() : 0); + result = 31 * result + (myIndication != null ? myIndication.hashCode() : 0); + result = 31 * result + (myPostOp != null ? myPostOp.hashCode() : 0); + result = 31 * result + (myPreOp != null ? myPreOp.hashCode() : 0); + result = 31 * result + (myProcedure != null ? myProcedure.hashCode() : 0); + result = 31 * result + (myPurpose != null ? myPurpose.hashCode() : 0); + result = 31 * result + (mySeriousAdverseOutcome != null ? mySeriousAdverseOutcome.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalDevice medicalDevice = (MedicalDevice) o; + if (!super.equals(o)) return false; + if (myAdverseOutcome != null ? !myAdverseOutcome.equals(medicalDevice.myAdverseOutcome) : medicalDevice.myAdverseOutcome != null) return false; + if (myContraindication != null ? !myContraindication.equals(medicalDevice.myContraindication) : medicalDevice.myContraindication != null) return false; + if (myIndication != null ? !myIndication.equals(medicalDevice.myIndication) : medicalDevice.myIndication != null) return false; + if (myPostOp != null ? !myPostOp.equals(medicalDevice.myPostOp) : medicalDevice.myPostOp != null) return false; + if (myPreOp != null ? !myPreOp.equals(medicalDevice.myPreOp) : medicalDevice.myPreOp != null) return false; + if (myProcedure != null ? !myProcedure.equals(medicalDevice.myProcedure) : medicalDevice.myProcedure != null) return false; + if (myPurpose != null ? !myPurpose.equals(medicalDevice.myPurpose) : medicalDevice.myPurpose != null) return false; + if (mySeriousAdverseOutcome != null ? !mySeriousAdverseOutcome.equals(medicalDevice.mySeriousAdverseOutcome) : medicalDevice.mySeriousAdverseOutcome != null) return false; + return true; + } + private MedicalEntity myAdverseOutcome; private MedicalContraindication myContraindication; private MedicalIndication myIndication; diff --git a/src/main/java/org/schema/MedicalDevicePurpose.java b/src/main/java/org/schema/MedicalDevicePurpose.java index ba896ccc..a75aee7f 100644 --- a/src/main/java/org/schema/MedicalDevicePurpose.java +++ b/src/main/java/org/schema/MedicalDevicePurpose.java @@ -247,7 +247,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -283,4 +283,18 @@ public interface Builder extends ThingBuilder { protected MedicalDevicePurpose(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalDevicePurpose medicalDevicePurpose = (MedicalDevicePurpose) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalDevicePurposeOrThing.java b/src/main/java/org/schema/MedicalDevicePurposeOrThing.java index 347d5034..609baa65 100644 --- a/src/main/java/org/schema/MedicalDevicePurposeOrThing.java +++ b/src/main/java/org/schema/MedicalDevicePurposeOrThing.java @@ -39,4 +39,21 @@ private void clear() { myMedicalDevicePurpose = null; myThing = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myMedicalDevicePurpose != null ? myMedicalDevicePurpose.hashCode() : 0); + result = 31 * result + (myThing != null ? myThing.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalDevicePurposeOrThing medicalDevicePurposeOrThing = (MedicalDevicePurposeOrThing) o; + if (myMedicalDevicePurpose != null ? !myMedicalDevicePurpose.equals(medicalDevicePurposeOrThing.myMedicalDevicePurpose) : medicalDevicePurposeOrThing.myMedicalDevicePurpose != null) return false; + if (myThing != null ? !myThing.equals(medicalDevicePurposeOrThing.myThing) : medicalDevicePurposeOrThing.myThing != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalEntity.java b/src/main/java/org/schema/MedicalEntity.java index c32212cc..82c7c983 100644 --- a/src/main/java/org/schema/MedicalEntity.java +++ b/src/main/java/org/schema/MedicalEntity.java @@ -337,7 +337,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalCode code; @@ -392,6 +392,32 @@ protected MedicalEntity(MedicalCode code, MedicalGuideline guideline, MedicineSy myRelevantSpecialty = relevantSpecialty; myStudy = study; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myCode != null ? myCode.hashCode() : 0); + result = 31 * result + (myGuideline != null ? myGuideline.hashCode() : 0); + result = 31 * result + (myMedicineSystem != null ? myMedicineSystem.hashCode() : 0); + result = 31 * result + (myRecognizingAuthority != null ? myRecognizingAuthority.hashCode() : 0); + result = 31 * result + (myRelevantSpecialty != null ? myRelevantSpecialty.hashCode() : 0); + result = 31 * result + (myStudy != null ? myStudy.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalEntity medicalEntity = (MedicalEntity) o; + if (!super.equals(o)) return false; + if (myCode != null ? !myCode.equals(medicalEntity.myCode) : medicalEntity.myCode != null) return false; + if (myGuideline != null ? !myGuideline.equals(medicalEntity.myGuideline) : medicalEntity.myGuideline != null) return false; + if (myMedicineSystem != null ? !myMedicineSystem.equals(medicalEntity.myMedicineSystem) : medicalEntity.myMedicineSystem != null) return false; + if (myRecognizingAuthority != null ? !myRecognizingAuthority.equals(medicalEntity.myRecognizingAuthority) : medicalEntity.myRecognizingAuthority != null) return false; + if (myRelevantSpecialty != null ? !myRelevantSpecialty.equals(medicalEntity.myRelevantSpecialty) : medicalEntity.myRelevantSpecialty != null) return false; + if (myStudy != null ? !myStudy.equals(medicalEntity.myStudy) : medicalEntity.myStudy != null) return false; + return true; + } + private MedicalCode myCode; private MedicalGuideline myGuideline; private MedicineSystem myMedicineSystem; diff --git a/src/main/java/org/schema/MedicalEnumeration.java b/src/main/java/org/schema/MedicalEnumeration.java index b5119e63..bff6d376 100644 --- a/src/main/java/org/schema/MedicalEnumeration.java +++ b/src/main/java/org/schema/MedicalEnumeration.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected MedicalEnumeration(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalEnumeration medicalEnumeration = (MedicalEnumeration) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalEvidenceLevel.java b/src/main/java/org/schema/MedicalEvidenceLevel.java index bdaa11d9..ff336d1d 100644 --- a/src/main/java/org/schema/MedicalEvidenceLevel.java +++ b/src/main/java/org/schema/MedicalEvidenceLevel.java @@ -247,7 +247,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -283,4 +283,18 @@ public interface Builder extends ThingBuilder { protected MedicalEvidenceLevel(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalEvidenceLevel medicalEvidenceLevel = (MedicalEvidenceLevel) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalGuideline.java b/src/main/java/org/schema/MedicalGuideline.java index 875dffcf..645e7a7f 100644 --- a/src/main/java/org/schema/MedicalGuideline.java +++ b/src/main/java/org/schema/MedicalGuideline.java @@ -370,7 +370,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalEvidenceLevel evidenceLevel; @@ -433,6 +433,28 @@ protected MedicalGuideline(MedicalEvidenceLevel evidenceLevel, String evidenceOr myGuidelineDate = guidelineDate; myGuidelineSubject = guidelineSubject; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myEvidenceLevel != null ? myEvidenceLevel.hashCode() : 0); + result = 31 * result + (myEvidenceOrigin != null ? myEvidenceOrigin.hashCode() : 0); + result = 31 * result + (myGuidelineDate != null ? myGuidelineDate.hashCode() : 0); + result = 31 * result + (myGuidelineSubject != null ? myGuidelineSubject.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalGuideline medicalGuideline = (MedicalGuideline) o; + if (!super.equals(o)) return false; + if (myEvidenceLevel != null ? !myEvidenceLevel.equals(medicalGuideline.myEvidenceLevel) : medicalGuideline.myEvidenceLevel != null) return false; + if (myEvidenceOrigin != null ? !myEvidenceOrigin.equals(medicalGuideline.myEvidenceOrigin) : medicalGuideline.myEvidenceOrigin != null) return false; + if (myGuidelineDate != null ? !myGuidelineDate.equals(medicalGuideline.myGuidelineDate) : medicalGuideline.myGuidelineDate != null) return false; + if (myGuidelineSubject != null ? !myGuidelineSubject.equals(medicalGuideline.myGuidelineSubject) : medicalGuideline.myGuidelineSubject != null) return false; + return true; + } + private MedicalEvidenceLevel myEvidenceLevel; private String myEvidenceOrigin; private java.util.Date myGuidelineDate; diff --git a/src/main/java/org/schema/MedicalGuidelineContraindication.java b/src/main/java/org/schema/MedicalGuidelineContraindication.java index 29e14755..d74c824f 100644 --- a/src/main/java/org/schema/MedicalGuidelineContraindication.java +++ b/src/main/java/org/schema/MedicalGuidelineContraindication.java @@ -345,7 +345,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalEvidenceLevel evidenceLevel; @@ -404,4 +404,18 @@ public interface Builder extends ThingBuilder protected MedicalGuidelineContraindication(MedicalEvidenceLevel evidenceLevel, String evidenceOrigin, java.util.Date guidelineDate, MedicalEntity guidelineSubject, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(evidenceLevel, evidenceOrigin, guidelineDate, guidelineSubject, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalGuidelineContraindication medicalGuidelineContraindication = (MedicalGuidelineContraindication) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalGuidelineRecommendation.java b/src/main/java/org/schema/MedicalGuidelineRecommendation.java index 9616c0f1..e3d5103f 100644 --- a/src/main/java/org/schema/MedicalGuidelineRecommendation.java +++ b/src/main/java/org/schema/MedicalGuidelineRecommendation.java @@ -359,7 +359,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String recommendationStrength; @@ -421,5 +421,21 @@ protected MedicalGuidelineRecommendation(String recommendationStrength, MedicalE super(evidenceLevel, evidenceOrigin, guidelineDate, guidelineSubject, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myRecommendationStrength = recommendationStrength; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myRecommendationStrength != null ? myRecommendationStrength.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalGuidelineRecommendation medicalGuidelineRecommendation = (MedicalGuidelineRecommendation) o; + if (!super.equals(o)) return false; + if (myRecommendationStrength != null ? !myRecommendationStrength.equals(medicalGuidelineRecommendation.myRecommendationStrength) : medicalGuidelineRecommendation.myRecommendationStrength != null) return false; + return true; + } + private String myRecommendationStrength; } diff --git a/src/main/java/org/schema/MedicalImagingTechnique.java b/src/main/java/org/schema/MedicalImagingTechnique.java index fe230d38..5b4ff11e 100644 --- a/src/main/java/org/schema/MedicalImagingTechnique.java +++ b/src/main/java/org/schema/MedicalImagingTechnique.java @@ -247,7 +247,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -283,4 +283,18 @@ public interface Builder extends ThingBuilder { protected MedicalImagingTechnique(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalImagingTechnique medicalImagingTechnique = (MedicalImagingTechnique) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalIndication.java b/src/main/java/org/schema/MedicalIndication.java index dfdad0ee..dd7da067 100644 --- a/src/main/java/org/schema/MedicalIndication.java +++ b/src/main/java/org/schema/MedicalIndication.java @@ -301,7 +301,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalCode code; @@ -350,4 +350,18 @@ public interface Builder extends ThingBuilder { protected MedicalIndication(MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalIndication medicalIndication = (MedicalIndication) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalIntangible.java b/src/main/java/org/schema/MedicalIntangible.java index 0cb12f17..89023a0b 100644 --- a/src/main/java/org/schema/MedicalIntangible.java +++ b/src/main/java/org/schema/MedicalIntangible.java @@ -300,7 +300,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalCode code; @@ -349,4 +349,18 @@ public interface Builder extends ThingBuilder { protected MedicalIntangible(MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalIntangible medicalIntangible = (MedicalIntangible) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalObservationalStudy.java b/src/main/java/org/schema/MedicalObservationalStudy.java index 21b4fa7a..52d0afa9 100644 --- a/src/main/java/org/schema/MedicalObservationalStudy.java +++ b/src/main/java/org/schema/MedicalObservationalStudy.java @@ -393,7 +393,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalObservationalStudyDesign studyDesign; @@ -462,5 +462,21 @@ protected MedicalObservationalStudy(MedicalObservationalStudyDesign studyDesign, super(outcome, population, sponsor, status, studyLocation, studySubject, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myStudyDesign = studyDesign; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myStudyDesign != null ? myStudyDesign.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalObservationalStudy medicalObservationalStudy = (MedicalObservationalStudy) o; + if (!super.equals(o)) return false; + if (myStudyDesign != null ? !myStudyDesign.equals(medicalObservationalStudy.myStudyDesign) : medicalObservationalStudy.myStudyDesign != null) return false; + return true; + } + private MedicalObservationalStudyDesign myStudyDesign; } diff --git a/src/main/java/org/schema/MedicalObservationalStudyDesign.java b/src/main/java/org/schema/MedicalObservationalStudyDesign.java index bcf15808..e494d5f8 100644 --- a/src/main/java/org/schema/MedicalObservationalStudyDesign.java +++ b/src/main/java/org/schema/MedicalObservationalStudyDesign.java @@ -247,7 +247,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -283,4 +283,18 @@ public interface Builder extends ThingBuilder { protected MedicalObservationalStudyDesign(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalObservationalStudyDesign medicalObservationalStudyDesign = (MedicalObservationalStudyDesign) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalOrganization.java b/src/main/java/org/schema/MedicalOrganization.java index 51e8cd0d..f64f2d87 100644 --- a/src/main/java/org/schema/MedicalOrganization.java +++ b/src/main/java/org/schema/MedicalOrganization.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected MedicalOrganization(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalOrganization medicalOrganization = (MedicalOrganization) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalProcedure.java b/src/main/java/org/schema/MedicalProcedure.java index 29e33cdb..5f70c8f0 100644 --- a/src/main/java/org/schema/MedicalProcedure.java +++ b/src/main/java/org/schema/MedicalProcedure.java @@ -363,7 +363,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String followup; @@ -425,6 +425,28 @@ protected MedicalProcedure(String followup, String howPerformed, String preparat myPreparation = preparation; myProcedureType = procedureType; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myFollowup != null ? myFollowup.hashCode() : 0); + result = 31 * result + (myHowPerformed != null ? myHowPerformed.hashCode() : 0); + result = 31 * result + (myPreparation != null ? myPreparation.hashCode() : 0); + result = 31 * result + (myProcedureType != null ? myProcedureType.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalProcedure medicalProcedure = (MedicalProcedure) o; + if (!super.equals(o)) return false; + if (myFollowup != null ? !myFollowup.equals(medicalProcedure.myFollowup) : medicalProcedure.myFollowup != null) return false; + if (myHowPerformed != null ? !myHowPerformed.equals(medicalProcedure.myHowPerformed) : medicalProcedure.myHowPerformed != null) return false; + if (myPreparation != null ? !myPreparation.equals(medicalProcedure.myPreparation) : medicalProcedure.myPreparation != null) return false; + if (myProcedureType != null ? !myProcedureType.equals(medicalProcedure.myProcedureType) : medicalProcedure.myProcedureType != null) return false; + return true; + } + private String myFollowup; private String myHowPerformed; private String myPreparation; diff --git a/src/main/java/org/schema/MedicalProcedureOrMedicalTestOrMedicalTherapy.java b/src/main/java/org/schema/MedicalProcedureOrMedicalTestOrMedicalTherapy.java index 37c32fcc..e567a1ba 100644 --- a/src/main/java/org/schema/MedicalProcedureOrMedicalTestOrMedicalTherapy.java +++ b/src/main/java/org/schema/MedicalProcedureOrMedicalTestOrMedicalTherapy.java @@ -50,4 +50,23 @@ private void clear() { myMedicalTest = null; myMedicalTherapy = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myMedicalProcedure != null ? myMedicalProcedure.hashCode() : 0); + result = 31 * result + (myMedicalTest != null ? myMedicalTest.hashCode() : 0); + result = 31 * result + (myMedicalTherapy != null ? myMedicalTherapy.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalProcedureOrMedicalTestOrMedicalTherapy medicalProcedureOrMedicalTestOrMedicalTherapy = (MedicalProcedureOrMedicalTestOrMedicalTherapy) o; + if (myMedicalProcedure != null ? !myMedicalProcedure.equals(medicalProcedureOrMedicalTestOrMedicalTherapy.myMedicalProcedure) : medicalProcedureOrMedicalTestOrMedicalTherapy.myMedicalProcedure != null) return false; + if (myMedicalTest != null ? !myMedicalTest.equals(medicalProcedureOrMedicalTestOrMedicalTherapy.myMedicalTest) : medicalProcedureOrMedicalTestOrMedicalTherapy.myMedicalTest != null) return false; + if (myMedicalTherapy != null ? !myMedicalTherapy.equals(medicalProcedureOrMedicalTestOrMedicalTherapy.myMedicalTherapy) : medicalProcedureOrMedicalTestOrMedicalTherapy.myMedicalTherapy != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalProcedureType.java b/src/main/java/org/schema/MedicalProcedureType.java index 5cd58a0b..2af51714 100644 --- a/src/main/java/org/schema/MedicalProcedureType.java +++ b/src/main/java/org/schema/MedicalProcedureType.java @@ -247,7 +247,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -283,4 +283,18 @@ public interface Builder extends ThingBuilder { protected MedicalProcedureType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalProcedureType medicalProcedureType = (MedicalProcedureType) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalResearcher.java b/src/main/java/org/schema/MedicalResearcher.java index abd839c0..ab134af1 100644 --- a/src/main/java/org/schema/MedicalResearcher.java +++ b/src/main/java/org/schema/MedicalResearcher.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected MedicalResearcher() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalResearcher medicalResearcher = (MedicalResearcher) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalRiskCalculator.java b/src/main/java/org/schema/MedicalRiskCalculator.java index 0817fe15..7413d2e6 100644 --- a/src/main/java/org/schema/MedicalRiskCalculator.java +++ b/src/main/java/org/schema/MedicalRiskCalculator.java @@ -329,7 +329,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalEntity estimatesRiskOf; @@ -384,4 +384,18 @@ public interface Builder extends ThingBuilder { protected MedicalRiskCalculator(MedicalEntity estimatesRiskOf, MedicalRiskFactor includedRiskFactor, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(estimatesRiskOf, includedRiskFactor, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalRiskCalculator medicalRiskCalculator = (MedicalRiskCalculator) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalRiskEstimator.java b/src/main/java/org/schema/MedicalRiskEstimator.java index 26643ce7..7a817dc2 100644 --- a/src/main/java/org/schema/MedicalRiskEstimator.java +++ b/src/main/java/org/schema/MedicalRiskEstimator.java @@ -341,7 +341,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalEntity estimatesRiskOf; @@ -398,6 +398,24 @@ protected MedicalRiskEstimator(MedicalEntity estimatesRiskOf, MedicalRiskFactor myEstimatesRiskOf = estimatesRiskOf; myIncludedRiskFactor = includedRiskFactor; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myEstimatesRiskOf != null ? myEstimatesRiskOf.hashCode() : 0); + result = 31 * result + (myIncludedRiskFactor != null ? myIncludedRiskFactor.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalRiskEstimator medicalRiskEstimator = (MedicalRiskEstimator) o; + if (!super.equals(o)) return false; + if (myEstimatesRiskOf != null ? !myEstimatesRiskOf.equals(medicalRiskEstimator.myEstimatesRiskOf) : medicalRiskEstimator.myEstimatesRiskOf != null) return false; + if (myIncludedRiskFactor != null ? !myIncludedRiskFactor.equals(medicalRiskEstimator.myIncludedRiskFactor) : medicalRiskEstimator.myIncludedRiskFactor != null) return false; + return true; + } + private MedicalEntity myEstimatesRiskOf; private MedicalRiskFactor myIncludedRiskFactor; } diff --git a/src/main/java/org/schema/MedicalRiskFactor.java b/src/main/java/org/schema/MedicalRiskFactor.java index ad78e2de..af27768e 100644 --- a/src/main/java/org/schema/MedicalRiskFactor.java +++ b/src/main/java/org/schema/MedicalRiskFactor.java @@ -321,7 +321,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalEntity increasesRiskOf; @@ -374,5 +374,21 @@ protected MedicalRiskFactor(MedicalEntity increasesRiskOf, MedicalCode code, Med super(code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myIncreasesRiskOf = increasesRiskOf; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myIncreasesRiskOf != null ? myIncreasesRiskOf.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalRiskFactor medicalRiskFactor = (MedicalRiskFactor) o; + if (!super.equals(o)) return false; + if (myIncreasesRiskOf != null ? !myIncreasesRiskOf.equals(medicalRiskFactor.myIncreasesRiskOf) : medicalRiskFactor.myIncreasesRiskOf != null) return false; + return true; + } + private MedicalEntity myIncreasesRiskOf; } diff --git a/src/main/java/org/schema/MedicalRiskScore.java b/src/main/java/org/schema/MedicalRiskScore.java index 22a4f20b..d6c22dcf 100644 --- a/src/main/java/org/schema/MedicalRiskScore.java +++ b/src/main/java/org/schema/MedicalRiskScore.java @@ -343,7 +343,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String algorithm; @@ -401,5 +401,21 @@ protected MedicalRiskScore(String algorithm, MedicalEntity estimatesRiskOf, Medi super(estimatesRiskOf, includedRiskFactor, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myAlgorithm = algorithm; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAlgorithm != null ? myAlgorithm.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalRiskScore medicalRiskScore = (MedicalRiskScore) o; + if (!super.equals(o)) return false; + if (myAlgorithm != null ? !myAlgorithm.equals(medicalRiskScore.myAlgorithm) : medicalRiskScore.myAlgorithm != null) return false; + return true; + } + private String myAlgorithm; } diff --git a/src/main/java/org/schema/MedicalScholarlyArticle.java b/src/main/java/org/schema/MedicalScholarlyArticle.java index 283864cb..20f9f8ca 100644 --- a/src/main/java/org/schema/MedicalScholarlyArticle.java +++ b/src/main/java/org/schema/MedicalScholarlyArticle.java @@ -1228,7 +1228,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String publicationType; @@ -1462,5 +1462,21 @@ protected MedicalScholarlyArticle(String publicationType, String articleBody, St super(articleBody, articleSection, wordCount, pageEnd, pageStart, pagination, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myPublicationType = publicationType; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myPublicationType != null ? myPublicationType.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalScholarlyArticle medicalScholarlyArticle = (MedicalScholarlyArticle) o; + if (!super.equals(o)) return false; + if (myPublicationType != null ? !myPublicationType.equals(medicalScholarlyArticle.myPublicationType) : medicalScholarlyArticle.myPublicationType != null) return false; + return true; + } + private String myPublicationType; } diff --git a/src/main/java/org/schema/MedicalSign.java b/src/main/java/org/schema/MedicalSign.java index 669e8752..68d97de4 100644 --- a/src/main/java/org/schema/MedicalSign.java +++ b/src/main/java/org/schema/MedicalSign.java @@ -369,7 +369,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PhysicalExam identifyingExam; @@ -432,6 +432,24 @@ protected MedicalSign(PhysicalExam identifyingExam, MedicalTest identifyingTest, myIdentifyingExam = identifyingExam; myIdentifyingTest = identifyingTest; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myIdentifyingExam != null ? myIdentifyingExam.hashCode() : 0); + result = 31 * result + (myIdentifyingTest != null ? myIdentifyingTest.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalSign medicalSign = (MedicalSign) o; + if (!super.equals(o)) return false; + if (myIdentifyingExam != null ? !myIdentifyingExam.equals(medicalSign.myIdentifyingExam) : medicalSign.myIdentifyingExam != null) return false; + if (myIdentifyingTest != null ? !myIdentifyingTest.equals(medicalSign.myIdentifyingTest) : medicalSign.myIdentifyingTest != null) return false; + return true; + } + private PhysicalExam myIdentifyingExam; private MedicalTest myIdentifyingTest; } diff --git a/src/main/java/org/schema/MedicalSignOrSymptom.java b/src/main/java/org/schema/MedicalSignOrSymptom.java index 6ce98c15..9b69871a 100644 --- a/src/main/java/org/schema/MedicalSignOrSymptom.java +++ b/src/main/java/org/schema/MedicalSignOrSymptom.java @@ -341,7 +341,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalCause cause; @@ -398,6 +398,24 @@ protected MedicalSignOrSymptom(MedicalCause cause, MedicalTherapy possibleTreatm myCause = cause; myPossibleTreatment = possibleTreatment; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myCause != null ? myCause.hashCode() : 0); + result = 31 * result + (myPossibleTreatment != null ? myPossibleTreatment.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalSignOrSymptom medicalSignOrSymptom = (MedicalSignOrSymptom) o; + if (!super.equals(o)) return false; + if (myCause != null ? !myCause.equals(medicalSignOrSymptom.myCause) : medicalSignOrSymptom.myCause != null) return false; + if (myPossibleTreatment != null ? !myPossibleTreatment.equals(medicalSignOrSymptom.myPossibleTreatment) : medicalSignOrSymptom.myPossibleTreatment != null) return false; + return true; + } + private MedicalCause myCause; private MedicalTherapy myPossibleTreatment; } diff --git a/src/main/java/org/schema/MedicalSpecialty.java b/src/main/java/org/schema/MedicalSpecialty.java index bc2d4198..6189a8ac 100644 --- a/src/main/java/org/schema/MedicalSpecialty.java +++ b/src/main/java/org/schema/MedicalSpecialty.java @@ -247,7 +247,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -283,4 +283,18 @@ public interface Builder extends ThingBuilder { protected MedicalSpecialty(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalSpecialty medicalSpecialty = (MedicalSpecialty) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalStudy.java b/src/main/java/org/schema/MedicalStudy.java index 4401f7cb..740141c8 100644 --- a/src/main/java/org/schema/MedicalStudy.java +++ b/src/main/java/org/schema/MedicalStudy.java @@ -409,7 +409,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String outcome; @@ -480,6 +480,32 @@ protected MedicalStudy(String outcome, String population, Organization sponsor, myStudyLocation = studyLocation; myStudySubject = studySubject; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myOutcome != null ? myOutcome.hashCode() : 0); + result = 31 * result + (myPopulation != null ? myPopulation.hashCode() : 0); + result = 31 * result + (mySponsor != null ? mySponsor.hashCode() : 0); + result = 31 * result + (myStatus != null ? myStatus.hashCode() : 0); + result = 31 * result + (myStudyLocation != null ? myStudyLocation.hashCode() : 0); + result = 31 * result + (myStudySubject != null ? myStudySubject.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalStudy medicalStudy = (MedicalStudy) o; + if (!super.equals(o)) return false; + if (myOutcome != null ? !myOutcome.equals(medicalStudy.myOutcome) : medicalStudy.myOutcome != null) return false; + if (myPopulation != null ? !myPopulation.equals(medicalStudy.myPopulation) : medicalStudy.myPopulation != null) return false; + if (mySponsor != null ? !mySponsor.equals(medicalStudy.mySponsor) : medicalStudy.mySponsor != null) return false; + if (myStatus != null ? !myStatus.equals(medicalStudy.myStatus) : medicalStudy.myStatus != null) return false; + if (myStudyLocation != null ? !myStudyLocation.equals(medicalStudy.myStudyLocation) : medicalStudy.myStudyLocation != null) return false; + if (myStudySubject != null ? !myStudySubject.equals(medicalStudy.myStudySubject) : medicalStudy.myStudySubject != null) return false; + return true; + } + private String myOutcome; private String myPopulation; private Organization mySponsor; diff --git a/src/main/java/org/schema/MedicalStudyStatus.java b/src/main/java/org/schema/MedicalStudyStatus.java index e2ad95b5..7852ca57 100644 --- a/src/main/java/org/schema/MedicalStudyStatus.java +++ b/src/main/java/org/schema/MedicalStudyStatus.java @@ -247,7 +247,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -283,4 +283,18 @@ public interface Builder extends ThingBuilder { protected MedicalStudyStatus(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalStudyStatus medicalStudyStatus = (MedicalStudyStatus) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalSymptom.java b/src/main/java/org/schema/MedicalSymptom.java index 6d548af8..4876d158 100644 --- a/src/main/java/org/schema/MedicalSymptom.java +++ b/src/main/java/org/schema/MedicalSymptom.java @@ -329,7 +329,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalCause cause; @@ -384,4 +384,18 @@ public interface Builder extends ThingBuilder { protected MedicalSymptom(MedicalCause cause, MedicalTherapy possibleTreatment, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(cause, possibleTreatment, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalSymptom medicalSymptom = (MedicalSymptom) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalTest.java b/src/main/java/org/schema/MedicalTest.java index 670f5e9b..c510a830 100644 --- a/src/main/java/org/schema/MedicalTest.java +++ b/src/main/java/org/schema/MedicalTest.java @@ -395,7 +395,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Drug affectedBy; @@ -463,6 +463,30 @@ protected MedicalTest(Drug affectedBy, String normalRange, MedicalSign signDetec myUsedToDiagnose = usedToDiagnose; myUsesDevice = usesDevice; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAffectedBy != null ? myAffectedBy.hashCode() : 0); + result = 31 * result + (myNormalRange != null ? myNormalRange.hashCode() : 0); + result = 31 * result + (mySignDetected != null ? mySignDetected.hashCode() : 0); + result = 31 * result + (myUsedToDiagnose != null ? myUsedToDiagnose.hashCode() : 0); + result = 31 * result + (myUsesDevice != null ? myUsesDevice.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalTest medicalTest = (MedicalTest) o; + if (!super.equals(o)) return false; + if (myAffectedBy != null ? !myAffectedBy.equals(medicalTest.myAffectedBy) : medicalTest.myAffectedBy != null) return false; + if (myNormalRange != null ? !myNormalRange.equals(medicalTest.myNormalRange) : medicalTest.myNormalRange != null) return false; + if (mySignDetected != null ? !mySignDetected.equals(medicalTest.mySignDetected) : medicalTest.mySignDetected != null) return false; + if (myUsedToDiagnose != null ? !myUsedToDiagnose.equals(medicalTest.myUsedToDiagnose) : medicalTest.myUsedToDiagnose != null) return false; + if (myUsesDevice != null ? !myUsesDevice.equals(medicalTest.myUsesDevice) : medicalTest.myUsesDevice != null) return false; + return true; + } + private Drug myAffectedBy; private String myNormalRange; private MedicalSign mySignDetected; diff --git a/src/main/java/org/schema/MedicalTestPanel.java b/src/main/java/org/schema/MedicalTestPanel.java index 64808ea1..2f428354 100644 --- a/src/main/java/org/schema/MedicalTestPanel.java +++ b/src/main/java/org/schema/MedicalTestPanel.java @@ -385,7 +385,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalTest subTest; @@ -452,5 +452,21 @@ protected MedicalTestPanel(MedicalTest subTest, Drug affectedBy, String normalRa super(affectedBy, normalRange, signDetected, usedToDiagnose, usesDevice, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); mySubTest = subTest; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (mySubTest != null ? mySubTest.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalTestPanel medicalTestPanel = (MedicalTestPanel) o; + if (!super.equals(o)) return false; + if (mySubTest != null ? !mySubTest.equals(medicalTestPanel.mySubTest) : medicalTestPanel.mySubTest != null) return false; + return true; + } + private MedicalTest mySubTest; } diff --git a/src/main/java/org/schema/MedicalTherapy.java b/src/main/java/org/schema/MedicalTherapy.java index 5da3c96f..292ccd98 100644 --- a/src/main/java/org/schema/MedicalTherapy.java +++ b/src/main/java/org/schema/MedicalTherapy.java @@ -401,7 +401,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalEntity adverseOutcome; @@ -470,6 +470,30 @@ protected MedicalTherapy(MedicalEntity adverseOutcome, MedicalContraindication c myIndication = indication; mySeriousAdverseOutcome = seriousAdverseOutcome; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAdverseOutcome != null ? myAdverseOutcome.hashCode() : 0); + result = 31 * result + (myContraindication != null ? myContraindication.hashCode() : 0); + result = 31 * result + (myDuplicateTherapy != null ? myDuplicateTherapy.hashCode() : 0); + result = 31 * result + (myIndication != null ? myIndication.hashCode() : 0); + result = 31 * result + (mySeriousAdverseOutcome != null ? mySeriousAdverseOutcome.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalTherapy medicalTherapy = (MedicalTherapy) o; + if (!super.equals(o)) return false; + if (myAdverseOutcome != null ? !myAdverseOutcome.equals(medicalTherapy.myAdverseOutcome) : medicalTherapy.myAdverseOutcome != null) return false; + if (myContraindication != null ? !myContraindication.equals(medicalTherapy.myContraindication) : medicalTherapy.myContraindication != null) return false; + if (myDuplicateTherapy != null ? !myDuplicateTherapy.equals(medicalTherapy.myDuplicateTherapy) : medicalTherapy.myDuplicateTherapy != null) return false; + if (myIndication != null ? !myIndication.equals(medicalTherapy.myIndication) : medicalTherapy.myIndication != null) return false; + if (mySeriousAdverseOutcome != null ? !mySeriousAdverseOutcome.equals(medicalTherapy.mySeriousAdverseOutcome) : medicalTherapy.mySeriousAdverseOutcome != null) return false; + return true; + } + private MedicalEntity myAdverseOutcome; private MedicalContraindication myContraindication; private MedicalTherapy myDuplicateTherapy; diff --git a/src/main/java/org/schema/MedicalTrial.java b/src/main/java/org/schema/MedicalTrial.java index 14e8eaf1..c8acd47a 100644 --- a/src/main/java/org/schema/MedicalTrial.java +++ b/src/main/java/org/schema/MedicalTrial.java @@ -407,7 +407,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String phase; @@ -479,6 +479,24 @@ protected MedicalTrial(String phase, MedicalTrialDesign trialDesign, String outc myPhase = phase; myTrialDesign = trialDesign; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myPhase != null ? myPhase.hashCode() : 0); + result = 31 * result + (myTrialDesign != null ? myTrialDesign.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalTrial medicalTrial = (MedicalTrial) o; + if (!super.equals(o)) return false; + if (myPhase != null ? !myPhase.equals(medicalTrial.myPhase) : medicalTrial.myPhase != null) return false; + if (myTrialDesign != null ? !myTrialDesign.equals(medicalTrial.myTrialDesign) : medicalTrial.myTrialDesign != null) return false; + return true; + } + private String myPhase; private MedicalTrialDesign myTrialDesign; } diff --git a/src/main/java/org/schema/MedicalTrialDesign.java b/src/main/java/org/schema/MedicalTrialDesign.java index cc3a8384..e0859bf7 100644 --- a/src/main/java/org/schema/MedicalTrialDesign.java +++ b/src/main/java/org/schema/MedicalTrialDesign.java @@ -247,7 +247,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -283,4 +283,18 @@ public interface Builder extends ThingBuilder { protected MedicalTrialDesign(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalTrialDesign medicalTrialDesign = (MedicalTrialDesign) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MedicalWebPage.java b/src/main/java/org/schema/MedicalWebPage.java index 5c8c55bd..843796d9 100644 --- a/src/main/java/org/schema/MedicalWebPage.java +++ b/src/main/java/org/schema/MedicalWebPage.java @@ -1280,7 +1280,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String aspect; @@ -1524,5 +1524,21 @@ protected MedicalWebPage(String aspect, BreadcrumbListOrString breadcrumb, java. super(breadcrumb, lastReviewed, mainContentOfPage, primaryImageOfPage, relatedLink, reviewedBy, significantLink, specialty, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myAspect = aspect; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAspect != null ? myAspect.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicalWebPage medicalWebPage = (MedicalWebPage) o; + if (!super.equals(o)) return false; + if (myAspect != null ? !myAspect.equals(medicalWebPage.myAspect) : medicalWebPage.myAspect != null) return false; + return true; + } + private String myAspect; } diff --git a/src/main/java/org/schema/MedicineSystem.java b/src/main/java/org/schema/MedicineSystem.java index a078ee83..b2cf04e1 100644 --- a/src/main/java/org/schema/MedicineSystem.java +++ b/src/main/java/org/schema/MedicineSystem.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected MedicineSystem(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MedicineSystem medicineSystem = (MedicineSystem) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MensClothingStore.java b/src/main/java/org/schema/MensClothingStore.java index d49a1be2..d1de04b7 100644 --- a/src/main/java/org/schema/MensClothingStore.java +++ b/src/main/java/org/schema/MensClothingStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected MensClothingStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MensClothingStore mensClothingStore = (MensClothingStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MiddleSchool.java b/src/main/java/org/schema/MiddleSchool.java index 01666bdf..43ccdd3e 100644 --- a/src/main/java/org/schema/MiddleSchool.java +++ b/src/main/java/org/schema/MiddleSchool.java @@ -674,7 +674,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person alumni; @@ -800,4 +800,18 @@ public interface Builder extends ThingBuilder { protected MiddleSchool(Person alumni, PostalAddress address, AggregateRating aggregateRating, String award, BrandOrOrganization brand, ContactPoint contactPoint, Organization department, String duns, String email, Person employee, Event event, String faxNumber, Person founder, java.util.Date dissolutionDate, java.util.Date foundingDate, String globalLocationNumber, Place hasPOS, String isicV4, String legalName, ImageObjectOrString logo, Offer makesOffer, OrganizationOrPerson member, OrganizationOrProgramMembership memberOf, String naics, QuantitativeValue numberOfEmployees, OwnershipInfoOrProduct owns, Review review, Demand seeks, Organization subOrganization, String taxID, String telephone, String vatID, Place foundingLocation, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(alumni, address, aggregateRating, award, brand, contactPoint, department, duns, email, employee, event, faxNumber, founder, dissolutionDate, foundingDate, globalLocationNumber, hasPOS, isicV4, legalName, logo, makesOffer, member, memberOf, naics, numberOfEmployees, owns, review, seeks, subOrganization, taxID, telephone, vatID, foundingLocation, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MiddleSchool middleSchool = (MiddleSchool) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Midwifery.java b/src/main/java/org/schema/Midwifery.java index 31a211a2..d3fbf049 100644 --- a/src/main/java/org/schema/Midwifery.java +++ b/src/main/java/org/schema/Midwifery.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Midwifery() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Midwifery midwifery = (Midwifery) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MixtapeAlbum.java b/src/main/java/org/schema/MixtapeAlbum.java index 669f6a86..df5ebcf9 100644 --- a/src/main/java/org/schema/MixtapeAlbum.java +++ b/src/main/java/org/schema/MixtapeAlbum.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected MixtapeAlbum() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MixtapeAlbum mixtapeAlbum = (MixtapeAlbum) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MobileApplication.java b/src/main/java/org/schema/MobileApplication.java index 43462982..f381e3d4 100644 --- a/src/main/java/org/schema/MobileApplication.java +++ b/src/main/java/org/schema/MobileApplication.java @@ -1364,7 +1364,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String carrierRequirements; @@ -1632,5 +1632,21 @@ protected MobileApplication(String carrierRequirements, String applicationCatego super(applicationCategory, applicationSubCategory, applicationSuite, countriesNotSupported, countriesSupported, availableOnDevice, downloadUrl, featureList, fileFormat, fileSize, installUrl, memoryRequirements, operatingSystem, permissions, processorRequirements, releaseNotes, softwareRequirements, screenshot, softwareVersion, storageRequirements, softwareAddOn, softwareHelp, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myCarrierRequirements = carrierRequirements; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myCarrierRequirements != null ? myCarrierRequirements.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MobileApplication mobileApplication = (MobileApplication) o; + if (!super.equals(o)) return false; + if (myCarrierRequirements != null ? !myCarrierRequirements.equals(mobileApplication.myCarrierRequirements) : mobileApplication.myCarrierRequirements != null) return false; + return true; + } + private String myCarrierRequirements; } diff --git a/src/main/java/org/schema/MobilePhoneStore.java b/src/main/java/org/schema/MobilePhoneStore.java index 4d3b3734..2434eefe 100644 --- a/src/main/java/org/schema/MobilePhoneStore.java +++ b/src/main/java/org/schema/MobilePhoneStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected MobilePhoneStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MobilePhoneStore mobilePhoneStore = (MobilePhoneStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Mosque.java b/src/main/java/org/schema/Mosque.java index 9dc9117b..5884a7f5 100644 --- a/src/main/java/org/schema/Mosque.java +++ b/src/main/java/org/schema/Mosque.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected Mosque(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Mosque mosque = (Mosque) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Motel.java b/src/main/java/org/schema/Motel.java index 98685ce6..04d6fd8b 100644 --- a/src/main/java/org/schema/Motel.java +++ b/src/main/java/org/schema/Motel.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected Motel(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Motel motel = (Motel) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MotorcycleDealer.java b/src/main/java/org/schema/MotorcycleDealer.java index be2a632d..c9820a6f 100644 --- a/src/main/java/org/schema/MotorcycleDealer.java +++ b/src/main/java/org/schema/MotorcycleDealer.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected MotorcycleDealer(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MotorcycleDealer motorcycleDealer = (MotorcycleDealer) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MotorcycleRepair.java b/src/main/java/org/schema/MotorcycleRepair.java index 79c0fb46..31ceeaea 100644 --- a/src/main/java/org/schema/MotorcycleRepair.java +++ b/src/main/java/org/schema/MotorcycleRepair.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected MotorcycleRepair(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MotorcycleRepair motorcycleRepair = (MotorcycleRepair) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Mountain.java b/src/main/java/org/schema/Mountain.java index 30890a26..9b32b102 100644 --- a/src/main/java/org/schema/Mountain.java +++ b/src/main/java/org/schema/Mountain.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected Mountain(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Mountain mountain = (Mountain) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MoveAction.java b/src/main/java/org/schema/MoveAction.java index d4ae8505..2b0ea317 100644 --- a/src/main/java/org/schema/MoveAction.java +++ b/src/main/java/org/schema/MoveAction.java @@ -348,7 +348,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Place fromLocation; @@ -405,6 +405,24 @@ protected MoveAction(Place fromLocation, Place toLocation, OrganizationOrPerson myFromLocation = fromLocation; myToLocation = toLocation; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myFromLocation != null ? myFromLocation.hashCode() : 0); + result = 31 * result + (myToLocation != null ? myToLocation.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MoveAction moveAction = (MoveAction) o; + if (!super.equals(o)) return false; + if (myFromLocation != null ? !myFromLocation.equals(moveAction.myFromLocation) : moveAction.myFromLocation != null) return false; + if (myToLocation != null ? !myToLocation.equals(moveAction.myToLocation) : moveAction.myToLocation != null) return false; + return true; + } + private Place myFromLocation; private Place myToLocation; } diff --git a/src/main/java/org/schema/Movie.java b/src/main/java/org/schema/Movie.java index abbc3daf..013b5eb0 100644 --- a/src/main/java/org/schema/Movie.java +++ b/src/main/java/org/schema/Movie.java @@ -1312,7 +1312,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person actor; @@ -1560,6 +1560,34 @@ protected Movie(Person actor, Person director, Duration duration, MusicGroupOrPe mySubtitleLanguage = subtitleLanguage; myTrailer = trailer; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myActor != null ? myActor.hashCode() : 0); + result = 31 * result + (myDirector != null ? myDirector.hashCode() : 0); + result = 31 * result + (myDuration != null ? myDuration.hashCode() : 0); + result = 31 * result + (myMusicBy != null ? myMusicBy.hashCode() : 0); + result = 31 * result + (myProductionCompany != null ? myProductionCompany.hashCode() : 0); + result = 31 * result + (mySubtitleLanguage != null ? mySubtitleLanguage.hashCode() : 0); + result = 31 * result + (myTrailer != null ? myTrailer.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Movie movie = (Movie) o; + if (!super.equals(o)) return false; + if (myActor != null ? !myActor.equals(movie.myActor) : movie.myActor != null) return false; + if (myDirector != null ? !myDirector.equals(movie.myDirector) : movie.myDirector != null) return false; + if (myDuration != null ? !myDuration.equals(movie.myDuration) : movie.myDuration != null) return false; + if (myMusicBy != null ? !myMusicBy.equals(movie.myMusicBy) : movie.myMusicBy != null) return false; + if (myProductionCompany != null ? !myProductionCompany.equals(movie.myProductionCompany) : movie.myProductionCompany != null) return false; + if (mySubtitleLanguage != null ? !mySubtitleLanguage.equals(movie.mySubtitleLanguage) : movie.mySubtitleLanguage != null) return false; + if (myTrailer != null ? !myTrailer.equals(movie.myTrailer) : movie.myTrailer != null) return false; + return true; + } + private Person myActor; private Person myDirector; private Duration myDuration; diff --git a/src/main/java/org/schema/MovieClip.java b/src/main/java/org/schema/MovieClip.java index 75ead4cc..35ec9d11 100644 --- a/src/main/java/org/schema/MovieClip.java +++ b/src/main/java/org/schema/MovieClip.java @@ -1236,7 +1236,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person actor; @@ -1472,4 +1472,18 @@ public interface Builder extends ThingBuilder { protected MovieClip(Person actor, Position clipNumber, Person director, MusicGroupOrPerson musicBy, IsPartOf partOfEpisode, IsPartOf partOfSeason, IsPartOf partOfSeries, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(actor, clipNumber, director, musicBy, partOfEpisode, partOfSeason, partOfSeries, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MovieClip movieClip = (MovieClip) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MovieRentalStore.java b/src/main/java/org/schema/MovieRentalStore.java index 4264f838..83577b56 100644 --- a/src/main/java/org/schema/MovieRentalStore.java +++ b/src/main/java/org/schema/MovieRentalStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected MovieRentalStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MovieRentalStore movieRentalStore = (MovieRentalStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MovieSeries.java b/src/main/java/org/schema/MovieSeries.java index 46283a18..bcebe23c 100644 --- a/src/main/java/org/schema/MovieSeries.java +++ b/src/main/java/org/schema/MovieSeries.java @@ -1258,7 +1258,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person director; @@ -1497,6 +1497,28 @@ protected MovieSeries(Person director, MusicGroupOrPerson musicBy, Organization myProductionCompany = productionCompany; myTrailer = trailer; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDirector != null ? myDirector.hashCode() : 0); + result = 31 * result + (myMusicBy != null ? myMusicBy.hashCode() : 0); + result = 31 * result + (myProductionCompany != null ? myProductionCompany.hashCode() : 0); + result = 31 * result + (myTrailer != null ? myTrailer.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MovieSeries movieSeries = (MovieSeries) o; + if (!super.equals(o)) return false; + if (myDirector != null ? !myDirector.equals(movieSeries.myDirector) : movieSeries.myDirector != null) return false; + if (myMusicBy != null ? !myMusicBy.equals(movieSeries.myMusicBy) : movieSeries.myMusicBy != null) return false; + if (myProductionCompany != null ? !myProductionCompany.equals(movieSeries.myProductionCompany) : movieSeries.myProductionCompany != null) return false; + if (myTrailer != null ? !myTrailer.equals(movieSeries.myTrailer) : movieSeries.myTrailer != null) return false; + return true; + } + private Person myDirector; private MusicGroupOrPerson myMusicBy; private Organization myProductionCompany; diff --git a/src/main/java/org/schema/MovieTheater.java b/src/main/java/org/schema/MovieTheater.java index 87caa71b..efaf5ec0 100644 --- a/src/main/java/org/schema/MovieTheater.java +++ b/src/main/java/org/schema/MovieTheater.java @@ -557,7 +557,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Number screenCount; @@ -653,5 +653,21 @@ protected MovieTheater(Number screenCount, Organization parentOrganization, Stri super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myScreenCount = screenCount; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myScreenCount != null ? myScreenCount.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MovieTheater movieTheater = (MovieTheater) o; + if (!super.equals(o)) return false; + if (myScreenCount != null ? !myScreenCount.equals(movieTheater.myScreenCount) : movieTheater.myScreenCount != null) return false; + return true; + } + private Number myScreenCount; } diff --git a/src/main/java/org/schema/MovingCompany.java b/src/main/java/org/schema/MovingCompany.java index 77bdacfb..1c7595bd 100644 --- a/src/main/java/org/schema/MovingCompany.java +++ b/src/main/java/org/schema/MovingCompany.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected MovingCompany(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MovingCompany movingCompany = (MovingCompany) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MultiCenterTrial.java b/src/main/java/org/schema/MultiCenterTrial.java index 584b19f7..cbe30d79 100644 --- a/src/main/java/org/schema/MultiCenterTrial.java +++ b/src/main/java/org/schema/MultiCenterTrial.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected MultiCenterTrial() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MultiCenterTrial multiCenterTrial = (MultiCenterTrial) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MultiPlayer.java b/src/main/java/org/schema/MultiPlayer.java index e8bb4024..0b1bf68b 100644 --- a/src/main/java/org/schema/MultiPlayer.java +++ b/src/main/java/org/schema/MultiPlayer.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected MultiPlayer() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MultiPlayer multiPlayer = (MultiPlayer) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MulticellularParasite.java b/src/main/java/org/schema/MulticellularParasite.java index 0bb72939..663c2624 100644 --- a/src/main/java/org/schema/MulticellularParasite.java +++ b/src/main/java/org/schema/MulticellularParasite.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected MulticellularParasite() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MulticellularParasite multicellularParasite = (MulticellularParasite) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Muscle.java b/src/main/java/org/schema/Muscle.java index 7c114ad3..1d2cd8b6 100644 --- a/src/main/java/org/schema/Muscle.java +++ b/src/main/java/org/schema/Muscle.java @@ -517,7 +517,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String muscleAction; @@ -612,6 +612,32 @@ protected Muscle(String muscleAction, Muscle antagonist, Vessel bloodSupply, Ana myNerve = nerve; myOrigin = origin; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myMuscleAction != null ? myMuscleAction.hashCode() : 0); + result = 31 * result + (myAntagonist != null ? myAntagonist.hashCode() : 0); + result = 31 * result + (myBloodSupply != null ? myBloodSupply.hashCode() : 0); + result = 31 * result + (myInsertion != null ? myInsertion.hashCode() : 0); + result = 31 * result + (myNerve != null ? myNerve.hashCode() : 0); + result = 31 * result + (myOrigin != null ? myOrigin.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Muscle muscle = (Muscle) o; + if (!super.equals(o)) return false; + if (myMuscleAction != null ? !myMuscleAction.equals(muscle.myMuscleAction) : muscle.myMuscleAction != null) return false; + if (myAntagonist != null ? !myAntagonist.equals(muscle.myAntagonist) : muscle.myAntagonist != null) return false; + if (myBloodSupply != null ? !myBloodSupply.equals(muscle.myBloodSupply) : muscle.myBloodSupply != null) return false; + if (myInsertion != null ? !myInsertion.equals(muscle.myInsertion) : muscle.myInsertion != null) return false; + if (myNerve != null ? !myNerve.equals(muscle.myNerve) : muscle.myNerve != null) return false; + if (myOrigin != null ? !myOrigin.equals(muscle.myOrigin) : muscle.myOrigin != null) return false; + return true; + } + private String myMuscleAction; private Muscle myAntagonist; private Vessel myBloodSupply; diff --git a/src/main/java/org/schema/Musculoskeletal.java b/src/main/java/org/schema/Musculoskeletal.java index a37b97da..95e32fe0 100644 --- a/src/main/java/org/schema/Musculoskeletal.java +++ b/src/main/java/org/schema/Musculoskeletal.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Musculoskeletal() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Musculoskeletal musculoskeletal = (Musculoskeletal) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MusculoskeletalExam.java b/src/main/java/org/schema/MusculoskeletalExam.java index ae57927c..61199c6d 100644 --- a/src/main/java/org/schema/MusculoskeletalExam.java +++ b/src/main/java/org/schema/MusculoskeletalExam.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected MusculoskeletalExam() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MusculoskeletalExam musculoskeletalExam = (MusculoskeletalExam) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Museum.java b/src/main/java/org/schema/Museum.java index ee5ca74b..3d2cfd25 100644 --- a/src/main/java/org/schema/Museum.java +++ b/src/main/java/org/schema/Museum.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected Museum(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Museum museum = (Museum) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MusicAlbum.java b/src/main/java/org/schema/MusicAlbum.java index 64feb95b..de3d3bc9 100644 --- a/src/main/java/org/schema/MusicAlbum.java +++ b/src/main/java/org/schema/MusicAlbum.java @@ -1264,7 +1264,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MusicGroup byArtist; @@ -1504,6 +1504,28 @@ protected MusicAlbum(MusicGroup byArtist, MusicAlbumProductionType albumProducti myAlbumReleaseType = albumReleaseType; myAlbumRelease = albumRelease; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myByArtist != null ? myByArtist.hashCode() : 0); + result = 31 * result + (myAlbumProductionType != null ? myAlbumProductionType.hashCode() : 0); + result = 31 * result + (myAlbumReleaseType != null ? myAlbumReleaseType.hashCode() : 0); + result = 31 * result + (myAlbumRelease != null ? myAlbumRelease.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MusicAlbum musicAlbum = (MusicAlbum) o; + if (!super.equals(o)) return false; + if (myByArtist != null ? !myByArtist.equals(musicAlbum.myByArtist) : musicAlbum.myByArtist != null) return false; + if (myAlbumProductionType != null ? !myAlbumProductionType.equals(musicAlbum.myAlbumProductionType) : musicAlbum.myAlbumProductionType != null) return false; + if (myAlbumReleaseType != null ? !myAlbumReleaseType.equals(musicAlbum.myAlbumReleaseType) : musicAlbum.myAlbumReleaseType != null) return false; + if (myAlbumRelease != null ? !myAlbumRelease.equals(musicAlbum.myAlbumRelease) : musicAlbum.myAlbumRelease != null) return false; + return true; + } + private MusicGroup myByArtist; private MusicAlbumProductionType myAlbumProductionType; private MusicAlbumReleaseType myAlbumReleaseType; diff --git a/src/main/java/org/schema/MusicAlbumProductionType.java b/src/main/java/org/schema/MusicAlbumProductionType.java index e2219b66..0ba01acf 100644 --- a/src/main/java/org/schema/MusicAlbumProductionType.java +++ b/src/main/java/org/schema/MusicAlbumProductionType.java @@ -247,7 +247,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -283,4 +283,18 @@ public interface Builder extends ThingBuilder { protected MusicAlbumProductionType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MusicAlbumProductionType musicAlbumProductionType = (MusicAlbumProductionType) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MusicAlbumReleaseType.java b/src/main/java/org/schema/MusicAlbumReleaseType.java index 8b42a4b9..4807005b 100644 --- a/src/main/java/org/schema/MusicAlbumReleaseType.java +++ b/src/main/java/org/schema/MusicAlbumReleaseType.java @@ -247,7 +247,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -283,4 +283,18 @@ public interface Builder extends ThingBuilder { protected MusicAlbumReleaseType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MusicAlbumReleaseType musicAlbumReleaseType = (MusicAlbumReleaseType) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MusicComposition.java b/src/main/java/org/schema/MusicComposition.java index e46eb09e..925ea2dd 100644 --- a/src/main/java/org/schema/MusicComposition.java +++ b/src/main/java/org/schema/MusicComposition.java @@ -1325,7 +1325,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MusicComposition musicArrangement; @@ -1577,6 +1577,38 @@ protected MusicComposition(MusicComposition musicArrangement, OrganizationOrPers myMusicalKey = musicalKey; myRecordedAs = recordedAs; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myMusicArrangement != null ? myMusicArrangement.hashCode() : 0); + result = 31 * result + (myComposer != null ? myComposer.hashCode() : 0); + result = 31 * result + (myFirstPerformance != null ? myFirstPerformance.hashCode() : 0); + result = 31 * result + (myIncludedComposition != null ? myIncludedComposition.hashCode() : 0); + result = 31 * result + (myIswcCode != null ? myIswcCode.hashCode() : 0); + result = 31 * result + (myLyricist != null ? myLyricist.hashCode() : 0); + result = 31 * result + (myMusicCompositionForm != null ? myMusicCompositionForm.hashCode() : 0); + result = 31 * result + (myMusicalKey != null ? myMusicalKey.hashCode() : 0); + result = 31 * result + (myRecordedAs != null ? myRecordedAs.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MusicComposition musicComposition = (MusicComposition) o; + if (!super.equals(o)) return false; + if (myMusicArrangement != null ? !myMusicArrangement.equals(musicComposition.myMusicArrangement) : musicComposition.myMusicArrangement != null) return false; + if (myComposer != null ? !myComposer.equals(musicComposition.myComposer) : musicComposition.myComposer != null) return false; + if (myFirstPerformance != null ? !myFirstPerformance.equals(musicComposition.myFirstPerformance) : musicComposition.myFirstPerformance != null) return false; + if (myIncludedComposition != null ? !myIncludedComposition.equals(musicComposition.myIncludedComposition) : musicComposition.myIncludedComposition != null) return false; + if (myIswcCode != null ? !myIswcCode.equals(musicComposition.myIswcCode) : musicComposition.myIswcCode != null) return false; + if (myLyricist != null ? !myLyricist.equals(musicComposition.myLyricist) : musicComposition.myLyricist != null) return false; + if (myMusicCompositionForm != null ? !myMusicCompositionForm.equals(musicComposition.myMusicCompositionForm) : musicComposition.myMusicCompositionForm != null) return false; + if (myMusicalKey != null ? !myMusicalKey.equals(musicComposition.myMusicalKey) : musicComposition.myMusicalKey != null) return false; + if (myRecordedAs != null ? !myRecordedAs.equals(musicComposition.myRecordedAs) : musicComposition.myRecordedAs != null) return false; + return true; + } + private MusicComposition myMusicArrangement; private OrganizationOrPerson myComposer; private Event myFirstPerformance; diff --git a/src/main/java/org/schema/MusicEvent.java b/src/main/java/org/schema/MusicEvent.java index 0da60d74..afe7aca3 100644 --- a/src/main/java/org/schema/MusicEvent.java +++ b/src/main/java/org/schema/MusicEvent.java @@ -496,7 +496,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -583,4 +583,18 @@ public interface Builder extends ThingBuilder { protected MusicEvent(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MusicEvent musicEvent = (MusicEvent) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MusicGroup.java b/src/main/java/org/schema/MusicGroup.java index 6a75fdbf..24c36662 100644 --- a/src/main/java/org/schema/MusicGroup.java +++ b/src/main/java/org/schema/MusicGroup.java @@ -730,7 +730,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MusicAlbum album; @@ -866,6 +866,26 @@ protected MusicGroup(MusicAlbum album, ItemListOrMusicRecording track, String ge myTrack = track; myGenre = genre; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAlbum != null ? myAlbum.hashCode() : 0); + result = 31 * result + (myTrack != null ? myTrack.hashCode() : 0); + result = 31 * result + (myGenre != null ? myGenre.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MusicGroup musicGroup = (MusicGroup) o; + if (!super.equals(o)) return false; + if (myAlbum != null ? !myAlbum.equals(musicGroup.myAlbum) : musicGroup.myAlbum != null) return false; + if (myTrack != null ? !myTrack.equals(musicGroup.myTrack) : musicGroup.myTrack != null) return false; + if (myGenre != null ? !myGenre.equals(musicGroup.myGenre) : musicGroup.myGenre != null) return false; + return true; + } + private MusicAlbum myAlbum; private ItemListOrMusicRecording myTrack; private String myGenre; diff --git a/src/main/java/org/schema/MusicGroupOrPerson.java b/src/main/java/org/schema/MusicGroupOrPerson.java index 477db3fd..147af90a 100644 --- a/src/main/java/org/schema/MusicGroupOrPerson.java +++ b/src/main/java/org/schema/MusicGroupOrPerson.java @@ -44,4 +44,21 @@ private void clear() { myMusicGroup = null; myPerson = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myMusicGroup != null ? myMusicGroup.hashCode() : 0); + result = 31 * result + (myPerson != null ? myPerson.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MusicGroupOrPerson musicGroupOrPerson = (MusicGroupOrPerson) o; + if (myMusicGroup != null ? !myMusicGroup.equals(musicGroupOrPerson.myMusicGroup) : musicGroupOrPerson.myMusicGroup != null) return false; + if (myPerson != null ? !myPerson.equals(musicGroupOrPerson.myPerson) : musicGroupOrPerson.myPerson != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MusicPlaylist.java b/src/main/java/org/schema/MusicPlaylist.java index 5756b4f7..7cc49232 100644 --- a/src/main/java/org/schema/MusicPlaylist.java +++ b/src/main/java/org/schema/MusicPlaylist.java @@ -1196,7 +1196,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Integer numTracks; @@ -1422,6 +1422,24 @@ protected MusicPlaylist(Integer numTracks, ItemListOrMusicRecording track, Strin myNumTracks = numTracks; myTrack = track; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myNumTracks != null ? myNumTracks.hashCode() : 0); + result = 31 * result + (myTrack != null ? myTrack.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MusicPlaylist musicPlaylist = (MusicPlaylist) o; + if (!super.equals(o)) return false; + if (myNumTracks != null ? !myNumTracks.equals(musicPlaylist.myNumTracks) : musicPlaylist.myNumTracks != null) return false; + if (myTrack != null ? !myTrack.equals(musicPlaylist.myTrack) : musicPlaylist.myTrack != null) return false; + return true; + } + private Integer myNumTracks; private ItemListOrMusicRecording myTrack; } diff --git a/src/main/java/org/schema/MusicRecording.java b/src/main/java/org/schema/MusicRecording.java index 94187a30..1e6e7208 100644 --- a/src/main/java/org/schema/MusicRecording.java +++ b/src/main/java/org/schema/MusicRecording.java @@ -1260,7 +1260,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MusicGroup byArtist; @@ -1500,6 +1500,32 @@ protected MusicRecording(MusicGroup byArtist, Duration duration, MusicAlbum inAl myIsrcCode = isrcCode; myRecordingOf = recordingOf; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myByArtist != null ? myByArtist.hashCode() : 0); + result = 31 * result + (myDuration != null ? myDuration.hashCode() : 0); + result = 31 * result + (myInAlbum != null ? myInAlbum.hashCode() : 0); + result = 31 * result + (myInPlaylist != null ? myInPlaylist.hashCode() : 0); + result = 31 * result + (myIsrcCode != null ? myIsrcCode.hashCode() : 0); + result = 31 * result + (myRecordingOf != null ? myRecordingOf.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MusicRecording musicRecording = (MusicRecording) o; + if (!super.equals(o)) return false; + if (myByArtist != null ? !myByArtist.equals(musicRecording.myByArtist) : musicRecording.myByArtist != null) return false; + if (myDuration != null ? !myDuration.equals(musicRecording.myDuration) : musicRecording.myDuration != null) return false; + if (myInAlbum != null ? !myInAlbum.equals(musicRecording.myInAlbum) : musicRecording.myInAlbum != null) return false; + if (myInPlaylist != null ? !myInPlaylist.equals(musicRecording.myInPlaylist) : musicRecording.myInPlaylist != null) return false; + if (myIsrcCode != null ? !myIsrcCode.equals(musicRecording.myIsrcCode) : musicRecording.myIsrcCode != null) return false; + if (myRecordingOf != null ? !myRecordingOf.equals(musicRecording.myRecordingOf) : musicRecording.myRecordingOf != null) return false; + return true; + } + private MusicGroup myByArtist; private Duration myDuration; private MusicAlbum myInAlbum; diff --git a/src/main/java/org/schema/MusicRelease.java b/src/main/java/org/schema/MusicRelease.java index 02a71349..e94291ad 100644 --- a/src/main/java/org/schema/MusicRelease.java +++ b/src/main/java/org/schema/MusicRelease.java @@ -1315,7 +1315,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String catalogNumber; @@ -1564,6 +1564,32 @@ protected MusicRelease(String catalogNumber, OrganizationOrPerson creditedTo, Du myRecordLabel = recordLabel; myReleaseOf = releaseOf; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myCatalogNumber != null ? myCatalogNumber.hashCode() : 0); + result = 31 * result + (myCreditedTo != null ? myCreditedTo.hashCode() : 0); + result = 31 * result + (myDuration != null ? myDuration.hashCode() : 0); + result = 31 * result + (myMusicReleaseFormat != null ? myMusicReleaseFormat.hashCode() : 0); + result = 31 * result + (myRecordLabel != null ? myRecordLabel.hashCode() : 0); + result = 31 * result + (myReleaseOf != null ? myReleaseOf.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MusicRelease musicRelease = (MusicRelease) o; + if (!super.equals(o)) return false; + if (myCatalogNumber != null ? !myCatalogNumber.equals(musicRelease.myCatalogNumber) : musicRelease.myCatalogNumber != null) return false; + if (myCreditedTo != null ? !myCreditedTo.equals(musicRelease.myCreditedTo) : musicRelease.myCreditedTo != null) return false; + if (myDuration != null ? !myDuration.equals(musicRelease.myDuration) : musicRelease.myDuration != null) return false; + if (myMusicReleaseFormat != null ? !myMusicReleaseFormat.equals(musicRelease.myMusicReleaseFormat) : musicRelease.myMusicReleaseFormat != null) return false; + if (myRecordLabel != null ? !myRecordLabel.equals(musicRelease.myRecordLabel) : musicRelease.myRecordLabel != null) return false; + if (myReleaseOf != null ? !myReleaseOf.equals(musicRelease.myReleaseOf) : musicRelease.myReleaseOf != null) return false; + return true; + } + private String myCatalogNumber; private OrganizationOrPerson myCreditedTo; private Duration myDuration; diff --git a/src/main/java/org/schema/MusicReleaseFormatType.java b/src/main/java/org/schema/MusicReleaseFormatType.java index fb72df1c..4036b94e 100644 --- a/src/main/java/org/schema/MusicReleaseFormatType.java +++ b/src/main/java/org/schema/MusicReleaseFormatType.java @@ -247,7 +247,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -283,4 +283,18 @@ public interface Builder extends ThingBuilder { protected MusicReleaseFormatType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MusicReleaseFormatType musicReleaseFormatType = (MusicReleaseFormatType) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MusicStore.java b/src/main/java/org/schema/MusicStore.java index 74259c30..33ba8d6d 100644 --- a/src/main/java/org/schema/MusicStore.java +++ b/src/main/java/org/schema/MusicStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected MusicStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MusicStore musicStore = (MusicStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MusicVenue.java b/src/main/java/org/schema/MusicVenue.java index 902df9b2..86d821da 100644 --- a/src/main/java/org/schema/MusicVenue.java +++ b/src/main/java/org/schema/MusicVenue.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected MusicVenue(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MusicVenue musicVenue = (MusicVenue) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/MusicVideoObject.java b/src/main/java/org/schema/MusicVideoObject.java index ee92031d..ff7ee45a 100644 --- a/src/main/java/org/schema/MusicVideoObject.java +++ b/src/main/java/org/schema/MusicVideoObject.java @@ -1348,7 +1348,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private NewsArticle associatedArticle; @@ -1608,4 +1608,18 @@ public interface Builder extends ThingBuilder { protected MusicVideoObject(NewsArticle associatedArticle, String bitrate, String contentSize, String contentUrl, Duration duration, String embedUrl, CreativeWork encodesCreativeWork, String encodingFormat, java.util.Date expires, DistanceOrQuantitativeValue height, String playerType, Organization productionCompany, Place regionsAllowed, Boolean requiresSubscription, java.util.Date uploadDate, DistanceOrQuantitativeValue width, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(associatedArticle, bitrate, contentSize, contentUrl, duration, embedUrl, encodesCreativeWork, encodingFormat, expires, height, playerType, productionCompany, regionsAllowed, requiresSubscription, uploadDate, width, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + MusicVideoObject musicVideoObject = (MusicVideoObject) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/NGO.java b/src/main/java/org/schema/NGO.java index c62a1a37..863d93d8 100644 --- a/src/main/java/org/schema/NGO.java +++ b/src/main/java/org/schema/NGO.java @@ -660,7 +660,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -783,4 +783,18 @@ public interface Builder extends ThingBuilder { protected NGO(PostalAddress address, AggregateRating aggregateRating, String award, BrandOrOrganization brand, ContactPoint contactPoint, Organization department, String duns, String email, Person employee, Event event, String faxNumber, Person founder, java.util.Date dissolutionDate, java.util.Date foundingDate, String globalLocationNumber, Place hasPOS, String isicV4, String legalName, ImageObjectOrString logo, Offer makesOffer, OrganizationOrPerson member, OrganizationOrProgramMembership memberOf, String naics, QuantitativeValue numberOfEmployees, OwnershipInfoOrProduct owns, Review review, Demand seeks, Organization subOrganization, String taxID, String telephone, String vatID, Place foundingLocation, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, award, brand, contactPoint, department, duns, email, employee, event, faxNumber, founder, dissolutionDate, foundingDate, globalLocationNumber, hasPOS, isicV4, legalName, logo, makesOffer, member, memberOf, naics, numberOfEmployees, owns, review, seeks, subOrganization, taxID, telephone, vatID, foundingLocation, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + NGO nGO = (NGO) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/NailSalon.java b/src/main/java/org/schema/NailSalon.java index 7f39bb1c..2859d6f0 100644 --- a/src/main/java/org/schema/NailSalon.java +++ b/src/main/java/org/schema/NailSalon.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected NailSalon(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + NailSalon nailSalon = (NailSalon) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Neck.java b/src/main/java/org/schema/Neck.java index 4939c415..a9633ea0 100644 --- a/src/main/java/org/schema/Neck.java +++ b/src/main/java/org/schema/Neck.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Neck() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Neck neck = (Neck) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Nerve.java b/src/main/java/org/schema/Nerve.java index 89c6f8e3..32fbf828 100644 --- a/src/main/java/org/schema/Nerve.java +++ b/src/main/java/org/schema/Nerve.java @@ -499,7 +499,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AnatomicalStructure branch; @@ -589,6 +589,28 @@ protected Nerve(AnatomicalStructure branch, Muscle nerveMotor, AnatomicalStructu mySensoryUnit = sensoryUnit; mySourcedFrom = sourcedFrom; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBranch != null ? myBranch.hashCode() : 0); + result = 31 * result + (myNerveMotor != null ? myNerveMotor.hashCode() : 0); + result = 31 * result + (mySensoryUnit != null ? mySensoryUnit.hashCode() : 0); + result = 31 * result + (mySourcedFrom != null ? mySourcedFrom.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Nerve nerve = (Nerve) o; + if (!super.equals(o)) return false; + if (myBranch != null ? !myBranch.equals(nerve.myBranch) : nerve.myBranch != null) return false; + if (myNerveMotor != null ? !myNerveMotor.equals(nerve.myNerveMotor) : nerve.myNerveMotor != null) return false; + if (mySensoryUnit != null ? !mySensoryUnit.equals(nerve.mySensoryUnit) : nerve.mySensoryUnit != null) return false; + if (mySourcedFrom != null ? !mySourcedFrom.equals(nerve.mySourcedFrom) : nerve.mySourcedFrom != null) return false; + return true; + } + private AnatomicalStructure myBranch; private Muscle myNerveMotor; private AnatomicalStructureOrSuperficialAnatomy mySensoryUnit; diff --git a/src/main/java/org/schema/Neuro.java b/src/main/java/org/schema/Neuro.java index 63a0a4b8..d8d76771 100644 --- a/src/main/java/org/schema/Neuro.java +++ b/src/main/java/org/schema/Neuro.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Neuro() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Neuro neuro = (Neuro) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Neurologic.java b/src/main/java/org/schema/Neurologic.java index 7d96977a..7b184d5e 100644 --- a/src/main/java/org/schema/Neurologic.java +++ b/src/main/java/org/schema/Neurologic.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Neurologic() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Neurologic neurologic = (Neurologic) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/NewCondition.java b/src/main/java/org/schema/NewCondition.java index 5c65381c..2e65df52 100644 --- a/src/main/java/org/schema/NewCondition.java +++ b/src/main/java/org/schema/NewCondition.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected NewCondition() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + NewCondition newCondition = (NewCondition) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/NewsArticle.java b/src/main/java/org/schema/NewsArticle.java index 399ed14e..723f5fd4 100644 --- a/src/main/java/org/schema/NewsArticle.java +++ b/src/main/java/org/schema/NewsArticle.java @@ -1285,7 +1285,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String dateline; @@ -1531,6 +1531,30 @@ protected NewsArticle(String dateline, String printColumn, String printEdition, myPrintPage = printPage; myPrintSection = printSection; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDateline != null ? myDateline.hashCode() : 0); + result = 31 * result + (myPrintColumn != null ? myPrintColumn.hashCode() : 0); + result = 31 * result + (myPrintEdition != null ? myPrintEdition.hashCode() : 0); + result = 31 * result + (myPrintPage != null ? myPrintPage.hashCode() : 0); + result = 31 * result + (myPrintSection != null ? myPrintSection.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + NewsArticle newsArticle = (NewsArticle) o; + if (!super.equals(o)) return false; + if (myDateline != null ? !myDateline.equals(newsArticle.myDateline) : newsArticle.myDateline != null) return false; + if (myPrintColumn != null ? !myPrintColumn.equals(newsArticle.myPrintColumn) : newsArticle.myPrintColumn != null) return false; + if (myPrintEdition != null ? !myPrintEdition.equals(newsArticle.myPrintEdition) : newsArticle.myPrintEdition != null) return false; + if (myPrintPage != null ? !myPrintPage.equals(newsArticle.myPrintPage) : newsArticle.myPrintPage != null) return false; + if (myPrintSection != null ? !myPrintSection.equals(newsArticle.myPrintSection) : newsArticle.myPrintSection != null) return false; + return true; + } + private String myDateline; private String myPrintColumn; private String myPrintEdition; diff --git a/src/main/java/org/schema/NightClub.java b/src/main/java/org/schema/NightClub.java index 70174799..203e7a20 100644 --- a/src/main/java/org/schema/NightClub.java +++ b/src/main/java/org/schema/NightClub.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected NightClub(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + NightClub nightClub = (NightClub) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/NoninvasiveProcedure.java b/src/main/java/org/schema/NoninvasiveProcedure.java index 5b00bfd1..fb197258 100644 --- a/src/main/java/org/schema/NoninvasiveProcedure.java +++ b/src/main/java/org/schema/NoninvasiveProcedure.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected NoninvasiveProcedure() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + NoninvasiveProcedure noninvasiveProcedure = (NoninvasiveProcedure) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Nose.java b/src/main/java/org/schema/Nose.java index 135a5209..52e4feb6 100644 --- a/src/main/java/org/schema/Nose.java +++ b/src/main/java/org/schema/Nose.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Nose() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Nose nose = (Nose) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/NotYetRecruiting.java b/src/main/java/org/schema/NotYetRecruiting.java index df08d7cc..87f99212 100644 --- a/src/main/java/org/schema/NotYetRecruiting.java +++ b/src/main/java/org/schema/NotYetRecruiting.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected NotYetRecruiting() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + NotYetRecruiting notYetRecruiting = (NotYetRecruiting) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Notary.java b/src/main/java/org/schema/Notary.java index 2cecefd6..e4d06cfd 100644 --- a/src/main/java/org/schema/Notary.java +++ b/src/main/java/org/schema/Notary.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected Notary(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Notary notary = (Notary) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Number.java b/src/main/java/org/schema/Number.java index 8084b866..38eab2b9 100644 --- a/src/main/java/org/schema/Number.java +++ b/src/main/java/org/schema/Number.java @@ -54,4 +54,27 @@ private void clear() { myDouble = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myInteger != null ? myInteger.hashCode() : 0); + result = 31 * result + (myLong != null ? myLong.hashCode() : 0); + result = 31 * result + (myFloat != null ? myFloat.hashCode() : 0); + result = 31 * result + (myDouble != null ? myDouble.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Number number = (Number) o; + if (myInteger != null ? !myInteger.equals(number.myInteger) : number.myInteger != null) return false; + if (myLong != null ? !myLong.equals(number.myLong) : number.myLong != null) return false; + if (myFloat != null ? !myFloat.equals(number.myFloat) : number.myFloat != null) return false; + if (myDouble != null ? !myDouble.equals(number.myDouble) : number.myDouble != null) return false; + if (myString != null ? !myString.equals(number.myString) : number.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/NumberOrPriceSpecification.java b/src/main/java/org/schema/NumberOrPriceSpecification.java deleted file mode 100644 index 2fba1080..00000000 --- a/src/main/java/org/schema/NumberOrPriceSpecification.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2015-2016 JetBrains s.r.o. - * - * 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. - * - * This is auto-generated file. Do not edit. - */ - -package org.schema; - -import com.fasterxml.jackson.databind.annotation.*; -import com.fasterxml.jackson.annotation.*; - -@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) -class NumberOrPriceSpecification { - @JsonValue - public Object getJsonLdValue() { - if (myNumber != null) return myNumber; - if (myPriceSpecification != null) return myPriceSpecification; - return null; - } - public Thing getThing() { - if (myPriceSpecification != null) return myPriceSpecification; - return null; - } - public void setNumber(Number number) { clear(); myNumber = number; } - public Number getNumber() { return myNumber; } - private Number myNumber; - public void setPriceSpecification(PriceSpecification priceSpecification) { clear(); myPriceSpecification = priceSpecification; } - public PriceSpecification getPriceSpecification() { return myPriceSpecification; } - private PriceSpecification myPriceSpecification; - private void clear() { - myNumber = null; - myPriceSpecification = null; - } -} diff --git a/src/main/java/org/schema/NumberOrPriceSpecificationOrString.java b/src/main/java/org/schema/NumberOrPriceSpecificationOrString.java deleted file mode 100644 index e0aca78b..00000000 --- a/src/main/java/org/schema/NumberOrPriceSpecificationOrString.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2015-2016 JetBrains s.r.o. - * - * 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. - * - * This is auto-generated file. Do not edit. - */ - -package org.schema; - -import com.fasterxml.jackson.databind.annotation.*; -import com.fasterxml.jackson.annotation.*; - -@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) -class NumberOrPriceSpecificationOrString { - @JsonValue - public Object getJsonLdValue() { - if (myNumber != null) return myNumber; - if (myPriceSpecification != null) return myPriceSpecification; - if (myString != null) return myString; - return null; - } - public void setNumber(Number number) { clear(); myNumber = number; } - public Number getNumber() { return myNumber; } - private Number myNumber; - public void setPriceSpecification(PriceSpecification priceSpecification) { clear(); myPriceSpecification = priceSpecification; } - public PriceSpecification getPriceSpecification() { return myPriceSpecification; } - private PriceSpecification myPriceSpecification; - public void setString(String value) { clear(); myString = value; } - public String getString() { return myString; } - private String myString; - private void clear() { - myNumber = null; - myPriceSpecification = null; - myString = null; - } -} diff --git a/src/main/java/org/schema/NumberOrQuantitativeValue.java b/src/main/java/org/schema/NumberOrQuantitativeValue.java index 1020d638..5ca28ca7 100644 --- a/src/main/java/org/schema/NumberOrQuantitativeValue.java +++ b/src/main/java/org/schema/NumberOrQuantitativeValue.java @@ -43,4 +43,21 @@ private void clear() { myNumber = null; myQuantitativeValue = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myNumber != null ? myNumber.hashCode() : 0); + result = 31 * result + (myQuantitativeValue != null ? myQuantitativeValue.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + NumberOrQuantitativeValue numberOrQuantitativeValue = (NumberOrQuantitativeValue) o; + if (myNumber != null ? !myNumber.equals(numberOrQuantitativeValue.myNumber) : numberOrQuantitativeValue.myNumber != null) return false; + if (myQuantitativeValue != null ? !myQuantitativeValue.equals(numberOrQuantitativeValue.myQuantitativeValue) : numberOrQuantitativeValue.myQuantitativeValue != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/NumberOrString.java b/src/main/java/org/schema/NumberOrString.java deleted file mode 100644 index 6a9b90ad..00000000 --- a/src/main/java/org/schema/NumberOrString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2015-2016 JetBrains s.r.o. - * - * 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. - * - * This is auto-generated file. Do not edit. - */ - -package org.schema; - -import com.fasterxml.jackson.databind.annotation.*; -import com.fasterxml.jackson.annotation.*; - -@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) -class NumberOrString { - @JsonValue - public Object getJsonLdValue() { - if (myNumber != null) return myNumber; - if (myString != null) return myString; - return null; - } - public void setNumber(Number number) { clear(); myNumber = number; } - public Number getNumber() { return myNumber; } - private Number myNumber; - public void setString(String value) { clear(); myString = value; } - public String getString() { return myString; } - private String myString; - private void clear() { - myNumber = null; - myString = null; - } -} diff --git a/src/main/java/org/schema/Nursing.java b/src/main/java/org/schema/Nursing.java index 433cbcb8..5c5861ba 100644 --- a/src/main/java/org/schema/Nursing.java +++ b/src/main/java/org/schema/Nursing.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Nursing() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Nursing nursing = (Nursing) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/NutritionInformation.java b/src/main/java/org/schema/NutritionInformation.java index c12c421c..ac636afe 100644 --- a/src/main/java/org/schema/NutritionInformation.java +++ b/src/main/java/org/schema/NutritionInformation.java @@ -450,7 +450,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Energy calories; @@ -528,6 +528,44 @@ protected NutritionInformation(Energy calories, Mass carbohydrateContent, Mass c myTransFatContent = transFatContent; myUnsaturatedFatContent = unsaturatedFatContent; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myCalories != null ? myCalories.hashCode() : 0); + result = 31 * result + (myCarbohydrateContent != null ? myCarbohydrateContent.hashCode() : 0); + result = 31 * result + (myCholesterolContent != null ? myCholesterolContent.hashCode() : 0); + result = 31 * result + (myFatContent != null ? myFatContent.hashCode() : 0); + result = 31 * result + (myFiberContent != null ? myFiberContent.hashCode() : 0); + result = 31 * result + (myProteinContent != null ? myProteinContent.hashCode() : 0); + result = 31 * result + (mySaturatedFatContent != null ? mySaturatedFatContent.hashCode() : 0); + result = 31 * result + (myServingSize != null ? myServingSize.hashCode() : 0); + result = 31 * result + (mySodiumContent != null ? mySodiumContent.hashCode() : 0); + result = 31 * result + (mySugarContent != null ? mySugarContent.hashCode() : 0); + result = 31 * result + (myTransFatContent != null ? myTransFatContent.hashCode() : 0); + result = 31 * result + (myUnsaturatedFatContent != null ? myUnsaturatedFatContent.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + NutritionInformation nutritionInformation = (NutritionInformation) o; + if (!super.equals(o)) return false; + if (myCalories != null ? !myCalories.equals(nutritionInformation.myCalories) : nutritionInformation.myCalories != null) return false; + if (myCarbohydrateContent != null ? !myCarbohydrateContent.equals(nutritionInformation.myCarbohydrateContent) : nutritionInformation.myCarbohydrateContent != null) return false; + if (myCholesterolContent != null ? !myCholesterolContent.equals(nutritionInformation.myCholesterolContent) : nutritionInformation.myCholesterolContent != null) return false; + if (myFatContent != null ? !myFatContent.equals(nutritionInformation.myFatContent) : nutritionInformation.myFatContent != null) return false; + if (myFiberContent != null ? !myFiberContent.equals(nutritionInformation.myFiberContent) : nutritionInformation.myFiberContent != null) return false; + if (myProteinContent != null ? !myProteinContent.equals(nutritionInformation.myProteinContent) : nutritionInformation.myProteinContent != null) return false; + if (mySaturatedFatContent != null ? !mySaturatedFatContent.equals(nutritionInformation.mySaturatedFatContent) : nutritionInformation.mySaturatedFatContent != null) return false; + if (myServingSize != null ? !myServingSize.equals(nutritionInformation.myServingSize) : nutritionInformation.myServingSize != null) return false; + if (mySodiumContent != null ? !mySodiumContent.equals(nutritionInformation.mySodiumContent) : nutritionInformation.mySodiumContent != null) return false; + if (mySugarContent != null ? !mySugarContent.equals(nutritionInformation.mySugarContent) : nutritionInformation.mySugarContent != null) return false; + if (myTransFatContent != null ? !myTransFatContent.equals(nutritionInformation.myTransFatContent) : nutritionInformation.myTransFatContent != null) return false; + if (myUnsaturatedFatContent != null ? !myUnsaturatedFatContent.equals(nutritionInformation.myUnsaturatedFatContent) : nutritionInformation.myUnsaturatedFatContent != null) return false; + return true; + } + private Energy myCalories; private Mass myCarbohydrateContent; private Mass myCholesterolContent; diff --git a/src/main/java/org/schema/OTC.java b/src/main/java/org/schema/OTC.java index a3d847bf..5fef5ea5 100644 --- a/src/main/java/org/schema/OTC.java +++ b/src/main/java/org/schema/OTC.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected OTC() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OTC oTC = (OTC) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Observational.java b/src/main/java/org/schema/Observational.java index f1d2138c..09a6dca9 100644 --- a/src/main/java/org/schema/Observational.java +++ b/src/main/java/org/schema/Observational.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Observational() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Observational observational = (Observational) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Obstetric.java b/src/main/java/org/schema/Obstetric.java index eeb37c17..6f7ce9df 100644 --- a/src/main/java/org/schema/Obstetric.java +++ b/src/main/java/org/schema/Obstetric.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Obstetric() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Obstetric obstetric = (Obstetric) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OccupationalActivity.java b/src/main/java/org/schema/OccupationalActivity.java index 7a1f8b54..464ae325 100644 --- a/src/main/java/org/schema/OccupationalActivity.java +++ b/src/main/java/org/schema/OccupationalActivity.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected OccupationalActivity() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OccupationalActivity occupationalActivity = (OccupationalActivity) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OccupationalTherapy.java b/src/main/java/org/schema/OccupationalTherapy.java index c79bdaa5..35160e1e 100644 --- a/src/main/java/org/schema/OccupationalTherapy.java +++ b/src/main/java/org/schema/OccupationalTherapy.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected OccupationalTherapy() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OccupationalTherapy occupationalTherapy = (OccupationalTherapy) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OceanBodyOfWater.java b/src/main/java/org/schema/OceanBodyOfWater.java index e40e5300..8d757bae 100644 --- a/src/main/java/org/schema/OceanBodyOfWater.java +++ b/src/main/java/org/schema/OceanBodyOfWater.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected OceanBodyOfWater(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OceanBodyOfWater oceanBodyOfWater = (OceanBodyOfWater) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Offer.java b/src/main/java/org/schema/Offer.java index 0c8feac4..4b5a912c 100644 --- a/src/main/java/org/schema/Offer.java +++ b/src/main/java/org/schema/Offer.java @@ -219,7 +219,7 @@ public String getMpn() { */ - public NumberOrString getPrice() { + public Number getPrice() { return myPrice; } /** @@ -690,9 +690,93 @@ public Offer build() { */ - @NotNull public Builder price(@NotNull Number number) { - if (this.price == null) this.price = new NumberOrString(); - this.price.setNumber(number); + @NotNull public Builder price(@NotNull Integer integer) { + if (this.price == null) this.price = new Number(); + this.price.setInteger(integer); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Long price) { + if (this.price == null) this.price = new Number(); + this.price.setLong(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Float price) { + if (this.price == null) this.price = new Number(); + this.price.setFloat(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Double price) { + if (this.price == null) this.price = new Number(); + this.price.setDouble(price); return this; } /** @@ -719,7 +803,7 @@ public Offer build() { */ @NotNull public Builder price(@NotNull String price) { - if (this.price == null) this.price = new NumberOrString(); + if (this.price == null) this.price = new Number(); this.price.setString(price); return this; } @@ -1008,7 +1092,10 @@ public Builder id(long id) { if ("itemCondition".equals(key) && value instanceof OfferItemCondition) { itemCondition((OfferItemCondition)value); continue; } if ("itemOffered".equals(key) && value instanceof Product) { itemOffered((Product)value); continue; } if ("mpn".equals(key) && value instanceof String) { mpn((String)value); continue; } - if ("price".equals(key) && value instanceof Number) { price((Number)value); continue; } + if ("price".equals(key) && value instanceof Integer) { price((Integer)value); continue; } + if ("price".equals(key) && value instanceof Long) { price((Long)value); continue; } + if ("price".equals(key) && value instanceof Float) { price((Float)value); continue; } + if ("price".equals(key) && value instanceof Double) { price((Double)value); continue; } if ("price".equals(key) && value instanceof String) { price((String)value); continue; } if ("priceSpecification".equals(key) && value instanceof PriceSpecification) { priceSpecification((PriceSpecification)value); continue; } if ("priceValidUntil".equals(key) && value instanceof java.util.Date) { priceValidUntil((java.util.Date)value); continue; } @@ -1028,7 +1115,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PaymentMethod acceptedPaymentMethod; @@ -1058,7 +1145,7 @@ public Builder id(long id) { private OfferItemCondition itemCondition; private Product itemOffered; private String mpn; - private NumberOrString price; + private Number price; private PriceSpecification priceSpecification; private java.util.Date priceValidUntil; private Review review; @@ -1135,7 +1222,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder itemOffered(@NotNull Product product); @NotNull Builder itemOffered(@NotNull Product.Builder product); @NotNull Builder mpn(@NotNull String mpn); - @NotNull Builder price(@NotNull Number number); + @NotNull Builder price(@NotNull Integer integer); + @NotNull Builder price(@NotNull Long price); + @NotNull Builder price(@NotNull Float price); + @NotNull Builder price(@NotNull Double price); @NotNull Builder price(@NotNull String price); @NotNull Builder priceSpecification(@NotNull PriceSpecification priceSpecification); @NotNull Builder priceSpecification(@NotNull PriceSpecification.Builder priceSpecification); @@ -1163,7 +1253,7 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected Offer(PaymentMethod acceptedPaymentMethod, Offer addOn, QuantitativeValue advanceBookingRequirement, AggregateRating aggregateRating, ItemAvailability availability, java.util.Date availabilityEnds, java.util.Date availabilityStarts, Place availableAtOrFrom, DeliveryMethod availableDeliveryMethod, BusinessFunction businessFunction, PhysicalActivityCategoryOrStringOrThing category, QuantitativeValue deliveryLeadTime, BusinessEntityType eligibleCustomerType, QuantitativeValue eligibleDuration, QuantitativeValue eligibleQuantity, GeoShapeOrPlaceOrString eligibleRegion, GeoShapeOrPlaceOrString ineligibleRegion, PriceSpecification eligibleTransactionVolume, String gtin12, String gtin13, String gtin14, String gtin8, TypeAndQuantityNode includesObject, QuantitativeValue inventoryLevel, OfferItemCondition itemCondition, Product itemOffered, String mpn, NumberOrString price, PriceSpecification priceSpecification, java.util.Date priceValidUntil, Review review, Participant seller, String sku, java.util.Date validFrom, java.util.Date validThrough, WarrantyPromise warranty, String priceCurrency, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected Offer(PaymentMethod acceptedPaymentMethod, Offer addOn, QuantitativeValue advanceBookingRequirement, AggregateRating aggregateRating, ItemAvailability availability, java.util.Date availabilityEnds, java.util.Date availabilityStarts, Place availableAtOrFrom, DeliveryMethod availableDeliveryMethod, BusinessFunction businessFunction, PhysicalActivityCategoryOrStringOrThing category, QuantitativeValue deliveryLeadTime, BusinessEntityType eligibleCustomerType, QuantitativeValue eligibleDuration, QuantitativeValue eligibleQuantity, GeoShapeOrPlaceOrString eligibleRegion, GeoShapeOrPlaceOrString ineligibleRegion, PriceSpecification eligibleTransactionVolume, String gtin12, String gtin13, String gtin14, String gtin8, TypeAndQuantityNode includesObject, QuantitativeValue inventoryLevel, OfferItemCondition itemCondition, Product itemOffered, String mpn, Number price, PriceSpecification priceSpecification, java.util.Date priceValidUntil, Review review, Participant seller, String sku, java.util.Date validFrom, java.util.Date validThrough, WarrantyPromise warranty, String priceCurrency, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myAcceptedPaymentMethod = acceptedPaymentMethod; myAddOn = addOn; @@ -1203,6 +1293,94 @@ protected Offer(PaymentMethod acceptedPaymentMethod, Offer addOn, QuantitativeVa myWarranty = warranty; myPriceCurrency = priceCurrency; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAcceptedPaymentMethod != null ? myAcceptedPaymentMethod.hashCode() : 0); + result = 31 * result + (myAddOn != null ? myAddOn.hashCode() : 0); + result = 31 * result + (myAdvanceBookingRequirement != null ? myAdvanceBookingRequirement.hashCode() : 0); + result = 31 * result + (myAggregateRating != null ? myAggregateRating.hashCode() : 0); + result = 31 * result + (myAvailability != null ? myAvailability.hashCode() : 0); + result = 31 * result + (myAvailabilityEnds != null ? myAvailabilityEnds.hashCode() : 0); + result = 31 * result + (myAvailabilityStarts != null ? myAvailabilityStarts.hashCode() : 0); + result = 31 * result + (myAvailableAtOrFrom != null ? myAvailableAtOrFrom.hashCode() : 0); + result = 31 * result + (myAvailableDeliveryMethod != null ? myAvailableDeliveryMethod.hashCode() : 0); + result = 31 * result + (myBusinessFunction != null ? myBusinessFunction.hashCode() : 0); + result = 31 * result + (myCategory != null ? myCategory.hashCode() : 0); + result = 31 * result + (myDeliveryLeadTime != null ? myDeliveryLeadTime.hashCode() : 0); + result = 31 * result + (myEligibleCustomerType != null ? myEligibleCustomerType.hashCode() : 0); + result = 31 * result + (myEligibleDuration != null ? myEligibleDuration.hashCode() : 0); + result = 31 * result + (myEligibleQuantity != null ? myEligibleQuantity.hashCode() : 0); + result = 31 * result + (myEligibleRegion != null ? myEligibleRegion.hashCode() : 0); + result = 31 * result + (myIneligibleRegion != null ? myIneligibleRegion.hashCode() : 0); + result = 31 * result + (myEligibleTransactionVolume != null ? myEligibleTransactionVolume.hashCode() : 0); + result = 31 * result + (myGtin12 != null ? myGtin12.hashCode() : 0); + result = 31 * result + (myGtin13 != null ? myGtin13.hashCode() : 0); + result = 31 * result + (myGtin14 != null ? myGtin14.hashCode() : 0); + result = 31 * result + (myGtin8 != null ? myGtin8.hashCode() : 0); + result = 31 * result + (myIncludesObject != null ? myIncludesObject.hashCode() : 0); + result = 31 * result + (myInventoryLevel != null ? myInventoryLevel.hashCode() : 0); + result = 31 * result + (myItemCondition != null ? myItemCondition.hashCode() : 0); + result = 31 * result + (myItemOffered != null ? myItemOffered.hashCode() : 0); + result = 31 * result + (myMpn != null ? myMpn.hashCode() : 0); + result = 31 * result + (myPrice != null ? myPrice.hashCode() : 0); + result = 31 * result + (myPriceSpecification != null ? myPriceSpecification.hashCode() : 0); + result = 31 * result + (myPriceValidUntil != null ? myPriceValidUntil.hashCode() : 0); + result = 31 * result + (myReview != null ? myReview.hashCode() : 0); + result = 31 * result + (mySeller != null ? mySeller.hashCode() : 0); + result = 31 * result + (mySku != null ? mySku.hashCode() : 0); + result = 31 * result + (myValidFrom != null ? myValidFrom.hashCode() : 0); + result = 31 * result + (myValidThrough != null ? myValidThrough.hashCode() : 0); + result = 31 * result + (myWarranty != null ? myWarranty.hashCode() : 0); + result = 31 * result + (myPriceCurrency != null ? myPriceCurrency.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Offer offer = (Offer) o; + if (!super.equals(o)) return false; + if (myAcceptedPaymentMethod != null ? !myAcceptedPaymentMethod.equals(offer.myAcceptedPaymentMethod) : offer.myAcceptedPaymentMethod != null) return false; + if (myAddOn != null ? !myAddOn.equals(offer.myAddOn) : offer.myAddOn != null) return false; + if (myAdvanceBookingRequirement != null ? !myAdvanceBookingRequirement.equals(offer.myAdvanceBookingRequirement) : offer.myAdvanceBookingRequirement != null) return false; + if (myAggregateRating != null ? !myAggregateRating.equals(offer.myAggregateRating) : offer.myAggregateRating != null) return false; + if (myAvailability != null ? !myAvailability.equals(offer.myAvailability) : offer.myAvailability != null) return false; + if (myAvailabilityEnds != null ? !myAvailabilityEnds.equals(offer.myAvailabilityEnds) : offer.myAvailabilityEnds != null) return false; + if (myAvailabilityStarts != null ? !myAvailabilityStarts.equals(offer.myAvailabilityStarts) : offer.myAvailabilityStarts != null) return false; + if (myAvailableAtOrFrom != null ? !myAvailableAtOrFrom.equals(offer.myAvailableAtOrFrom) : offer.myAvailableAtOrFrom != null) return false; + if (myAvailableDeliveryMethod != null ? !myAvailableDeliveryMethod.equals(offer.myAvailableDeliveryMethod) : offer.myAvailableDeliveryMethod != null) return false; + if (myBusinessFunction != null ? !myBusinessFunction.equals(offer.myBusinessFunction) : offer.myBusinessFunction != null) return false; + if (myCategory != null ? !myCategory.equals(offer.myCategory) : offer.myCategory != null) return false; + if (myDeliveryLeadTime != null ? !myDeliveryLeadTime.equals(offer.myDeliveryLeadTime) : offer.myDeliveryLeadTime != null) return false; + if (myEligibleCustomerType != null ? !myEligibleCustomerType.equals(offer.myEligibleCustomerType) : offer.myEligibleCustomerType != null) return false; + if (myEligibleDuration != null ? !myEligibleDuration.equals(offer.myEligibleDuration) : offer.myEligibleDuration != null) return false; + if (myEligibleQuantity != null ? !myEligibleQuantity.equals(offer.myEligibleQuantity) : offer.myEligibleQuantity != null) return false; + if (myEligibleRegion != null ? !myEligibleRegion.equals(offer.myEligibleRegion) : offer.myEligibleRegion != null) return false; + if (myIneligibleRegion != null ? !myIneligibleRegion.equals(offer.myIneligibleRegion) : offer.myIneligibleRegion != null) return false; + if (myEligibleTransactionVolume != null ? !myEligibleTransactionVolume.equals(offer.myEligibleTransactionVolume) : offer.myEligibleTransactionVolume != null) return false; + if (myGtin12 != null ? !myGtin12.equals(offer.myGtin12) : offer.myGtin12 != null) return false; + if (myGtin13 != null ? !myGtin13.equals(offer.myGtin13) : offer.myGtin13 != null) return false; + if (myGtin14 != null ? !myGtin14.equals(offer.myGtin14) : offer.myGtin14 != null) return false; + if (myGtin8 != null ? !myGtin8.equals(offer.myGtin8) : offer.myGtin8 != null) return false; + if (myIncludesObject != null ? !myIncludesObject.equals(offer.myIncludesObject) : offer.myIncludesObject != null) return false; + if (myInventoryLevel != null ? !myInventoryLevel.equals(offer.myInventoryLevel) : offer.myInventoryLevel != null) return false; + if (myItemCondition != null ? !myItemCondition.equals(offer.myItemCondition) : offer.myItemCondition != null) return false; + if (myItemOffered != null ? !myItemOffered.equals(offer.myItemOffered) : offer.myItemOffered != null) return false; + if (myMpn != null ? !myMpn.equals(offer.myMpn) : offer.myMpn != null) return false; + if (myPrice != null ? !myPrice.equals(offer.myPrice) : offer.myPrice != null) return false; + if (myPriceSpecification != null ? !myPriceSpecification.equals(offer.myPriceSpecification) : offer.myPriceSpecification != null) return false; + if (myPriceValidUntil != null ? !myPriceValidUntil.equals(offer.myPriceValidUntil) : offer.myPriceValidUntil != null) return false; + if (myReview != null ? !myReview.equals(offer.myReview) : offer.myReview != null) return false; + if (mySeller != null ? !mySeller.equals(offer.mySeller) : offer.mySeller != null) return false; + if (mySku != null ? !mySku.equals(offer.mySku) : offer.mySku != null) return false; + if (myValidFrom != null ? !myValidFrom.equals(offer.myValidFrom) : offer.myValidFrom != null) return false; + if (myValidThrough != null ? !myValidThrough.equals(offer.myValidThrough) : offer.myValidThrough != null) return false; + if (myWarranty != null ? !myWarranty.equals(offer.myWarranty) : offer.myWarranty != null) return false; + if (myPriceCurrency != null ? !myPriceCurrency.equals(offer.myPriceCurrency) : offer.myPriceCurrency != null) return false; + return true; + } + private PaymentMethod myAcceptedPaymentMethod; private Offer myAddOn; private QuantitativeValue myAdvanceBookingRequirement; @@ -1230,7 +1408,7 @@ protected Offer(PaymentMethod acceptedPaymentMethod, Offer addOn, QuantitativeVa private OfferItemCondition myItemCondition; private Product myItemOffered; private String myMpn; - private NumberOrString myPrice; + private Number myPrice; private PriceSpecification myPriceSpecification; private java.util.Date myPriceValidUntil; private Review myReview; diff --git a/src/main/java/org/schema/OfferItemCondition.java b/src/main/java/org/schema/OfferItemCondition.java index 33117e4a..5ce6a14a 100644 --- a/src/main/java/org/schema/OfferItemCondition.java +++ b/src/main/java/org/schema/OfferItemCondition.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected OfferItemCondition(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OfferItemCondition offerItemCondition = (OfferItemCondition) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OfficeEquipmentStore.java b/src/main/java/org/schema/OfficeEquipmentStore.java index b1f6be15..bed1e5d2 100644 --- a/src/main/java/org/schema/OfficeEquipmentStore.java +++ b/src/main/java/org/schema/OfficeEquipmentStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected OfficeEquipmentStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OfficeEquipmentStore officeEquipmentStore = (OfficeEquipmentStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OfflinePermanently.java b/src/main/java/org/schema/OfflinePermanently.java index c36c923e..58e78453 100644 --- a/src/main/java/org/schema/OfflinePermanently.java +++ b/src/main/java/org/schema/OfflinePermanently.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected OfflinePermanently() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OfflinePermanently offlinePermanently = (OfflinePermanently) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OfflineTemporarily.java b/src/main/java/org/schema/OfflineTemporarily.java index 1d029a9b..8639a66b 100644 --- a/src/main/java/org/schema/OfflineTemporarily.java +++ b/src/main/java/org/schema/OfflineTemporarily.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected OfflineTemporarily() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OfflineTemporarily offlineTemporarily = (OfflineTemporarily) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OnDemandEvent.java b/src/main/java/org/schema/OnDemandEvent.java index fdd58d63..e2ff977d 100644 --- a/src/main/java/org/schema/OnDemandEvent.java +++ b/src/main/java/org/schema/OnDemandEvent.java @@ -518,7 +518,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Boolean isAccessibleForFree; @@ -610,4 +610,18 @@ public interface Builder extends ThingBuilder { protected OnDemandEvent(Boolean isAccessibleForFree, BroadcastService publishedOn, AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(isAccessibleForFree, publishedOn, aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OnDemandEvent onDemandEvent = (OnDemandEvent) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OnSitePickup.java b/src/main/java/org/schema/OnSitePickup.java index 56ebc606..c23db281 100644 --- a/src/main/java/org/schema/OnSitePickup.java +++ b/src/main/java/org/schema/OnSitePickup.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected OnSitePickup() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OnSitePickup onSitePickup = (OnSitePickup) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Oncologic.java b/src/main/java/org/schema/Oncologic.java index 26f25711..57fa2f3b 100644 --- a/src/main/java/org/schema/Oncologic.java +++ b/src/main/java/org/schema/Oncologic.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Oncologic() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Oncologic oncologic = (Oncologic) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Online.java b/src/main/java/org/schema/Online.java index 27481514..91ce4bd1 100644 --- a/src/main/java/org/schema/Online.java +++ b/src/main/java/org/schema/Online.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Online() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Online online = (Online) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OnlineFull.java b/src/main/java/org/schema/OnlineFull.java index 632a13f7..d3befdcd 100644 --- a/src/main/java/org/schema/OnlineFull.java +++ b/src/main/java/org/schema/OnlineFull.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected OnlineFull() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OnlineFull onlineFull = (OnlineFull) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OnlineOnly.java b/src/main/java/org/schema/OnlineOnly.java index 86244cb7..20add694 100644 --- a/src/main/java/org/schema/OnlineOnly.java +++ b/src/main/java/org/schema/OnlineOnly.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected OnlineOnly() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OnlineOnly onlineOnly = (OnlineOnly) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OpenTrial.java b/src/main/java/org/schema/OpenTrial.java index 1d6730cb..1de7a823 100644 --- a/src/main/java/org/schema/OpenTrial.java +++ b/src/main/java/org/schema/OpenTrial.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected OpenTrial() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OpenTrial openTrial = (OpenTrial) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OpeningHoursSpecification.java b/src/main/java/org/schema/OpeningHoursSpecification.java index 01d5ec63..cf40e624 100644 --- a/src/main/java/org/schema/OpeningHoursSpecification.java +++ b/src/main/java/org/schema/OpeningHoursSpecification.java @@ -297,7 +297,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private java.util.Date closes; @@ -344,6 +344,30 @@ protected OpeningHoursSpecification(java.util.Date closes, DayOfWeek dayOfWeek, myValidFrom = validFrom; myValidThrough = validThrough; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myCloses != null ? myCloses.hashCode() : 0); + result = 31 * result + (myDayOfWeek != null ? myDayOfWeek.hashCode() : 0); + result = 31 * result + (myOpens != null ? myOpens.hashCode() : 0); + result = 31 * result + (myValidFrom != null ? myValidFrom.hashCode() : 0); + result = 31 * result + (myValidThrough != null ? myValidThrough.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OpeningHoursSpecification openingHoursSpecification = (OpeningHoursSpecification) o; + if (!super.equals(o)) return false; + if (myCloses != null ? !myCloses.equals(openingHoursSpecification.myCloses) : openingHoursSpecification.myCloses != null) return false; + if (myDayOfWeek != null ? !myDayOfWeek.equals(openingHoursSpecification.myDayOfWeek) : openingHoursSpecification.myDayOfWeek != null) return false; + if (myOpens != null ? !myOpens.equals(openingHoursSpecification.myOpens) : openingHoursSpecification.myOpens != null) return false; + if (myValidFrom != null ? !myValidFrom.equals(openingHoursSpecification.myValidFrom) : openingHoursSpecification.myValidFrom != null) return false; + if (myValidThrough != null ? !myValidThrough.equals(openingHoursSpecification.myValidThrough) : openingHoursSpecification.myValidThrough != null) return false; + return true; + } + private java.util.Date myCloses; private DayOfWeek myDayOfWeek; private java.util.Date myOpens; diff --git a/src/main/java/org/schema/Optician.java b/src/main/java/org/schema/Optician.java index 36c8564a..eff04838 100644 --- a/src/main/java/org/schema/Optician.java +++ b/src/main/java/org/schema/Optician.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected Optician(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Optician optician = (Optician) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Optometic.java b/src/main/java/org/schema/Optometic.java index c69c6162..5f5f9e88 100644 --- a/src/main/java/org/schema/Optometic.java +++ b/src/main/java/org/schema/Optometic.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Optometic() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Optometic optometic = (Optometic) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Order.java b/src/main/java/org/schema/Order.java index eece857c..b9abef1d 100644 --- a/src/main/java/org/schema/Order.java +++ b/src/main/java/org/schema/Order.java @@ -59,7 +59,7 @@ public OrganizationOrPerson getCustomer() { /** * Any discount applied (to an Order). */ - public NumberOrString getDiscount() { + public Number getDiscount() { return myDiscount; } /** @@ -235,16 +235,40 @@ public Order build() { /** * Any discount applied (to an Order). */ - @NotNull public Builder discount(@NotNull Number number) { - if (this.discount == null) this.discount = new NumberOrString(); - this.discount.setNumber(number); + @NotNull public Builder discount(@NotNull Integer integer) { + if (this.discount == null) this.discount = new Number(); + this.discount.setInteger(integer); + return this; + } + /** + * Any discount applied (to an Order). + */ + @NotNull public Builder discount(@NotNull Long discount) { + if (this.discount == null) this.discount = new Number(); + this.discount.setLong(discount); + return this; + } + /** + * Any discount applied (to an Order). + */ + @NotNull public Builder discount(@NotNull Float discount) { + if (this.discount == null) this.discount = new Number(); + this.discount.setFloat(discount); + return this; + } + /** + * Any discount applied (to an Order). + */ + @NotNull public Builder discount(@NotNull Double discount) { + if (this.discount == null) this.discount = new Number(); + this.discount.setDouble(discount); return this; } /** * Any discount applied (to an Order). */ @NotNull public Builder discount(@NotNull String discount) { - if (this.discount == null) this.discount = new NumberOrString(); + if (this.discount == null) this.discount = new Number(); this.discount.setString(discount); return this; } @@ -583,7 +607,10 @@ public Builder id(long id) { if ("confirmationNumber".equals(key) && value instanceof String) { confirmationNumber((String)value); continue; } if ("customer".equals(key) && value instanceof Organization) { customer((Organization)value); continue; } if ("customer".equals(key) && value instanceof Person) { customer((Person)value); continue; } - if ("discount".equals(key) && value instanceof Number) { discount((Number)value); continue; } + if ("discount".equals(key) && value instanceof Integer) { discount((Integer)value); continue; } + if ("discount".equals(key) && value instanceof Long) { discount((Long)value); continue; } + if ("discount".equals(key) && value instanceof Float) { discount((Float)value); continue; } + if ("discount".equals(key) && value instanceof Double) { discount((Double)value); continue; } if ("discount".equals(key) && value instanceof String) { discount((String)value); continue; } if ("discountCode".equals(key) && value instanceof String) { discountCode((String)value); continue; } if ("discountCurrency".equals(key) && value instanceof String) { discountCurrency((String)value); continue; } @@ -610,7 +637,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private ParcelDelivery orderDelivery; @@ -618,7 +645,7 @@ public Builder id(long id) { private PostalAddress billingAddress; private String confirmationNumber; private OrganizationOrPerson customer; - private NumberOrString discount; + private Number discount; private String discountCode; private String discountCurrency; private Boolean isGift; @@ -655,7 +682,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder customer(@NotNull Organization.Builder organization); @NotNull Builder customer(@NotNull Person person); @NotNull Builder customer(@NotNull Person.Builder person); - @NotNull Builder discount(@NotNull Number number); + @NotNull Builder discount(@NotNull Integer integer); + @NotNull Builder discount(@NotNull Long discount); + @NotNull Builder discount(@NotNull Float discount); + @NotNull Builder discount(@NotNull Double discount); @NotNull Builder discount(@NotNull String discount); @NotNull Builder discountCode(@NotNull String discountCode); @NotNull Builder discountCurrency(@NotNull String discountCurrency); @@ -694,7 +724,7 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected Order(ParcelDelivery orderDelivery, Offer acceptedOffer, PostalAddress billingAddress, String confirmationNumber, OrganizationOrPerson customer, NumberOrString discount, String discountCode, String discountCurrency, Boolean isGift, java.util.Date orderDate, OrderItemOrProduct orderedItem, String orderNumber, OrderStatus orderStatus, Invoice partOfInvoice, java.util.Date paymentDue, PaymentMethod paymentMethod, String paymentMethodId, String paymentUrl, Participant seller, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected Order(ParcelDelivery orderDelivery, Offer acceptedOffer, PostalAddress billingAddress, String confirmationNumber, OrganizationOrPerson customer, Number discount, String discountCode, String discountCurrency, Boolean isGift, java.util.Date orderDate, OrderItemOrProduct orderedItem, String orderNumber, OrderStatus orderStatus, Invoice partOfInvoice, java.util.Date paymentDue, PaymentMethod paymentMethod, String paymentMethodId, String paymentUrl, Participant seller, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myOrderDelivery = orderDelivery; myAcceptedOffer = acceptedOffer; @@ -717,12 +747,66 @@ protected Order(ParcelDelivery orderDelivery, Offer acceptedOffer, PostalAddress mySeller = seller; myBroker = broker; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myOrderDelivery != null ? myOrderDelivery.hashCode() : 0); + result = 31 * result + (myAcceptedOffer != null ? myAcceptedOffer.hashCode() : 0); + result = 31 * result + (myBillingAddress != null ? myBillingAddress.hashCode() : 0); + result = 31 * result + (myConfirmationNumber != null ? myConfirmationNumber.hashCode() : 0); + result = 31 * result + (myCustomer != null ? myCustomer.hashCode() : 0); + result = 31 * result + (myDiscount != null ? myDiscount.hashCode() : 0); + result = 31 * result + (myDiscountCode != null ? myDiscountCode.hashCode() : 0); + result = 31 * result + (myDiscountCurrency != null ? myDiscountCurrency.hashCode() : 0); + result = 31 * result + (myIsGift != null ? myIsGift.hashCode() : 0); + result = 31 * result + (myOrderDate != null ? myOrderDate.hashCode() : 0); + result = 31 * result + (myOrderedItem != null ? myOrderedItem.hashCode() : 0); + result = 31 * result + (myOrderNumber != null ? myOrderNumber.hashCode() : 0); + result = 31 * result + (myOrderStatus != null ? myOrderStatus.hashCode() : 0); + result = 31 * result + (myPartOfInvoice != null ? myPartOfInvoice.hashCode() : 0); + result = 31 * result + (myPaymentDue != null ? myPaymentDue.hashCode() : 0); + result = 31 * result + (myPaymentMethod != null ? myPaymentMethod.hashCode() : 0); + result = 31 * result + (myPaymentMethodId != null ? myPaymentMethodId.hashCode() : 0); + result = 31 * result + (myPaymentUrl != null ? myPaymentUrl.hashCode() : 0); + result = 31 * result + (mySeller != null ? mySeller.hashCode() : 0); + result = 31 * result + (myBroker != null ? myBroker.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Order order = (Order) o; + if (!super.equals(o)) return false; + if (myOrderDelivery != null ? !myOrderDelivery.equals(order.myOrderDelivery) : order.myOrderDelivery != null) return false; + if (myAcceptedOffer != null ? !myAcceptedOffer.equals(order.myAcceptedOffer) : order.myAcceptedOffer != null) return false; + if (myBillingAddress != null ? !myBillingAddress.equals(order.myBillingAddress) : order.myBillingAddress != null) return false; + if (myConfirmationNumber != null ? !myConfirmationNumber.equals(order.myConfirmationNumber) : order.myConfirmationNumber != null) return false; + if (myCustomer != null ? !myCustomer.equals(order.myCustomer) : order.myCustomer != null) return false; + if (myDiscount != null ? !myDiscount.equals(order.myDiscount) : order.myDiscount != null) return false; + if (myDiscountCode != null ? !myDiscountCode.equals(order.myDiscountCode) : order.myDiscountCode != null) return false; + if (myDiscountCurrency != null ? !myDiscountCurrency.equals(order.myDiscountCurrency) : order.myDiscountCurrency != null) return false; + if (myIsGift != null ? !myIsGift.equals(order.myIsGift) : order.myIsGift != null) return false; + if (myOrderDate != null ? !myOrderDate.equals(order.myOrderDate) : order.myOrderDate != null) return false; + if (myOrderedItem != null ? !myOrderedItem.equals(order.myOrderedItem) : order.myOrderedItem != null) return false; + if (myOrderNumber != null ? !myOrderNumber.equals(order.myOrderNumber) : order.myOrderNumber != null) return false; + if (myOrderStatus != null ? !myOrderStatus.equals(order.myOrderStatus) : order.myOrderStatus != null) return false; + if (myPartOfInvoice != null ? !myPartOfInvoice.equals(order.myPartOfInvoice) : order.myPartOfInvoice != null) return false; + if (myPaymentDue != null ? !myPaymentDue.equals(order.myPaymentDue) : order.myPaymentDue != null) return false; + if (myPaymentMethod != null ? !myPaymentMethod.equals(order.myPaymentMethod) : order.myPaymentMethod != null) return false; + if (myPaymentMethodId != null ? !myPaymentMethodId.equals(order.myPaymentMethodId) : order.myPaymentMethodId != null) return false; + if (myPaymentUrl != null ? !myPaymentUrl.equals(order.myPaymentUrl) : order.myPaymentUrl != null) return false; + if (mySeller != null ? !mySeller.equals(order.mySeller) : order.mySeller != null) return false; + if (myBroker != null ? !myBroker.equals(order.myBroker) : order.myBroker != null) return false; + return true; + } + private ParcelDelivery myOrderDelivery; private Offer myAcceptedOffer; private PostalAddress myBillingAddress; private String myConfirmationNumber; private OrganizationOrPerson myCustomer; - private NumberOrString myDiscount; + private Number myDiscount; private String myDiscountCode; private String myDiscountCurrency; private Boolean myIsGift; diff --git a/src/main/java/org/schema/OrderAction.java b/src/main/java/org/schema/OrderAction.java index 8b1fe5ee..76da3fe7 100644 --- a/src/main/java/org/schema/OrderAction.java +++ b/src/main/java/org/schema/OrderAction.java @@ -78,9 +78,93 @@ public OrderAction build() { */ - @NotNull public Builder price(@NotNull Number number) { - if (this.price == null) this.price = new NumberOrString(); - this.price.setNumber(number); + @NotNull public Builder price(@NotNull Integer integer) { + if (this.price == null) this.price = new Number(); + this.price.setInteger(integer); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Long price) { + if (this.price == null) this.price = new Number(); + this.price.setLong(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Float price) { + if (this.price == null) this.price = new Number(); + this.price.setFloat(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Double price) { + if (this.price == null) this.price = new Number(); + this.price.setDouble(price); return this; } /** @@ -107,7 +191,7 @@ public OrderAction build() { */ @NotNull public Builder price(@NotNull String price) { - if (this.price == null) this.price = new NumberOrString(); + if (this.price == null) this.price = new Number(); this.price.setString(price); return this; } @@ -381,7 +465,10 @@ public Builder id(long id) { Object value = entry.getValue(); if (value instanceof java.util.Map) { value = ThingDeserializer.fromMap((java.util.Map)value); } if ("deliveryMethod".equals(key) && value instanceof DeliveryMethod) { deliveryMethod((DeliveryMethod)value); continue; } - if ("price".equals(key) && value instanceof Number) { price((Number)value); continue; } + if ("price".equals(key) && value instanceof Integer) { price((Integer)value); continue; } + if ("price".equals(key) && value instanceof Long) { price((Long)value); continue; } + if ("price".equals(key) && value instanceof Float) { price((Float)value); continue; } + if ("price".equals(key) && value instanceof Double) { price((Double)value); continue; } if ("price".equals(key) && value instanceof String) { price((String)value); continue; } if ("priceSpecification".equals(key) && value instanceof PriceSpecification) { priceSpecification((PriceSpecification)value); continue; } if ("agent".equals(key) && value instanceof Organization) { agent((Organization)value); continue; } @@ -400,11 +487,11 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private DeliveryMethod deliveryMethod; - private NumberOrString price; + private Number price; private PriceSpecification priceSpecification; private OrganizationOrPerson agent; private java.util.Date endTime; @@ -425,7 +512,10 @@ public Builder id(long id) { public interface Builder extends ThingBuilder { @NotNull Builder deliveryMethod(@NotNull DeliveryMethod deliveryMethod); @NotNull Builder deliveryMethod(@NotNull DeliveryMethod.Builder deliveryMethod); - @NotNull Builder price(@NotNull Number number); + @NotNull Builder price(@NotNull Integer integer); + @NotNull Builder price(@NotNull Long price); + @NotNull Builder price(@NotNull Float price); + @NotNull Builder price(@NotNull Double price); @NotNull Builder price(@NotNull String price); @NotNull Builder priceSpecification(@NotNull PriceSpecification priceSpecification); @NotNull Builder priceSpecification(@NotNull PriceSpecification.Builder priceSpecification); @@ -455,9 +545,25 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected OrderAction(DeliveryMethod deliveryMethod, NumberOrString price, PriceSpecification priceSpecification, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected OrderAction(DeliveryMethod deliveryMethod, Number price, PriceSpecification priceSpecification, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(price, priceSpecification, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myDeliveryMethod = deliveryMethod; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDeliveryMethod != null ? myDeliveryMethod.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OrderAction orderAction = (OrderAction) o; + if (!super.equals(o)) return false; + if (myDeliveryMethod != null ? !myDeliveryMethod.equals(orderAction.myDeliveryMethod) : orderAction.myDeliveryMethod != null) return false; + return true; + } + private DeliveryMethod myDeliveryMethod; } diff --git a/src/main/java/org/schema/OrderCancelled.java b/src/main/java/org/schema/OrderCancelled.java index 4d36f187..a0ac6cd4 100644 --- a/src/main/java/org/schema/OrderCancelled.java +++ b/src/main/java/org/schema/OrderCancelled.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected OrderCancelled() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OrderCancelled orderCancelled = (OrderCancelled) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OrderDelivered.java b/src/main/java/org/schema/OrderDelivered.java index 33584b26..fcad5618 100644 --- a/src/main/java/org/schema/OrderDelivered.java +++ b/src/main/java/org/schema/OrderDelivered.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected OrderDelivered() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OrderDelivered orderDelivered = (OrderDelivered) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OrderInTransit.java b/src/main/java/org/schema/OrderInTransit.java index f98a3e61..e0b1e191 100644 --- a/src/main/java/org/schema/OrderInTransit.java +++ b/src/main/java/org/schema/OrderInTransit.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected OrderInTransit() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OrderInTransit orderInTransit = (OrderInTransit) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OrderItem.java b/src/main/java/org/schema/OrderItem.java index 7f56832a..2a61b1c0 100644 --- a/src/main/java/org/schema/OrderItem.java +++ b/src/main/java/org/schema/OrderItem.java @@ -357,7 +357,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Number orderQuantity; @@ -412,6 +412,30 @@ protected OrderItem(Number orderQuantity, OrderStatus orderItemStatus, String or myOrderDelivery = orderDelivery; myOrderedItem = orderedItem; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myOrderQuantity != null ? myOrderQuantity.hashCode() : 0); + result = 31 * result + (myOrderItemStatus != null ? myOrderItemStatus.hashCode() : 0); + result = 31 * result + (myOrderItemNumber != null ? myOrderItemNumber.hashCode() : 0); + result = 31 * result + (myOrderDelivery != null ? myOrderDelivery.hashCode() : 0); + result = 31 * result + (myOrderedItem != null ? myOrderedItem.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OrderItem orderItem = (OrderItem) o; + if (!super.equals(o)) return false; + if (myOrderQuantity != null ? !myOrderQuantity.equals(orderItem.myOrderQuantity) : orderItem.myOrderQuantity != null) return false; + if (myOrderItemStatus != null ? !myOrderItemStatus.equals(orderItem.myOrderItemStatus) : orderItem.myOrderItemStatus != null) return false; + if (myOrderItemNumber != null ? !myOrderItemNumber.equals(orderItem.myOrderItemNumber) : orderItem.myOrderItemNumber != null) return false; + if (myOrderDelivery != null ? !myOrderDelivery.equals(orderItem.myOrderDelivery) : orderItem.myOrderDelivery != null) return false; + if (myOrderedItem != null ? !myOrderedItem.equals(orderItem.myOrderedItem) : orderItem.myOrderedItem != null) return false; + return true; + } + private Number myOrderQuantity; private OrderStatus myOrderItemStatus; private String myOrderItemNumber; diff --git a/src/main/java/org/schema/OrderItemOrProduct.java b/src/main/java/org/schema/OrderItemOrProduct.java index 3071f604..2382e949 100644 --- a/src/main/java/org/schema/OrderItemOrProduct.java +++ b/src/main/java/org/schema/OrderItemOrProduct.java @@ -44,4 +44,21 @@ private void clear() { myOrderItem = null; myProduct = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myOrderItem != null ? myOrderItem.hashCode() : 0); + result = 31 * result + (myProduct != null ? myProduct.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OrderItemOrProduct orderItemOrProduct = (OrderItemOrProduct) o; + if (myOrderItem != null ? !myOrderItem.equals(orderItemOrProduct.myOrderItem) : orderItemOrProduct.myOrderItem != null) return false; + if (myProduct != null ? !myProduct.equals(orderItemOrProduct.myProduct) : orderItemOrProduct.myProduct != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OrderPaymentDue.java b/src/main/java/org/schema/OrderPaymentDue.java index f08a04a7..17ba7d10 100644 --- a/src/main/java/org/schema/OrderPaymentDue.java +++ b/src/main/java/org/schema/OrderPaymentDue.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected OrderPaymentDue() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OrderPaymentDue orderPaymentDue = (OrderPaymentDue) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OrderPickupAvailable.java b/src/main/java/org/schema/OrderPickupAvailable.java index 7eb3f369..1e6c2f96 100644 --- a/src/main/java/org/schema/OrderPickupAvailable.java +++ b/src/main/java/org/schema/OrderPickupAvailable.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected OrderPickupAvailable() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OrderPickupAvailable orderPickupAvailable = (OrderPickupAvailable) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OrderProblem.java b/src/main/java/org/schema/OrderProblem.java index 3dcb78a8..886ade00 100644 --- a/src/main/java/org/schema/OrderProblem.java +++ b/src/main/java/org/schema/OrderProblem.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected OrderProblem() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OrderProblem orderProblem = (OrderProblem) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OrderProcessing.java b/src/main/java/org/schema/OrderProcessing.java index 035be693..072a13d1 100644 --- a/src/main/java/org/schema/OrderProcessing.java +++ b/src/main/java/org/schema/OrderProcessing.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected OrderProcessing() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OrderProcessing orderProcessing = (OrderProcessing) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OrderReturned.java b/src/main/java/org/schema/OrderReturned.java index 6cabe9fd..cc9c095e 100644 --- a/src/main/java/org/schema/OrderReturned.java +++ b/src/main/java/org/schema/OrderReturned.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected OrderReturned() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OrderReturned orderReturned = (OrderReturned) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OrderStatus.java b/src/main/java/org/schema/OrderStatus.java index 17afadea..c0adf7bc 100644 --- a/src/main/java/org/schema/OrderStatus.java +++ b/src/main/java/org/schema/OrderStatus.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected OrderStatus(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OrderStatus orderStatus = (OrderStatus) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Organization.java b/src/main/java/org/schema/Organization.java index 657f85d5..0a8de56e 100644 --- a/src/main/java/org/schema/Organization.java +++ b/src/main/java/org/schema/Organization.java @@ -854,7 +854,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -1009,6 +1009,84 @@ protected Organization(PostalAddress address, AggregateRating aggregateRating, S myVatID = vatID; myFoundingLocation = foundingLocation; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAddress != null ? myAddress.hashCode() : 0); + result = 31 * result + (myAggregateRating != null ? myAggregateRating.hashCode() : 0); + result = 31 * result + (myAward != null ? myAward.hashCode() : 0); + result = 31 * result + (myBrand != null ? myBrand.hashCode() : 0); + result = 31 * result + (myContactPoint != null ? myContactPoint.hashCode() : 0); + result = 31 * result + (myDepartment != null ? myDepartment.hashCode() : 0); + result = 31 * result + (myDuns != null ? myDuns.hashCode() : 0); + result = 31 * result + (myEmail != null ? myEmail.hashCode() : 0); + result = 31 * result + (myEmployee != null ? myEmployee.hashCode() : 0); + result = 31 * result + (myEvent != null ? myEvent.hashCode() : 0); + result = 31 * result + (myFaxNumber != null ? myFaxNumber.hashCode() : 0); + result = 31 * result + (myFounder != null ? myFounder.hashCode() : 0); + result = 31 * result + (myDissolutionDate != null ? myDissolutionDate.hashCode() : 0); + result = 31 * result + (myFoundingDate != null ? myFoundingDate.hashCode() : 0); + result = 31 * result + (myGlobalLocationNumber != null ? myGlobalLocationNumber.hashCode() : 0); + result = 31 * result + (myHasPOS != null ? myHasPOS.hashCode() : 0); + result = 31 * result + (myIsicV4 != null ? myIsicV4.hashCode() : 0); + result = 31 * result + (myLegalName != null ? myLegalName.hashCode() : 0); + result = 31 * result + (myLogo != null ? myLogo.hashCode() : 0); + result = 31 * result + (myMakesOffer != null ? myMakesOffer.hashCode() : 0); + result = 31 * result + (myMember != null ? myMember.hashCode() : 0); + result = 31 * result + (myMemberOf != null ? myMemberOf.hashCode() : 0); + result = 31 * result + (myNaics != null ? myNaics.hashCode() : 0); + result = 31 * result + (myNumberOfEmployees != null ? myNumberOfEmployees.hashCode() : 0); + result = 31 * result + (myOwns != null ? myOwns.hashCode() : 0); + result = 31 * result + (myReview != null ? myReview.hashCode() : 0); + result = 31 * result + (mySeeks != null ? mySeeks.hashCode() : 0); + result = 31 * result + (mySubOrganization != null ? mySubOrganization.hashCode() : 0); + result = 31 * result + (myTaxID != null ? myTaxID.hashCode() : 0); + result = 31 * result + (myTelephone != null ? myTelephone.hashCode() : 0); + result = 31 * result + (myVatID != null ? myVatID.hashCode() : 0); + result = 31 * result + (myFoundingLocation != null ? myFoundingLocation.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Organization organization = (Organization) o; + if (!super.equals(o)) return false; + if (myAddress != null ? !myAddress.equals(organization.myAddress) : organization.myAddress != null) return false; + if (myAggregateRating != null ? !myAggregateRating.equals(organization.myAggregateRating) : organization.myAggregateRating != null) return false; + if (myAward != null ? !myAward.equals(organization.myAward) : organization.myAward != null) return false; + if (myBrand != null ? !myBrand.equals(organization.myBrand) : organization.myBrand != null) return false; + if (myContactPoint != null ? !myContactPoint.equals(organization.myContactPoint) : organization.myContactPoint != null) return false; + if (myDepartment != null ? !myDepartment.equals(organization.myDepartment) : organization.myDepartment != null) return false; + if (myDuns != null ? !myDuns.equals(organization.myDuns) : organization.myDuns != null) return false; + if (myEmail != null ? !myEmail.equals(organization.myEmail) : organization.myEmail != null) return false; + if (myEmployee != null ? !myEmployee.equals(organization.myEmployee) : organization.myEmployee != null) return false; + if (myEvent != null ? !myEvent.equals(organization.myEvent) : organization.myEvent != null) return false; + if (myFaxNumber != null ? !myFaxNumber.equals(organization.myFaxNumber) : organization.myFaxNumber != null) return false; + if (myFounder != null ? !myFounder.equals(organization.myFounder) : organization.myFounder != null) return false; + if (myDissolutionDate != null ? !myDissolutionDate.equals(organization.myDissolutionDate) : organization.myDissolutionDate != null) return false; + if (myFoundingDate != null ? !myFoundingDate.equals(organization.myFoundingDate) : organization.myFoundingDate != null) return false; + if (myGlobalLocationNumber != null ? !myGlobalLocationNumber.equals(organization.myGlobalLocationNumber) : organization.myGlobalLocationNumber != null) return false; + if (myHasPOS != null ? !myHasPOS.equals(organization.myHasPOS) : organization.myHasPOS != null) return false; + if (myIsicV4 != null ? !myIsicV4.equals(organization.myIsicV4) : organization.myIsicV4 != null) return false; + if (myLegalName != null ? !myLegalName.equals(organization.myLegalName) : organization.myLegalName != null) return false; + if (myLogo != null ? !myLogo.equals(organization.myLogo) : organization.myLogo != null) return false; + if (myMakesOffer != null ? !myMakesOffer.equals(organization.myMakesOffer) : organization.myMakesOffer != null) return false; + if (myMember != null ? !myMember.equals(organization.myMember) : organization.myMember != null) return false; + if (myMemberOf != null ? !myMemberOf.equals(organization.myMemberOf) : organization.myMemberOf != null) return false; + if (myNaics != null ? !myNaics.equals(organization.myNaics) : organization.myNaics != null) return false; + if (myNumberOfEmployees != null ? !myNumberOfEmployees.equals(organization.myNumberOfEmployees) : organization.myNumberOfEmployees != null) return false; + if (myOwns != null ? !myOwns.equals(organization.myOwns) : organization.myOwns != null) return false; + if (myReview != null ? !myReview.equals(organization.myReview) : organization.myReview != null) return false; + if (mySeeks != null ? !mySeeks.equals(organization.mySeeks) : organization.mySeeks != null) return false; + if (mySubOrganization != null ? !mySubOrganization.equals(organization.mySubOrganization) : organization.mySubOrganization != null) return false; + if (myTaxID != null ? !myTaxID.equals(organization.myTaxID) : organization.myTaxID != null) return false; + if (myTelephone != null ? !myTelephone.equals(organization.myTelephone) : organization.myTelephone != null) return false; + if (myVatID != null ? !myVatID.equals(organization.myVatID) : organization.myVatID != null) return false; + if (myFoundingLocation != null ? !myFoundingLocation.equals(organization.myFoundingLocation) : organization.myFoundingLocation != null) return false; + return true; + } + private PostalAddress myAddress; private AggregateRating myAggregateRating; private String myAward; diff --git a/src/main/java/org/schema/OrganizationOrPerson.java b/src/main/java/org/schema/OrganizationOrPerson.java index add55509..29f1c3b2 100644 --- a/src/main/java/org/schema/OrganizationOrPerson.java +++ b/src/main/java/org/schema/OrganizationOrPerson.java @@ -44,4 +44,21 @@ private void clear() { myOrganization = null; myPerson = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myOrganization != null ? myOrganization.hashCode() : 0); + result = 31 * result + (myPerson != null ? myPerson.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OrganizationOrPerson organizationOrPerson = (OrganizationOrPerson) o; + if (myOrganization != null ? !myOrganization.equals(organizationOrPerson.myOrganization) : organizationOrPerson.myOrganization != null) return false; + if (myPerson != null ? !myPerson.equals(organizationOrPerson.myPerson) : organizationOrPerson.myPerson != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OrganizationOrProgramMembership.java b/src/main/java/org/schema/OrganizationOrProgramMembership.java index e59a4b60..2856de40 100644 --- a/src/main/java/org/schema/OrganizationOrProgramMembership.java +++ b/src/main/java/org/schema/OrganizationOrProgramMembership.java @@ -44,4 +44,21 @@ private void clear() { myOrganization = null; myProgramMembership = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myOrganization != null ? myOrganization.hashCode() : 0); + result = 31 * result + (myProgramMembership != null ? myProgramMembership.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OrganizationOrProgramMembership organizationOrProgramMembership = (OrganizationOrProgramMembership) o; + if (myOrganization != null ? !myOrganization.equals(organizationOrProgramMembership.myOrganization) : organizationOrProgramMembership.myOrganization != null) return false; + if (myProgramMembership != null ? !myProgramMembership.equals(organizationOrProgramMembership.myProgramMembership) : organizationOrProgramMembership.myProgramMembership != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OrganizationRole.java b/src/main/java/org/schema/OrganizationRole.java index ab8c03d5..d7eff0d5 100644 --- a/src/main/java/org/schema/OrganizationRole.java +++ b/src/main/java/org/schema/OrganizationRole.java @@ -283,7 +283,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Number numberedPosition; @@ -325,5 +325,21 @@ protected OrganizationRole(Number numberedPosition, java.util.Date startDate, St super(startDate, roleName, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myNumberedPosition = numberedPosition; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myNumberedPosition != null ? myNumberedPosition.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OrganizationRole organizationRole = (OrganizationRole) o; + if (!super.equals(o)) return false; + if (myNumberedPosition != null ? !myNumberedPosition.equals(organizationRole.myNumberedPosition) : organizationRole.myNumberedPosition != null) return false; + return true; + } + private Number myNumberedPosition; } diff --git a/src/main/java/org/schema/OrganizeAction.java b/src/main/java/org/schema/OrganizeAction.java index e601e4b7..62ceb7f7 100644 --- a/src/main/java/org/schema/OrganizeAction.java +++ b/src/main/java/org/schema/OrganizeAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected OrganizeAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OrganizeAction organizeAction = (OrganizeAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Osteopathic.java b/src/main/java/org/schema/Osteopathic.java index 5b763fd4..aa439b80 100644 --- a/src/main/java/org/schema/Osteopathic.java +++ b/src/main/java/org/schema/Osteopathic.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Osteopathic() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Osteopathic osteopathic = (Osteopathic) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Otolaryngologic.java b/src/main/java/org/schema/Otolaryngologic.java index f7aba9f3..ab95b362 100644 --- a/src/main/java/org/schema/Otolaryngologic.java +++ b/src/main/java/org/schema/Otolaryngologic.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Otolaryngologic() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Otolaryngologic otolaryngologic = (Otolaryngologic) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OutOfStock.java b/src/main/java/org/schema/OutOfStock.java index f8162810..f5c8a974 100644 --- a/src/main/java/org/schema/OutOfStock.java +++ b/src/main/java/org/schema/OutOfStock.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected OutOfStock() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OutOfStock outOfStock = (OutOfStock) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OutletStore.java b/src/main/java/org/schema/OutletStore.java index 94911f5b..d1aa778e 100644 --- a/src/main/java/org/schema/OutletStore.java +++ b/src/main/java/org/schema/OutletStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected OutletStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OutletStore outletStore = (OutletStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/OwnershipInfo.java b/src/main/java/org/schema/OwnershipInfo.java index dab479bb..a27a1d47 100644 --- a/src/main/java/org/schema/OwnershipInfo.java +++ b/src/main/java/org/schema/OwnershipInfo.java @@ -303,7 +303,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson acquiredFrom; @@ -350,6 +350,28 @@ protected OwnershipInfo(OrganizationOrPerson acquiredFrom, java.util.Date ownedF myOwnedThrough = ownedThrough; myTypeOfGood = typeOfGood; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAcquiredFrom != null ? myAcquiredFrom.hashCode() : 0); + result = 31 * result + (myOwnedFrom != null ? myOwnedFrom.hashCode() : 0); + result = 31 * result + (myOwnedThrough != null ? myOwnedThrough.hashCode() : 0); + result = 31 * result + (myTypeOfGood != null ? myTypeOfGood.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OwnershipInfo ownershipInfo = (OwnershipInfo) o; + if (!super.equals(o)) return false; + if (myAcquiredFrom != null ? !myAcquiredFrom.equals(ownershipInfo.myAcquiredFrom) : ownershipInfo.myAcquiredFrom != null) return false; + if (myOwnedFrom != null ? !myOwnedFrom.equals(ownershipInfo.myOwnedFrom) : ownershipInfo.myOwnedFrom != null) return false; + if (myOwnedThrough != null ? !myOwnedThrough.equals(ownershipInfo.myOwnedThrough) : ownershipInfo.myOwnedThrough != null) return false; + if (myTypeOfGood != null ? !myTypeOfGood.equals(ownershipInfo.myTypeOfGood) : ownershipInfo.myTypeOfGood != null) return false; + return true; + } + private OrganizationOrPerson myAcquiredFrom; private java.util.Date myOwnedFrom; private java.util.Date myOwnedThrough; diff --git a/src/main/java/org/schema/OwnershipInfoOrProduct.java b/src/main/java/org/schema/OwnershipInfoOrProduct.java index 2a32151f..0c2e332a 100644 --- a/src/main/java/org/schema/OwnershipInfoOrProduct.java +++ b/src/main/java/org/schema/OwnershipInfoOrProduct.java @@ -44,4 +44,21 @@ private void clear() { myOwnershipInfo = null; myProduct = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myOwnershipInfo != null ? myOwnershipInfo.hashCode() : 0); + result = 31 * result + (myProduct != null ? myProduct.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OwnershipInfoOrProduct ownershipInfoOrProduct = (OwnershipInfoOrProduct) o; + if (myOwnershipInfo != null ? !myOwnershipInfo.equals(ownershipInfoOrProduct.myOwnershipInfo) : ownershipInfoOrProduct.myOwnershipInfo != null) return false; + if (myProduct != null ? !myProduct.equals(ownershipInfoOrProduct.myProduct) : ownershipInfoOrProduct.myProduct != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PET.java b/src/main/java/org/schema/PET.java index 89970622..1fbd51df 100644 --- a/src/main/java/org/schema/PET.java +++ b/src/main/java/org/schema/PET.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected PET() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PET pET = (PET) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PaintAction.java b/src/main/java/org/schema/PaintAction.java index 04e319f0..76acca11 100644 --- a/src/main/java/org/schema/PaintAction.java +++ b/src/main/java/org/schema/PaintAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected PaintAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PaintAction paintAction = (PaintAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Painting.java b/src/main/java/org/schema/Painting.java index 2aa65edd..68759bad 100644 --- a/src/main/java/org/schema/Painting.java +++ b/src/main/java/org/schema/Painting.java @@ -1146,7 +1146,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String schemaVersion; @@ -1363,4 +1363,18 @@ public interface Builder extends ThingBuilder { protected Painting(String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Painting painting = (Painting) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PalliativeProcedure.java b/src/main/java/org/schema/PalliativeProcedure.java index 74e6c0cb..e283c415 100644 --- a/src/main/java/org/schema/PalliativeProcedure.java +++ b/src/main/java/org/schema/PalliativeProcedure.java @@ -371,7 +371,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalEntity adverseOutcome; @@ -435,4 +435,18 @@ public interface Builder extends ThingBuilder { protected PalliativeProcedure(MedicalEntity adverseOutcome, MedicalContraindication contraindication, MedicalTherapy duplicateTherapy, MedicalIndication indication, MedicalEntity seriousAdverseOutcome, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(adverseOutcome, contraindication, duplicateTherapy, indication, seriousAdverseOutcome, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PalliativeProcedure palliativeProcedure = (PalliativeProcedure) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Paperback.java b/src/main/java/org/schema/Paperback.java index 7d6455cb..ce2ceea9 100644 --- a/src/main/java/org/schema/Paperback.java +++ b/src/main/java/org/schema/Paperback.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Paperback() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Paperback paperback = (Paperback) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ParcelDelivery.java b/src/main/java/org/schema/ParcelDelivery.java index c4c7b9f1..6914ac36 100644 --- a/src/main/java/org/schema/ParcelDelivery.java +++ b/src/main/java/org/schema/ParcelDelivery.java @@ -424,7 +424,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress deliveryAddress; @@ -496,6 +496,42 @@ protected ParcelDelivery(PostalAddress deliveryAddress, DeliveryEvent deliverySt myTrackingUrl = trackingUrl; myProvider = provider; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDeliveryAddress != null ? myDeliveryAddress.hashCode() : 0); + result = 31 * result + (myDeliveryStatus != null ? myDeliveryStatus.hashCode() : 0); + result = 31 * result + (myExpectedArrivalFrom != null ? myExpectedArrivalFrom.hashCode() : 0); + result = 31 * result + (myExpectedArrivalUntil != null ? myExpectedArrivalUntil.hashCode() : 0); + result = 31 * result + (myHasDeliveryMethod != null ? myHasDeliveryMethod.hashCode() : 0); + result = 31 * result + (myItemShipped != null ? myItemShipped.hashCode() : 0); + result = 31 * result + (myOriginAddress != null ? myOriginAddress.hashCode() : 0); + result = 31 * result + (myPartOfOrder != null ? myPartOfOrder.hashCode() : 0); + result = 31 * result + (myTrackingNumber != null ? myTrackingNumber.hashCode() : 0); + result = 31 * result + (myTrackingUrl != null ? myTrackingUrl.hashCode() : 0); + result = 31 * result + (myProvider != null ? myProvider.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ParcelDelivery parcelDelivery = (ParcelDelivery) o; + if (!super.equals(o)) return false; + if (myDeliveryAddress != null ? !myDeliveryAddress.equals(parcelDelivery.myDeliveryAddress) : parcelDelivery.myDeliveryAddress != null) return false; + if (myDeliveryStatus != null ? !myDeliveryStatus.equals(parcelDelivery.myDeliveryStatus) : parcelDelivery.myDeliveryStatus != null) return false; + if (myExpectedArrivalFrom != null ? !myExpectedArrivalFrom.equals(parcelDelivery.myExpectedArrivalFrom) : parcelDelivery.myExpectedArrivalFrom != null) return false; + if (myExpectedArrivalUntil != null ? !myExpectedArrivalUntil.equals(parcelDelivery.myExpectedArrivalUntil) : parcelDelivery.myExpectedArrivalUntil != null) return false; + if (myHasDeliveryMethod != null ? !myHasDeliveryMethod.equals(parcelDelivery.myHasDeliveryMethod) : parcelDelivery.myHasDeliveryMethod != null) return false; + if (myItemShipped != null ? !myItemShipped.equals(parcelDelivery.myItemShipped) : parcelDelivery.myItemShipped != null) return false; + if (myOriginAddress != null ? !myOriginAddress.equals(parcelDelivery.myOriginAddress) : parcelDelivery.myOriginAddress != null) return false; + if (myPartOfOrder != null ? !myPartOfOrder.equals(parcelDelivery.myPartOfOrder) : parcelDelivery.myPartOfOrder != null) return false; + if (myTrackingNumber != null ? !myTrackingNumber.equals(parcelDelivery.myTrackingNumber) : parcelDelivery.myTrackingNumber != null) return false; + if (myTrackingUrl != null ? !myTrackingUrl.equals(parcelDelivery.myTrackingUrl) : parcelDelivery.myTrackingUrl != null) return false; + if (myProvider != null ? !myProvider.equals(parcelDelivery.myProvider) : parcelDelivery.myProvider != null) return false; + return true; + } + private PostalAddress myDeliveryAddress; private DeliveryEvent myDeliveryStatus; private java.util.Date myExpectedArrivalFrom; diff --git a/src/main/java/org/schema/ParcelService.java b/src/main/java/org/schema/ParcelService.java index 3f2be959..2f671116 100644 --- a/src/main/java/org/schema/ParcelService.java +++ b/src/main/java/org/schema/ParcelService.java @@ -254,7 +254,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -290,4 +290,18 @@ public interface Builder extends ThingBuilder { protected ParcelService(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ParcelService parcelService = (ParcelService) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ParentAudience.java b/src/main/java/org/schema/ParentAudience.java index 52397bdd..8494b4d0 100644 --- a/src/main/java/org/schema/ParentAudience.java +++ b/src/main/java/org/schema/ParentAudience.java @@ -476,7 +476,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Number childMaxAge; @@ -549,6 +549,24 @@ protected ParentAudience(Number childMaxAge, Number childMinAge, MedicalConditio myChildMaxAge = childMaxAge; myChildMinAge = childMinAge; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myChildMaxAge != null ? myChildMaxAge.hashCode() : 0); + result = 31 * result + (myChildMinAge != null ? myChildMinAge.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ParentAudience parentAudience = (ParentAudience) o; + if (!super.equals(o)) return false; + if (myChildMaxAge != null ? !myChildMaxAge.equals(parentAudience.myChildMaxAge) : parentAudience.myChildMaxAge != null) return false; + if (myChildMinAge != null ? !myChildMinAge.equals(parentAudience.myChildMinAge) : parentAudience.myChildMinAge != null) return false; + return true; + } + private Number myChildMaxAge; private Number myChildMinAge; } diff --git a/src/main/java/org/schema/Park.java b/src/main/java/org/schema/Park.java index dac5d8e4..1c41cdd6 100644 --- a/src/main/java/org/schema/Park.java +++ b/src/main/java/org/schema/Park.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected Park(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Park park = (Park) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ParkingFacility.java b/src/main/java/org/schema/ParkingFacility.java index 7496f63a..08ecd9cf 100644 --- a/src/main/java/org/schema/ParkingFacility.java +++ b/src/main/java/org/schema/ParkingFacility.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected ParkingFacility(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ParkingFacility parkingFacility = (ParkingFacility) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ParkingMap.java b/src/main/java/org/schema/ParkingMap.java index e1461660..f7084502 100644 --- a/src/main/java/org/schema/ParkingMap.java +++ b/src/main/java/org/schema/ParkingMap.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected ParkingMap() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ParkingMap parkingMap = (ParkingMap) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Pathology.java b/src/main/java/org/schema/Pathology.java index 7ab3a948..0f832fba 100644 --- a/src/main/java/org/schema/Pathology.java +++ b/src/main/java/org/schema/Pathology.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Pathology() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Pathology pathology = (Pathology) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PathologyTest.java b/src/main/java/org/schema/PathologyTest.java index 5a9f69c4..e151223e 100644 --- a/src/main/java/org/schema/PathologyTest.java +++ b/src/main/java/org/schema/PathologyTest.java @@ -379,7 +379,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String tissueSample; @@ -445,5 +445,21 @@ protected PathologyTest(String tissueSample, Drug affectedBy, String normalRange super(affectedBy, normalRange, signDetected, usedToDiagnose, usesDevice, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myTissueSample = tissueSample; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myTissueSample != null ? myTissueSample.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PathologyTest pathologyTest = (PathologyTest) o; + if (!super.equals(o)) return false; + if (myTissueSample != null ? !myTissueSample.equals(pathologyTest.myTissueSample) : pathologyTest.myTissueSample != null) return false; + return true; + } + private String myTissueSample; } diff --git a/src/main/java/org/schema/Patient.java b/src/main/java/org/schema/Patient.java index 22001881..166c54dc 100644 --- a/src/main/java/org/schema/Patient.java +++ b/src/main/java/org/schema/Patient.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Patient() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Patient patient = (Patient) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PawnShop.java b/src/main/java/org/schema/PawnShop.java index 000c8cd8..b0f38b6e 100644 --- a/src/main/java/org/schema/PawnShop.java +++ b/src/main/java/org/schema/PawnShop.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected PawnShop(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PawnShop pawnShop = (PawnShop) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PayAction.java b/src/main/java/org/schema/PayAction.java index be08a8cb..b48d4add 100644 --- a/src/main/java/org/schema/PayAction.java +++ b/src/main/java/org/schema/PayAction.java @@ -141,9 +141,93 @@ public PayAction build() { */ - @NotNull public Builder price(@NotNull Number number) { - if (this.price == null) this.price = new NumberOrString(); - this.price.setNumber(number); + @NotNull public Builder price(@NotNull Integer integer) { + if (this.price == null) this.price = new Number(); + this.price.setInteger(integer); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Long price) { + if (this.price == null) this.price = new Number(); + this.price.setLong(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Float price) { + if (this.price == null) this.price = new Number(); + this.price.setFloat(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Double price) { + if (this.price == null) this.price = new Number(); + this.price.setDouble(price); return this; } /** @@ -170,7 +254,7 @@ public PayAction build() { */ @NotNull public Builder price(@NotNull String price) { - if (this.price == null) this.price = new NumberOrString(); + if (this.price == null) this.price = new Number(); this.price.setString(price); return this; } @@ -448,7 +532,10 @@ public Builder id(long id) { if ("recipient".equals(key) && value instanceof Audience) { recipient((Audience)value); continue; } if ("recipient".equals(key) && value instanceof Organization) { recipient((Organization)value); continue; } if ("recipient".equals(key) && value instanceof Person) { recipient((Person)value); continue; } - if ("price".equals(key) && value instanceof Number) { price((Number)value); continue; } + if ("price".equals(key) && value instanceof Integer) { price((Integer)value); continue; } + if ("price".equals(key) && value instanceof Long) { price((Long)value); continue; } + if ("price".equals(key) && value instanceof Float) { price((Float)value); continue; } + if ("price".equals(key) && value instanceof Double) { price((Double)value); continue; } if ("price".equals(key) && value instanceof String) { price((String)value); continue; } if ("priceSpecification".equals(key) && value instanceof PriceSpecification) { priceSpecification((PriceSpecification)value); continue; } if ("agent".equals(key) && value instanceof Organization) { agent((Organization)value); continue; } @@ -467,12 +554,12 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalDevicePurposeOrThing purpose; private AudienceOrOrganizationOrPerson recipient; - private NumberOrString price; + private Number price; private PriceSpecification priceSpecification; private OrganizationOrPerson agent; private java.util.Date endTime; @@ -501,7 +588,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder recipient(@NotNull Organization.Builder organization); @NotNull Builder recipient(@NotNull Person person); @NotNull Builder recipient(@NotNull Person.Builder person); - @NotNull Builder price(@NotNull Number number); + @NotNull Builder price(@NotNull Integer integer); + @NotNull Builder price(@NotNull Long price); + @NotNull Builder price(@NotNull Float price); + @NotNull Builder price(@NotNull Double price); @NotNull Builder price(@NotNull String price); @NotNull Builder priceSpecification(@NotNull PriceSpecification priceSpecification); @NotNull Builder priceSpecification(@NotNull PriceSpecification.Builder priceSpecification); @@ -531,11 +621,29 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected PayAction(MedicalDevicePurposeOrThing purpose, AudienceOrOrganizationOrPerson recipient, NumberOrString price, PriceSpecification priceSpecification, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected PayAction(MedicalDevicePurposeOrThing purpose, AudienceOrOrganizationOrPerson recipient, Number price, PriceSpecification priceSpecification, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(price, priceSpecification, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myPurpose = purpose; myRecipient = recipient; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myPurpose != null ? myPurpose.hashCode() : 0); + result = 31 * result + (myRecipient != null ? myRecipient.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PayAction payAction = (PayAction) o; + if (!super.equals(o)) return false; + if (myPurpose != null ? !myPurpose.equals(payAction.myPurpose) : payAction.myPurpose != null) return false; + if (myRecipient != null ? !myRecipient.equals(payAction.myRecipient) : payAction.myRecipient != null) return false; + return true; + } + private MedicalDevicePurposeOrThing myPurpose; private AudienceOrOrganizationOrPerson myRecipient; } diff --git a/src/main/java/org/schema/PaymentChargeSpecification.java b/src/main/java/org/schema/PaymentChargeSpecification.java index f093faf1..40d452d3 100644 --- a/src/main/java/org/schema/PaymentChargeSpecification.java +++ b/src/main/java/org/schema/PaymentChargeSpecification.java @@ -204,9 +204,93 @@ public PaymentChargeSpecification build() { */ - @NotNull public Builder price(@NotNull Number number) { - if (this.price == null) this.price = new NumberOrString(); - this.price.setNumber(number); + @NotNull public Builder price(@NotNull Integer integer) { + if (this.price == null) this.price = new Number(); + this.price.setInteger(integer); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Long price) { + if (this.price == null) this.price = new Number(); + this.price.setLong(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Float price) { + if (this.price == null) this.price = new Number(); + this.price.setFloat(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Double price) { + if (this.price == null) this.price = new Number(); + this.price.setDouble(price); return this; } /** @@ -233,7 +317,7 @@ public PaymentChargeSpecification build() { */ @NotNull public Builder price(@NotNull String price) { - if (this.price == null) this.price = new NumberOrString(); + if (this.price == null) this.price = new Number(); this.price.setString(price); return this; } @@ -450,7 +534,10 @@ public Builder id(long id) { if ("minPrice".equals(key) && value instanceof Float) { minPrice((Float)value); continue; } if ("minPrice".equals(key) && value instanceof Double) { minPrice((Double)value); continue; } if ("minPrice".equals(key) && value instanceof String) { minPrice((String)value); continue; } - if ("price".equals(key) && value instanceof Number) { price((Number)value); continue; } + if ("price".equals(key) && value instanceof Integer) { price((Integer)value); continue; } + if ("price".equals(key) && value instanceof Long) { price((Long)value); continue; } + if ("price".equals(key) && value instanceof Float) { price((Float)value); continue; } + if ("price".equals(key) && value instanceof Double) { price((Double)value); continue; } if ("price".equals(key) && value instanceof String) { price((String)value); continue; } if ("validFrom".equals(key) && value instanceof java.util.Date) { validFrom((java.util.Date)value); continue; } if ("validThrough".equals(key) && value instanceof java.util.Date) { validThrough((java.util.Date)value); continue; } @@ -465,7 +552,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private DeliveryMethod appliesToDeliveryMethod; @@ -474,7 +561,7 @@ public Builder id(long id) { private PriceSpecification eligibleTransactionVolume; private Number maxPrice; private Number minPrice; - private NumberOrString price; + private Number price; private java.util.Date validFrom; private java.util.Date validThrough; private Boolean valueAddedTaxIncluded; @@ -508,7 +595,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder minPrice(@NotNull Float minPrice); @NotNull Builder minPrice(@NotNull Double minPrice); @NotNull Builder minPrice(@NotNull String minPrice); - @NotNull Builder price(@NotNull Number number); + @NotNull Builder price(@NotNull Integer integer); + @NotNull Builder price(@NotNull Long price); + @NotNull Builder price(@NotNull Float price); + @NotNull Builder price(@NotNull Double price); @NotNull Builder price(@NotNull String price); @NotNull Builder validFrom(@NotNull java.util.Date date); @NotNull Builder validThrough(@NotNull java.util.Date date); @@ -528,11 +618,29 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected PaymentChargeSpecification(DeliveryMethod appliesToDeliveryMethod, PaymentMethod appliesToPaymentMethod, QuantitativeValue eligibleQuantity, PriceSpecification eligibleTransactionVolume, Number maxPrice, Number minPrice, NumberOrString price, java.util.Date validFrom, java.util.Date validThrough, Boolean valueAddedTaxIncluded, String priceCurrency, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected PaymentChargeSpecification(DeliveryMethod appliesToDeliveryMethod, PaymentMethod appliesToPaymentMethod, QuantitativeValue eligibleQuantity, PriceSpecification eligibleTransactionVolume, Number maxPrice, Number minPrice, Number price, java.util.Date validFrom, java.util.Date validThrough, Boolean valueAddedTaxIncluded, String priceCurrency, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(eligibleQuantity, eligibleTransactionVolume, maxPrice, minPrice, price, validFrom, validThrough, valueAddedTaxIncluded, priceCurrency, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myAppliesToDeliveryMethod = appliesToDeliveryMethod; myAppliesToPaymentMethod = appliesToPaymentMethod; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAppliesToDeliveryMethod != null ? myAppliesToDeliveryMethod.hashCode() : 0); + result = 31 * result + (myAppliesToPaymentMethod != null ? myAppliesToPaymentMethod.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PaymentChargeSpecification paymentChargeSpecification = (PaymentChargeSpecification) o; + if (!super.equals(o)) return false; + if (myAppliesToDeliveryMethod != null ? !myAppliesToDeliveryMethod.equals(paymentChargeSpecification.myAppliesToDeliveryMethod) : paymentChargeSpecification.myAppliesToDeliveryMethod != null) return false; + if (myAppliesToPaymentMethod != null ? !myAppliesToPaymentMethod.equals(paymentChargeSpecification.myAppliesToPaymentMethod) : paymentChargeSpecification.myAppliesToPaymentMethod != null) return false; + return true; + } + private DeliveryMethod myAppliesToDeliveryMethod; private PaymentMethod myAppliesToPaymentMethod; } diff --git a/src/main/java/org/schema/PaymentMethod.java b/src/main/java/org/schema/PaymentMethod.java index 795020b3..31794bd3 100644 --- a/src/main/java/org/schema/PaymentMethod.java +++ b/src/main/java/org/schema/PaymentMethod.java @@ -260,7 +260,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -296,4 +296,18 @@ public interface Builder extends ThingBuilder { protected PaymentMethod(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PaymentMethod paymentMethod = (PaymentMethod) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Pediatric.java b/src/main/java/org/schema/Pediatric.java index 6bd6c3a8..6b4fff38 100644 --- a/src/main/java/org/schema/Pediatric.java +++ b/src/main/java/org/schema/Pediatric.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Pediatric() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Pediatric pediatric = (Pediatric) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PeopleAudience.java b/src/main/java/org/schema/PeopleAudience.java index 9f00b1ea..31f0ea43 100644 --- a/src/main/java/org/schema/PeopleAudience.java +++ b/src/main/java/org/schema/PeopleAudience.java @@ -416,7 +416,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalCondition healthCondition; @@ -482,6 +482,34 @@ protected PeopleAudience(MedicalCondition healthCondition, String requiredGender mySuggestedMaxAge = suggestedMaxAge; mySuggestedMinAge = suggestedMinAge; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myHealthCondition != null ? myHealthCondition.hashCode() : 0); + result = 31 * result + (myRequiredGender != null ? myRequiredGender.hashCode() : 0); + result = 31 * result + (myRequiredMaxAge != null ? myRequiredMaxAge.hashCode() : 0); + result = 31 * result + (myRequiredMinAge != null ? myRequiredMinAge.hashCode() : 0); + result = 31 * result + (mySuggestedGender != null ? mySuggestedGender.hashCode() : 0); + result = 31 * result + (mySuggestedMaxAge != null ? mySuggestedMaxAge.hashCode() : 0); + result = 31 * result + (mySuggestedMinAge != null ? mySuggestedMinAge.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PeopleAudience peopleAudience = (PeopleAudience) o; + if (!super.equals(o)) return false; + if (myHealthCondition != null ? !myHealthCondition.equals(peopleAudience.myHealthCondition) : peopleAudience.myHealthCondition != null) return false; + if (myRequiredGender != null ? !myRequiredGender.equals(peopleAudience.myRequiredGender) : peopleAudience.myRequiredGender != null) return false; + if (myRequiredMaxAge != null ? !myRequiredMaxAge.equals(peopleAudience.myRequiredMaxAge) : peopleAudience.myRequiredMaxAge != null) return false; + if (myRequiredMinAge != null ? !myRequiredMinAge.equals(peopleAudience.myRequiredMinAge) : peopleAudience.myRequiredMinAge != null) return false; + if (mySuggestedGender != null ? !mySuggestedGender.equals(peopleAudience.mySuggestedGender) : peopleAudience.mySuggestedGender != null) return false; + if (mySuggestedMaxAge != null ? !mySuggestedMaxAge.equals(peopleAudience.mySuggestedMaxAge) : peopleAudience.mySuggestedMaxAge != null) return false; + if (mySuggestedMinAge != null ? !mySuggestedMinAge.equals(peopleAudience.mySuggestedMinAge) : peopleAudience.mySuggestedMinAge != null) return false; + return true; + } + private MedicalCondition myHealthCondition; private String myRequiredGender; private Integer myRequiredMaxAge; diff --git a/src/main/java/org/schema/PercutaneousProcedure.java b/src/main/java/org/schema/PercutaneousProcedure.java index fa6da11d..e3baa3ae 100644 --- a/src/main/java/org/schema/PercutaneousProcedure.java +++ b/src/main/java/org/schema/PercutaneousProcedure.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected PercutaneousProcedure() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PercutaneousProcedure percutaneousProcedure = (PercutaneousProcedure) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PerformAction.java b/src/main/java/org/schema/PerformAction.java index f36358ae..aa380dd9 100644 --- a/src/main/java/org/schema/PerformAction.java +++ b/src/main/java/org/schema/PerformAction.java @@ -356,7 +356,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EntertainmentBusiness entertainmentBusiness; @@ -415,5 +415,21 @@ protected PerformAction(EntertainmentBusiness entertainmentBusiness, Audience au super(audience, event, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myEntertainmentBusiness = entertainmentBusiness; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myEntertainmentBusiness != null ? myEntertainmentBusiness.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PerformAction performAction = (PerformAction) o; + if (!super.equals(o)) return false; + if (myEntertainmentBusiness != null ? !myEntertainmentBusiness.equals(performAction.myEntertainmentBusiness) : performAction.myEntertainmentBusiness != null) return false; + return true; + } + private EntertainmentBusiness myEntertainmentBusiness; } diff --git a/src/main/java/org/schema/PerformanceRole.java b/src/main/java/org/schema/PerformanceRole.java index 22830191..d0523a3e 100644 --- a/src/main/java/org/schema/PerformanceRole.java +++ b/src/main/java/org/schema/PerformanceRole.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String characterName; @@ -284,5 +284,21 @@ protected PerformanceRole(String characterName, java.util.Date startDate, String super(startDate, roleName, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myCharacterName = characterName; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myCharacterName != null ? myCharacterName.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PerformanceRole performanceRole = (PerformanceRole) o; + if (!super.equals(o)) return false; + if (myCharacterName != null ? !myCharacterName.equals(performanceRole.myCharacterName) : performanceRole.myCharacterName != null) return false; + return true; + } + private String myCharacterName; } diff --git a/src/main/java/org/schema/PerformingArtsTheater.java b/src/main/java/org/schema/PerformingArtsTheater.java index 869e1c72..5095978a 100644 --- a/src/main/java/org/schema/PerformingArtsTheater.java +++ b/src/main/java/org/schema/PerformingArtsTheater.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected PerformingArtsTheater(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PerformingArtsTheater performingArtsTheater = (PerformingArtsTheater) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PerformingGroup.java b/src/main/java/org/schema/PerformingGroup.java index 95602ae5..87e2ee2a 100644 --- a/src/main/java/org/schema/PerformingGroup.java +++ b/src/main/java/org/schema/PerformingGroup.java @@ -660,7 +660,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -783,4 +783,18 @@ public interface Builder extends ThingBuilder { protected PerformingGroup(PostalAddress address, AggregateRating aggregateRating, String award, BrandOrOrganization brand, ContactPoint contactPoint, Organization department, String duns, String email, Person employee, Event event, String faxNumber, Person founder, java.util.Date dissolutionDate, java.util.Date foundingDate, String globalLocationNumber, Place hasPOS, String isicV4, String legalName, ImageObjectOrString logo, Offer makesOffer, OrganizationOrPerson member, OrganizationOrProgramMembership memberOf, String naics, QuantitativeValue numberOfEmployees, OwnershipInfoOrProduct owns, Review review, Demand seeks, Organization subOrganization, String taxID, String telephone, String vatID, Place foundingLocation, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, award, brand, contactPoint, department, duns, email, employee, event, faxNumber, founder, dissolutionDate, foundingDate, globalLocationNumber, hasPOS, isicV4, legalName, logo, makesOffer, member, memberOf, naics, numberOfEmployees, owns, review, seeks, subOrganization, taxID, telephone, vatID, foundingLocation, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PerformingGroup performingGroup = (PerformingGroup) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Periodical.java b/src/main/java/org/schema/Periodical.java index 7b43111c..835d3d0a 100644 --- a/src/main/java/org/schema/Periodical.java +++ b/src/main/java/org/schema/Periodical.java @@ -1180,7 +1180,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String issn; @@ -1404,5 +1404,21 @@ protected Periodical(String issn, java.util.Date endDate, java.util.Date startDa super(endDate, startDate, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myIssn = issn; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myIssn != null ? myIssn.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Periodical periodical = (Periodical) o; + if (!super.equals(o)) return false; + if (myIssn != null ? !myIssn.equals(periodical.myIssn) : periodical.myIssn != null) return false; + return true; + } + private String myIssn; } diff --git a/src/main/java/org/schema/Permit.java b/src/main/java/org/schema/Permit.java index b5046043..5fe189ae 100644 --- a/src/main/java/org/schema/Permit.java +++ b/src/main/java/org/schema/Permit.java @@ -346,7 +346,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Service issuedThrough; @@ -403,6 +403,34 @@ protected Permit(Service issuedThrough, Audience permitAudience, Duration validF myValidUntil = validUntil; myIssuedBy = issuedBy; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myIssuedThrough != null ? myIssuedThrough.hashCode() : 0); + result = 31 * result + (myPermitAudience != null ? myPermitAudience.hashCode() : 0); + result = 31 * result + (myValidFor != null ? myValidFor.hashCode() : 0); + result = 31 * result + (myValidFrom != null ? myValidFrom.hashCode() : 0); + result = 31 * result + (myValidIn != null ? myValidIn.hashCode() : 0); + result = 31 * result + (myValidUntil != null ? myValidUntil.hashCode() : 0); + result = 31 * result + (myIssuedBy != null ? myIssuedBy.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Permit permit = (Permit) o; + if (!super.equals(o)) return false; + if (myIssuedThrough != null ? !myIssuedThrough.equals(permit.myIssuedThrough) : permit.myIssuedThrough != null) return false; + if (myPermitAudience != null ? !myPermitAudience.equals(permit.myPermitAudience) : permit.myPermitAudience != null) return false; + if (myValidFor != null ? !myValidFor.equals(permit.myValidFor) : permit.myValidFor != null) return false; + if (myValidFrom != null ? !myValidFrom.equals(permit.myValidFrom) : permit.myValidFrom != null) return false; + if (myValidIn != null ? !myValidIn.equals(permit.myValidIn) : permit.myValidIn != null) return false; + if (myValidUntil != null ? !myValidUntil.equals(permit.myValidUntil) : permit.myValidUntil != null) return false; + if (myIssuedBy != null ? !myIssuedBy.equals(permit.myIssuedBy) : permit.myIssuedBy != null) return false; + return true; + } + private Service myIssuedThrough; private Audience myPermitAudience; private Duration myValidFor; diff --git a/src/main/java/org/schema/Person.java b/src/main/java/org/schema/Person.java index 9eef81db..6afb4219 100644 --- a/src/main/java/org/schema/Person.java +++ b/src/main/java/org/schema/Person.java @@ -1142,7 +1142,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String additionalName; @@ -1354,6 +1354,114 @@ protected Person(String additionalName, PostalAddress address, Organization affi myBirthPlace = birthPlace; myDeathPlace = deathPlace; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAdditionalName != null ? myAdditionalName.hashCode() : 0); + result = 31 * result + (myAddress != null ? myAddress.hashCode() : 0); + result = 31 * result + (myAffiliation != null ? myAffiliation.hashCode() : 0); + result = 31 * result + (myAlumniOf != null ? myAlumniOf.hashCode() : 0); + result = 31 * result + (myAward != null ? myAward.hashCode() : 0); + result = 31 * result + (myBirthDate != null ? myBirthDate.hashCode() : 0); + result = 31 * result + (myBrand != null ? myBrand.hashCode() : 0); + result = 31 * result + (myChildren != null ? myChildren.hashCode() : 0); + result = 31 * result + (myColleague != null ? myColleague.hashCode() : 0); + result = 31 * result + (myContactPoint != null ? myContactPoint.hashCode() : 0); + result = 31 * result + (myDeathDate != null ? myDeathDate.hashCode() : 0); + result = 31 * result + (myDuns != null ? myDuns.hashCode() : 0); + result = 31 * result + (myEmail != null ? myEmail.hashCode() : 0); + result = 31 * result + (myFamilyName != null ? myFamilyName.hashCode() : 0); + result = 31 * result + (myFaxNumber != null ? myFaxNumber.hashCode() : 0); + result = 31 * result + (myFollows != null ? myFollows.hashCode() : 0); + result = 31 * result + (myGender != null ? myGender.hashCode() : 0); + result = 31 * result + (myGivenName != null ? myGivenName.hashCode() : 0); + result = 31 * result + (myGlobalLocationNumber != null ? myGlobalLocationNumber.hashCode() : 0); + result = 31 * result + (myHasPOS != null ? myHasPOS.hashCode() : 0); + result = 31 * result + (myHeight != null ? myHeight.hashCode() : 0); + result = 31 * result + (myHomeLocation != null ? myHomeLocation.hashCode() : 0); + result = 31 * result + (myHonorificPrefix != null ? myHonorificPrefix.hashCode() : 0); + result = 31 * result + (myHonorificSuffix != null ? myHonorificSuffix.hashCode() : 0); + result = 31 * result + (myIsicV4 != null ? myIsicV4.hashCode() : 0); + result = 31 * result + (myJobTitle != null ? myJobTitle.hashCode() : 0); + result = 31 * result + (myKnows != null ? myKnows.hashCode() : 0); + result = 31 * result + (myMakesOffer != null ? myMakesOffer.hashCode() : 0); + result = 31 * result + (myMemberOf != null ? myMemberOf.hashCode() : 0); + result = 31 * result + (myNaics != null ? myNaics.hashCode() : 0); + result = 31 * result + (myNationality != null ? myNationality.hashCode() : 0); + result = 31 * result + (myNetWorth != null ? myNetWorth.hashCode() : 0); + result = 31 * result + (myOwns != null ? myOwns.hashCode() : 0); + result = 31 * result + (myParent != null ? myParent.hashCode() : 0); + result = 31 * result + (myPerformerIn != null ? myPerformerIn.hashCode() : 0); + result = 31 * result + (myRelatedTo != null ? myRelatedTo.hashCode() : 0); + result = 31 * result + (mySeeks != null ? mySeeks.hashCode() : 0); + result = 31 * result + (mySibling != null ? mySibling.hashCode() : 0); + result = 31 * result + (mySpouse != null ? mySpouse.hashCode() : 0); + result = 31 * result + (myTaxID != null ? myTaxID.hashCode() : 0); + result = 31 * result + (myTelephone != null ? myTelephone.hashCode() : 0); + result = 31 * result + (myVatID != null ? myVatID.hashCode() : 0); + result = 31 * result + (myWeight != null ? myWeight.hashCode() : 0); + result = 31 * result + (myWorkLocation != null ? myWorkLocation.hashCode() : 0); + result = 31 * result + (myWorksFor != null ? myWorksFor.hashCode() : 0); + result = 31 * result + (myBirthPlace != null ? myBirthPlace.hashCode() : 0); + result = 31 * result + (myDeathPlace != null ? myDeathPlace.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Person person = (Person) o; + if (!super.equals(o)) return false; + if (myAdditionalName != null ? !myAdditionalName.equals(person.myAdditionalName) : person.myAdditionalName != null) return false; + if (myAddress != null ? !myAddress.equals(person.myAddress) : person.myAddress != null) return false; + if (myAffiliation != null ? !myAffiliation.equals(person.myAffiliation) : person.myAffiliation != null) return false; + if (myAlumniOf != null ? !myAlumniOf.equals(person.myAlumniOf) : person.myAlumniOf != null) return false; + if (myAward != null ? !myAward.equals(person.myAward) : person.myAward != null) return false; + if (myBirthDate != null ? !myBirthDate.equals(person.myBirthDate) : person.myBirthDate != null) return false; + if (myBrand != null ? !myBrand.equals(person.myBrand) : person.myBrand != null) return false; + if (myChildren != null ? !myChildren.equals(person.myChildren) : person.myChildren != null) return false; + if (myColleague != null ? !myColleague.equals(person.myColleague) : person.myColleague != null) return false; + if (myContactPoint != null ? !myContactPoint.equals(person.myContactPoint) : person.myContactPoint != null) return false; + if (myDeathDate != null ? !myDeathDate.equals(person.myDeathDate) : person.myDeathDate != null) return false; + if (myDuns != null ? !myDuns.equals(person.myDuns) : person.myDuns != null) return false; + if (myEmail != null ? !myEmail.equals(person.myEmail) : person.myEmail != null) return false; + if (myFamilyName != null ? !myFamilyName.equals(person.myFamilyName) : person.myFamilyName != null) return false; + if (myFaxNumber != null ? !myFaxNumber.equals(person.myFaxNumber) : person.myFaxNumber != null) return false; + if (myFollows != null ? !myFollows.equals(person.myFollows) : person.myFollows != null) return false; + if (myGender != null ? !myGender.equals(person.myGender) : person.myGender != null) return false; + if (myGivenName != null ? !myGivenName.equals(person.myGivenName) : person.myGivenName != null) return false; + if (myGlobalLocationNumber != null ? !myGlobalLocationNumber.equals(person.myGlobalLocationNumber) : person.myGlobalLocationNumber != null) return false; + if (myHasPOS != null ? !myHasPOS.equals(person.myHasPOS) : person.myHasPOS != null) return false; + if (myHeight != null ? !myHeight.equals(person.myHeight) : person.myHeight != null) return false; + if (myHomeLocation != null ? !myHomeLocation.equals(person.myHomeLocation) : person.myHomeLocation != null) return false; + if (myHonorificPrefix != null ? !myHonorificPrefix.equals(person.myHonorificPrefix) : person.myHonorificPrefix != null) return false; + if (myHonorificSuffix != null ? !myHonorificSuffix.equals(person.myHonorificSuffix) : person.myHonorificSuffix != null) return false; + if (myIsicV4 != null ? !myIsicV4.equals(person.myIsicV4) : person.myIsicV4 != null) return false; + if (myJobTitle != null ? !myJobTitle.equals(person.myJobTitle) : person.myJobTitle != null) return false; + if (myKnows != null ? !myKnows.equals(person.myKnows) : person.myKnows != null) return false; + if (myMakesOffer != null ? !myMakesOffer.equals(person.myMakesOffer) : person.myMakesOffer != null) return false; + if (myMemberOf != null ? !myMemberOf.equals(person.myMemberOf) : person.myMemberOf != null) return false; + if (myNaics != null ? !myNaics.equals(person.myNaics) : person.myNaics != null) return false; + if (myNationality != null ? !myNationality.equals(person.myNationality) : person.myNationality != null) return false; + if (myNetWorth != null ? !myNetWorth.equals(person.myNetWorth) : person.myNetWorth != null) return false; + if (myOwns != null ? !myOwns.equals(person.myOwns) : person.myOwns != null) return false; + if (myParent != null ? !myParent.equals(person.myParent) : person.myParent != null) return false; + if (myPerformerIn != null ? !myPerformerIn.equals(person.myPerformerIn) : person.myPerformerIn != null) return false; + if (myRelatedTo != null ? !myRelatedTo.equals(person.myRelatedTo) : person.myRelatedTo != null) return false; + if (mySeeks != null ? !mySeeks.equals(person.mySeeks) : person.mySeeks != null) return false; + if (mySibling != null ? !mySibling.equals(person.mySibling) : person.mySibling != null) return false; + if (mySpouse != null ? !mySpouse.equals(person.mySpouse) : person.mySpouse != null) return false; + if (myTaxID != null ? !myTaxID.equals(person.myTaxID) : person.myTaxID != null) return false; + if (myTelephone != null ? !myTelephone.equals(person.myTelephone) : person.myTelephone != null) return false; + if (myVatID != null ? !myVatID.equals(person.myVatID) : person.myVatID != null) return false; + if (myWeight != null ? !myWeight.equals(person.myWeight) : person.myWeight != null) return false; + if (myWorkLocation != null ? !myWorkLocation.equals(person.myWorkLocation) : person.myWorkLocation != null) return false; + if (myWorksFor != null ? !myWorksFor.equals(person.myWorksFor) : person.myWorksFor != null) return false; + if (myBirthPlace != null ? !myBirthPlace.equals(person.myBirthPlace) : person.myBirthPlace != null) return false; + if (myDeathPlace != null ? !myDeathPlace.equals(person.myDeathPlace) : person.myDeathPlace != null) return false; + return true; + } + private String myAdditionalName; private PostalAddress myAddress; private Organization myAffiliation; diff --git a/src/main/java/org/schema/PetStore.java b/src/main/java/org/schema/PetStore.java index 33dadc5e..23b0362b 100644 --- a/src/main/java/org/schema/PetStore.java +++ b/src/main/java/org/schema/PetStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected PetStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PetStore petStore = (PetStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Pharmacy.java b/src/main/java/org/schema/Pharmacy.java index c9c42b83..16e9dadf 100644 --- a/src/main/java/org/schema/Pharmacy.java +++ b/src/main/java/org/schema/Pharmacy.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected Pharmacy(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Pharmacy pharmacy = (Pharmacy) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PharmacySpecialty.java b/src/main/java/org/schema/PharmacySpecialty.java index 3a6ca261..69efc339 100644 --- a/src/main/java/org/schema/PharmacySpecialty.java +++ b/src/main/java/org/schema/PharmacySpecialty.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected PharmacySpecialty() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PharmacySpecialty pharmacySpecialty = (PharmacySpecialty) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Photograph.java b/src/main/java/org/schema/Photograph.java index 29f30418..811e970b 100644 --- a/src/main/java/org/schema/Photograph.java +++ b/src/main/java/org/schema/Photograph.java @@ -1146,7 +1146,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String schemaVersion; @@ -1363,4 +1363,18 @@ public interface Builder extends ThingBuilder { protected Photograph(String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Photograph photograph = (Photograph) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PhotographAction.java b/src/main/java/org/schema/PhotographAction.java index e35a4e6a..6dcbe4db 100644 --- a/src/main/java/org/schema/PhotographAction.java +++ b/src/main/java/org/schema/PhotographAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected PhotographAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PhotographAction photographAction = (PhotographAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PhysicalActivity.java b/src/main/java/org/schema/PhysicalActivity.java index 55ebb87c..13dfe9a7 100644 --- a/src/main/java/org/schema/PhysicalActivity.java +++ b/src/main/java/org/schema/PhysicalActivity.java @@ -495,7 +495,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy associatedAnatomy; @@ -580,6 +580,28 @@ protected PhysicalActivity(AnatomicalStructureOrAnatomicalSystemOrSuperficialAna myEpidemiology = epidemiology; myPathophysiology = pathophysiology; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAssociatedAnatomy != null ? myAssociatedAnatomy.hashCode() : 0); + result = 31 * result + (myCategory != null ? myCategory.hashCode() : 0); + result = 31 * result + (myEpidemiology != null ? myEpidemiology.hashCode() : 0); + result = 31 * result + (myPathophysiology != null ? myPathophysiology.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PhysicalActivity physicalActivity = (PhysicalActivity) o; + if (!super.equals(o)) return false; + if (myAssociatedAnatomy != null ? !myAssociatedAnatomy.equals(physicalActivity.myAssociatedAnatomy) : physicalActivity.myAssociatedAnatomy != null) return false; + if (myCategory != null ? !myCategory.equals(physicalActivity.myCategory) : physicalActivity.myCategory != null) return false; + if (myEpidemiology != null ? !myEpidemiology.equals(physicalActivity.myEpidemiology) : physicalActivity.myEpidemiology != null) return false; + if (myPathophysiology != null ? !myPathophysiology.equals(physicalActivity.myPathophysiology) : physicalActivity.myPathophysiology != null) return false; + return true; + } + private AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy myAssociatedAnatomy; private PhysicalActivityCategoryOrStringOrThing myCategory; private String myEpidemiology; diff --git a/src/main/java/org/schema/PhysicalActivityCategory.java b/src/main/java/org/schema/PhysicalActivityCategory.java index 27330514..2ddc1154 100644 --- a/src/main/java/org/schema/PhysicalActivityCategory.java +++ b/src/main/java/org/schema/PhysicalActivityCategory.java @@ -247,7 +247,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -283,4 +283,18 @@ public interface Builder extends ThingBuilder { protected PhysicalActivityCategory(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PhysicalActivityCategory physicalActivityCategory = (PhysicalActivityCategory) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PhysicalActivityCategoryOrStringOrThing.java b/src/main/java/org/schema/PhysicalActivityCategoryOrStringOrThing.java index bd2e929a..aa252b46 100644 --- a/src/main/java/org/schema/PhysicalActivityCategoryOrStringOrThing.java +++ b/src/main/java/org/schema/PhysicalActivityCategoryOrStringOrThing.java @@ -44,4 +44,23 @@ private void clear() { myString = null; myThing = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myPhysicalActivityCategory != null ? myPhysicalActivityCategory.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + result = 31 * result + (myThing != null ? myThing.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PhysicalActivityCategoryOrStringOrThing physicalActivityCategoryOrStringOrThing = (PhysicalActivityCategoryOrStringOrThing) o; + if (myPhysicalActivityCategory != null ? !myPhysicalActivityCategory.equals(physicalActivityCategoryOrStringOrThing.myPhysicalActivityCategory) : physicalActivityCategoryOrStringOrThing.myPhysicalActivityCategory != null) return false; + if (myString != null ? !myString.equals(physicalActivityCategoryOrStringOrThing.myString) : physicalActivityCategoryOrStringOrThing.myString != null) return false; + if (myThing != null ? !myThing.equals(physicalActivityCategoryOrStringOrThing.myThing) : physicalActivityCategoryOrStringOrThing.myThing != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PhysicalExam.java b/src/main/java/org/schema/PhysicalExam.java index 82f60033..012145f9 100644 --- a/src/main/java/org/schema/PhysicalExam.java +++ b/src/main/java/org/schema/PhysicalExam.java @@ -247,7 +247,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -283,4 +283,18 @@ public interface Builder extends ThingBuilder { protected PhysicalExam(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PhysicalExam physicalExam = (PhysicalExam) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PhysicalTherapy.java b/src/main/java/org/schema/PhysicalTherapy.java index e0a6f959..0efac85d 100644 --- a/src/main/java/org/schema/PhysicalTherapy.java +++ b/src/main/java/org/schema/PhysicalTherapy.java @@ -371,7 +371,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalEntity adverseOutcome; @@ -435,4 +435,18 @@ public interface Builder extends ThingBuilder { protected PhysicalTherapy(MedicalEntity adverseOutcome, MedicalContraindication contraindication, MedicalTherapy duplicateTherapy, MedicalIndication indication, MedicalEntity seriousAdverseOutcome, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(adverseOutcome, contraindication, duplicateTherapy, indication, seriousAdverseOutcome, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PhysicalTherapy physicalTherapy = (PhysicalTherapy) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Physician.java b/src/main/java/org/schema/Physician.java index 512754fe..69581b50 100644 --- a/src/main/java/org/schema/Physician.java +++ b/src/main/java/org/schema/Physician.java @@ -597,7 +597,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalProcedureOrMedicalTestOrMedicalTherapy availableService; @@ -702,6 +702,26 @@ protected Physician(MedicalProcedureOrMedicalTestOrMedicalTherapy availableServi myHospitalAffiliation = hospitalAffiliation; myMedicalSpecialty = medicalSpecialty; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAvailableService != null ? myAvailableService.hashCode() : 0); + result = 31 * result + (myHospitalAffiliation != null ? myHospitalAffiliation.hashCode() : 0); + result = 31 * result + (myMedicalSpecialty != null ? myMedicalSpecialty.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Physician physician = (Physician) o; + if (!super.equals(o)) return false; + if (myAvailableService != null ? !myAvailableService.equals(physician.myAvailableService) : physician.myAvailableService != null) return false; + if (myHospitalAffiliation != null ? !myHospitalAffiliation.equals(physician.myHospitalAffiliation) : physician.myHospitalAffiliation != null) return false; + if (myMedicalSpecialty != null ? !myMedicalSpecialty.equals(physician.myMedicalSpecialty) : physician.myMedicalSpecialty != null) return false; + return true; + } + private MedicalProcedureOrMedicalTestOrMedicalTherapy myAvailableService; private Hospital myHospitalAffiliation; private MedicalSpecialty myMedicalSpecialty; diff --git a/src/main/java/org/schema/Physiotherapy.java b/src/main/java/org/schema/Physiotherapy.java index 46d81d29..350b5012 100644 --- a/src/main/java/org/schema/Physiotherapy.java +++ b/src/main/java/org/schema/Physiotherapy.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Physiotherapy() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Physiotherapy physiotherapy = (Physiotherapy) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Place.java b/src/main/java/org/schema/Place.java index e0a5119d..5c646e73 100644 --- a/src/main/java/org/schema/Place.java +++ b/src/main/java/org/schema/Place.java @@ -553,7 +553,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -646,6 +646,50 @@ protected Place(PostalAddress address, AggregateRating aggregateRating, Place co myTelephone = telephone; myAdditionalProperty = additionalProperty; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAddress != null ? myAddress.hashCode() : 0); + result = 31 * result + (myAggregateRating != null ? myAggregateRating.hashCode() : 0); + result = 31 * result + (myContainedIn != null ? myContainedIn.hashCode() : 0); + result = 31 * result + (myEvent != null ? myEvent.hashCode() : 0); + result = 31 * result + (myFaxNumber != null ? myFaxNumber.hashCode() : 0); + result = 31 * result + (myGeo != null ? myGeo.hashCode() : 0); + result = 31 * result + (myGlobalLocationNumber != null ? myGlobalLocationNumber.hashCode() : 0); + result = 31 * result + (myIsicV4 != null ? myIsicV4.hashCode() : 0); + result = 31 * result + (myLogo != null ? myLogo.hashCode() : 0); + result = 31 * result + (myHasMap != null ? myHasMap.hashCode() : 0); + result = 31 * result + (myOpeningHoursSpecification != null ? myOpeningHoursSpecification.hashCode() : 0); + result = 31 * result + (myPhoto != null ? myPhoto.hashCode() : 0); + result = 31 * result + (myReview != null ? myReview.hashCode() : 0); + result = 31 * result + (myTelephone != null ? myTelephone.hashCode() : 0); + result = 31 * result + (myAdditionalProperty != null ? myAdditionalProperty.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Place place = (Place) o; + if (!super.equals(o)) return false; + if (myAddress != null ? !myAddress.equals(place.myAddress) : place.myAddress != null) return false; + if (myAggregateRating != null ? !myAggregateRating.equals(place.myAggregateRating) : place.myAggregateRating != null) return false; + if (myContainedIn != null ? !myContainedIn.equals(place.myContainedIn) : place.myContainedIn != null) return false; + if (myEvent != null ? !myEvent.equals(place.myEvent) : place.myEvent != null) return false; + if (myFaxNumber != null ? !myFaxNumber.equals(place.myFaxNumber) : place.myFaxNumber != null) return false; + if (myGeo != null ? !myGeo.equals(place.myGeo) : place.myGeo != null) return false; + if (myGlobalLocationNumber != null ? !myGlobalLocationNumber.equals(place.myGlobalLocationNumber) : place.myGlobalLocationNumber != null) return false; + if (myIsicV4 != null ? !myIsicV4.equals(place.myIsicV4) : place.myIsicV4 != null) return false; + if (myLogo != null ? !myLogo.equals(place.myLogo) : place.myLogo != null) return false; + if (myHasMap != null ? !myHasMap.equals(place.myHasMap) : place.myHasMap != null) return false; + if (myOpeningHoursSpecification != null ? !myOpeningHoursSpecification.equals(place.myOpeningHoursSpecification) : place.myOpeningHoursSpecification != null) return false; + if (myPhoto != null ? !myPhoto.equals(place.myPhoto) : place.myPhoto != null) return false; + if (myReview != null ? !myReview.equals(place.myReview) : place.myReview != null) return false; + if (myTelephone != null ? !myTelephone.equals(place.myTelephone) : place.myTelephone != null) return false; + if (myAdditionalProperty != null ? !myAdditionalProperty.equals(place.myAdditionalProperty) : place.myAdditionalProperty != null) return false; + return true; + } + private PostalAddress myAddress; private AggregateRating myAggregateRating; private Place myContainedIn; diff --git a/src/main/java/org/schema/PlaceOfWorship.java b/src/main/java/org/schema/PlaceOfWorship.java index b0f582df..8d79b00a 100644 --- a/src/main/java/org/schema/PlaceOfWorship.java +++ b/src/main/java/org/schema/PlaceOfWorship.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected PlaceOfWorship(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PlaceOfWorship placeOfWorship = (PlaceOfWorship) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PlaceOrPostalAddressOrString.java b/src/main/java/org/schema/PlaceOrPostalAddressOrString.java index 2f883843..22e62284 100644 --- a/src/main/java/org/schema/PlaceOrPostalAddressOrString.java +++ b/src/main/java/org/schema/PlaceOrPostalAddressOrString.java @@ -44,4 +44,23 @@ private void clear() { myPostalAddress = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myPlace != null ? myPlace.hashCode() : 0); + result = 31 * result + (myPostalAddress != null ? myPostalAddress.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PlaceOrPostalAddressOrString placeOrPostalAddressOrString = (PlaceOrPostalAddressOrString) o; + if (myPlace != null ? !myPlace.equals(placeOrPostalAddressOrString.myPlace) : placeOrPostalAddressOrString.myPlace != null) return false; + if (myPostalAddress != null ? !myPostalAddress.equals(placeOrPostalAddressOrString.myPostalAddress) : placeOrPostalAddressOrString.myPostalAddress != null) return false; + if (myString != null ? !myString.equals(placeOrPostalAddressOrString.myString) : placeOrPostalAddressOrString.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PlaceboControlledTrial.java b/src/main/java/org/schema/PlaceboControlledTrial.java index 40b7e530..06cdeef9 100644 --- a/src/main/java/org/schema/PlaceboControlledTrial.java +++ b/src/main/java/org/schema/PlaceboControlledTrial.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected PlaceboControlledTrial() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PlaceboControlledTrial placeboControlledTrial = (PlaceboControlledTrial) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PlanAction.java b/src/main/java/org/schema/PlanAction.java index d2ab16fe..f43b19ac 100644 --- a/src/main/java/org/schema/PlanAction.java +++ b/src/main/java/org/schema/PlanAction.java @@ -323,7 +323,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private java.util.Date scheduledTime; @@ -375,5 +375,21 @@ protected PlanAction(java.util.Date scheduledTime, OrganizationOrPerson agent, j super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myScheduledTime = scheduledTime; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myScheduledTime != null ? myScheduledTime.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PlanAction planAction = (PlanAction) o; + if (!super.equals(o)) return false; + if (myScheduledTime != null ? !myScheduledTime.equals(planAction.myScheduledTime) : planAction.myScheduledTime != null) return false; + return true; + } + private java.util.Date myScheduledTime; } diff --git a/src/main/java/org/schema/PlasticSurgery.java b/src/main/java/org/schema/PlasticSurgery.java index 1565292c..cee4b7ce 100644 --- a/src/main/java/org/schema/PlasticSurgery.java +++ b/src/main/java/org/schema/PlasticSurgery.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected PlasticSurgery() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PlasticSurgery plasticSurgery = (PlasticSurgery) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PlayAction.java b/src/main/java/org/schema/PlayAction.java index b5c4862a..8f738daf 100644 --- a/src/main/java/org/schema/PlayAction.java +++ b/src/main/java/org/schema/PlayAction.java @@ -348,7 +348,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Audience audience; @@ -405,6 +405,24 @@ protected PlayAction(Audience audience, Event event, OrganizationOrPerson agent, myAudience = audience; myEvent = event; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAudience != null ? myAudience.hashCode() : 0); + result = 31 * result + (myEvent != null ? myEvent.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PlayAction playAction = (PlayAction) o; + if (!super.equals(o)) return false; + if (myAudience != null ? !myAudience.equals(playAction.myAudience) : playAction.myAudience != null) return false; + if (myEvent != null ? !myEvent.equals(playAction.myEvent) : playAction.myEvent != null) return false; + return true; + } + private Audience myAudience; private Event myEvent; } diff --git a/src/main/java/org/schema/Playground.java b/src/main/java/org/schema/Playground.java index 9c7570d2..cfdbb51c 100644 --- a/src/main/java/org/schema/Playground.java +++ b/src/main/java/org/schema/Playground.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected Playground(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Playground playground = (Playground) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Plumber.java b/src/main/java/org/schema/Plumber.java index 7a00b560..8fc00dd7 100644 --- a/src/main/java/org/schema/Plumber.java +++ b/src/main/java/org/schema/Plumber.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected Plumber(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Plumber plumber = (Plumber) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Podiatric.java b/src/main/java/org/schema/Podiatric.java index 38e3e827..3f6c644c 100644 --- a/src/main/java/org/schema/Podiatric.java +++ b/src/main/java/org/schema/Podiatric.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Podiatric() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Podiatric podiatric = (Podiatric) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PoliceStation.java b/src/main/java/org/schema/PoliceStation.java index bf31eb12..d52caf20 100644 --- a/src/main/java/org/schema/PoliceStation.java +++ b/src/main/java/org/schema/PoliceStation.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected PoliceStation(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PoliceStation policeStation = (PoliceStation) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Pond.java b/src/main/java/org/schema/Pond.java index 7c718a0a..c49c3546 100644 --- a/src/main/java/org/schema/Pond.java +++ b/src/main/java/org/schema/Pond.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected Pond(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Pond pond = (Pond) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PostOffice.java b/src/main/java/org/schema/PostOffice.java index 1e97bd83..0f90caae 100644 --- a/src/main/java/org/schema/PostOffice.java +++ b/src/main/java/org/schema/PostOffice.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected PostOffice(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PostOffice postOffice = (PostOffice) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PostalAddress.java b/src/main/java/org/schema/PostalAddress.java index 428f6c4f..6fd43169 100644 --- a/src/main/java/org/schema/PostalAddress.java +++ b/src/main/java/org/schema/PostalAddress.java @@ -418,7 +418,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Country addressCountry; @@ -492,6 +492,32 @@ protected PostalAddress(Country addressCountry, String addressLocality, String a myPostOfficeBoxNumber = postOfficeBoxNumber; myStreetAddress = streetAddress; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAddressCountry != null ? myAddressCountry.hashCode() : 0); + result = 31 * result + (myAddressLocality != null ? myAddressLocality.hashCode() : 0); + result = 31 * result + (myAddressRegion != null ? myAddressRegion.hashCode() : 0); + result = 31 * result + (myPostalCode != null ? myPostalCode.hashCode() : 0); + result = 31 * result + (myPostOfficeBoxNumber != null ? myPostOfficeBoxNumber.hashCode() : 0); + result = 31 * result + (myStreetAddress != null ? myStreetAddress.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PostalAddress postalAddress = (PostalAddress) o; + if (!super.equals(o)) return false; + if (myAddressCountry != null ? !myAddressCountry.equals(postalAddress.myAddressCountry) : postalAddress.myAddressCountry != null) return false; + if (myAddressLocality != null ? !myAddressLocality.equals(postalAddress.myAddressLocality) : postalAddress.myAddressLocality != null) return false; + if (myAddressRegion != null ? !myAddressRegion.equals(postalAddress.myAddressRegion) : postalAddress.myAddressRegion != null) return false; + if (myPostalCode != null ? !myPostalCode.equals(postalAddress.myPostalCode) : postalAddress.myPostalCode != null) return false; + if (myPostOfficeBoxNumber != null ? !myPostOfficeBoxNumber.equals(postalAddress.myPostOfficeBoxNumber) : postalAddress.myPostOfficeBoxNumber != null) return false; + if (myStreetAddress != null ? !myStreetAddress.equals(postalAddress.myStreetAddress) : postalAddress.myStreetAddress != null) return false; + return true; + } + private Country myAddressCountry; private String myAddressLocality; private String myAddressRegion; diff --git a/src/main/java/org/schema/PotentialActionStatus.java b/src/main/java/org/schema/PotentialActionStatus.java index f189f063..72947a8c 100644 --- a/src/main/java/org/schema/PotentialActionStatus.java +++ b/src/main/java/org/schema/PotentialActionStatus.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected PotentialActionStatus() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PotentialActionStatus potentialActionStatus = (PotentialActionStatus) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PreOrder.java b/src/main/java/org/schema/PreOrder.java index 58310ec0..2593497f 100644 --- a/src/main/java/org/schema/PreOrder.java +++ b/src/main/java/org/schema/PreOrder.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected PreOrder() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PreOrder preOrder = (PreOrder) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PrependAction.java b/src/main/java/org/schema/PrependAction.java index 5bbf52a9..6d0607cf 100644 --- a/src/main/java/org/schema/PrependAction.java +++ b/src/main/java/org/schema/PrependAction.java @@ -336,7 +336,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Place toLocation; @@ -391,4 +391,18 @@ public interface Builder extends ThingBuilder { protected PrependAction(Place toLocation, Thing targetCollection, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(toLocation, targetCollection, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PrependAction prependAction = (PrependAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Preschool.java b/src/main/java/org/schema/Preschool.java index 2e34bb50..16a63d3d 100644 --- a/src/main/java/org/schema/Preschool.java +++ b/src/main/java/org/schema/Preschool.java @@ -674,7 +674,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person alumni; @@ -800,4 +800,18 @@ public interface Builder extends ThingBuilder { protected Preschool(Person alumni, PostalAddress address, AggregateRating aggregateRating, String award, BrandOrOrganization brand, ContactPoint contactPoint, Organization department, String duns, String email, Person employee, Event event, String faxNumber, Person founder, java.util.Date dissolutionDate, java.util.Date foundingDate, String globalLocationNumber, Place hasPOS, String isicV4, String legalName, ImageObjectOrString logo, Offer makesOffer, OrganizationOrPerson member, OrganizationOrProgramMembership memberOf, String naics, QuantitativeValue numberOfEmployees, OwnershipInfoOrProduct owns, Review review, Demand seeks, Organization subOrganization, String taxID, String telephone, String vatID, Place foundingLocation, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(alumni, address, aggregateRating, award, brand, contactPoint, department, duns, email, employee, event, faxNumber, founder, dissolutionDate, foundingDate, globalLocationNumber, hasPOS, isicV4, legalName, logo, makesOffer, member, memberOf, naics, numberOfEmployees, owns, review, seeks, subOrganization, taxID, telephone, vatID, foundingLocation, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Preschool preschool = (Preschool) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PrescriptionOnly.java b/src/main/java/org/schema/PrescriptionOnly.java index f15ae791..eb8344f9 100644 --- a/src/main/java/org/schema/PrescriptionOnly.java +++ b/src/main/java/org/schema/PrescriptionOnly.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected PrescriptionOnly() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PrescriptionOnly prescriptionOnly = (PrescriptionOnly) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PreventionIndication.java b/src/main/java/org/schema/PreventionIndication.java index 61ba1767..9362bcab 100644 --- a/src/main/java/org/schema/PreventionIndication.java +++ b/src/main/java/org/schema/PreventionIndication.java @@ -301,7 +301,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalCode code; @@ -350,4 +350,18 @@ public interface Builder extends ThingBuilder { protected PreventionIndication(MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PreventionIndication preventionIndication = (PreventionIndication) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PriceSpecification.java b/src/main/java/org/schema/PriceSpecification.java index 821e1884..95af5c78 100644 --- a/src/main/java/org/schema/PriceSpecification.java +++ b/src/main/java/org/schema/PriceSpecification.java @@ -74,7 +74,7 @@ public Number getMinPrice() { */ - public NumberOrString getPrice() { + public Number getPrice() { return myPrice; } /** @@ -242,9 +242,93 @@ public PriceSpecification build() { */ - @NotNull public Builder price(@NotNull Number number) { - if (this.price == null) this.price = new NumberOrString(); - this.price.setNumber(number); + @NotNull public Builder price(@NotNull Integer integer) { + if (this.price == null) this.price = new Number(); + this.price.setInteger(integer); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Long price) { + if (this.price == null) this.price = new Number(); + this.price.setLong(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Float price) { + if (this.price == null) this.price = new Number(); + this.price.setFloat(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Double price) { + if (this.price == null) this.price = new Number(); + this.price.setDouble(price); return this; } /** @@ -271,7 +355,7 @@ public PriceSpecification build() { */ @NotNull public Builder price(@NotNull String price) { - if (this.price == null) this.price = new NumberOrString(); + if (this.price == null) this.price = new Number(); this.price.setString(price); return this; } @@ -486,7 +570,10 @@ public Builder id(long id) { if ("minPrice".equals(key) && value instanceof Float) { minPrice((Float)value); continue; } if ("minPrice".equals(key) && value instanceof Double) { minPrice((Double)value); continue; } if ("minPrice".equals(key) && value instanceof String) { minPrice((String)value); continue; } - if ("price".equals(key) && value instanceof Number) { price((Number)value); continue; } + if ("price".equals(key) && value instanceof Integer) { price((Integer)value); continue; } + if ("price".equals(key) && value instanceof Long) { price((Long)value); continue; } + if ("price".equals(key) && value instanceof Float) { price((Float)value); continue; } + if ("price".equals(key) && value instanceof Double) { price((Double)value); continue; } if ("price".equals(key) && value instanceof String) { price((String)value); continue; } if ("validFrom".equals(key) && value instanceof java.util.Date) { validFrom((java.util.Date)value); continue; } if ("validThrough".equals(key) && value instanceof java.util.Date) { validThrough((java.util.Date)value); continue; } @@ -501,14 +588,14 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private QuantitativeValue eligibleQuantity; private PriceSpecification eligibleTransactionVolume; private Number maxPrice; private Number minPrice; - private NumberOrString price; + private Number price; private java.util.Date validFrom; private java.util.Date validThrough; private Boolean valueAddedTaxIncluded; @@ -538,7 +625,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder minPrice(@NotNull Float minPrice); @NotNull Builder minPrice(@NotNull Double minPrice); @NotNull Builder minPrice(@NotNull String minPrice); - @NotNull Builder price(@NotNull Number number); + @NotNull Builder price(@NotNull Integer integer); + @NotNull Builder price(@NotNull Long price); + @NotNull Builder price(@NotNull Float price); + @NotNull Builder price(@NotNull Double price); @NotNull Builder price(@NotNull String price); @NotNull Builder validFrom(@NotNull java.util.Date date); @NotNull Builder validThrough(@NotNull java.util.Date date); @@ -558,7 +648,7 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected PriceSpecification(QuantitativeValue eligibleQuantity, PriceSpecification eligibleTransactionVolume, Number maxPrice, Number minPrice, NumberOrString price, java.util.Date validFrom, java.util.Date validThrough, Boolean valueAddedTaxIncluded, String priceCurrency, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected PriceSpecification(QuantitativeValue eligibleQuantity, PriceSpecification eligibleTransactionVolume, Number maxPrice, Number minPrice, Number price, java.util.Date validFrom, java.util.Date validThrough, Boolean valueAddedTaxIncluded, String priceCurrency, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myEligibleQuantity = eligibleQuantity; myEligibleTransactionVolume = eligibleTransactionVolume; @@ -570,11 +660,43 @@ protected PriceSpecification(QuantitativeValue eligibleQuantity, PriceSpecificat myValueAddedTaxIncluded = valueAddedTaxIncluded; myPriceCurrency = priceCurrency; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myEligibleQuantity != null ? myEligibleQuantity.hashCode() : 0); + result = 31 * result + (myEligibleTransactionVolume != null ? myEligibleTransactionVolume.hashCode() : 0); + result = 31 * result + (myMaxPrice != null ? myMaxPrice.hashCode() : 0); + result = 31 * result + (myMinPrice != null ? myMinPrice.hashCode() : 0); + result = 31 * result + (myPrice != null ? myPrice.hashCode() : 0); + result = 31 * result + (myValidFrom != null ? myValidFrom.hashCode() : 0); + result = 31 * result + (myValidThrough != null ? myValidThrough.hashCode() : 0); + result = 31 * result + (myValueAddedTaxIncluded != null ? myValueAddedTaxIncluded.hashCode() : 0); + result = 31 * result + (myPriceCurrency != null ? myPriceCurrency.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PriceSpecification priceSpecification = (PriceSpecification) o; + if (!super.equals(o)) return false; + if (myEligibleQuantity != null ? !myEligibleQuantity.equals(priceSpecification.myEligibleQuantity) : priceSpecification.myEligibleQuantity != null) return false; + if (myEligibleTransactionVolume != null ? !myEligibleTransactionVolume.equals(priceSpecification.myEligibleTransactionVolume) : priceSpecification.myEligibleTransactionVolume != null) return false; + if (myMaxPrice != null ? !myMaxPrice.equals(priceSpecification.myMaxPrice) : priceSpecification.myMaxPrice != null) return false; + if (myMinPrice != null ? !myMinPrice.equals(priceSpecification.myMinPrice) : priceSpecification.myMinPrice != null) return false; + if (myPrice != null ? !myPrice.equals(priceSpecification.myPrice) : priceSpecification.myPrice != null) return false; + if (myValidFrom != null ? !myValidFrom.equals(priceSpecification.myValidFrom) : priceSpecification.myValidFrom != null) return false; + if (myValidThrough != null ? !myValidThrough.equals(priceSpecification.myValidThrough) : priceSpecification.myValidThrough != null) return false; + if (myValueAddedTaxIncluded != null ? !myValueAddedTaxIncluded.equals(priceSpecification.myValueAddedTaxIncluded) : priceSpecification.myValueAddedTaxIncluded != null) return false; + if (myPriceCurrency != null ? !myPriceCurrency.equals(priceSpecification.myPriceCurrency) : priceSpecification.myPriceCurrency != null) return false; + return true; + } + private QuantitativeValue myEligibleQuantity; private PriceSpecification myEligibleTransactionVolume; private Number myMaxPrice; private Number myMinPrice; - private NumberOrString myPrice; + private Number myPrice; private java.util.Date myValidFrom; private java.util.Date myValidThrough; private Boolean myValueAddedTaxIncluded; diff --git a/src/main/java/org/schema/PrimaryCare.java b/src/main/java/org/schema/PrimaryCare.java index a0d9c193..119aa387 100644 --- a/src/main/java/org/schema/PrimaryCare.java +++ b/src/main/java/org/schema/PrimaryCare.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected PrimaryCare() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PrimaryCare primaryCare = (PrimaryCare) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Prion.java b/src/main/java/org/schema/Prion.java index fa4be239..3447d9e3 100644 --- a/src/main/java/org/schema/Prion.java +++ b/src/main/java/org/schema/Prion.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Prion() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Prion prion = (Prion) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Product.java b/src/main/java/org/schema/Product.java index 89703587..b18b8ef1 100644 --- a/src/main/java/org/schema/Product.java +++ b/src/main/java/org/schema/Product.java @@ -886,7 +886,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -1042,6 +1042,82 @@ protected Product(AggregateRating aggregateRating, Audience audience, String awa myProductionDate = productionDate; myPurchaseDate = purchaseDate; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAggregateRating != null ? myAggregateRating.hashCode() : 0); + result = 31 * result + (myAudience != null ? myAudience.hashCode() : 0); + result = 31 * result + (myAward != null ? myAward.hashCode() : 0); + result = 31 * result + (myBrand != null ? myBrand.hashCode() : 0); + result = 31 * result + (myCategory != null ? myCategory.hashCode() : 0); + result = 31 * result + (myColor != null ? myColor.hashCode() : 0); + result = 31 * result + (myDepth != null ? myDepth.hashCode() : 0); + result = 31 * result + (myGtin12 != null ? myGtin12.hashCode() : 0); + result = 31 * result + (myGtin13 != null ? myGtin13.hashCode() : 0); + result = 31 * result + (myGtin14 != null ? myGtin14.hashCode() : 0); + result = 31 * result + (myGtin8 != null ? myGtin8.hashCode() : 0); + result = 31 * result + (myHeight != null ? myHeight.hashCode() : 0); + result = 31 * result + (myIsAccessoryOrSparePartFor != null ? myIsAccessoryOrSparePartFor.hashCode() : 0); + result = 31 * result + (myIsConsumableFor != null ? myIsConsumableFor.hashCode() : 0); + result = 31 * result + (myIsRelatedTo != null ? myIsRelatedTo.hashCode() : 0); + result = 31 * result + (myIsSimilarTo != null ? myIsSimilarTo.hashCode() : 0); + result = 31 * result + (myItemCondition != null ? myItemCondition.hashCode() : 0); + result = 31 * result + (myLogo != null ? myLogo.hashCode() : 0); + result = 31 * result + (myManufacturer != null ? myManufacturer.hashCode() : 0); + result = 31 * result + (myModel != null ? myModel.hashCode() : 0); + result = 31 * result + (myMpn != null ? myMpn.hashCode() : 0); + result = 31 * result + (myOffers != null ? myOffers.hashCode() : 0); + result = 31 * result + (myProductID != null ? myProductID.hashCode() : 0); + result = 31 * result + (myReleaseDate != null ? myReleaseDate.hashCode() : 0); + result = 31 * result + (myReview != null ? myReview.hashCode() : 0); + result = 31 * result + (mySku != null ? mySku.hashCode() : 0); + result = 31 * result + (myWeight != null ? myWeight.hashCode() : 0); + result = 31 * result + (myWidth != null ? myWidth.hashCode() : 0); + result = 31 * result + (myAdditionalProperty != null ? myAdditionalProperty.hashCode() : 0); + result = 31 * result + (myProductionDate != null ? myProductionDate.hashCode() : 0); + result = 31 * result + (myPurchaseDate != null ? myPurchaseDate.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Product product = (Product) o; + if (!super.equals(o)) return false; + if (myAggregateRating != null ? !myAggregateRating.equals(product.myAggregateRating) : product.myAggregateRating != null) return false; + if (myAudience != null ? !myAudience.equals(product.myAudience) : product.myAudience != null) return false; + if (myAward != null ? !myAward.equals(product.myAward) : product.myAward != null) return false; + if (myBrand != null ? !myBrand.equals(product.myBrand) : product.myBrand != null) return false; + if (myCategory != null ? !myCategory.equals(product.myCategory) : product.myCategory != null) return false; + if (myColor != null ? !myColor.equals(product.myColor) : product.myColor != null) return false; + if (myDepth != null ? !myDepth.equals(product.myDepth) : product.myDepth != null) return false; + if (myGtin12 != null ? !myGtin12.equals(product.myGtin12) : product.myGtin12 != null) return false; + if (myGtin13 != null ? !myGtin13.equals(product.myGtin13) : product.myGtin13 != null) return false; + if (myGtin14 != null ? !myGtin14.equals(product.myGtin14) : product.myGtin14 != null) return false; + if (myGtin8 != null ? !myGtin8.equals(product.myGtin8) : product.myGtin8 != null) return false; + if (myHeight != null ? !myHeight.equals(product.myHeight) : product.myHeight != null) return false; + if (myIsAccessoryOrSparePartFor != null ? !myIsAccessoryOrSparePartFor.equals(product.myIsAccessoryOrSparePartFor) : product.myIsAccessoryOrSparePartFor != null) return false; + if (myIsConsumableFor != null ? !myIsConsumableFor.equals(product.myIsConsumableFor) : product.myIsConsumableFor != null) return false; + if (myIsRelatedTo != null ? !myIsRelatedTo.equals(product.myIsRelatedTo) : product.myIsRelatedTo != null) return false; + if (myIsSimilarTo != null ? !myIsSimilarTo.equals(product.myIsSimilarTo) : product.myIsSimilarTo != null) return false; + if (myItemCondition != null ? !myItemCondition.equals(product.myItemCondition) : product.myItemCondition != null) return false; + if (myLogo != null ? !myLogo.equals(product.myLogo) : product.myLogo != null) return false; + if (myManufacturer != null ? !myManufacturer.equals(product.myManufacturer) : product.myManufacturer != null) return false; + if (myModel != null ? !myModel.equals(product.myModel) : product.myModel != null) return false; + if (myMpn != null ? !myMpn.equals(product.myMpn) : product.myMpn != null) return false; + if (myOffers != null ? !myOffers.equals(product.myOffers) : product.myOffers != null) return false; + if (myProductID != null ? !myProductID.equals(product.myProductID) : product.myProductID != null) return false; + if (myReleaseDate != null ? !myReleaseDate.equals(product.myReleaseDate) : product.myReleaseDate != null) return false; + if (myReview != null ? !myReview.equals(product.myReview) : product.myReview != null) return false; + if (mySku != null ? !mySku.equals(product.mySku) : product.mySku != null) return false; + if (myWeight != null ? !myWeight.equals(product.myWeight) : product.myWeight != null) return false; + if (myWidth != null ? !myWidth.equals(product.myWidth) : product.myWidth != null) return false; + if (myAdditionalProperty != null ? !myAdditionalProperty.equals(product.myAdditionalProperty) : product.myAdditionalProperty != null) return false; + if (myProductionDate != null ? !myProductionDate.equals(product.myProductionDate) : product.myProductionDate != null) return false; + if (myPurchaseDate != null ? !myPurchaseDate.equals(product.myPurchaseDate) : product.myPurchaseDate != null) return false; + return true; + } + private AggregateRating myAggregateRating; private Audience myAudience; private String myAward; diff --git a/src/main/java/org/schema/ProductModel.java b/src/main/java/org/schema/ProductModel.java index f882d50f..9517025a 100644 --- a/src/main/java/org/schema/ProductModel.java +++ b/src/main/java/org/schema/ProductModel.java @@ -754,7 +754,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private ProductModel isVariantOf; @@ -891,6 +891,26 @@ protected ProductModel(ProductModel isVariantOf, ProductModel predecessorOf, Pro myPredecessorOf = predecessorOf; mySuccessorOf = successorOf; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myIsVariantOf != null ? myIsVariantOf.hashCode() : 0); + result = 31 * result + (myPredecessorOf != null ? myPredecessorOf.hashCode() : 0); + result = 31 * result + (mySuccessorOf != null ? mySuccessorOf.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ProductModel productModel = (ProductModel) o; + if (!super.equals(o)) return false; + if (myIsVariantOf != null ? !myIsVariantOf.equals(productModel.myIsVariantOf) : productModel.myIsVariantOf != null) return false; + if (myPredecessorOf != null ? !myPredecessorOf.equals(productModel.myPredecessorOf) : productModel.myPredecessorOf != null) return false; + if (mySuccessorOf != null ? !mySuccessorOf.equals(productModel.mySuccessorOf) : productModel.mySuccessorOf != null) return false; + return true; + } + private ProductModel myIsVariantOf; private ProductModel myPredecessorOf; private ProductModel mySuccessorOf; diff --git a/src/main/java/org/schema/ProductModelOrString.java b/src/main/java/org/schema/ProductModelOrString.java index 4c720874..179be3a5 100644 --- a/src/main/java/org/schema/ProductModelOrString.java +++ b/src/main/java/org/schema/ProductModelOrString.java @@ -39,4 +39,21 @@ private void clear() { myProductModel = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myProductModel != null ? myProductModel.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ProductModelOrString productModelOrString = (ProductModelOrString) o; + if (myProductModel != null ? !myProductModel.equals(productModelOrString.myProductModel) : productModelOrString.myProductModel != null) return false; + if (myString != null ? !myString.equals(productModelOrString.myString) : productModelOrString.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ProductOrString.java b/src/main/java/org/schema/ProductOrString.java index e99b3bef..f7a5e1a4 100644 --- a/src/main/java/org/schema/ProductOrString.java +++ b/src/main/java/org/schema/ProductOrString.java @@ -39,4 +39,21 @@ private void clear() { myProduct = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myProduct != null ? myProduct.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ProductOrString productOrString = (ProductOrString) o; + if (myProduct != null ? !myProduct.equals(productOrString.myProduct) : productOrString.myProduct != null) return false; + if (myString != null ? !myString.equals(productOrString.myString) : productOrString.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ProfessionalService.java b/src/main/java/org/schema/ProfessionalService.java index 7bfd9d68..b5565120 100644 --- a/src/main/java/org/schema/ProfessionalService.java +++ b/src/main/java/org/schema/ProfessionalService.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected ProfessionalService(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ProfessionalService professionalService = (ProfessionalService) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ProfilePage.java b/src/main/java/org/schema/ProfilePage.java index 932c5fdf..ab0dc0b2 100644 --- a/src/main/java/org/schema/ProfilePage.java +++ b/src/main/java/org/schema/ProfilePage.java @@ -1266,7 +1266,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BreadcrumbListOrString breadcrumb; @@ -1507,4 +1507,18 @@ public interface Builder extends ThingBuilder { protected ProfilePage(BreadcrumbListOrString breadcrumb, java.util.Date lastReviewed, WebPageElement mainContentOfPage, ImageObject primaryImageOfPage, String relatedLink, OrganizationOrPerson reviewedBy, String significantLink, Specialty specialty, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(breadcrumb, lastReviewed, mainContentOfPage, primaryImageOfPage, relatedLink, reviewedBy, significantLink, specialty, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ProfilePage profilePage = (ProfilePage) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ProgramMembership.java b/src/main/java/org/schema/ProgramMembership.java index 20c5ddba..09419c2c 100644 --- a/src/main/java/org/schema/ProgramMembership.java +++ b/src/main/java/org/schema/ProgramMembership.java @@ -264,7 +264,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String membershipNumber; @@ -305,6 +305,26 @@ protected ProgramMembership(String membershipNumber, String programName, Organiz myProgramName = programName; myHostingOrganization = hostingOrganization; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myMembershipNumber != null ? myMembershipNumber.hashCode() : 0); + result = 31 * result + (myProgramName != null ? myProgramName.hashCode() : 0); + result = 31 * result + (myHostingOrganization != null ? myHostingOrganization.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ProgramMembership programMembership = (ProgramMembership) o; + if (!super.equals(o)) return false; + if (myMembershipNumber != null ? !myMembershipNumber.equals(programMembership.myMembershipNumber) : programMembership.myMembershipNumber != null) return false; + if (myProgramName != null ? !myProgramName.equals(programMembership.myProgramName) : programMembership.myProgramName != null) return false; + if (myHostingOrganization != null ? !myHostingOrganization.equals(programMembership.myHostingOrganization) : programMembership.myHostingOrganization != null) return false; + return true; + } + private String myMembershipNumber; private String myProgramName; private Organization myHostingOrganization; diff --git a/src/main/java/org/schema/Project.java b/src/main/java/org/schema/Project.java index 9b1a9312..99d25ec8 100644 --- a/src/main/java/org/schema/Project.java +++ b/src/main/java/org/schema/Project.java @@ -216,7 +216,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String additionalType; @@ -247,4 +247,18 @@ public interface Builder extends ThingBuilder { protected Project(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Project project = (Project) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Property.java b/src/main/java/org/schema/Property.java index 7e011abd..55eefce2 100644 --- a/src/main/java/org/schema/Property.java +++ b/src/main/java/org/schema/Property.java @@ -272,7 +272,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Property inverseOf; @@ -313,6 +313,24 @@ protected Property(Property inverseOf, EnumerationOrProperty supersededBy, Strin myInverseOf = inverseOf; mySupersededBy = supersededBy; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myInverseOf != null ? myInverseOf.hashCode() : 0); + result = 31 * result + (mySupersededBy != null ? mySupersededBy.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Property property = (Property) o; + if (!super.equals(o)) return false; + if (myInverseOf != null ? !myInverseOf.equals(property.myInverseOf) : property.myInverseOf != null) return false; + if (mySupersededBy != null ? !mySupersededBy.equals(property.mySupersededBy) : property.mySupersededBy != null) return false; + return true; + } + private Property myInverseOf; private EnumerationOrProperty mySupersededBy; } diff --git a/src/main/java/org/schema/PropertyValue.java b/src/main/java/org/schema/PropertyValue.java index 2b5aea1b..326b985c 100644 --- a/src/main/java/org/schema/PropertyValue.java +++ b/src/main/java/org/schema/PropertyValue.java @@ -45,7 +45,7 @@ public String getUnitCode() { /** * The value of the quantitative value or property value node. For QuantitativeValue, the recommended type for values is 'Number'. For PropertyValue, it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'. */ - public BooleanOrNumberOrStringOrStructuredValue getValue() { + public Number getValue() { return myValue; } /** @@ -130,40 +130,42 @@ public PropertyValue build() { /** * The value of the quantitative value or property value node. For QuantitativeValue, the recommended type for values is 'Number'. For PropertyValue, it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'. */ - @NotNull public Builder value(@NotNull Boolean value) { - if (this.value == null) this.value = new BooleanOrNumberOrStringOrStructuredValue(); - this.value.setBoolean(value); + @NotNull public Builder value(@NotNull Integer integer) { + if (this.value == null) this.value = new Number(); + this.value.setInteger(integer); return this; } /** * The value of the quantitative value or property value node. For QuantitativeValue, the recommended type for values is 'Number'. For PropertyValue, it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'. */ - @NotNull public Builder value(@NotNull Number number) { - if (this.value == null) this.value = new BooleanOrNumberOrStringOrStructuredValue(); - this.value.setNumber(number); + @NotNull public Builder value(@NotNull Long value) { + if (this.value == null) this.value = new Number(); + this.value.setLong(value); return this; } /** * The value of the quantitative value or property value node. For QuantitativeValue, the recommended type for values is 'Number'. For PropertyValue, it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'. */ - @NotNull public Builder value(@NotNull String value) { - if (this.value == null) this.value = new BooleanOrNumberOrStringOrStructuredValue(); - this.value.setString(value); + @NotNull public Builder value(@NotNull Float value) { + if (this.value == null) this.value = new Number(); + this.value.setFloat(value); return this; } /** * The value of the quantitative value or property value node. For QuantitativeValue, the recommended type for values is 'Number'. For PropertyValue, it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'. */ - @NotNull public Builder value(@NotNull StructuredValue structuredValue) { - if (this.value == null) this.value = new BooleanOrNumberOrStringOrStructuredValue(); - this.value.setStructuredValue(structuredValue); + @NotNull public Builder value(@NotNull Double value) { + if (this.value == null) this.value = new Number(); + this.value.setDouble(value); return this; } /** * The value of the quantitative value or property value node. For QuantitativeValue, the recommended type for values is 'Number'. For PropertyValue, it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'. */ - @NotNull public Builder value(@NotNull StructuredValue.Builder structuredValue) { - return this.value(structuredValue.build()); + @NotNull public Builder value(@NotNull String value) { + if (this.value == null) this.value = new Number(); + this.value.setString(value); + return this; } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. @@ -430,10 +432,11 @@ public Builder id(long id) { if ("minValue".equals(key) && value instanceof Double) { minValue((Double)value); continue; } if ("minValue".equals(key) && value instanceof String) { minValue((String)value); continue; } if ("unitCode".equals(key) && value instanceof String) { unitCode((String)value); continue; } - if ("value".equals(key) && value instanceof Boolean) { value((Boolean)value); continue; } - if ("value".equals(key) && value instanceof Number) { value((Number)value); continue; } + if ("value".equals(key) && value instanceof Integer) { value((Integer)value); continue; } + if ("value".equals(key) && value instanceof Long) { value((Long)value); continue; } + if ("value".equals(key) && value instanceof Float) { value((Float)value); continue; } + if ("value".equals(key) && value instanceof Double) { value((Double)value); continue; } if ("value".equals(key) && value instanceof String) { value((String)value); continue; } - if ("value".equals(key) && value instanceof StructuredValue) { value((StructuredValue)value); continue; } if ("valueReference".equals(key) && value instanceof Enumeration) { valueReference((Enumeration)value); continue; } if ("valueReference".equals(key) && value instanceof PropertyValue) { valueReference((PropertyValue)value); continue; } if ("valueReference".equals(key) && value instanceof QualitativeValue) { valueReference((QualitativeValue)value); continue; } @@ -450,12 +453,12 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Number minValue; private String unitCode; - private BooleanOrNumberOrStringOrStructuredValue value; + private Number value; private EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue valueReference; private String unitText; private String propertyID; @@ -476,11 +479,11 @@ public interface Builder extends ThingBuilder { @NotNull Builder minValue(@NotNull Double minValue); @NotNull Builder minValue(@NotNull String minValue); @NotNull Builder unitCode(@NotNull String unitCode); - @NotNull Builder value(@NotNull Boolean value); - @NotNull Builder value(@NotNull Number number); + @NotNull Builder value(@NotNull Integer integer); + @NotNull Builder value(@NotNull Long value); + @NotNull Builder value(@NotNull Float value); + @NotNull Builder value(@NotNull Double value); @NotNull Builder value(@NotNull String value); - @NotNull Builder value(@NotNull StructuredValue structuredValue); - @NotNull Builder value(@NotNull StructuredValue.Builder structuredValue); @NotNull Builder valueReference(@NotNull Enumeration enumeration); @NotNull Builder valueReference(@NotNull Enumeration.Builder enumeration); @NotNull Builder valueReference(@NotNull PropertyValue propertyValue); @@ -507,7 +510,7 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected PropertyValue(Number minValue, String unitCode, BooleanOrNumberOrStringOrStructuredValue value, EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue valueReference, String unitText, String propertyID, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected PropertyValue(Number minValue, String unitCode, Number value, EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue valueReference, String unitText, String propertyID, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myMinValue = minValue; myUnitCode = unitCode; @@ -516,9 +519,35 @@ protected PropertyValue(Number minValue, String unitCode, BooleanOrNumberOrStrin myUnitText = unitText; myPropertyID = propertyID; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myMinValue != null ? myMinValue.hashCode() : 0); + result = 31 * result + (myUnitCode != null ? myUnitCode.hashCode() : 0); + result = 31 * result + (myValue != null ? myValue.hashCode() : 0); + result = 31 * result + (myValueReference != null ? myValueReference.hashCode() : 0); + result = 31 * result + (myUnitText != null ? myUnitText.hashCode() : 0); + result = 31 * result + (myPropertyID != null ? myPropertyID.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PropertyValue propertyValue = (PropertyValue) o; + if (!super.equals(o)) return false; + if (myMinValue != null ? !myMinValue.equals(propertyValue.myMinValue) : propertyValue.myMinValue != null) return false; + if (myUnitCode != null ? !myUnitCode.equals(propertyValue.myUnitCode) : propertyValue.myUnitCode != null) return false; + if (myValue != null ? !myValue.equals(propertyValue.myValue) : propertyValue.myValue != null) return false; + if (myValueReference != null ? !myValueReference.equals(propertyValue.myValueReference) : propertyValue.myValueReference != null) return false; + if (myUnitText != null ? !myUnitText.equals(propertyValue.myUnitText) : propertyValue.myUnitText != null) return false; + if (myPropertyID != null ? !myPropertyID.equals(propertyValue.myPropertyID) : propertyValue.myPropertyID != null) return false; + return true; + } + private Number myMinValue; private String myUnitCode; - private BooleanOrNumberOrStringOrStructuredValue myValue; + private Number myValue; private EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue myValueReference; private String myUnitText; private String myPropertyID; diff --git a/src/main/java/org/schema/PropertyValueOrString.java b/src/main/java/org/schema/PropertyValueOrString.java index a809b92d..c247d333 100644 --- a/src/main/java/org/schema/PropertyValueOrString.java +++ b/src/main/java/org/schema/PropertyValueOrString.java @@ -39,4 +39,21 @@ private void clear() { myPropertyValue = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myPropertyValue != null ? myPropertyValue.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PropertyValueOrString propertyValueOrString = (PropertyValueOrString) o; + if (myPropertyValue != null ? !myPropertyValue.equals(propertyValueOrString.myPropertyValue) : propertyValueOrString.myPropertyValue != null) return false; + if (myString != null ? !myString.equals(propertyValueOrString.myString) : propertyValueOrString.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PropertyValueSpecification.java b/src/main/java/org/schema/PropertyValueSpecification.java index 104fb5eb..5ef714d7 100644 --- a/src/main/java/org/schema/PropertyValueSpecification.java +++ b/src/main/java/org/schema/PropertyValueSpecification.java @@ -521,7 +521,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Number minValue; @@ -600,6 +600,40 @@ protected PropertyValueSpecification(Number minValue, String valueName, Boolean myValuePattern = valuePattern; myStepValue = stepValue; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myMinValue != null ? myMinValue.hashCode() : 0); + result = 31 * result + (myValueName != null ? myValueName.hashCode() : 0); + result = 31 * result + (myValueRequired != null ? myValueRequired.hashCode() : 0); + result = 31 * result + (myDefaultValue != null ? myDefaultValue.hashCode() : 0); + result = 31 * result + (myReadonlyValue != null ? myReadonlyValue.hashCode() : 0); + result = 31 * result + (myMultipleValues != null ? myMultipleValues.hashCode() : 0); + result = 31 * result + (myValueMinLength != null ? myValueMinLength.hashCode() : 0); + result = 31 * result + (myValueMaxLength != null ? myValueMaxLength.hashCode() : 0); + result = 31 * result + (myValuePattern != null ? myValuePattern.hashCode() : 0); + result = 31 * result + (myStepValue != null ? myStepValue.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PropertyValueSpecification propertyValueSpecification = (PropertyValueSpecification) o; + if (!super.equals(o)) return false; + if (myMinValue != null ? !myMinValue.equals(propertyValueSpecification.myMinValue) : propertyValueSpecification.myMinValue != null) return false; + if (myValueName != null ? !myValueName.equals(propertyValueSpecification.myValueName) : propertyValueSpecification.myValueName != null) return false; + if (myValueRequired != null ? !myValueRequired.equals(propertyValueSpecification.myValueRequired) : propertyValueSpecification.myValueRequired != null) return false; + if (myDefaultValue != null ? !myDefaultValue.equals(propertyValueSpecification.myDefaultValue) : propertyValueSpecification.myDefaultValue != null) return false; + if (myReadonlyValue != null ? !myReadonlyValue.equals(propertyValueSpecification.myReadonlyValue) : propertyValueSpecification.myReadonlyValue != null) return false; + if (myMultipleValues != null ? !myMultipleValues.equals(propertyValueSpecification.myMultipleValues) : propertyValueSpecification.myMultipleValues != null) return false; + if (myValueMinLength != null ? !myValueMinLength.equals(propertyValueSpecification.myValueMinLength) : propertyValueSpecification.myValueMinLength != null) return false; + if (myValueMaxLength != null ? !myValueMaxLength.equals(propertyValueSpecification.myValueMaxLength) : propertyValueSpecification.myValueMaxLength != null) return false; + if (myValuePattern != null ? !myValuePattern.equals(propertyValueSpecification.myValuePattern) : propertyValueSpecification.myValuePattern != null) return false; + if (myStepValue != null ? !myStepValue.equals(propertyValueSpecification.myStepValue) : propertyValueSpecification.myStepValue != null) return false; + return true; + } + private Number myMinValue; private String myValueName; private Boolean myValueRequired; diff --git a/src/main/java/org/schema/Protozoa.java b/src/main/java/org/schema/Protozoa.java index 28d6fcf9..a1d849d0 100644 --- a/src/main/java/org/schema/Protozoa.java +++ b/src/main/java/org/schema/Protozoa.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Protozoa() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Protozoa protozoa = (Protozoa) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Psychiatric.java b/src/main/java/org/schema/Psychiatric.java index 06291598..06c7e71c 100644 --- a/src/main/java/org/schema/Psychiatric.java +++ b/src/main/java/org/schema/Psychiatric.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Psychiatric() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Psychiatric psychiatric = (Psychiatric) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PsychologicalTreatment.java b/src/main/java/org/schema/PsychologicalTreatment.java index ee3950df..c904c05d 100644 --- a/src/main/java/org/schema/PsychologicalTreatment.java +++ b/src/main/java/org/schema/PsychologicalTreatment.java @@ -371,7 +371,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalEntity adverseOutcome; @@ -435,4 +435,18 @@ public interface Builder extends ThingBuilder { protected PsychologicalTreatment(MedicalEntity adverseOutcome, MedicalContraindication contraindication, MedicalTherapy duplicateTherapy, MedicalIndication indication, MedicalEntity seriousAdverseOutcome, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(adverseOutcome, contraindication, duplicateTherapy, indication, seriousAdverseOutcome, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PsychologicalTreatment psychologicalTreatment = (PsychologicalTreatment) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PublicHealth.java b/src/main/java/org/schema/PublicHealth.java index 4a7a8a10..88195b55 100644 --- a/src/main/java/org/schema/PublicHealth.java +++ b/src/main/java/org/schema/PublicHealth.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected PublicHealth() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PublicHealth publicHealth = (PublicHealth) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PublicSwimmingPool.java b/src/main/java/org/schema/PublicSwimmingPool.java index 209c0823..3df2fd24 100644 --- a/src/main/java/org/schema/PublicSwimmingPool.java +++ b/src/main/java/org/schema/PublicSwimmingPool.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected PublicSwimmingPool(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PublicSwimmingPool publicSwimmingPool = (PublicSwimmingPool) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/PublicationEvent.java b/src/main/java/org/schema/PublicationEvent.java index 77b598eb..6f4b58aa 100644 --- a/src/main/java/org/schema/PublicationEvent.java +++ b/src/main/java/org/schema/PublicationEvent.java @@ -530,7 +530,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Boolean isAccessibleForFree; @@ -624,6 +624,24 @@ protected PublicationEvent(Boolean isAccessibleForFree, BroadcastService publish myIsAccessibleForFree = isAccessibleForFree; myPublishedOn = publishedOn; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myIsAccessibleForFree != null ? myIsAccessibleForFree.hashCode() : 0); + result = 31 * result + (myPublishedOn != null ? myPublishedOn.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PublicationEvent publicationEvent = (PublicationEvent) o; + if (!super.equals(o)) return false; + if (myIsAccessibleForFree != null ? !myIsAccessibleForFree.equals(publicationEvent.myIsAccessibleForFree) : publicationEvent.myIsAccessibleForFree != null) return false; + if (myPublishedOn != null ? !myPublishedOn.equals(publicationEvent.myPublishedOn) : publicationEvent.myPublishedOn != null) return false; + return true; + } + private Boolean myIsAccessibleForFree; private BroadcastService myPublishedOn; } diff --git a/src/main/java/org/schema/PublicationIssue.java b/src/main/java/org/schema/PublicationIssue.java index 9b13928a..f1520a0c 100644 --- a/src/main/java/org/schema/PublicationIssue.java +++ b/src/main/java/org/schema/PublicationIssue.java @@ -1236,7 +1236,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private IntegerOrString issueNumber; @@ -1468,6 +1468,28 @@ protected PublicationIssue(IntegerOrString issueNumber, IntegerOrString pageEnd, myPageStart = pageStart; myPagination = pagination; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myIssueNumber != null ? myIssueNumber.hashCode() : 0); + result = 31 * result + (myPageEnd != null ? myPageEnd.hashCode() : 0); + result = 31 * result + (myPageStart != null ? myPageStart.hashCode() : 0); + result = 31 * result + (myPagination != null ? myPagination.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PublicationIssue publicationIssue = (PublicationIssue) o; + if (!super.equals(o)) return false; + if (myIssueNumber != null ? !myIssueNumber.equals(publicationIssue.myIssueNumber) : publicationIssue.myIssueNumber != null) return false; + if (myPageEnd != null ? !myPageEnd.equals(publicationIssue.myPageEnd) : publicationIssue.myPageEnd != null) return false; + if (myPageStart != null ? !myPageStart.equals(publicationIssue.myPageStart) : publicationIssue.myPageStart != null) return false; + if (myPagination != null ? !myPagination.equals(publicationIssue.myPagination) : publicationIssue.myPagination != null) return false; + return true; + } + private IntegerOrString myIssueNumber; private IntegerOrString myPageEnd; private IntegerOrString myPageStart; diff --git a/src/main/java/org/schema/PublicationVolume.java b/src/main/java/org/schema/PublicationVolume.java index 18370e52..f452bc26 100644 --- a/src/main/java/org/schema/PublicationVolume.java +++ b/src/main/java/org/schema/PublicationVolume.java @@ -1235,7 +1235,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private IntegerOrString pageEnd; @@ -1467,6 +1467,28 @@ protected PublicationVolume(IntegerOrString pageEnd, IntegerOrString pageStart, myPagination = pagination; myVolumeNumber = volumeNumber; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myPageEnd != null ? myPageEnd.hashCode() : 0); + result = 31 * result + (myPageStart != null ? myPageStart.hashCode() : 0); + result = 31 * result + (myPagination != null ? myPagination.hashCode() : 0); + result = 31 * result + (myVolumeNumber != null ? myVolumeNumber.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + PublicationVolume publicationVolume = (PublicationVolume) o; + if (!super.equals(o)) return false; + if (myPageEnd != null ? !myPageEnd.equals(publicationVolume.myPageEnd) : publicationVolume.myPageEnd != null) return false; + if (myPageStart != null ? !myPageStart.equals(publicationVolume.myPageStart) : publicationVolume.myPageStart != null) return false; + if (myPagination != null ? !myPagination.equals(publicationVolume.myPagination) : publicationVolume.myPagination != null) return false; + if (myVolumeNumber != null ? !myVolumeNumber.equals(publicationVolume.myVolumeNumber) : publicationVolume.myVolumeNumber != null) return false; + return true; + } + private IntegerOrString myPageEnd; private IntegerOrString myPageStart; private String myPagination; diff --git a/src/main/java/org/schema/Pulmonary.java b/src/main/java/org/schema/Pulmonary.java index f484a1dd..3955dc80 100644 --- a/src/main/java/org/schema/Pulmonary.java +++ b/src/main/java/org/schema/Pulmonary.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Pulmonary() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Pulmonary pulmonary = (Pulmonary) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/QAPage.java b/src/main/java/org/schema/QAPage.java index 3f190b6f..1d81ff41 100644 --- a/src/main/java/org/schema/QAPage.java +++ b/src/main/java/org/schema/QAPage.java @@ -1266,7 +1266,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BreadcrumbListOrString breadcrumb; @@ -1507,4 +1507,18 @@ public interface Builder extends ThingBuilder { protected QAPage(BreadcrumbListOrString breadcrumb, java.util.Date lastReviewed, WebPageElement mainContentOfPage, ImageObject primaryImageOfPage, String relatedLink, OrganizationOrPerson reviewedBy, String significantLink, Specialty specialty, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(breadcrumb, lastReviewed, mainContentOfPage, primaryImageOfPage, relatedLink, reviewedBy, significantLink, specialty, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + QAPage qAPage = (QAPage) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/QualitativeValue.java b/src/main/java/org/schema/QualitativeValue.java index 003d4b7c..05ea37a5 100644 --- a/src/main/java/org/schema/QualitativeValue.java +++ b/src/main/java/org/schema/QualitativeValue.java @@ -477,7 +477,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private QualitativeValue equal; @@ -553,6 +553,36 @@ protected QualitativeValue(QualitativeValue equal, QualitativeValue greater, Qua myValueReference = valueReference; myAdditionalProperty = additionalProperty; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myEqual != null ? myEqual.hashCode() : 0); + result = 31 * result + (myGreater != null ? myGreater.hashCode() : 0); + result = 31 * result + (myGreaterOrEqual != null ? myGreaterOrEqual.hashCode() : 0); + result = 31 * result + (myLesser != null ? myLesser.hashCode() : 0); + result = 31 * result + (myLesserOrEqual != null ? myLesserOrEqual.hashCode() : 0); + result = 31 * result + (myNonEqual != null ? myNonEqual.hashCode() : 0); + result = 31 * result + (myValueReference != null ? myValueReference.hashCode() : 0); + result = 31 * result + (myAdditionalProperty != null ? myAdditionalProperty.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + QualitativeValue qualitativeValue = (QualitativeValue) o; + if (!super.equals(o)) return false; + if (myEqual != null ? !myEqual.equals(qualitativeValue.myEqual) : qualitativeValue.myEqual != null) return false; + if (myGreater != null ? !myGreater.equals(qualitativeValue.myGreater) : qualitativeValue.myGreater != null) return false; + if (myGreaterOrEqual != null ? !myGreaterOrEqual.equals(qualitativeValue.myGreaterOrEqual) : qualitativeValue.myGreaterOrEqual != null) return false; + if (myLesser != null ? !myLesser.equals(qualitativeValue.myLesser) : qualitativeValue.myLesser != null) return false; + if (myLesserOrEqual != null ? !myLesserOrEqual.equals(qualitativeValue.myLesserOrEqual) : qualitativeValue.myLesserOrEqual != null) return false; + if (myNonEqual != null ? !myNonEqual.equals(qualitativeValue.myNonEqual) : qualitativeValue.myNonEqual != null) return false; + if (myValueReference != null ? !myValueReference.equals(qualitativeValue.myValueReference) : qualitativeValue.myValueReference != null) return false; + if (myAdditionalProperty != null ? !myAdditionalProperty.equals(qualitativeValue.myAdditionalProperty) : qualitativeValue.myAdditionalProperty != null) return false; + return true; + } + private QualitativeValue myEqual; private QualitativeValue myGreater; private QualitativeValue myGreaterOrEqual; diff --git a/src/main/java/org/schema/QualitativeValueOrString.java b/src/main/java/org/schema/QualitativeValueOrString.java index 48269086..ef808d38 100644 --- a/src/main/java/org/schema/QualitativeValueOrString.java +++ b/src/main/java/org/schema/QualitativeValueOrString.java @@ -39,4 +39,21 @@ private void clear() { myQualitativeValue = null; myString = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myQualitativeValue != null ? myQualitativeValue.hashCode() : 0); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + QualitativeValueOrString qualitativeValueOrString = (QualitativeValueOrString) o; + if (myQualitativeValue != null ? !myQualitativeValue.equals(qualitativeValueOrString.myQualitativeValue) : qualitativeValueOrString.myQualitativeValue != null) return false; + if (myString != null ? !myString.equals(qualitativeValueOrString.myString) : qualitativeValueOrString.myString != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/QuantitativeValue.java b/src/main/java/org/schema/QuantitativeValue.java index ec5a95a8..43ccedce 100644 --- a/src/main/java/org/schema/QuantitativeValue.java +++ b/src/main/java/org/schema/QuantitativeValue.java @@ -48,7 +48,7 @@ public String getUnitCode() { /** * The value of the quantitative value or property value node. For QuantitativeValue, the recommended type for values is 'Number'. For PropertyValue, it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'. */ - public BooleanOrNumberOrStringOrStructuredValue getValue() { + public Number getValue() { return myValue; } /** @@ -173,40 +173,42 @@ public QuantitativeValue build() { /** * The value of the quantitative value or property value node. For QuantitativeValue, the recommended type for values is 'Number'. For PropertyValue, it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'. */ - @NotNull public Builder value(@NotNull Boolean value) { - if (this.value == null) this.value = new BooleanOrNumberOrStringOrStructuredValue(); - this.value.setBoolean(value); + @NotNull public Builder value(@NotNull Integer integer) { + if (this.value == null) this.value = new Number(); + this.value.setInteger(integer); return this; } /** * The value of the quantitative value or property value node. For QuantitativeValue, the recommended type for values is 'Number'. For PropertyValue, it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'. */ - @NotNull public Builder value(@NotNull Number number) { - if (this.value == null) this.value = new BooleanOrNumberOrStringOrStructuredValue(); - this.value.setNumber(number); + @NotNull public Builder value(@NotNull Long value) { + if (this.value == null) this.value = new Number(); + this.value.setLong(value); return this; } /** * The value of the quantitative value or property value node. For QuantitativeValue, the recommended type for values is 'Number'. For PropertyValue, it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'. */ - @NotNull public Builder value(@NotNull String value) { - if (this.value == null) this.value = new BooleanOrNumberOrStringOrStructuredValue(); - this.value.setString(value); + @NotNull public Builder value(@NotNull Float value) { + if (this.value == null) this.value = new Number(); + this.value.setFloat(value); return this; } /** * The value of the quantitative value or property value node. For QuantitativeValue, the recommended type for values is 'Number'. For PropertyValue, it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'. */ - @NotNull public Builder value(@NotNull StructuredValue structuredValue) { - if (this.value == null) this.value = new BooleanOrNumberOrStringOrStructuredValue(); - this.value.setStructuredValue(structuredValue); + @NotNull public Builder value(@NotNull Double value) { + if (this.value == null) this.value = new Number(); + this.value.setDouble(value); return this; } /** * The value of the quantitative value or property value node. For QuantitativeValue, the recommended type for values is 'Number'. For PropertyValue, it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'. */ - @NotNull public Builder value(@NotNull StructuredValue.Builder structuredValue) { - return this.value(structuredValue.build()); + @NotNull public Builder value(@NotNull String value) { + if (this.value == null) this.value = new Number(); + this.value.setString(value); + return this; } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. @@ -487,10 +489,11 @@ public Builder id(long id) { if ("minValue".equals(key) && value instanceof Double) { minValue((Double)value); continue; } if ("minValue".equals(key) && value instanceof String) { minValue((String)value); continue; } if ("unitCode".equals(key) && value instanceof String) { unitCode((String)value); continue; } - if ("value".equals(key) && value instanceof Boolean) { value((Boolean)value); continue; } - if ("value".equals(key) && value instanceof Number) { value((Number)value); continue; } + if ("value".equals(key) && value instanceof Integer) { value((Integer)value); continue; } + if ("value".equals(key) && value instanceof Long) { value((Long)value); continue; } + if ("value".equals(key) && value instanceof Float) { value((Float)value); continue; } + if ("value".equals(key) && value instanceof Double) { value((Double)value); continue; } if ("value".equals(key) && value instanceof String) { value((String)value); continue; } - if ("value".equals(key) && value instanceof StructuredValue) { value((StructuredValue)value); continue; } if ("valueReference".equals(key) && value instanceof Enumeration) { valueReference((Enumeration)value); continue; } if ("valueReference".equals(key) && value instanceof PropertyValue) { valueReference((PropertyValue)value); continue; } if ("valueReference".equals(key) && value instanceof QualitativeValue) { valueReference((QualitativeValue)value); continue; } @@ -507,13 +510,13 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Number maxValue; private Number minValue; private String unitCode; - private BooleanOrNumberOrStringOrStructuredValue value; + private Number value; private EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue valueReference; private PropertyValue additionalProperty; private String unitText; @@ -539,11 +542,11 @@ public interface Builder extends ThingBuilder { @NotNull Builder minValue(@NotNull Double minValue); @NotNull Builder minValue(@NotNull String minValue); @NotNull Builder unitCode(@NotNull String unitCode); - @NotNull Builder value(@NotNull Boolean value); - @NotNull Builder value(@NotNull Number number); + @NotNull Builder value(@NotNull Integer integer); + @NotNull Builder value(@NotNull Long value); + @NotNull Builder value(@NotNull Float value); + @NotNull Builder value(@NotNull Double value); @NotNull Builder value(@NotNull String value); - @NotNull Builder value(@NotNull StructuredValue structuredValue); - @NotNull Builder value(@NotNull StructuredValue.Builder structuredValue); @NotNull Builder valueReference(@NotNull Enumeration enumeration); @NotNull Builder valueReference(@NotNull Enumeration.Builder enumeration); @NotNull Builder valueReference(@NotNull PropertyValue propertyValue); @@ -571,7 +574,7 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected QuantitativeValue(Number maxValue, Number minValue, String unitCode, BooleanOrNumberOrStringOrStructuredValue value, EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue valueReference, PropertyValue additionalProperty, String unitText, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected QuantitativeValue(Number maxValue, Number minValue, String unitCode, Number value, EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue valueReference, PropertyValue additionalProperty, String unitText, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myMaxValue = maxValue; myMinValue = minValue; @@ -581,10 +584,38 @@ protected QuantitativeValue(Number maxValue, Number minValue, String unitCode, B myAdditionalProperty = additionalProperty; myUnitText = unitText; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myMaxValue != null ? myMaxValue.hashCode() : 0); + result = 31 * result + (myMinValue != null ? myMinValue.hashCode() : 0); + result = 31 * result + (myUnitCode != null ? myUnitCode.hashCode() : 0); + result = 31 * result + (myValue != null ? myValue.hashCode() : 0); + result = 31 * result + (myValueReference != null ? myValueReference.hashCode() : 0); + result = 31 * result + (myAdditionalProperty != null ? myAdditionalProperty.hashCode() : 0); + result = 31 * result + (myUnitText != null ? myUnitText.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + QuantitativeValue quantitativeValue = (QuantitativeValue) o; + if (!super.equals(o)) return false; + if (myMaxValue != null ? !myMaxValue.equals(quantitativeValue.myMaxValue) : quantitativeValue.myMaxValue != null) return false; + if (myMinValue != null ? !myMinValue.equals(quantitativeValue.myMinValue) : quantitativeValue.myMinValue != null) return false; + if (myUnitCode != null ? !myUnitCode.equals(quantitativeValue.myUnitCode) : quantitativeValue.myUnitCode != null) return false; + if (myValue != null ? !myValue.equals(quantitativeValue.myValue) : quantitativeValue.myValue != null) return false; + if (myValueReference != null ? !myValueReference.equals(quantitativeValue.myValueReference) : quantitativeValue.myValueReference != null) return false; + if (myAdditionalProperty != null ? !myAdditionalProperty.equals(quantitativeValue.myAdditionalProperty) : quantitativeValue.myAdditionalProperty != null) return false; + if (myUnitText != null ? !myUnitText.equals(quantitativeValue.myUnitText) : quantitativeValue.myUnitText != null) return false; + return true; + } + private Number myMaxValue; private Number myMinValue; private String myUnitCode; - private BooleanOrNumberOrStringOrStructuredValue myValue; + private Number myValue; private EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue myValueReference; private PropertyValue myAdditionalProperty; private String myUnitText; diff --git a/src/main/java/org/schema/Quantity.java b/src/main/java/org/schema/Quantity.java index 5817a76e..32d55453 100644 --- a/src/main/java/org/schema/Quantity.java +++ b/src/main/java/org/schema/Quantity.java @@ -216,7 +216,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String additionalType; @@ -247,4 +247,18 @@ public interface Builder extends ThingBuilder { protected Quantity(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Quantity quantity = (Quantity) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Question.java b/src/main/java/org/schema/Question.java index 92295f52..63382171 100644 --- a/src/main/java/org/schema/Question.java +++ b/src/main/java/org/schema/Question.java @@ -1223,7 +1223,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Integer upvoteCount; @@ -1456,6 +1456,30 @@ protected Question(Integer upvoteCount, Integer downvoteCount, Integer answerCou myAcceptedAnswer = acceptedAnswer; mySuggestedAnswer = suggestedAnswer; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myUpvoteCount != null ? myUpvoteCount.hashCode() : 0); + result = 31 * result + (myDownvoteCount != null ? myDownvoteCount.hashCode() : 0); + result = 31 * result + (myAnswerCount != null ? myAnswerCount.hashCode() : 0); + result = 31 * result + (myAcceptedAnswer != null ? myAcceptedAnswer.hashCode() : 0); + result = 31 * result + (mySuggestedAnswer != null ? mySuggestedAnswer.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Question question = (Question) o; + if (!super.equals(o)) return false; + if (myUpvoteCount != null ? !myUpvoteCount.equals(question.myUpvoteCount) : question.myUpvoteCount != null) return false; + if (myDownvoteCount != null ? !myDownvoteCount.equals(question.myDownvoteCount) : question.myDownvoteCount != null) return false; + if (myAnswerCount != null ? !myAnswerCount.equals(question.myAnswerCount) : question.myAnswerCount != null) return false; + if (myAcceptedAnswer != null ? !myAcceptedAnswer.equals(question.myAcceptedAnswer) : question.myAcceptedAnswer != null) return false; + if (mySuggestedAnswer != null ? !mySuggestedAnswer.equals(question.mySuggestedAnswer) : question.mySuggestedAnswer != null) return false; + return true; + } + private Integer myUpvoteCount; private Integer myDownvoteCount; private Integer myAnswerCount; diff --git a/src/main/java/org/schema/QuoteAction.java b/src/main/java/org/schema/QuoteAction.java index 738ddf2e..12b252d6 100644 --- a/src/main/java/org/schema/QuoteAction.java +++ b/src/main/java/org/schema/QuoteAction.java @@ -59,9 +59,93 @@ public QuoteAction build() { */ - @NotNull public Builder price(@NotNull Number number) { - if (this.price == null) this.price = new NumberOrString(); - this.price.setNumber(number); + @NotNull public Builder price(@NotNull Integer integer) { + if (this.price == null) this.price = new Number(); + this.price.setInteger(integer); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Long price) { + if (this.price == null) this.price = new Number(); + this.price.setLong(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Float price) { + if (this.price == null) this.price = new Number(); + this.price.setFloat(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Double price) { + if (this.price == null) this.price = new Number(); + this.price.setDouble(price); return this; } /** @@ -88,7 +172,7 @@ public QuoteAction build() { */ @NotNull public Builder price(@NotNull String price) { - if (this.price == null) this.price = new NumberOrString(); + if (this.price == null) this.price = new Number(); this.price.setString(price); return this; } @@ -361,7 +445,10 @@ public Builder id(long id) { final String key = entry.getKey(); Object value = entry.getValue(); if (value instanceof java.util.Map) { value = ThingDeserializer.fromMap((java.util.Map)value); } - if ("price".equals(key) && value instanceof Number) { price((Number)value); continue; } + if ("price".equals(key) && value instanceof Integer) { price((Integer)value); continue; } + if ("price".equals(key) && value instanceof Long) { price((Long)value); continue; } + if ("price".equals(key) && value instanceof Float) { price((Float)value); continue; } + if ("price".equals(key) && value instanceof Double) { price((Double)value); continue; } if ("price".equals(key) && value instanceof String) { price((String)value); continue; } if ("priceSpecification".equals(key) && value instanceof PriceSpecification) { priceSpecification((PriceSpecification)value); continue; } if ("agent".equals(key) && value instanceof Organization) { agent((Organization)value); continue; } @@ -380,10 +467,10 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } - private NumberOrString price; + private Number price; private PriceSpecification priceSpecification; private OrganizationOrPerson agent; private java.util.Date endTime; @@ -402,7 +489,10 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - @NotNull Builder price(@NotNull Number number); + @NotNull Builder price(@NotNull Integer integer); + @NotNull Builder price(@NotNull Long price); + @NotNull Builder price(@NotNull Float price); + @NotNull Builder price(@NotNull Double price); @NotNull Builder price(@NotNull String price); @NotNull Builder priceSpecification(@NotNull PriceSpecification priceSpecification); @NotNull Builder priceSpecification(@NotNull PriceSpecification.Builder priceSpecification); @@ -432,7 +522,21 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected QuoteAction(NumberOrString price, PriceSpecification priceSpecification, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected QuoteAction(Number price, PriceSpecification priceSpecification, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(price, priceSpecification, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + QuoteAction quoteAction = (QuoteAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RNews.java b/src/main/java/org/schema/RNews.java index 32aa9d66..a2fdb699 100644 --- a/src/main/java/org/schema/RNews.java +++ b/src/main/java/org/schema/RNews.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected RNews() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RNews rNews = (RNews) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RVPark.java b/src/main/java/org/schema/RVPark.java index 70b902ac..df04a83d 100644 --- a/src/main/java/org/schema/RVPark.java +++ b/src/main/java/org/schema/RVPark.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected RVPark(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RVPark rVPark = (RVPark) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RadiationTherapy.java b/src/main/java/org/schema/RadiationTherapy.java index 543b1277..37cb0261 100644 --- a/src/main/java/org/schema/RadiationTherapy.java +++ b/src/main/java/org/schema/RadiationTherapy.java @@ -371,7 +371,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalEntity adverseOutcome; @@ -435,4 +435,18 @@ public interface Builder extends ThingBuilder { protected RadiationTherapy(MedicalEntity adverseOutcome, MedicalContraindication contraindication, MedicalTherapy duplicateTherapy, MedicalIndication indication, MedicalEntity seriousAdverseOutcome, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(adverseOutcome, contraindication, duplicateTherapy, indication, seriousAdverseOutcome, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RadiationTherapy radiationTherapy = (RadiationTherapy) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RadioChannel.java b/src/main/java/org/schema/RadioChannel.java index e91914e7..1e4d5159 100644 --- a/src/main/java/org/schema/RadioChannel.java +++ b/src/main/java/org/schema/RadioChannel.java @@ -260,7 +260,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String broadcastChannelId; @@ -301,4 +301,18 @@ public interface Builder extends ThingBuilder { protected RadioChannel(String broadcastChannelId, CableOrSatelliteService inBroadcastLineup, String broadcastServiceTier, BroadcastService providesBroadcastService, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(broadcastChannelId, inBroadcastLineup, broadcastServiceTier, providesBroadcastService, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RadioChannel radioChannel = (RadioChannel) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RadioClip.java b/src/main/java/org/schema/RadioClip.java index 410e246b..0d94a465 100644 --- a/src/main/java/org/schema/RadioClip.java +++ b/src/main/java/org/schema/RadioClip.java @@ -1236,7 +1236,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person actor; @@ -1472,4 +1472,18 @@ public interface Builder extends ThingBuilder { protected RadioClip(Person actor, Position clipNumber, Person director, MusicGroupOrPerson musicBy, IsPartOf partOfEpisode, IsPartOf partOfSeason, IsPartOf partOfSeries, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(actor, clipNumber, director, musicBy, partOfEpisode, partOfSeason, partOfSeries, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RadioClip radioClip = (RadioClip) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RadioEpisode.java b/src/main/java/org/schema/RadioEpisode.java index 8a5dee9f..acaa255c 100644 --- a/src/main/java/org/schema/RadioEpisode.java +++ b/src/main/java/org/schema/RadioEpisode.java @@ -1266,7 +1266,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person actor; @@ -1507,4 +1507,18 @@ public interface Builder extends ThingBuilder { protected RadioEpisode(Person actor, Person director, IntegerOrString episodeNumber, MusicGroupOrPerson musicBy, IsPartOf partOfSeason, IsPartOf partOfSeries, Organization productionCompany, VideoObject trailer, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(actor, director, episodeNumber, musicBy, partOfSeason, partOfSeries, productionCompany, trailer, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RadioEpisode radioEpisode = (RadioEpisode) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RadioSeason.java b/src/main/java/org/schema/RadioSeason.java index 4b8f5b3d..406bacfc 100644 --- a/src/main/java/org/schema/RadioSeason.java +++ b/src/main/java/org/schema/RadioSeason.java @@ -1260,7 +1260,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person actor; @@ -1502,4 +1502,18 @@ public interface Builder extends ThingBuilder { protected RadioSeason(Person actor, Person director, java.util.Date endDate, HasPart episode, Integer numberOfEpisodes, IsPartOf partOfSeries, Organization productionCompany, IntegerOrString seasonNumber, java.util.Date startDate, VideoObject trailer, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(actor, director, endDate, episode, numberOfEpisodes, partOfSeries, productionCompany, seasonNumber, startDate, trailer, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RadioSeason radioSeason = (RadioSeason) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RadioSeries.java b/src/main/java/org/schema/RadioSeries.java index e0c279e0..c66744be 100644 --- a/src/main/java/org/schema/RadioSeries.java +++ b/src/main/java/org/schema/RadioSeries.java @@ -1334,7 +1334,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person actor; @@ -1589,6 +1589,38 @@ protected RadioSeries(Person actor, Person director, HasPart episode, MusicGroup myContainsSeason = containsSeason; myTrailer = trailer; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myActor != null ? myActor.hashCode() : 0); + result = 31 * result + (myDirector != null ? myDirector.hashCode() : 0); + result = 31 * result + (myEpisode != null ? myEpisode.hashCode() : 0); + result = 31 * result + (myMusicBy != null ? myMusicBy.hashCode() : 0); + result = 31 * result + (myNumberOfEpisodes != null ? myNumberOfEpisodes.hashCode() : 0); + result = 31 * result + (myNumberOfSeasons != null ? myNumberOfSeasons.hashCode() : 0); + result = 31 * result + (myProductionCompany != null ? myProductionCompany.hashCode() : 0); + result = 31 * result + (myContainsSeason != null ? myContainsSeason.hashCode() : 0); + result = 31 * result + (myTrailer != null ? myTrailer.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RadioSeries radioSeries = (RadioSeries) o; + if (!super.equals(o)) return false; + if (myActor != null ? !myActor.equals(radioSeries.myActor) : radioSeries.myActor != null) return false; + if (myDirector != null ? !myDirector.equals(radioSeries.myDirector) : radioSeries.myDirector != null) return false; + if (myEpisode != null ? !myEpisode.equals(radioSeries.myEpisode) : radioSeries.myEpisode != null) return false; + if (myMusicBy != null ? !myMusicBy.equals(radioSeries.myMusicBy) : radioSeries.myMusicBy != null) return false; + if (myNumberOfEpisodes != null ? !myNumberOfEpisodes.equals(radioSeries.myNumberOfEpisodes) : radioSeries.myNumberOfEpisodes != null) return false; + if (myNumberOfSeasons != null ? !myNumberOfSeasons.equals(radioSeries.myNumberOfSeasons) : radioSeries.myNumberOfSeasons != null) return false; + if (myProductionCompany != null ? !myProductionCompany.equals(radioSeries.myProductionCompany) : radioSeries.myProductionCompany != null) return false; + if (myContainsSeason != null ? !myContainsSeason.equals(radioSeries.myContainsSeason) : radioSeries.myContainsSeason != null) return false; + if (myTrailer != null ? !myTrailer.equals(radioSeries.myTrailer) : radioSeries.myTrailer != null) return false; + return true; + } + private Person myActor; private Person myDirector; private HasPart myEpisode; diff --git a/src/main/java/org/schema/RadioStation.java b/src/main/java/org/schema/RadioStation.java index 587724ad..5afe157b 100644 --- a/src/main/java/org/schema/RadioStation.java +++ b/src/main/java/org/schema/RadioStation.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected RadioStation(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RadioStation radioStation = (RadioStation) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Radiograpy.java b/src/main/java/org/schema/Radiograpy.java index ffde53ed..87039872 100644 --- a/src/main/java/org/schema/Radiograpy.java +++ b/src/main/java/org/schema/Radiograpy.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Radiograpy() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Radiograpy radiograpy = (Radiograpy) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RandomizedTrial.java b/src/main/java/org/schema/RandomizedTrial.java index 69f7db1c..9c7d14c4 100644 --- a/src/main/java/org/schema/RandomizedTrial.java +++ b/src/main/java/org/schema/RandomizedTrial.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected RandomizedTrial() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RandomizedTrial randomizedTrial = (RandomizedTrial) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Rating.java b/src/main/java/org/schema/Rating.java index 57db0cc5..d2059ffb 100644 --- a/src/main/java/org/schema/Rating.java +++ b/src/main/java/org/schema/Rating.java @@ -29,7 +29,7 @@ public class Rating extends Intangible { /** * The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed. */ - public NumberOrString getBestRating() { + public Number getBestRating() { return myBestRating; } /** @@ -41,7 +41,7 @@ public String getRatingValue() { /** * The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed. */ - public NumberOrString getWorstRating() { + public Number getWorstRating() { return myWorstRating; } /** @@ -57,16 +57,40 @@ public Rating build() { /** * The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed. */ - @NotNull public Builder bestRating(@NotNull Number number) { - if (this.bestRating == null) this.bestRating = new NumberOrString(); - this.bestRating.setNumber(number); + @NotNull public Builder bestRating(@NotNull Integer integer) { + if (this.bestRating == null) this.bestRating = new Number(); + this.bestRating.setInteger(integer); + return this; + } + /** + * The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed. + */ + @NotNull public Builder bestRating(@NotNull Long bestRating) { + if (this.bestRating == null) this.bestRating = new Number(); + this.bestRating.setLong(bestRating); + return this; + } + /** + * The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed. + */ + @NotNull public Builder bestRating(@NotNull Float bestRating) { + if (this.bestRating == null) this.bestRating = new Number(); + this.bestRating.setFloat(bestRating); + return this; + } + /** + * The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed. + */ + @NotNull public Builder bestRating(@NotNull Double bestRating) { + if (this.bestRating == null) this.bestRating = new Number(); + this.bestRating.setDouble(bestRating); return this; } /** * The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed. */ @NotNull public Builder bestRating(@NotNull String bestRating) { - if (this.bestRating == null) this.bestRating = new NumberOrString(); + if (this.bestRating == null) this.bestRating = new Number(); this.bestRating.setString(bestRating); return this; } @@ -80,16 +104,40 @@ public Rating build() { /** * The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed. */ - @NotNull public Builder worstRating(@NotNull Number number) { - if (this.worstRating == null) this.worstRating = new NumberOrString(); - this.worstRating.setNumber(number); + @NotNull public Builder worstRating(@NotNull Integer integer) { + if (this.worstRating == null) this.worstRating = new Number(); + this.worstRating.setInteger(integer); + return this; + } + /** + * The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed. + */ + @NotNull public Builder worstRating(@NotNull Long worstRating) { + if (this.worstRating == null) this.worstRating = new Number(); + this.worstRating.setLong(worstRating); + return this; + } + /** + * The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed. + */ + @NotNull public Builder worstRating(@NotNull Float worstRating) { + if (this.worstRating == null) this.worstRating = new Number(); + this.worstRating.setFloat(worstRating); + return this; + } + /** + * The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed. + */ + @NotNull public Builder worstRating(@NotNull Double worstRating) { + if (this.worstRating == null) this.worstRating = new Number(); + this.worstRating.setDouble(worstRating); return this; } /** * The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed. */ @NotNull public Builder worstRating(@NotNull String worstRating) { - if (this.worstRating == null) this.worstRating = new NumberOrString(); + if (this.worstRating == null) this.worstRating = new Number(); this.worstRating.setString(worstRating); return this; } @@ -264,10 +312,16 @@ public Builder id(long id) { final String key = entry.getKey(); Object value = entry.getValue(); if (value instanceof java.util.Map) { value = ThingDeserializer.fromMap((java.util.Map)value); } - if ("bestRating".equals(key) && value instanceof Number) { bestRating((Number)value); continue; } + if ("bestRating".equals(key) && value instanceof Integer) { bestRating((Integer)value); continue; } + if ("bestRating".equals(key) && value instanceof Long) { bestRating((Long)value); continue; } + if ("bestRating".equals(key) && value instanceof Float) { bestRating((Float)value); continue; } + if ("bestRating".equals(key) && value instanceof Double) { bestRating((Double)value); continue; } if ("bestRating".equals(key) && value instanceof String) { bestRating((String)value); continue; } if ("ratingValue".equals(key) && value instanceof String) { ratingValue((String)value); continue; } - if ("worstRating".equals(key) && value instanceof Number) { worstRating((Number)value); continue; } + if ("worstRating".equals(key) && value instanceof Integer) { worstRating((Integer)value); continue; } + if ("worstRating".equals(key) && value instanceof Long) { worstRating((Long)value); continue; } + if ("worstRating".equals(key) && value instanceof Float) { worstRating((Float)value); continue; } + if ("worstRating".equals(key) && value instanceof Double) { worstRating((Double)value); continue; } if ("worstRating".equals(key) && value instanceof String) { worstRating((String)value); continue; } if ("additionalType".equals(key) && value instanceof String) { additionalType((String)value); continue; } if ("alternateName".equals(key) && value instanceof String) { alternateName((String)value); continue; } @@ -278,12 +332,12 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } - private NumberOrString bestRating; + private Number bestRating; private String ratingValue; - private NumberOrString worstRating; + private Number worstRating; private String additionalType; private String alternateName; private String description; @@ -295,10 +349,16 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - @NotNull Builder bestRating(@NotNull Number number); + @NotNull Builder bestRating(@NotNull Integer integer); + @NotNull Builder bestRating(@NotNull Long bestRating); + @NotNull Builder bestRating(@NotNull Float bestRating); + @NotNull Builder bestRating(@NotNull Double bestRating); @NotNull Builder bestRating(@NotNull String bestRating); @NotNull Builder ratingValue(@NotNull String ratingValue); - @NotNull Builder worstRating(@NotNull Number number); + @NotNull Builder worstRating(@NotNull Integer integer); + @NotNull Builder worstRating(@NotNull Long worstRating); + @NotNull Builder worstRating(@NotNull Float worstRating); + @NotNull Builder worstRating(@NotNull Double worstRating); @NotNull Builder worstRating(@NotNull String worstRating); @NotNull Builder additionalType(@NotNull String additionalType); @NotNull Builder alternateName(@NotNull String alternateName); @@ -314,13 +374,33 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected Rating(NumberOrString bestRating, String ratingValue, NumberOrString worstRating, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected Rating(Number bestRating, String ratingValue, Number worstRating, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myBestRating = bestRating; myRatingValue = ratingValue; myWorstRating = worstRating; } - private NumberOrString myBestRating; + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBestRating != null ? myBestRating.hashCode() : 0); + result = 31 * result + (myRatingValue != null ? myRatingValue.hashCode() : 0); + result = 31 * result + (myWorstRating != null ? myWorstRating.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Rating rating = (Rating) o; + if (!super.equals(o)) return false; + if (myBestRating != null ? !myBestRating.equals(rating.myBestRating) : rating.myBestRating != null) return false; + if (myRatingValue != null ? !myRatingValue.equals(rating.myRatingValue) : rating.myRatingValue != null) return false; + if (myWorstRating != null ? !myWorstRating.equals(rating.myWorstRating) : rating.myWorstRating != null) return false; + return true; + } + + private Number myBestRating; private String myRatingValue; - private NumberOrString myWorstRating; + private Number myWorstRating; } diff --git a/src/main/java/org/schema/ReactAction.java b/src/main/java/org/schema/ReactAction.java index 4deb74e7..435c6e1f 100644 --- a/src/main/java/org/schema/ReactAction.java +++ b/src/main/java/org/schema/ReactAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected ReactAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReactAction reactAction = (ReactAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ReadAction.java b/src/main/java/org/schema/ReadAction.java index 6c32ef24..f038c4ed 100644 --- a/src/main/java/org/schema/ReadAction.java +++ b/src/main/java/org/schema/ReadAction.java @@ -322,7 +322,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Offer expectsAcceptanceOf; @@ -374,4 +374,18 @@ public interface Builder extends ThingBuilder { protected ReadAction(Offer expectsAcceptanceOf, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(expectsAcceptanceOf, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReadAction readAction = (ReadAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RealEstateAgent.java b/src/main/java/org/schema/RealEstateAgent.java index 01a7acee..e765037c 100644 --- a/src/main/java/org/schema/RealEstateAgent.java +++ b/src/main/java/org/schema/RealEstateAgent.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected RealEstateAgent(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RealEstateAgent realEstateAgent = (RealEstateAgent) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RearWheelDriveConfiguration.java b/src/main/java/org/schema/RearWheelDriveConfiguration.java index e49fe3da..f6c86385 100644 --- a/src/main/java/org/schema/RearWheelDriveConfiguration.java +++ b/src/main/java/org/schema/RearWheelDriveConfiguration.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected RearWheelDriveConfiguration() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RearWheelDriveConfiguration rearWheelDriveConfiguration = (RearWheelDriveConfiguration) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ReceiveAction.java b/src/main/java/org/schema/ReceiveAction.java index 0470cc1c..a41fa186 100644 --- a/src/main/java/org/schema/ReceiveAction.java +++ b/src/main/java/org/schema/ReceiveAction.java @@ -407,7 +407,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private DeliveryMethod deliveryMethod; @@ -474,6 +474,24 @@ protected ReceiveAction(DeliveryMethod deliveryMethod, AudienceOrOrganizationOrP myDeliveryMethod = deliveryMethod; mySender = sender; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDeliveryMethod != null ? myDeliveryMethod.hashCode() : 0); + result = 31 * result + (mySender != null ? mySender.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReceiveAction receiveAction = (ReceiveAction) o; + if (!super.equals(o)) return false; + if (myDeliveryMethod != null ? !myDeliveryMethod.equals(receiveAction.myDeliveryMethod) : receiveAction.myDeliveryMethod != null) return false; + if (mySender != null ? !mySender.equals(receiveAction.mySender) : receiveAction.mySender != null) return false; + return true; + } + private DeliveryMethod myDeliveryMethod; private AudienceOrOrganizationOrPerson mySender; } diff --git a/src/main/java/org/schema/Recipe.java b/src/main/java/org/schema/Recipe.java index 208b7a2f..5c059b32 100644 --- a/src/main/java/org/schema/Recipe.java +++ b/src/main/java/org/schema/Recipe.java @@ -1326,7 +1326,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String cookingMethod; @@ -1579,6 +1579,40 @@ protected Recipe(String cookingMethod, Duration cookTime, String recipeIngredien myRecipeYield = recipeYield; myTotalTime = totalTime; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myCookingMethod != null ? myCookingMethod.hashCode() : 0); + result = 31 * result + (myCookTime != null ? myCookTime.hashCode() : 0); + result = 31 * result + (myRecipeIngredient != null ? myRecipeIngredient.hashCode() : 0); + result = 31 * result + (myNutrition != null ? myNutrition.hashCode() : 0); + result = 31 * result + (myPrepTime != null ? myPrepTime.hashCode() : 0); + result = 31 * result + (myRecipeCategory != null ? myRecipeCategory.hashCode() : 0); + result = 31 * result + (myRecipeCuisine != null ? myRecipeCuisine.hashCode() : 0); + result = 31 * result + (myRecipeInstructions != null ? myRecipeInstructions.hashCode() : 0); + result = 31 * result + (myRecipeYield != null ? myRecipeYield.hashCode() : 0); + result = 31 * result + (myTotalTime != null ? myTotalTime.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Recipe recipe = (Recipe) o; + if (!super.equals(o)) return false; + if (myCookingMethod != null ? !myCookingMethod.equals(recipe.myCookingMethod) : recipe.myCookingMethod != null) return false; + if (myCookTime != null ? !myCookTime.equals(recipe.myCookTime) : recipe.myCookTime != null) return false; + if (myRecipeIngredient != null ? !myRecipeIngredient.equals(recipe.myRecipeIngredient) : recipe.myRecipeIngredient != null) return false; + if (myNutrition != null ? !myNutrition.equals(recipe.myNutrition) : recipe.myNutrition != null) return false; + if (myPrepTime != null ? !myPrepTime.equals(recipe.myPrepTime) : recipe.myPrepTime != null) return false; + if (myRecipeCategory != null ? !myRecipeCategory.equals(recipe.myRecipeCategory) : recipe.myRecipeCategory != null) return false; + if (myRecipeCuisine != null ? !myRecipeCuisine.equals(recipe.myRecipeCuisine) : recipe.myRecipeCuisine != null) return false; + if (myRecipeInstructions != null ? !myRecipeInstructions.equals(recipe.myRecipeInstructions) : recipe.myRecipeInstructions != null) return false; + if (myRecipeYield != null ? !myRecipeYield.equals(recipe.myRecipeYield) : recipe.myRecipeYield != null) return false; + if (myTotalTime != null ? !myTotalTime.equals(recipe.myTotalTime) : recipe.myTotalTime != null) return false; + return true; + } + private String myCookingMethod; private Duration myCookTime; private String myRecipeIngredient; diff --git a/src/main/java/org/schema/RecommendedDoseSchedule.java b/src/main/java/org/schema/RecommendedDoseSchedule.java index f50a3d9e..5f6bf9d2 100644 --- a/src/main/java/org/schema/RecommendedDoseSchedule.java +++ b/src/main/java/org/schema/RecommendedDoseSchedule.java @@ -369,7 +369,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String doseUnit; @@ -430,4 +430,18 @@ public interface Builder extends ThingBuilder { protected RecommendedDoseSchedule(String doseUnit, Number doseValue, String frequency, String targetPopulation, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(doseUnit, doseValue, frequency, targetPopulation, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RecommendedDoseSchedule recommendedDoseSchedule = (RecommendedDoseSchedule) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Recruiting.java b/src/main/java/org/schema/Recruiting.java index f79c70a3..3737c64c 100644 --- a/src/main/java/org/schema/Recruiting.java +++ b/src/main/java/org/schema/Recruiting.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Recruiting() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Recruiting recruiting = (Recruiting) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RecyclingCenter.java b/src/main/java/org/schema/RecyclingCenter.java index 3934bc5c..99f8f82e 100644 --- a/src/main/java/org/schema/RecyclingCenter.java +++ b/src/main/java/org/schema/RecyclingCenter.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected RecyclingCenter(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RecyclingCenter recyclingCenter = (RecyclingCenter) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RefurbishedCondition.java b/src/main/java/org/schema/RefurbishedCondition.java index a220b065..1ba81318 100644 --- a/src/main/java/org/schema/RefurbishedCondition.java +++ b/src/main/java/org/schema/RefurbishedCondition.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected RefurbishedCondition() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RefurbishedCondition refurbishedCondition = (RefurbishedCondition) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RegisterAction.java b/src/main/java/org/schema/RegisterAction.java index a8e83731..5b69a66b 100644 --- a/src/main/java/org/schema/RegisterAction.java +++ b/src/main/java/org/schema/RegisterAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected RegisterAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RegisterAction registerAction = (RegisterAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Registry.java b/src/main/java/org/schema/Registry.java index 95d17534..fc3f4d8f 100644 --- a/src/main/java/org/schema/Registry.java +++ b/src/main/java/org/schema/Registry.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Registry() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Registry registry = (Registry) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ReimbursementCap.java b/src/main/java/org/schema/ReimbursementCap.java index 4b40f6f4..97f6f3fe 100644 --- a/src/main/java/org/schema/ReimbursementCap.java +++ b/src/main/java/org/schema/ReimbursementCap.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected ReimbursementCap() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReimbursementCap reimbursementCap = (ReimbursementCap) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RejectAction.java b/src/main/java/org/schema/RejectAction.java index 0f4fcc5f..090ae84a 100644 --- a/src/main/java/org/schema/RejectAction.java +++ b/src/main/java/org/schema/RejectAction.java @@ -338,7 +338,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalDevicePurposeOrThing purpose; @@ -392,4 +392,18 @@ public interface Builder extends ThingBuilder { protected RejectAction(MedicalDevicePurposeOrThing purpose, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(purpose, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RejectAction rejectAction = (RejectAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RemixAlbum.java b/src/main/java/org/schema/RemixAlbum.java index 67065537..b076be96 100644 --- a/src/main/java/org/schema/RemixAlbum.java +++ b/src/main/java/org/schema/RemixAlbum.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected RemixAlbum() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RemixAlbum remixAlbum = (RemixAlbum) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Renal.java b/src/main/java/org/schema/Renal.java index 94cf88d8..d57585d2 100644 --- a/src/main/java/org/schema/Renal.java +++ b/src/main/java/org/schema/Renal.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Renal() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Renal renal = (Renal) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RentAction.java b/src/main/java/org/schema/RentAction.java index 648ec772..12eb5a00 100644 --- a/src/main/java/org/schema/RentAction.java +++ b/src/main/java/org/schema/RentAction.java @@ -112,9 +112,93 @@ public RentAction build() { */ - @NotNull public Builder price(@NotNull Number number) { - if (this.price == null) this.price = new NumberOrString(); - this.price.setNumber(number); + @NotNull public Builder price(@NotNull Integer integer) { + if (this.price == null) this.price = new Number(); + this.price.setInteger(integer); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Long price) { + if (this.price == null) this.price = new Number(); + this.price.setLong(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Float price) { + if (this.price == null) this.price = new Number(); + this.price.setFloat(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Double price) { + if (this.price == null) this.price = new Number(); + this.price.setDouble(price); return this; } /** @@ -141,7 +225,7 @@ public RentAction build() { */ @NotNull public Builder price(@NotNull String price) { - if (this.price == null) this.price = new NumberOrString(); + if (this.price == null) this.price = new Number(); this.price.setString(price); return this; } @@ -417,7 +501,10 @@ public Builder id(long id) { if ("landlord".equals(key) && value instanceof Organization) { landlord((Organization)value); continue; } if ("landlord".equals(key) && value instanceof Person) { landlord((Person)value); continue; } if ("realEstateAgent".equals(key) && value instanceof RealEstateAgent) { realEstateAgent((RealEstateAgent)value); continue; } - if ("price".equals(key) && value instanceof Number) { price((Number)value); continue; } + if ("price".equals(key) && value instanceof Integer) { price((Integer)value); continue; } + if ("price".equals(key) && value instanceof Long) { price((Long)value); continue; } + if ("price".equals(key) && value instanceof Float) { price((Float)value); continue; } + if ("price".equals(key) && value instanceof Double) { price((Double)value); continue; } if ("price".equals(key) && value instanceof String) { price((String)value); continue; } if ("priceSpecification".equals(key) && value instanceof PriceSpecification) { priceSpecification((PriceSpecification)value); continue; } if ("agent".equals(key) && value instanceof Organization) { agent((Organization)value); continue; } @@ -436,12 +523,12 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson landlord; private RealEstateAgent realEstateAgent; - private NumberOrString price; + private Number price; private PriceSpecification priceSpecification; private OrganizationOrPerson agent; private java.util.Date endTime; @@ -466,7 +553,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder landlord(@NotNull Person.Builder person); @NotNull Builder realEstateAgent(@NotNull RealEstateAgent realEstateAgent); @NotNull Builder realEstateAgent(@NotNull RealEstateAgent.Builder realEstateAgent); - @NotNull Builder price(@NotNull Number number); + @NotNull Builder price(@NotNull Integer integer); + @NotNull Builder price(@NotNull Long price); + @NotNull Builder price(@NotNull Float price); + @NotNull Builder price(@NotNull Double price); @NotNull Builder price(@NotNull String price); @NotNull Builder priceSpecification(@NotNull PriceSpecification priceSpecification); @NotNull Builder priceSpecification(@NotNull PriceSpecification.Builder priceSpecification); @@ -496,11 +586,29 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected RentAction(OrganizationOrPerson landlord, RealEstateAgent realEstateAgent, NumberOrString price, PriceSpecification priceSpecification, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected RentAction(OrganizationOrPerson landlord, RealEstateAgent realEstateAgent, Number price, PriceSpecification priceSpecification, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(price, priceSpecification, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myLandlord = landlord; myRealEstateAgent = realEstateAgent; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myLandlord != null ? myLandlord.hashCode() : 0); + result = 31 * result + (myRealEstateAgent != null ? myRealEstateAgent.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RentAction rentAction = (RentAction) o; + if (!super.equals(o)) return false; + if (myLandlord != null ? !myLandlord.equals(rentAction.myLandlord) : rentAction.myLandlord != null) return false; + if (myRealEstateAgent != null ? !myRealEstateAgent.equals(rentAction.myRealEstateAgent) : rentAction.myRealEstateAgent != null) return false; + return true; + } + private OrganizationOrPerson myLandlord; private RealEstateAgent myRealEstateAgent; } diff --git a/src/main/java/org/schema/RentalCarReservation.java b/src/main/java/org/schema/RentalCarReservation.java index 343567fe..7326c561 100644 --- a/src/main/java/org/schema/RentalCarReservation.java +++ b/src/main/java/org/schema/RentalCarReservation.java @@ -234,30 +234,40 @@ public RentalCarReservation build() { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull Number number) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setNumber(number); + @NotNull public Builder totalPrice(@NotNull Integer integer) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setInteger(integer); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification priceSpecification) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setPriceSpecification(priceSpecification); + @NotNull public Builder totalPrice(@NotNull Long totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setLong(totalPrice); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification) { - return this.totalPrice(priceSpecification.build()); + @NotNull public Builder totalPrice(@NotNull Float totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setFloat(totalPrice); + return this; + } + /** + * The total price for the reservation or ticket, including applicable taxes, shipping, etc. + */ + @NotNull public Builder totalPrice(@NotNull Double totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setDouble(totalPrice); + return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ @NotNull public Builder totalPrice(@NotNull String totalPrice) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); + if (this.totalPrice == null) this.totalPrice = new Number(); this.totalPrice.setString(totalPrice); return this; } @@ -482,8 +492,10 @@ public Builder id(long id) { if ("modifiedTime".equals(key) && value instanceof java.util.Date) { modifiedTime((java.util.Date)value); continue; } if ("programMembershipUsed".equals(key) && value instanceof ProgramMembership) { programMembershipUsed((ProgramMembership)value); continue; } if ("reservedTicket".equals(key) && value instanceof Ticket) { reservedTicket((Ticket)value); continue; } - if ("totalPrice".equals(key) && value instanceof Number) { totalPrice((Number)value); continue; } - if ("totalPrice".equals(key) && value instanceof PriceSpecification) { totalPrice((PriceSpecification)value); continue; } + if ("totalPrice".equals(key) && value instanceof Integer) { totalPrice((Integer)value); continue; } + if ("totalPrice".equals(key) && value instanceof Long) { totalPrice((Long)value); continue; } + if ("totalPrice".equals(key) && value instanceof Float) { totalPrice((Float)value); continue; } + if ("totalPrice".equals(key) && value instanceof Double) { totalPrice((Double)value); continue; } if ("totalPrice".equals(key) && value instanceof String) { totalPrice((String)value); continue; } if ("priceCurrency".equals(key) && value instanceof String) { priceCurrency((String)value); continue; } if ("broker".equals(key) && value instanceof Organization) { broker((Organization)value); continue; } @@ -497,7 +509,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Place pickupLocation; @@ -513,7 +525,7 @@ public Builder id(long id) { private java.util.Date modifiedTime; private ProgramMembership programMembershipUsed; private Ticket reservedTicket; - private NumberOrPriceSpecificationOrString totalPrice; + private Number totalPrice; private String priceCurrency; private OrganizationOrPerson broker; private String additionalType; @@ -552,9 +564,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder programMembershipUsed(@NotNull ProgramMembership.Builder programMembership); @NotNull Builder reservedTicket(@NotNull Ticket ticket); @NotNull Builder reservedTicket(@NotNull Ticket.Builder ticket); - @NotNull Builder totalPrice(@NotNull Number number); - @NotNull Builder totalPrice(@NotNull PriceSpecification priceSpecification); - @NotNull Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(@NotNull Integer integer); + @NotNull Builder totalPrice(@NotNull Long totalPrice); + @NotNull Builder totalPrice(@NotNull Float totalPrice); + @NotNull Builder totalPrice(@NotNull Double totalPrice); @NotNull Builder totalPrice(@NotNull String totalPrice); @NotNull Builder priceCurrency(@NotNull String priceCurrency); @NotNull Builder broker(@NotNull Organization organization); @@ -575,13 +588,35 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected RentalCarReservation(Place pickupLocation, Place dropoffLocation, java.util.Date pickupTime, java.util.Date dropoffTime, String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, NumberOrPriceSpecificationOrString totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected RentalCarReservation(Place pickupLocation, Place dropoffLocation, java.util.Date pickupTime, java.util.Date dropoffTime, String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, Number totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(reservationId, reservationStatus, reservationFor, underName, provider, bookingTime, modifiedTime, programMembershipUsed, reservedTicket, totalPrice, priceCurrency, broker, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myPickupLocation = pickupLocation; myDropoffLocation = dropoffLocation; myPickupTime = pickupTime; myDropoffTime = dropoffTime; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myPickupLocation != null ? myPickupLocation.hashCode() : 0); + result = 31 * result + (myDropoffLocation != null ? myDropoffLocation.hashCode() : 0); + result = 31 * result + (myPickupTime != null ? myPickupTime.hashCode() : 0); + result = 31 * result + (myDropoffTime != null ? myDropoffTime.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RentalCarReservation rentalCarReservation = (RentalCarReservation) o; + if (!super.equals(o)) return false; + if (myPickupLocation != null ? !myPickupLocation.equals(rentalCarReservation.myPickupLocation) : rentalCarReservation.myPickupLocation != null) return false; + if (myDropoffLocation != null ? !myDropoffLocation.equals(rentalCarReservation.myDropoffLocation) : rentalCarReservation.myDropoffLocation != null) return false; + if (myPickupTime != null ? !myPickupTime.equals(rentalCarReservation.myPickupTime) : rentalCarReservation.myPickupTime != null) return false; + if (myDropoffTime != null ? !myDropoffTime.equals(rentalCarReservation.myDropoffTime) : rentalCarReservation.myDropoffTime != null) return false; + return true; + } + private Place myPickupLocation; private Place myDropoffLocation; private java.util.Date myPickupTime; diff --git a/src/main/java/org/schema/RentalVehicleUsage.java b/src/main/java/org/schema/RentalVehicleUsage.java index 14b7ef14..6325a87e 100644 --- a/src/main/java/org/schema/RentalVehicleUsage.java +++ b/src/main/java/org/schema/RentalVehicleUsage.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected RentalVehicleUsage() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RentalVehicleUsage rentalVehicleUsage = (RentalVehicleUsage) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ReplaceAction.java b/src/main/java/org/schema/ReplaceAction.java index e287de30..91f7f301 100644 --- a/src/main/java/org/schema/ReplaceAction.java +++ b/src/main/java/org/schema/ReplaceAction.java @@ -362,7 +362,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Thing replacee; @@ -422,6 +422,24 @@ protected ReplaceAction(Thing replacee, Thing replacer, Thing targetCollection, myReplacee = replacee; myReplacer = replacer; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myReplacee != null ? myReplacee.hashCode() : 0); + result = 31 * result + (myReplacer != null ? myReplacer.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReplaceAction replaceAction = (ReplaceAction) o; + if (!super.equals(o)) return false; + if (myReplacee != null ? !myReplacee.equals(replaceAction.myReplacee) : replaceAction.myReplacee != null) return false; + if (myReplacer != null ? !myReplacer.equals(replaceAction.myReplacer) : replaceAction.myReplacer != null) return false; + return true; + } + private Thing myReplacee; private Thing myReplacer; } diff --git a/src/main/java/org/schema/ReplyAction.java b/src/main/java/org/schema/ReplyAction.java index c08f7e9d..278f632d 100644 --- a/src/main/java/org/schema/ReplyAction.java +++ b/src/main/java/org/schema/ReplyAction.java @@ -411,7 +411,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Comment resultComment; @@ -478,5 +478,21 @@ protected ReplyAction(Comment resultComment, Thing about, LanguageOrString inLan super(about, inLanguage, recipient, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myResultComment = resultComment; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myResultComment != null ? myResultComment.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReplyAction replyAction = (ReplyAction) o; + if (!super.equals(o)) return false; + if (myResultComment != null ? !myResultComment.equals(replyAction.myResultComment) : replyAction.myResultComment != null) return false; + return true; + } + private Comment myResultComment; } diff --git a/src/main/java/org/schema/ReportedDoseSchedule.java b/src/main/java/org/schema/ReportedDoseSchedule.java index 4292c459..be739b63 100644 --- a/src/main/java/org/schema/ReportedDoseSchedule.java +++ b/src/main/java/org/schema/ReportedDoseSchedule.java @@ -369,7 +369,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String doseUnit; @@ -430,4 +430,18 @@ public interface Builder extends ThingBuilder { protected ReportedDoseSchedule(String doseUnit, Number doseValue, String frequency, String targetPopulation, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(doseUnit, doseValue, frequency, targetPopulation, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReportedDoseSchedule reportedDoseSchedule = (ReportedDoseSchedule) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Researcher.java b/src/main/java/org/schema/Researcher.java index e7508037..86661846 100644 --- a/src/main/java/org/schema/Researcher.java +++ b/src/main/java/org/schema/Researcher.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Researcher() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Researcher researcher = (Researcher) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Reservation.java b/src/main/java/org/schema/Reservation.java index 8c47c972..30a26939 100644 --- a/src/main/java/org/schema/Reservation.java +++ b/src/main/java/org/schema/Reservation.java @@ -85,7 +85,7 @@ public Ticket getReservedTicket() { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public NumberOrPriceSpecificationOrString getTotalPrice() { + public Number getTotalPrice() { return myTotalPrice; } /** @@ -242,30 +242,40 @@ public Reservation build() { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull Number number) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setNumber(number); + @NotNull public Builder totalPrice(@NotNull Integer integer) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setInteger(integer); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification priceSpecification) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setPriceSpecification(priceSpecification); + @NotNull public Builder totalPrice(@NotNull Long totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setLong(totalPrice); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification) { - return this.totalPrice(priceSpecification.build()); + @NotNull public Builder totalPrice(@NotNull Float totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setFloat(totalPrice); + return this; + } + /** + * The total price for the reservation or ticket, including applicable taxes, shipping, etc. + */ + @NotNull public Builder totalPrice(@NotNull Double totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setDouble(totalPrice); + return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ @NotNull public Builder totalPrice(@NotNull String totalPrice) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); + if (this.totalPrice == null) this.totalPrice = new Number(); this.totalPrice.setString(totalPrice); return this; } @@ -486,8 +496,10 @@ public Builder id(long id) { if ("modifiedTime".equals(key) && value instanceof java.util.Date) { modifiedTime((java.util.Date)value); continue; } if ("programMembershipUsed".equals(key) && value instanceof ProgramMembership) { programMembershipUsed((ProgramMembership)value); continue; } if ("reservedTicket".equals(key) && value instanceof Ticket) { reservedTicket((Ticket)value); continue; } - if ("totalPrice".equals(key) && value instanceof Number) { totalPrice((Number)value); continue; } - if ("totalPrice".equals(key) && value instanceof PriceSpecification) { totalPrice((PriceSpecification)value); continue; } + if ("totalPrice".equals(key) && value instanceof Integer) { totalPrice((Integer)value); continue; } + if ("totalPrice".equals(key) && value instanceof Long) { totalPrice((Long)value); continue; } + if ("totalPrice".equals(key) && value instanceof Float) { totalPrice((Float)value); continue; } + if ("totalPrice".equals(key) && value instanceof Double) { totalPrice((Double)value); continue; } if ("totalPrice".equals(key) && value instanceof String) { totalPrice((String)value); continue; } if ("priceCurrency".equals(key) && value instanceof String) { priceCurrency((String)value); continue; } if ("broker".equals(key) && value instanceof Organization) { broker((Organization)value); continue; } @@ -501,7 +513,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String reservationId; @@ -513,7 +525,7 @@ public Builder id(long id) { private java.util.Date modifiedTime; private ProgramMembership programMembershipUsed; private Ticket reservedTicket; - private NumberOrPriceSpecificationOrString totalPrice; + private Number totalPrice; private String priceCurrency; private OrganizationOrPerson broker; private String additionalType; @@ -546,9 +558,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder programMembershipUsed(@NotNull ProgramMembership.Builder programMembership); @NotNull Builder reservedTicket(@NotNull Ticket ticket); @NotNull Builder reservedTicket(@NotNull Ticket.Builder ticket); - @NotNull Builder totalPrice(@NotNull Number number); - @NotNull Builder totalPrice(@NotNull PriceSpecification priceSpecification); - @NotNull Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(@NotNull Integer integer); + @NotNull Builder totalPrice(@NotNull Long totalPrice); + @NotNull Builder totalPrice(@NotNull Float totalPrice); + @NotNull Builder totalPrice(@NotNull Double totalPrice); @NotNull Builder totalPrice(@NotNull String totalPrice); @NotNull Builder priceCurrency(@NotNull String priceCurrency); @NotNull Builder broker(@NotNull Organization organization); @@ -569,7 +582,7 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected Reservation(String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, NumberOrPriceSpecificationOrString totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected Reservation(String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, Number totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myReservationId = reservationId; myReservationStatus = reservationStatus; @@ -584,6 +597,44 @@ protected Reservation(String reservationId, ReservationStatusType reservationSta myPriceCurrency = priceCurrency; myBroker = broker; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myReservationId != null ? myReservationId.hashCode() : 0); + result = 31 * result + (myReservationStatus != null ? myReservationStatus.hashCode() : 0); + result = 31 * result + (myReservationFor != null ? myReservationFor.hashCode() : 0); + result = 31 * result + (myUnderName != null ? myUnderName.hashCode() : 0); + result = 31 * result + (myProvider != null ? myProvider.hashCode() : 0); + result = 31 * result + (myBookingTime != null ? myBookingTime.hashCode() : 0); + result = 31 * result + (myModifiedTime != null ? myModifiedTime.hashCode() : 0); + result = 31 * result + (myProgramMembershipUsed != null ? myProgramMembershipUsed.hashCode() : 0); + result = 31 * result + (myReservedTicket != null ? myReservedTicket.hashCode() : 0); + result = 31 * result + (myTotalPrice != null ? myTotalPrice.hashCode() : 0); + result = 31 * result + (myPriceCurrency != null ? myPriceCurrency.hashCode() : 0); + result = 31 * result + (myBroker != null ? myBroker.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Reservation reservation = (Reservation) o; + if (!super.equals(o)) return false; + if (myReservationId != null ? !myReservationId.equals(reservation.myReservationId) : reservation.myReservationId != null) return false; + if (myReservationStatus != null ? !myReservationStatus.equals(reservation.myReservationStatus) : reservation.myReservationStatus != null) return false; + if (myReservationFor != null ? !myReservationFor.equals(reservation.myReservationFor) : reservation.myReservationFor != null) return false; + if (myUnderName != null ? !myUnderName.equals(reservation.myUnderName) : reservation.myUnderName != null) return false; + if (myProvider != null ? !myProvider.equals(reservation.myProvider) : reservation.myProvider != null) return false; + if (myBookingTime != null ? !myBookingTime.equals(reservation.myBookingTime) : reservation.myBookingTime != null) return false; + if (myModifiedTime != null ? !myModifiedTime.equals(reservation.myModifiedTime) : reservation.myModifiedTime != null) return false; + if (myProgramMembershipUsed != null ? !myProgramMembershipUsed.equals(reservation.myProgramMembershipUsed) : reservation.myProgramMembershipUsed != null) return false; + if (myReservedTicket != null ? !myReservedTicket.equals(reservation.myReservedTicket) : reservation.myReservedTicket != null) return false; + if (myTotalPrice != null ? !myTotalPrice.equals(reservation.myTotalPrice) : reservation.myTotalPrice != null) return false; + if (myPriceCurrency != null ? !myPriceCurrency.equals(reservation.myPriceCurrency) : reservation.myPriceCurrency != null) return false; + if (myBroker != null ? !myBroker.equals(reservation.myBroker) : reservation.myBroker != null) return false; + return true; + } + private String myReservationId; private ReservationStatusType myReservationStatus; private Thing myReservationFor; @@ -593,7 +644,7 @@ protected Reservation(String reservationId, ReservationStatusType reservationSta private java.util.Date myModifiedTime; private ProgramMembership myProgramMembershipUsed; private Ticket myReservedTicket; - private NumberOrPriceSpecificationOrString myTotalPrice; + private Number myTotalPrice; private String myPriceCurrency; private OrganizationOrPerson myBroker; } diff --git a/src/main/java/org/schema/ReservationCancelled.java b/src/main/java/org/schema/ReservationCancelled.java index 3f32f4fd..2d39ffcc 100644 --- a/src/main/java/org/schema/ReservationCancelled.java +++ b/src/main/java/org/schema/ReservationCancelled.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected ReservationCancelled() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReservationCancelled reservationCancelled = (ReservationCancelled) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ReservationConfirmed.java b/src/main/java/org/schema/ReservationConfirmed.java index 8356a2a2..e9beb1c7 100644 --- a/src/main/java/org/schema/ReservationConfirmed.java +++ b/src/main/java/org/schema/ReservationConfirmed.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected ReservationConfirmed() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReservationConfirmed reservationConfirmed = (ReservationConfirmed) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ReservationHold.java b/src/main/java/org/schema/ReservationHold.java index 13e95c11..182391dd 100644 --- a/src/main/java/org/schema/ReservationHold.java +++ b/src/main/java/org/schema/ReservationHold.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected ReservationHold() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReservationHold reservationHold = (ReservationHold) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ReservationPackage.java b/src/main/java/org/schema/ReservationPackage.java index ca52a7c9..64cc4527 100644 --- a/src/main/java/org/schema/ReservationPackage.java +++ b/src/main/java/org/schema/ReservationPackage.java @@ -187,30 +187,40 @@ public ReservationPackage build() { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull Number number) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setNumber(number); + @NotNull public Builder totalPrice(@NotNull Integer integer) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setInteger(integer); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification priceSpecification) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setPriceSpecification(priceSpecification); + @NotNull public Builder totalPrice(@NotNull Long totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setLong(totalPrice); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification) { - return this.totalPrice(priceSpecification.build()); + @NotNull public Builder totalPrice(@NotNull Float totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setFloat(totalPrice); + return this; + } + /** + * The total price for the reservation or ticket, including applicable taxes, shipping, etc. + */ + @NotNull public Builder totalPrice(@NotNull Double totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setDouble(totalPrice); + return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ @NotNull public Builder totalPrice(@NotNull String totalPrice) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); + if (this.totalPrice == null) this.totalPrice = new Number(); this.totalPrice.setString(totalPrice); return this; } @@ -432,8 +442,10 @@ public Builder id(long id) { if ("modifiedTime".equals(key) && value instanceof java.util.Date) { modifiedTime((java.util.Date)value); continue; } if ("programMembershipUsed".equals(key) && value instanceof ProgramMembership) { programMembershipUsed((ProgramMembership)value); continue; } if ("reservedTicket".equals(key) && value instanceof Ticket) { reservedTicket((Ticket)value); continue; } - if ("totalPrice".equals(key) && value instanceof Number) { totalPrice((Number)value); continue; } - if ("totalPrice".equals(key) && value instanceof PriceSpecification) { totalPrice((PriceSpecification)value); continue; } + if ("totalPrice".equals(key) && value instanceof Integer) { totalPrice((Integer)value); continue; } + if ("totalPrice".equals(key) && value instanceof Long) { totalPrice((Long)value); continue; } + if ("totalPrice".equals(key) && value instanceof Float) { totalPrice((Float)value); continue; } + if ("totalPrice".equals(key) && value instanceof Double) { totalPrice((Double)value); continue; } if ("totalPrice".equals(key) && value instanceof String) { totalPrice((String)value); continue; } if ("priceCurrency".equals(key) && value instanceof String) { priceCurrency((String)value); continue; } if ("broker".equals(key) && value instanceof Organization) { broker((Organization)value); continue; } @@ -447,7 +459,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Reservation subReservation; @@ -460,7 +472,7 @@ public Builder id(long id) { private java.util.Date modifiedTime; private ProgramMembership programMembershipUsed; private Ticket reservedTicket; - private NumberOrPriceSpecificationOrString totalPrice; + private Number totalPrice; private String priceCurrency; private OrganizationOrPerson broker; private String additionalType; @@ -495,9 +507,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder programMembershipUsed(@NotNull ProgramMembership.Builder programMembership); @NotNull Builder reservedTicket(@NotNull Ticket ticket); @NotNull Builder reservedTicket(@NotNull Ticket.Builder ticket); - @NotNull Builder totalPrice(@NotNull Number number); - @NotNull Builder totalPrice(@NotNull PriceSpecification priceSpecification); - @NotNull Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(@NotNull Integer integer); + @NotNull Builder totalPrice(@NotNull Long totalPrice); + @NotNull Builder totalPrice(@NotNull Float totalPrice); + @NotNull Builder totalPrice(@NotNull Double totalPrice); @NotNull Builder totalPrice(@NotNull String totalPrice); @NotNull Builder priceCurrency(@NotNull String priceCurrency); @NotNull Builder broker(@NotNull Organization organization); @@ -518,9 +531,25 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected ReservationPackage(Reservation subReservation, String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, NumberOrPriceSpecificationOrString totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected ReservationPackage(Reservation subReservation, String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, Number totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(reservationId, reservationStatus, reservationFor, underName, provider, bookingTime, modifiedTime, programMembershipUsed, reservedTicket, totalPrice, priceCurrency, broker, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); mySubReservation = subReservation; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (mySubReservation != null ? mySubReservation.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReservationPackage reservationPackage = (ReservationPackage) o; + if (!super.equals(o)) return false; + if (mySubReservation != null ? !mySubReservation.equals(reservationPackage.mySubReservation) : reservationPackage.mySubReservation != null) return false; + return true; + } + private Reservation mySubReservation; } diff --git a/src/main/java/org/schema/ReservationPending.java b/src/main/java/org/schema/ReservationPending.java index f24a34d3..ef3d3165 100644 --- a/src/main/java/org/schema/ReservationPending.java +++ b/src/main/java/org/schema/ReservationPending.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected ReservationPending() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReservationPending reservationPending = (ReservationPending) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ReservationStatusType.java b/src/main/java/org/schema/ReservationStatusType.java index fff1bb90..5b42fca3 100644 --- a/src/main/java/org/schema/ReservationStatusType.java +++ b/src/main/java/org/schema/ReservationStatusType.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected ReservationStatusType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReservationStatusType reservationStatusType = (ReservationStatusType) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ReserveAction.java b/src/main/java/org/schema/ReserveAction.java index 51142475..f21296e4 100644 --- a/src/main/java/org/schema/ReserveAction.java +++ b/src/main/java/org/schema/ReserveAction.java @@ -316,7 +316,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private java.util.Date scheduledTime; @@ -367,4 +367,18 @@ public interface Builder extends ThingBuilder { protected ReserveAction(java.util.Date scheduledTime, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(scheduledTime, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReserveAction reserveAction = (ReserveAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Reservoir.java b/src/main/java/org/schema/Reservoir.java index 201da9e3..d05ad8e9 100644 --- a/src/main/java/org/schema/Reservoir.java +++ b/src/main/java/org/schema/Reservoir.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected Reservoir(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Reservoir reservoir = (Reservoir) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Residence.java b/src/main/java/org/schema/Residence.java index e44d66bb..36623e30 100644 --- a/src/main/java/org/schema/Residence.java +++ b/src/main/java/org/schema/Residence.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected Residence(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Residence residence = (Residence) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RespiratoryTherapy.java b/src/main/java/org/schema/RespiratoryTherapy.java index 5db16033..cee6433a 100644 --- a/src/main/java/org/schema/RespiratoryTherapy.java +++ b/src/main/java/org/schema/RespiratoryTherapy.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected RespiratoryTherapy() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RespiratoryTherapy respiratoryTherapy = (RespiratoryTherapy) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Restaurant.java b/src/main/java/org/schema/Restaurant.java index 8f41ea5b..1326c5f6 100644 --- a/src/main/java/org/schema/Restaurant.java +++ b/src/main/java/org/schema/Restaurant.java @@ -540,7 +540,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BooleanOrString acceptsReservations; @@ -636,4 +636,18 @@ public interface Builder extends ThingBuilder { protected Restaurant(BooleanOrString acceptsReservations, String menu, String servesCuisine, Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(acceptsReservations, menu, servesCuisine, parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Restaurant restaurant = (Restaurant) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ResultsAvailable.java b/src/main/java/org/schema/ResultsAvailable.java index be2ec800..5ea2a54a 100644 --- a/src/main/java/org/schema/ResultsAvailable.java +++ b/src/main/java/org/schema/ResultsAvailable.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected ResultsAvailable() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ResultsAvailable resultsAvailable = (ResultsAvailable) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ResultsNotAvailable.java b/src/main/java/org/schema/ResultsNotAvailable.java index 27e78338..780043e0 100644 --- a/src/main/java/org/schema/ResultsNotAvailable.java +++ b/src/main/java/org/schema/ResultsNotAvailable.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected ResultsNotAvailable() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ResultsNotAvailable resultsNotAvailable = (ResultsNotAvailable) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ResumeAction.java b/src/main/java/org/schema/ResumeAction.java index 08e604af..b74e5ffb 100644 --- a/src/main/java/org/schema/ResumeAction.java +++ b/src/main/java/org/schema/ResumeAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected ResumeAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ResumeAction resumeAction = (ResumeAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Retail.java b/src/main/java/org/schema/Retail.java index e799eb0a..7a839795 100644 --- a/src/main/java/org/schema/Retail.java +++ b/src/main/java/org/schema/Retail.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Retail() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Retail retail = (Retail) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ReturnAction.java b/src/main/java/org/schema/ReturnAction.java index 4d0809eb..3f9eb9a0 100644 --- a/src/main/java/org/schema/ReturnAction.java +++ b/src/main/java/org/schema/ReturnAction.java @@ -387,7 +387,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AudienceOrOrganizationOrPerson recipient; @@ -450,5 +450,21 @@ protected ReturnAction(AudienceOrOrganizationOrPerson recipient, Place fromLocat super(fromLocation, toLocation, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myRecipient = recipient; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myRecipient != null ? myRecipient.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReturnAction returnAction = (ReturnAction) o; + if (!super.equals(o)) return false; + if (myRecipient != null ? !myRecipient.equals(returnAction.myRecipient) : returnAction.myRecipient != null) return false; + return true; + } + private AudienceOrOrganizationOrPerson myRecipient; } diff --git a/src/main/java/org/schema/Review.java b/src/main/java/org/schema/Review.java index c7905c3b..f18b6a54 100644 --- a/src/main/java/org/schema/Review.java +++ b/src/main/java/org/schema/Review.java @@ -1200,7 +1200,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Thing itemReviewed; @@ -1428,6 +1428,26 @@ protected Review(Thing itemReviewed, String reviewBody, Rating reviewRating, Str myReviewBody = reviewBody; myReviewRating = reviewRating; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myItemReviewed != null ? myItemReviewed.hashCode() : 0); + result = 31 * result + (myReviewBody != null ? myReviewBody.hashCode() : 0); + result = 31 * result + (myReviewRating != null ? myReviewRating.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Review review = (Review) o; + if (!super.equals(o)) return false; + if (myItemReviewed != null ? !myItemReviewed.equals(review.myItemReviewed) : review.myItemReviewed != null) return false; + if (myReviewBody != null ? !myReviewBody.equals(review.myReviewBody) : review.myReviewBody != null) return false; + if (myReviewRating != null ? !myReviewRating.equals(review.myReviewRating) : review.myReviewRating != null) return false; + return true; + } + private Thing myItemReviewed; private String myReviewBody; private Rating myReviewRating; diff --git a/src/main/java/org/schema/ReviewAction.java b/src/main/java/org/schema/ReviewAction.java index 72b76d6e..fe3ee98d 100644 --- a/src/main/java/org/schema/ReviewAction.java +++ b/src/main/java/org/schema/ReviewAction.java @@ -328,7 +328,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Review resultReview; @@ -381,5 +381,21 @@ protected ReviewAction(Review resultReview, OrganizationOrPerson agent, java.uti super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myResultReview = resultReview; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myResultReview != null ? myResultReview.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ReviewAction reviewAction = (ReviewAction) o; + if (!super.equals(o)) return false; + if (myResultReview != null ? !myResultReview.equals(reviewAction.myResultReview) : reviewAction.myResultReview != null) return false; + return true; + } + private Review myResultReview; } diff --git a/src/main/java/org/schema/Rheumatologic.java b/src/main/java/org/schema/Rheumatologic.java index 08cef718..8da0e136 100644 --- a/src/main/java/org/schema/Rheumatologic.java +++ b/src/main/java/org/schema/Rheumatologic.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Rheumatologic() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Rheumatologic rheumatologic = (Rheumatologic) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RightHandDriving.java b/src/main/java/org/schema/RightHandDriving.java index 1a6d9539..63f7ca5a 100644 --- a/src/main/java/org/schema/RightHandDriving.java +++ b/src/main/java/org/schema/RightHandDriving.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected RightHandDriving() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RightHandDriving rightHandDriving = (RightHandDriving) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RiverBodyOfWater.java b/src/main/java/org/schema/RiverBodyOfWater.java index 6945cf5c..0f1cf73c 100644 --- a/src/main/java/org/schema/RiverBodyOfWater.java +++ b/src/main/java/org/schema/RiverBodyOfWater.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected RiverBodyOfWater(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RiverBodyOfWater riverBodyOfWater = (RiverBodyOfWater) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Role.java b/src/main/java/org/schema/Role.java index bb67363d..6bed6923 100644 --- a/src/main/java/org/schema/Role.java +++ b/src/main/java/org/schema/Role.java @@ -247,7 +247,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private java.util.Date startDate; @@ -284,6 +284,24 @@ protected Role(java.util.Date startDate, String roleName, String additionalType, myStartDate = startDate; myRoleName = roleName; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myStartDate != null ? myStartDate.hashCode() : 0); + result = 31 * result + (myRoleName != null ? myRoleName.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Role role = (Role) o; + if (!super.equals(o)) return false; + if (myStartDate != null ? !myStartDate.equals(role.myStartDate) : role.myStartDate != null) return false; + if (myRoleName != null ? !myRoleName.equals(role.myRoleName) : role.myRoleName != null) return false; + return true; + } + private java.util.Date myStartDate; private String myRoleName; } diff --git a/src/main/java/org/schema/RoofingContractor.java b/src/main/java/org/schema/RoofingContractor.java index 18ea90e8..576bac61 100644 --- a/src/main/java/org/schema/RoofingContractor.java +++ b/src/main/java/org/schema/RoofingContractor.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected RoofingContractor(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RoofingContractor roofingContractor = (RoofingContractor) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RsvpAction.java b/src/main/java/org/schema/RsvpAction.java index e1ea2f75..85f9c35d 100644 --- a/src/main/java/org/schema/RsvpAction.java +++ b/src/main/java/org/schema/RsvpAction.java @@ -496,7 +496,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Number additionalNumberOfGuests; @@ -577,6 +577,26 @@ protected RsvpAction(Number additionalNumberOfGuests, RsvpResponseType rsvpRespo myRsvpResponse = rsvpResponse; myComment = comment; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAdditionalNumberOfGuests != null ? myAdditionalNumberOfGuests.hashCode() : 0); + result = 31 * result + (myRsvpResponse != null ? myRsvpResponse.hashCode() : 0); + result = 31 * result + (myComment != null ? myComment.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RsvpAction rsvpAction = (RsvpAction) o; + if (!super.equals(o)) return false; + if (myAdditionalNumberOfGuests != null ? !myAdditionalNumberOfGuests.equals(rsvpAction.myAdditionalNumberOfGuests) : rsvpAction.myAdditionalNumberOfGuests != null) return false; + if (myRsvpResponse != null ? !myRsvpResponse.equals(rsvpAction.myRsvpResponse) : rsvpAction.myRsvpResponse != null) return false; + if (myComment != null ? !myComment.equals(rsvpAction.myComment) : rsvpAction.myComment != null) return false; + return true; + } + private Number myAdditionalNumberOfGuests; private RsvpResponseType myRsvpResponse; private Comment myComment; diff --git a/src/main/java/org/schema/RsvpResponseMaybe.java b/src/main/java/org/schema/RsvpResponseMaybe.java index 0a93fa54..88ac7c94 100644 --- a/src/main/java/org/schema/RsvpResponseMaybe.java +++ b/src/main/java/org/schema/RsvpResponseMaybe.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected RsvpResponseMaybe() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RsvpResponseMaybe rsvpResponseMaybe = (RsvpResponseMaybe) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RsvpResponseNo.java b/src/main/java/org/schema/RsvpResponseNo.java index f791987b..797610e4 100644 --- a/src/main/java/org/schema/RsvpResponseNo.java +++ b/src/main/java/org/schema/RsvpResponseNo.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected RsvpResponseNo() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RsvpResponseNo rsvpResponseNo = (RsvpResponseNo) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RsvpResponseType.java b/src/main/java/org/schema/RsvpResponseType.java index 9f91909f..1ef756f7 100644 --- a/src/main/java/org/schema/RsvpResponseType.java +++ b/src/main/java/org/schema/RsvpResponseType.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected RsvpResponseType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RsvpResponseType rsvpResponseType = (RsvpResponseType) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/RsvpResponseYes.java b/src/main/java/org/schema/RsvpResponseYes.java index e5282077..70d4e825 100644 --- a/src/main/java/org/schema/RsvpResponseYes.java +++ b/src/main/java/org/schema/RsvpResponseYes.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected RsvpResponseYes() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RsvpResponseYes rsvpResponseYes = (RsvpResponseYes) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SaleEvent.java b/src/main/java/org/schema/SaleEvent.java index 9ea3e174..c0414e1b 100644 --- a/src/main/java/org/schema/SaleEvent.java +++ b/src/main/java/org/schema/SaleEvent.java @@ -496,7 +496,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -583,4 +583,18 @@ public interface Builder extends ThingBuilder { protected SaleEvent(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SaleEvent saleEvent = (SaleEvent) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ScheduleAction.java b/src/main/java/org/schema/ScheduleAction.java index 0bf2ef4e..d4bcf6e0 100644 --- a/src/main/java/org/schema/ScheduleAction.java +++ b/src/main/java/org/schema/ScheduleAction.java @@ -316,7 +316,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private java.util.Date scheduledTime; @@ -367,4 +367,18 @@ public interface Builder extends ThingBuilder { protected ScheduleAction(java.util.Date scheduledTime, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(scheduledTime, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ScheduleAction scheduleAction = (ScheduleAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SchemaOrg.java b/src/main/java/org/schema/SchemaOrg.java index 3f514968..b563f216 100644 --- a/src/main/java/org/schema/SchemaOrg.java +++ b/src/main/java/org/schema/SchemaOrg.java @@ -891,10 +891,6 @@ CreativeWorkSeries is on published materials (written e.g. books and periodicals * A notary. */ public static Notary.Builder notary() { return new Notary.NotaryThingBuilder(); } - /** - * The basic data types such as Integers, Strings, etc. - */ - public static DataType.Builder dataType() { return new DataType.DataTypeThingBuilder(); } /** * Properties that take Mass as values are of the form '<Number> <Mass unit of measure>'. E.g., '7 kg'. */ @@ -1293,10 +1289,6 @@ CreativeWorkSeries is on published materials (written e.g. books and periodicals * Enumerated status values for Order. */ public static OrderStatus.Builder orderStatus() { return new OrderStatus.OrderStatusThingBuilder(); } - /** - * Data type: Integer. - */ - public static Integer.Builder integer() { return new Integer.IntegerThingBuilder(); } /** * A structured value indicating the quantity, unit of measurement, and business function of goods included in a bundle offer. */ @@ -3817,7 +3809,6 @@ public static ThingBuilder getBuilder(@NotNull String type) { if ("Artery".equals(type)) { return new Artery.ArteryThingBuilder(); } if ("OrderDelivered".equals(type)) { return new OrderDelivered.OrderDeliveredThingBuilder(); } if ("Notary".equals(type)) { return new Notary.NotaryThingBuilder(); } - if ("DataType".equals(type)) { return new DataType.DataTypeThingBuilder(); } if ("Mass".equals(type)) { return new Mass.MassThingBuilder(); } if ("Demand".equals(type)) { return new Demand.DemandThingBuilder(); } if ("FoodEstablishmentReservation".equals(type)) { return new FoodEstablishmentReservation.FoodEstablishmentReservationThingBuilder(); } @@ -3914,7 +3905,6 @@ public static ThingBuilder getBuilder(@NotNull String type) { if ("EmergencyService".equals(type)) { return new EmergencyService.EmergencyServiceThingBuilder(); } if ("Map".equals(type)) { return new Map.MapThingBuilder(); } if ("OrderStatus".equals(type)) { return new OrderStatus.OrderStatusThingBuilder(); } - if ("Integer".equals(type)) { return new Integer.IntegerThingBuilder(); } if ("TypeAndQuantityNode".equals(type)) { return new TypeAndQuantityNode.TypeAndQuantityNodeThingBuilder(); } if ("CarUsageType".equals(type)) { return new CarUsageType.CarUsageTypeThingBuilder(); } if ("VideoGallery".equals(type)) { return new VideoGallery.VideoGalleryThingBuilder(); } diff --git a/src/main/java/org/schema/ScholarlyArticle.java b/src/main/java/org/schema/ScholarlyArticle.java index 13f0ee2b..27afc2ab 100644 --- a/src/main/java/org/schema/ScholarlyArticle.java +++ b/src/main/java/org/schema/ScholarlyArticle.java @@ -1214,7 +1214,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String articleBody; @@ -1445,4 +1445,18 @@ public interface Builder extends ThingBuilder { protected ScholarlyArticle(String articleBody, String articleSection, Integer wordCount, IntegerOrString pageEnd, IntegerOrString pageStart, String pagination, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(articleBody, articleSection, wordCount, pageEnd, pageStart, pagination, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ScholarlyArticle scholarlyArticle = (ScholarlyArticle) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/School.java b/src/main/java/org/schema/School.java index 6b5bc7a8..bc44ffea 100644 --- a/src/main/java/org/schema/School.java +++ b/src/main/java/org/schema/School.java @@ -674,7 +674,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person alumni; @@ -800,4 +800,18 @@ public interface Builder extends ThingBuilder { protected School(Person alumni, PostalAddress address, AggregateRating aggregateRating, String award, BrandOrOrganization brand, ContactPoint contactPoint, Organization department, String duns, String email, Person employee, Event event, String faxNumber, Person founder, java.util.Date dissolutionDate, java.util.Date foundingDate, String globalLocationNumber, Place hasPOS, String isicV4, String legalName, ImageObjectOrString logo, Offer makesOffer, OrganizationOrPerson member, OrganizationOrProgramMembership memberOf, String naics, QuantitativeValue numberOfEmployees, OwnershipInfoOrProduct owns, Review review, Demand seeks, Organization subOrganization, String taxID, String telephone, String vatID, Place foundingLocation, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(alumni, address, aggregateRating, award, brand, contactPoint, department, duns, email, employee, event, faxNumber, founder, dissolutionDate, foundingDate, globalLocationNumber, hasPOS, isicV4, legalName, logo, makesOffer, member, memberOf, naics, numberOfEmployees, owns, review, seeks, subOrganization, taxID, telephone, vatID, foundingLocation, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + School school = (School) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ScreeningEvent.java b/src/main/java/org/schema/ScreeningEvent.java index f4618cee..093d8572 100644 --- a/src/main/java/org/schema/ScreeningEvent.java +++ b/src/main/java/org/schema/ScreeningEvent.java @@ -560,7 +560,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String videoFormat; @@ -659,6 +659,26 @@ protected ScreeningEvent(String videoFormat, LanguageOrString subtitleLanguage, mySubtitleLanguage = subtitleLanguage; myWorkPresented = workPresented; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myVideoFormat != null ? myVideoFormat.hashCode() : 0); + result = 31 * result + (mySubtitleLanguage != null ? mySubtitleLanguage.hashCode() : 0); + result = 31 * result + (myWorkPresented != null ? myWorkPresented.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ScreeningEvent screeningEvent = (ScreeningEvent) o; + if (!super.equals(o)) return false; + if (myVideoFormat != null ? !myVideoFormat.equals(screeningEvent.myVideoFormat) : screeningEvent.myVideoFormat != null) return false; + if (mySubtitleLanguage != null ? !mySubtitleLanguage.equals(screeningEvent.mySubtitleLanguage) : screeningEvent.mySubtitleLanguage != null) return false; + if (myWorkPresented != null ? !myWorkPresented.equals(screeningEvent.myWorkPresented) : screeningEvent.myWorkPresented != null) return false; + return true; + } + private String myVideoFormat; private LanguageOrString mySubtitleLanguage; private Movie myWorkPresented; diff --git a/src/main/java/org/schema/Sculpture.java b/src/main/java/org/schema/Sculpture.java index 58352396..4b42b4dc 100644 --- a/src/main/java/org/schema/Sculpture.java +++ b/src/main/java/org/schema/Sculpture.java @@ -1146,7 +1146,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String schemaVersion; @@ -1363,4 +1363,18 @@ public interface Builder extends ThingBuilder { protected Sculpture(String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Sculpture sculpture = (Sculpture) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SeaBodyOfWater.java b/src/main/java/org/schema/SeaBodyOfWater.java index 91f069a4..1713c7d6 100644 --- a/src/main/java/org/schema/SeaBodyOfWater.java +++ b/src/main/java/org/schema/SeaBodyOfWater.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected SeaBodyOfWater(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SeaBodyOfWater seaBodyOfWater = (SeaBodyOfWater) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SearchAction.java b/src/main/java/org/schema/SearchAction.java index 8c2656cf..1cedc486 100644 --- a/src/main/java/org/schema/SearchAction.java +++ b/src/main/java/org/schema/SearchAction.java @@ -322,7 +322,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String query; @@ -374,5 +374,21 @@ protected SearchAction(String query, OrganizationOrPerson agent, java.util.Date super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myQuery = query; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myQuery != null ? myQuery.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SearchAction searchAction = (SearchAction) o; + if (!super.equals(o)) return false; + if (myQuery != null ? !myQuery.equals(searchAction.myQuery) : searchAction.myQuery != null) return false; + return true; + } + private String myQuery; } diff --git a/src/main/java/org/schema/SearchResultsPage.java b/src/main/java/org/schema/SearchResultsPage.java index 1bb130fb..dea66154 100644 --- a/src/main/java/org/schema/SearchResultsPage.java +++ b/src/main/java/org/schema/SearchResultsPage.java @@ -1266,7 +1266,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BreadcrumbListOrString breadcrumb; @@ -1507,4 +1507,18 @@ public interface Builder extends ThingBuilder { protected SearchResultsPage(BreadcrumbListOrString breadcrumb, java.util.Date lastReviewed, WebPageElement mainContentOfPage, ImageObject primaryImageOfPage, String relatedLink, OrganizationOrPerson reviewedBy, String significantLink, Specialty specialty, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(breadcrumb, lastReviewed, mainContentOfPage, primaryImageOfPage, relatedLink, reviewedBy, significantLink, specialty, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SearchResultsPage searchResultsPage = (SearchResultsPage) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Season.java b/src/main/java/org/schema/Season.java index 261b32cc..a7a76585 100644 --- a/src/main/java/org/schema/Season.java +++ b/src/main/java/org/schema/Season.java @@ -1146,7 +1146,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String schemaVersion; @@ -1363,4 +1363,18 @@ public interface Builder extends ThingBuilder { protected Season(String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Season season = (Season) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Seat.java b/src/main/java/org/schema/Seat.java index 5a633971..50078826 100644 --- a/src/main/java/org/schema/Seat.java +++ b/src/main/java/org/schema/Seat.java @@ -288,7 +288,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String seatNumber; @@ -333,6 +333,28 @@ protected Seat(String seatNumber, String seatRow, String seatSection, Qualitativ mySeatSection = seatSection; mySeatingType = seatingType; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (mySeatNumber != null ? mySeatNumber.hashCode() : 0); + result = 31 * result + (mySeatRow != null ? mySeatRow.hashCode() : 0); + result = 31 * result + (mySeatSection != null ? mySeatSection.hashCode() : 0); + result = 31 * result + (mySeatingType != null ? mySeatingType.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Seat seat = (Seat) o; + if (!super.equals(o)) return false; + if (mySeatNumber != null ? !mySeatNumber.equals(seat.mySeatNumber) : seat.mySeatNumber != null) return false; + if (mySeatRow != null ? !mySeatRow.equals(seat.mySeatRow) : seat.mySeatRow != null) return false; + if (mySeatSection != null ? !mySeatSection.equals(seat.mySeatSection) : seat.mySeatSection != null) return false; + if (mySeatingType != null ? !mySeatingType.equals(seat.mySeatingType) : seat.mySeatingType != null) return false; + return true; + } + private String mySeatNumber; private String mySeatRow; private String mySeatSection; diff --git a/src/main/java/org/schema/SeatingMap.java b/src/main/java/org/schema/SeatingMap.java index 45ff1c9d..37526ba4 100644 --- a/src/main/java/org/schema/SeatingMap.java +++ b/src/main/java/org/schema/SeatingMap.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected SeatingMap() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SeatingMap seatingMap = (SeatingMap) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SelfStorage.java b/src/main/java/org/schema/SelfStorage.java index c66e4641..b0f4959c 100644 --- a/src/main/java/org/schema/SelfStorage.java +++ b/src/main/java/org/schema/SelfStorage.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected SelfStorage(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SelfStorage selfStorage = (SelfStorage) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SellAction.java b/src/main/java/org/schema/SellAction.java index 1b3c322a..22a2698d 100644 --- a/src/main/java/org/schema/SellAction.java +++ b/src/main/java/org/schema/SellAction.java @@ -78,9 +78,93 @@ public SellAction build() { */ - @NotNull public Builder price(@NotNull Number number) { - if (this.price == null) this.price = new NumberOrString(); - this.price.setNumber(number); + @NotNull public Builder price(@NotNull Integer integer) { + if (this.price == null) this.price = new Number(); + this.price.setInteger(integer); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Long price) { + if (this.price == null) this.price = new Number(); + this.price.setLong(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Float price) { + if (this.price == null) this.price = new Number(); + this.price.setFloat(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Double price) { + if (this.price == null) this.price = new Number(); + this.price.setDouble(price); return this; } /** @@ -107,7 +191,7 @@ public SellAction build() { */ @NotNull public Builder price(@NotNull String price) { - if (this.price == null) this.price = new NumberOrString(); + if (this.price == null) this.price = new Number(); this.price.setString(price); return this; } @@ -381,7 +465,10 @@ public Builder id(long id) { Object value = entry.getValue(); if (value instanceof java.util.Map) { value = ThingDeserializer.fromMap((java.util.Map)value); } if ("buyer".equals(key) && value instanceof Person) { buyer((Person)value); continue; } - if ("price".equals(key) && value instanceof Number) { price((Number)value); continue; } + if ("price".equals(key) && value instanceof Integer) { price((Integer)value); continue; } + if ("price".equals(key) && value instanceof Long) { price((Long)value); continue; } + if ("price".equals(key) && value instanceof Float) { price((Float)value); continue; } + if ("price".equals(key) && value instanceof Double) { price((Double)value); continue; } if ("price".equals(key) && value instanceof String) { price((String)value); continue; } if ("priceSpecification".equals(key) && value instanceof PriceSpecification) { priceSpecification((PriceSpecification)value); continue; } if ("agent".equals(key) && value instanceof Organization) { agent((Organization)value); continue; } @@ -400,11 +487,11 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person buyer; - private NumberOrString price; + private Number price; private PriceSpecification priceSpecification; private OrganizationOrPerson agent; private java.util.Date endTime; @@ -425,7 +512,10 @@ public Builder id(long id) { public interface Builder extends ThingBuilder { @NotNull Builder buyer(@NotNull Person person); @NotNull Builder buyer(@NotNull Person.Builder person); - @NotNull Builder price(@NotNull Number number); + @NotNull Builder price(@NotNull Integer integer); + @NotNull Builder price(@NotNull Long price); + @NotNull Builder price(@NotNull Float price); + @NotNull Builder price(@NotNull Double price); @NotNull Builder price(@NotNull String price); @NotNull Builder priceSpecification(@NotNull PriceSpecification priceSpecification); @NotNull Builder priceSpecification(@NotNull PriceSpecification.Builder priceSpecification); @@ -455,9 +545,25 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected SellAction(Person buyer, NumberOrString price, PriceSpecification priceSpecification, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected SellAction(Person buyer, Number price, PriceSpecification priceSpecification, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(price, priceSpecification, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myBuyer = buyer; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBuyer != null ? myBuyer.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SellAction sellAction = (SellAction) o; + if (!super.equals(o)) return false; + if (myBuyer != null ? !myBuyer.equals(sellAction.myBuyer) : sellAction.myBuyer != null) return false; + return true; + } + private Person myBuyer; } diff --git a/src/main/java/org/schema/SendAction.java b/src/main/java/org/schema/SendAction.java index e481bc78..023f4fe0 100644 --- a/src/main/java/org/schema/SendAction.java +++ b/src/main/java/org/schema/SendAction.java @@ -407,7 +407,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private DeliveryMethod deliveryMethod; @@ -474,6 +474,24 @@ protected SendAction(DeliveryMethod deliveryMethod, AudienceOrOrganizationOrPers myDeliveryMethod = deliveryMethod; myRecipient = recipient; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDeliveryMethod != null ? myDeliveryMethod.hashCode() : 0); + result = 31 * result + (myRecipient != null ? myRecipient.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SendAction sendAction = (SendAction) o; + if (!super.equals(o)) return false; + if (myDeliveryMethod != null ? !myDeliveryMethod.equals(sendAction.myDeliveryMethod) : sendAction.myDeliveryMethod != null) return false; + if (myRecipient != null ? !myRecipient.equals(sendAction.myRecipient) : sendAction.myRecipient != null) return false; + return true; + } + private DeliveryMethod myDeliveryMethod; private AudienceOrOrganizationOrPerson myRecipient; } diff --git a/src/main/java/org/schema/Series.java b/src/main/java/org/schema/Series.java index 12b9653b..f94d1678 100644 --- a/src/main/java/org/schema/Series.java +++ b/src/main/java/org/schema/Series.java @@ -1147,7 +1147,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String schemaVersion; @@ -1364,4 +1364,18 @@ public interface Builder extends ThingBuilder { protected Series(String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Series series = (Series) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Service.java b/src/main/java/org/schema/Service.java index 6f00798b..f85fdecd 100644 --- a/src/main/java/org/schema/Service.java +++ b/src/main/java/org/schema/Service.java @@ -366,7 +366,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -426,6 +426,34 @@ protected Service(AggregateRating aggregateRating, ServiceChannel availableChann myServiceType = serviceType; myProvider = provider; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAggregateRating != null ? myAggregateRating.hashCode() : 0); + result = 31 * result + (myAvailableChannel != null ? myAvailableChannel.hashCode() : 0); + result = 31 * result + (myServiceOutput != null ? myServiceOutput.hashCode() : 0); + result = 31 * result + (myReview != null ? myReview.hashCode() : 0); + result = 31 * result + (myServiceArea != null ? myServiceArea.hashCode() : 0); + result = 31 * result + (myServiceType != null ? myServiceType.hashCode() : 0); + result = 31 * result + (myProvider != null ? myProvider.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Service service = (Service) o; + if (!super.equals(o)) return false; + if (myAggregateRating != null ? !myAggregateRating.equals(service.myAggregateRating) : service.myAggregateRating != null) return false; + if (myAvailableChannel != null ? !myAvailableChannel.equals(service.myAvailableChannel) : service.myAvailableChannel != null) return false; + if (myServiceOutput != null ? !myServiceOutput.equals(service.myServiceOutput) : service.myServiceOutput != null) return false; + if (myReview != null ? !myReview.equals(service.myReview) : service.myReview != null) return false; + if (myServiceArea != null ? !myServiceArea.equals(service.myServiceArea) : service.myServiceArea != null) return false; + if (myServiceType != null ? !myServiceType.equals(service.myServiceType) : service.myServiceType != null) return false; + if (myProvider != null ? !myProvider.equals(service.myProvider) : service.myProvider != null) return false; + return true; + } + private AggregateRating myAggregateRating; private ServiceChannel myAvailableChannel; private Thing myServiceOutput; diff --git a/src/main/java/org/schema/ServiceChannel.java b/src/main/java/org/schema/ServiceChannel.java index bc303ef4..d08710a9 100644 --- a/src/main/java/org/schema/ServiceChannel.java +++ b/src/main/java/org/schema/ServiceChannel.java @@ -370,7 +370,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Language availableLanguage; @@ -432,6 +432,36 @@ protected ServiceChannel(Language availableLanguage, Duration processingTime, Se myServiceSmsNumber = serviceSmsNumber; myServiceUrl = serviceUrl; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAvailableLanguage != null ? myAvailableLanguage.hashCode() : 0); + result = 31 * result + (myProcessingTime != null ? myProcessingTime.hashCode() : 0); + result = 31 * result + (myProvidesService != null ? myProvidesService.hashCode() : 0); + result = 31 * result + (myServiceLocation != null ? myServiceLocation.hashCode() : 0); + result = 31 * result + (myServicePhone != null ? myServicePhone.hashCode() : 0); + result = 31 * result + (myServicePostalAddress != null ? myServicePostalAddress.hashCode() : 0); + result = 31 * result + (myServiceSmsNumber != null ? myServiceSmsNumber.hashCode() : 0); + result = 31 * result + (myServiceUrl != null ? myServiceUrl.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ServiceChannel serviceChannel = (ServiceChannel) o; + if (!super.equals(o)) return false; + if (myAvailableLanguage != null ? !myAvailableLanguage.equals(serviceChannel.myAvailableLanguage) : serviceChannel.myAvailableLanguage != null) return false; + if (myProcessingTime != null ? !myProcessingTime.equals(serviceChannel.myProcessingTime) : serviceChannel.myProcessingTime != null) return false; + if (myProvidesService != null ? !myProvidesService.equals(serviceChannel.myProvidesService) : serviceChannel.myProvidesService != null) return false; + if (myServiceLocation != null ? !myServiceLocation.equals(serviceChannel.myServiceLocation) : serviceChannel.myServiceLocation != null) return false; + if (myServicePhone != null ? !myServicePhone.equals(serviceChannel.myServicePhone) : serviceChannel.myServicePhone != null) return false; + if (myServicePostalAddress != null ? !myServicePostalAddress.equals(serviceChannel.myServicePostalAddress) : serviceChannel.myServicePostalAddress != null) return false; + if (myServiceSmsNumber != null ? !myServiceSmsNumber.equals(serviceChannel.myServiceSmsNumber) : serviceChannel.myServiceSmsNumber != null) return false; + if (myServiceUrl != null ? !myServiceUrl.equals(serviceChannel.myServiceUrl) : serviceChannel.myServiceUrl != null) return false; + return true; + } + private Language myAvailableLanguage; private Duration myProcessingTime; private Service myProvidesService; diff --git a/src/main/java/org/schema/ShareAction.java b/src/main/java/org/schema/ShareAction.java index b8eb7768..836b4769 100644 --- a/src/main/java/org/schema/ShareAction.java +++ b/src/main/java/org/schema/ShareAction.java @@ -391,7 +391,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Thing about; @@ -454,4 +454,18 @@ public interface Builder extends ThingBuilder { protected ShareAction(Thing about, LanguageOrString inLanguage, AudienceOrOrganizationOrPerson recipient, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(about, inLanguage, recipient, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ShareAction shareAction = (ShareAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ShoeStore.java b/src/main/java/org/schema/ShoeStore.java index 33e98d66..aeb6a456 100644 --- a/src/main/java/org/schema/ShoeStore.java +++ b/src/main/java/org/schema/ShoeStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected ShoeStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ShoeStore shoeStore = (ShoeStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ShoppingCenter.java b/src/main/java/org/schema/ShoppingCenter.java index 02f4cf31..ad59ce26 100644 --- a/src/main/java/org/schema/ShoppingCenter.java +++ b/src/main/java/org/schema/ShoppingCenter.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected ShoppingCenter(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ShoppingCenter shoppingCenter = (ShoppingCenter) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SingleBlindedTrial.java b/src/main/java/org/schema/SingleBlindedTrial.java index 95cc17da..0f5f71b8 100644 --- a/src/main/java/org/schema/SingleBlindedTrial.java +++ b/src/main/java/org/schema/SingleBlindedTrial.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected SingleBlindedTrial() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SingleBlindedTrial singleBlindedTrial = (SingleBlindedTrial) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SingleCenterTrial.java b/src/main/java/org/schema/SingleCenterTrial.java index 110fa022..b73af3fe 100644 --- a/src/main/java/org/schema/SingleCenterTrial.java +++ b/src/main/java/org/schema/SingleCenterTrial.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected SingleCenterTrial() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SingleCenterTrial singleCenterTrial = (SingleCenterTrial) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SingleFamilyResidence.java b/src/main/java/org/schema/SingleFamilyResidence.java index 873f0c3c..cd7a35fb 100644 --- a/src/main/java/org/schema/SingleFamilyResidence.java +++ b/src/main/java/org/schema/SingleFamilyResidence.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected SingleFamilyResidence(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SingleFamilyResidence singleFamilyResidence = (SingleFamilyResidence) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SinglePlayer.java b/src/main/java/org/schema/SinglePlayer.java index 0ac3ee33..c0166db8 100644 --- a/src/main/java/org/schema/SinglePlayer.java +++ b/src/main/java/org/schema/SinglePlayer.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected SinglePlayer() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SinglePlayer singlePlayer = (SinglePlayer) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SingleRelease.java b/src/main/java/org/schema/SingleRelease.java index 50885fdc..4089a91b 100644 --- a/src/main/java/org/schema/SingleRelease.java +++ b/src/main/java/org/schema/SingleRelease.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected SingleRelease() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SingleRelease singleRelease = (SingleRelease) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SiteNavigationElement.java b/src/main/java/org/schema/SiteNavigationElement.java index 0b23c99e..4daa911d 100644 --- a/src/main/java/org/schema/SiteNavigationElement.java +++ b/src/main/java/org/schema/SiteNavigationElement.java @@ -1146,7 +1146,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String schemaVersion; @@ -1363,4 +1363,18 @@ public interface Builder extends ThingBuilder { protected SiteNavigationElement(String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SiteNavigationElement siteNavigationElement = (SiteNavigationElement) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SkiResort.java b/src/main/java/org/schema/SkiResort.java index 86fa220c..177c784a 100644 --- a/src/main/java/org/schema/SkiResort.java +++ b/src/main/java/org/schema/SkiResort.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected SkiResort(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SkiResort skiResort = (SkiResort) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Skin.java b/src/main/java/org/schema/Skin.java index a6671a15..e0ab194b 100644 --- a/src/main/java/org/schema/Skin.java +++ b/src/main/java/org/schema/Skin.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Skin() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Skin skin = (Skin) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SocialEvent.java b/src/main/java/org/schema/SocialEvent.java index a65eb02f..f25ef6c5 100644 --- a/src/main/java/org/schema/SocialEvent.java +++ b/src/main/java/org/schema/SocialEvent.java @@ -496,7 +496,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -583,4 +583,18 @@ public interface Builder extends ThingBuilder { protected SocialEvent(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SocialEvent socialEvent = (SocialEvent) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SoftwareApplication.java b/src/main/java/org/schema/SoftwareApplication.java index 66f99ac9..677e8267 100644 --- a/src/main/java/org/schema/SoftwareApplication.java +++ b/src/main/java/org/schema/SoftwareApplication.java @@ -1482,7 +1482,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String applicationCategory; @@ -1769,6 +1769,64 @@ protected SoftwareApplication(String applicationCategory, String applicationSubC mySoftwareAddOn = softwareAddOn; mySoftwareHelp = softwareHelp; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myApplicationCategory != null ? myApplicationCategory.hashCode() : 0); + result = 31 * result + (myApplicationSubCategory != null ? myApplicationSubCategory.hashCode() : 0); + result = 31 * result + (myApplicationSuite != null ? myApplicationSuite.hashCode() : 0); + result = 31 * result + (myCountriesNotSupported != null ? myCountriesNotSupported.hashCode() : 0); + result = 31 * result + (myCountriesSupported != null ? myCountriesSupported.hashCode() : 0); + result = 31 * result + (myAvailableOnDevice != null ? myAvailableOnDevice.hashCode() : 0); + result = 31 * result + (myDownloadUrl != null ? myDownloadUrl.hashCode() : 0); + result = 31 * result + (myFeatureList != null ? myFeatureList.hashCode() : 0); + result = 31 * result + (myFileFormat != null ? myFileFormat.hashCode() : 0); + result = 31 * result + (myFileSize != null ? myFileSize.hashCode() : 0); + result = 31 * result + (myInstallUrl != null ? myInstallUrl.hashCode() : 0); + result = 31 * result + (myMemoryRequirements != null ? myMemoryRequirements.hashCode() : 0); + result = 31 * result + (myOperatingSystem != null ? myOperatingSystem.hashCode() : 0); + result = 31 * result + (myPermissions != null ? myPermissions.hashCode() : 0); + result = 31 * result + (myProcessorRequirements != null ? myProcessorRequirements.hashCode() : 0); + result = 31 * result + (myReleaseNotes != null ? myReleaseNotes.hashCode() : 0); + result = 31 * result + (mySoftwareRequirements != null ? mySoftwareRequirements.hashCode() : 0); + result = 31 * result + (myScreenshot != null ? myScreenshot.hashCode() : 0); + result = 31 * result + (mySoftwareVersion != null ? mySoftwareVersion.hashCode() : 0); + result = 31 * result + (myStorageRequirements != null ? myStorageRequirements.hashCode() : 0); + result = 31 * result + (mySoftwareAddOn != null ? mySoftwareAddOn.hashCode() : 0); + result = 31 * result + (mySoftwareHelp != null ? mySoftwareHelp.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SoftwareApplication softwareApplication = (SoftwareApplication) o; + if (!super.equals(o)) return false; + if (myApplicationCategory != null ? !myApplicationCategory.equals(softwareApplication.myApplicationCategory) : softwareApplication.myApplicationCategory != null) return false; + if (myApplicationSubCategory != null ? !myApplicationSubCategory.equals(softwareApplication.myApplicationSubCategory) : softwareApplication.myApplicationSubCategory != null) return false; + if (myApplicationSuite != null ? !myApplicationSuite.equals(softwareApplication.myApplicationSuite) : softwareApplication.myApplicationSuite != null) return false; + if (myCountriesNotSupported != null ? !myCountriesNotSupported.equals(softwareApplication.myCountriesNotSupported) : softwareApplication.myCountriesNotSupported != null) return false; + if (myCountriesSupported != null ? !myCountriesSupported.equals(softwareApplication.myCountriesSupported) : softwareApplication.myCountriesSupported != null) return false; + if (myAvailableOnDevice != null ? !myAvailableOnDevice.equals(softwareApplication.myAvailableOnDevice) : softwareApplication.myAvailableOnDevice != null) return false; + if (myDownloadUrl != null ? !myDownloadUrl.equals(softwareApplication.myDownloadUrl) : softwareApplication.myDownloadUrl != null) return false; + if (myFeatureList != null ? !myFeatureList.equals(softwareApplication.myFeatureList) : softwareApplication.myFeatureList != null) return false; + if (myFileFormat != null ? !myFileFormat.equals(softwareApplication.myFileFormat) : softwareApplication.myFileFormat != null) return false; + if (myFileSize != null ? !myFileSize.equals(softwareApplication.myFileSize) : softwareApplication.myFileSize != null) return false; + if (myInstallUrl != null ? !myInstallUrl.equals(softwareApplication.myInstallUrl) : softwareApplication.myInstallUrl != null) return false; + if (myMemoryRequirements != null ? !myMemoryRequirements.equals(softwareApplication.myMemoryRequirements) : softwareApplication.myMemoryRequirements != null) return false; + if (myOperatingSystem != null ? !myOperatingSystem.equals(softwareApplication.myOperatingSystem) : softwareApplication.myOperatingSystem != null) return false; + if (myPermissions != null ? !myPermissions.equals(softwareApplication.myPermissions) : softwareApplication.myPermissions != null) return false; + if (myProcessorRequirements != null ? !myProcessorRequirements.equals(softwareApplication.myProcessorRequirements) : softwareApplication.myProcessorRequirements != null) return false; + if (myReleaseNotes != null ? !myReleaseNotes.equals(softwareApplication.myReleaseNotes) : softwareApplication.myReleaseNotes != null) return false; + if (mySoftwareRequirements != null ? !mySoftwareRequirements.equals(softwareApplication.mySoftwareRequirements) : softwareApplication.mySoftwareRequirements != null) return false; + if (myScreenshot != null ? !myScreenshot.equals(softwareApplication.myScreenshot) : softwareApplication.myScreenshot != null) return false; + if (mySoftwareVersion != null ? !mySoftwareVersion.equals(softwareApplication.mySoftwareVersion) : softwareApplication.mySoftwareVersion != null) return false; + if (myStorageRequirements != null ? !myStorageRequirements.equals(softwareApplication.myStorageRequirements) : softwareApplication.myStorageRequirements != null) return false; + if (mySoftwareAddOn != null ? !mySoftwareAddOn.equals(softwareApplication.mySoftwareAddOn) : softwareApplication.mySoftwareAddOn != null) return false; + if (mySoftwareHelp != null ? !mySoftwareHelp.equals(softwareApplication.mySoftwareHelp) : softwareApplication.mySoftwareHelp != null) return false; + return true; + } + private String myApplicationCategory; private String myApplicationSubCategory; private String myApplicationSuite; diff --git a/src/main/java/org/schema/SoftwareApplicationBuild.java b/src/main/java/org/schema/SoftwareApplicationBuild.java index f7af088b..f52059c2 100644 --- a/src/main/java/org/schema/SoftwareApplicationBuild.java +++ b/src/main/java/org/schema/SoftwareApplicationBuild.java @@ -1390,7 +1390,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private SoftwareApplication softwareApplication; @@ -1663,6 +1663,24 @@ protected SoftwareApplicationBuild(SoftwareApplication softwareApplication, Proj mySoftwareApplication = softwareApplication; myProject = project; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (mySoftwareApplication != null ? mySoftwareApplication.hashCode() : 0); + result = 31 * result + (myProject != null ? myProject.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SoftwareApplicationBuild softwareApplicationBuild = (SoftwareApplicationBuild) o; + if (!super.equals(o)) return false; + if (mySoftwareApplication != null ? !mySoftwareApplication.equals(softwareApplicationBuild.mySoftwareApplication) : softwareApplicationBuild.mySoftwareApplication != null) return false; + if (myProject != null ? !myProject.equals(softwareApplicationBuild.myProject) : softwareApplicationBuild.myProject != null) return false; + return true; + } + private SoftwareApplication mySoftwareApplication; private Project myProject; } diff --git a/src/main/java/org/schema/SoftwareSourceCode.java b/src/main/java/org/schema/SoftwareSourceCode.java index c983f4fb..e370ba1e 100644 --- a/src/main/java/org/schema/SoftwareSourceCode.java +++ b/src/main/java/org/schema/SoftwareSourceCode.java @@ -1228,7 +1228,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String codeRepository; @@ -1462,6 +1462,30 @@ protected SoftwareSourceCode(String codeRepository, Language programmingLanguage myCodeSampleType = codeSampleType; myTargetProduct = targetProduct; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myCodeRepository != null ? myCodeRepository.hashCode() : 0); + result = 31 * result + (myProgrammingLanguage != null ? myProgrammingLanguage.hashCode() : 0); + result = 31 * result + (myRuntimePlatform != null ? myRuntimePlatform.hashCode() : 0); + result = 31 * result + (myCodeSampleType != null ? myCodeSampleType.hashCode() : 0); + result = 31 * result + (myTargetProduct != null ? myTargetProduct.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SoftwareSourceCode softwareSourceCode = (SoftwareSourceCode) o; + if (!super.equals(o)) return false; + if (myCodeRepository != null ? !myCodeRepository.equals(softwareSourceCode.myCodeRepository) : softwareSourceCode.myCodeRepository != null) return false; + if (myProgrammingLanguage != null ? !myProgrammingLanguage.equals(softwareSourceCode.myProgrammingLanguage) : softwareSourceCode.myProgrammingLanguage != null) return false; + if (myRuntimePlatform != null ? !myRuntimePlatform.equals(softwareSourceCode.myRuntimePlatform) : softwareSourceCode.myRuntimePlatform != null) return false; + if (myCodeSampleType != null ? !myCodeSampleType.equals(softwareSourceCode.myCodeSampleType) : softwareSourceCode.myCodeSampleType != null) return false; + if (myTargetProduct != null ? !myTargetProduct.equals(softwareSourceCode.myTargetProduct) : softwareSourceCode.myTargetProduct != null) return false; + return true; + } + private String myCodeRepository; private Language myProgrammingLanguage; private String myRuntimePlatform; diff --git a/src/main/java/org/schema/SoldOut.java b/src/main/java/org/schema/SoldOut.java index 4ec4f352..5eaf5584 100644 --- a/src/main/java/org/schema/SoldOut.java +++ b/src/main/java/org/schema/SoldOut.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected SoldOut() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SoldOut soldOut = (SoldOut) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SomeProducts.java b/src/main/java/org/schema/SomeProducts.java index abaa6258..04135944 100644 --- a/src/main/java/org/schema/SomeProducts.java +++ b/src/main/java/org/schema/SomeProducts.java @@ -714,7 +714,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private QuantitativeValue inventoryLevel; @@ -843,5 +843,21 @@ protected SomeProducts(QuantitativeValue inventoryLevel, AggregateRating aggrega super(aggregateRating, audience, award, brand, category, color, depth, gtin12, gtin13, gtin14, gtin8, height, isAccessoryOrSparePartFor, isConsumableFor, isRelatedTo, isSimilarTo, itemCondition, logo, manufacturer, model, mpn, offers, productID, releaseDate, review, sku, weight, width, additionalProperty, productionDate, purchaseDate, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myInventoryLevel = inventoryLevel; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myInventoryLevel != null ? myInventoryLevel.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SomeProducts someProducts = (SomeProducts) o; + if (!super.equals(o)) return false; + if (myInventoryLevel != null ? !myInventoryLevel.equals(someProducts.myInventoryLevel) : someProducts.myInventoryLevel != null) return false; + return true; + } + private QuantitativeValue myInventoryLevel; } diff --git a/src/main/java/org/schema/SoundtrackAlbum.java b/src/main/java/org/schema/SoundtrackAlbum.java index 938cd682..9a50bb07 100644 --- a/src/main/java/org/schema/SoundtrackAlbum.java +++ b/src/main/java/org/schema/SoundtrackAlbum.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected SoundtrackAlbum() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SoundtrackAlbum soundtrackAlbum = (SoundtrackAlbum) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Specialty.java b/src/main/java/org/schema/Specialty.java index bf8a0395..18370531 100644 --- a/src/main/java/org/schema/Specialty.java +++ b/src/main/java/org/schema/Specialty.java @@ -246,7 +246,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -282,4 +282,18 @@ public interface Builder extends ThingBuilder { protected Specialty(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Specialty specialty = (Specialty) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SpeechPathology.java b/src/main/java/org/schema/SpeechPathology.java index 45d4f6fe..96900c57 100644 --- a/src/main/java/org/schema/SpeechPathology.java +++ b/src/main/java/org/schema/SpeechPathology.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected SpeechPathology() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SpeechPathology speechPathology = (SpeechPathology) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SpokenWordAlbum.java b/src/main/java/org/schema/SpokenWordAlbum.java index 7b0c05a3..ce3fe1d0 100644 --- a/src/main/java/org/schema/SpokenWordAlbum.java +++ b/src/main/java/org/schema/SpokenWordAlbum.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected SpokenWordAlbum() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SpokenWordAlbum spokenWordAlbum = (SpokenWordAlbum) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SportingGoodsStore.java b/src/main/java/org/schema/SportingGoodsStore.java index 19782092..bb235015 100644 --- a/src/main/java/org/schema/SportingGoodsStore.java +++ b/src/main/java/org/schema/SportingGoodsStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected SportingGoodsStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SportingGoodsStore sportingGoodsStore = (SportingGoodsStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SportsActivityLocation.java b/src/main/java/org/schema/SportsActivityLocation.java index e83799b5..8979e047 100644 --- a/src/main/java/org/schema/SportsActivityLocation.java +++ b/src/main/java/org/schema/SportsActivityLocation.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected SportsActivityLocation(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SportsActivityLocation sportsActivityLocation = (SportsActivityLocation) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SportsClub.java b/src/main/java/org/schema/SportsClub.java index e1985c62..ada9b786 100644 --- a/src/main/java/org/schema/SportsClub.java +++ b/src/main/java/org/schema/SportsClub.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected SportsClub(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SportsClub sportsClub = (SportsClub) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SportsEvent.java b/src/main/java/org/schema/SportsEvent.java index a5dff68c..600575eb 100644 --- a/src/main/java/org/schema/SportsEvent.java +++ b/src/main/java/org/schema/SportsEvent.java @@ -538,7 +538,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Competitor homeTeam; @@ -634,6 +634,26 @@ protected SportsEvent(Competitor homeTeam, Competitor awayTeam, Competitor compe myAwayTeam = awayTeam; myCompetitor = competitor; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myHomeTeam != null ? myHomeTeam.hashCode() : 0); + result = 31 * result + (myAwayTeam != null ? myAwayTeam.hashCode() : 0); + result = 31 * result + (myCompetitor != null ? myCompetitor.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SportsEvent sportsEvent = (SportsEvent) o; + if (!super.equals(o)) return false; + if (myHomeTeam != null ? !myHomeTeam.equals(sportsEvent.myHomeTeam) : sportsEvent.myHomeTeam != null) return false; + if (myAwayTeam != null ? !myAwayTeam.equals(sportsEvent.myAwayTeam) : sportsEvent.myAwayTeam != null) return false; + if (myCompetitor != null ? !myCompetitor.equals(sportsEvent.myCompetitor) : sportsEvent.myCompetitor != null) return false; + return true; + } + private Competitor myHomeTeam; private Competitor myAwayTeam; private Competitor myCompetitor; diff --git a/src/main/java/org/schema/SportsOrganization.java b/src/main/java/org/schema/SportsOrganization.java index 80344736..e633c2d0 100644 --- a/src/main/java/org/schema/SportsOrganization.java +++ b/src/main/java/org/schema/SportsOrganization.java @@ -674,7 +674,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String sport; @@ -800,5 +800,21 @@ protected SportsOrganization(String sport, PostalAddress address, AggregateRatin super(address, aggregateRating, award, brand, contactPoint, department, duns, email, employee, event, faxNumber, founder, dissolutionDate, foundingDate, globalLocationNumber, hasPOS, isicV4, legalName, logo, makesOffer, member, memberOf, naics, numberOfEmployees, owns, review, seeks, subOrganization, taxID, telephone, vatID, foundingLocation, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); mySport = sport; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (mySport != null ? mySport.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SportsOrganization sportsOrganization = (SportsOrganization) o; + if (!super.equals(o)) return false; + if (mySport != null ? !mySport.equals(sportsOrganization.mySport) : sportsOrganization.mySport != null) return false; + return true; + } + private String mySport; } diff --git a/src/main/java/org/schema/SportsTeam.java b/src/main/java/org/schema/SportsTeam.java index 86ec8cbf..e8471c98 100644 --- a/src/main/java/org/schema/SportsTeam.java +++ b/src/main/java/org/schema/SportsTeam.java @@ -708,7 +708,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person coach; @@ -841,6 +841,24 @@ protected SportsTeam(Person coach, Person athlete, String sport, PostalAddress a myCoach = coach; myAthlete = athlete; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myCoach != null ? myCoach.hashCode() : 0); + result = 31 * result + (myAthlete != null ? myAthlete.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SportsTeam sportsTeam = (SportsTeam) o; + if (!super.equals(o)) return false; + if (myCoach != null ? !myCoach.equals(sportsTeam.myCoach) : sportsTeam.myCoach != null) return false; + if (myAthlete != null ? !myAthlete.equals(sportsTeam.myAthlete) : sportsTeam.myAthlete != null) return false; + return true; + } + private Person myCoach; private Person myAthlete; } diff --git a/src/main/java/org/schema/StackExchange.java b/src/main/java/org/schema/StackExchange.java index 2df5e274..98263ae1 100644 --- a/src/main/java/org/schema/StackExchange.java +++ b/src/main/java/org/schema/StackExchange.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected StackExchange() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + StackExchange stackExchange = (StackExchange) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/StadiumOrArena.java b/src/main/java/org/schema/StadiumOrArena.java index c4992a40..4948552f 100644 --- a/src/main/java/org/schema/StadiumOrArena.java +++ b/src/main/java/org/schema/StadiumOrArena.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected StadiumOrArena(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + StadiumOrArena stadiumOrArena = (StadiumOrArena) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/State.java b/src/main/java/org/schema/State.java index d9837720..8e6ee766 100644 --- a/src/main/java/org/schema/State.java +++ b/src/main/java/org/schema/State.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected State(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + State state = (State) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SteeringPositionValue.java b/src/main/java/org/schema/SteeringPositionValue.java index 030ab4ce..b5fd606a 100644 --- a/src/main/java/org/schema/SteeringPositionValue.java +++ b/src/main/java/org/schema/SteeringPositionValue.java @@ -426,7 +426,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private QualitativeValue equal; @@ -494,4 +494,18 @@ public interface Builder extends ThingBuilder { protected SteeringPositionValue(QualitativeValue equal, QualitativeValue greater, QualitativeValue greaterOrEqual, QualitativeValue lesser, QualitativeValue lesserOrEqual, QualitativeValue nonEqual, EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue valueReference, PropertyValue additionalProperty, EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(equal, greater, greaterOrEqual, lesser, lesserOrEqual, nonEqual, valueReference, additionalProperty, supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SteeringPositionValue steeringPositionValue = (SteeringPositionValue) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Store.java b/src/main/java/org/schema/Store.java index f19200a4..da969370 100644 --- a/src/main/java/org/schema/Store.java +++ b/src/main/java/org/schema/Store.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected Store(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Store store = (Store) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/StrengthTraining.java b/src/main/java/org/schema/StrengthTraining.java index 30e87898..fa916af1 100644 --- a/src/main/java/org/schema/StrengthTraining.java +++ b/src/main/java/org/schema/StrengthTraining.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected StrengthTraining() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + StrengthTraining strengthTraining = (StrengthTraining) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/StringOrThing.java b/src/main/java/org/schema/StringOrThing.java index 31c0855e..188c85d8 100644 --- a/src/main/java/org/schema/StringOrThing.java +++ b/src/main/java/org/schema/StringOrThing.java @@ -39,4 +39,21 @@ private void clear() { myString = null; myThing = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + result = 31 * result + (myThing != null ? myThing.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + StringOrThing stringOrThing = (StringOrThing) o; + if (myString != null ? !myString.equals(stringOrThing.myString) : stringOrThing.myString != null) return false; + if (myThing != null ? !myThing.equals(stringOrThing.myThing) : stringOrThing.myThing != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/StringOrVehicle.java b/src/main/java/org/schema/StringOrVehicle.java index 6c87d799..dc63db7c 100644 --- a/src/main/java/org/schema/StringOrVehicle.java +++ b/src/main/java/org/schema/StringOrVehicle.java @@ -39,4 +39,21 @@ private void clear() { myString = null; myVehicle = null; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myString != null ? myString.hashCode() : 0); + result = 31 * result + (myVehicle != null ? myVehicle.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + StringOrVehicle stringOrVehicle = (StringOrVehicle) o; + if (myString != null ? !myString.equals(stringOrVehicle.myString) : stringOrVehicle.myString != null) return false; + if (myVehicle != null ? !myVehicle.equals(stringOrVehicle.myVehicle) : stringOrVehicle.myVehicle != null) return false; + return true; + } + } diff --git a/src/main/java/org/schema/StructuredValue.java b/src/main/java/org/schema/StructuredValue.java index 7da781b6..db900323 100644 --- a/src/main/java/org/schema/StructuredValue.java +++ b/src/main/java/org/schema/StructuredValue.java @@ -216,7 +216,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String additionalType; @@ -247,4 +247,18 @@ public interface Builder extends ThingBuilder { protected StructuredValue(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + StructuredValue structuredValue = (StructuredValue) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/StudioAlbum.java b/src/main/java/org/schema/StudioAlbum.java index 738bb058..ae2a24b7 100644 --- a/src/main/java/org/schema/StudioAlbum.java +++ b/src/main/java/org/schema/StudioAlbum.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected StudioAlbum() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + StudioAlbum studioAlbum = (StudioAlbum) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SubscribeAction.java b/src/main/java/org/schema/SubscribeAction.java index 55b1b840..6b2d26cd 100644 --- a/src/main/java/org/schema/SubscribeAction.java +++ b/src/main/java/org/schema/SubscribeAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected SubscribeAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SubscribeAction subscribeAction = (SubscribeAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SubwayStation.java b/src/main/java/org/schema/SubwayStation.java index 804690d7..34e2a162 100644 --- a/src/main/java/org/schema/SubwayStation.java +++ b/src/main/java/org/schema/SubwayStation.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected SubwayStation(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SubwayStation subwayStation = (SubwayStation) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SuperficialAnatomy.java b/src/main/java/org/schema/SuperficialAnatomy.java index 2533d2a1..bcf703b2 100644 --- a/src/main/java/org/schema/SuperficialAnatomy.java +++ b/src/main/java/org/schema/SuperficialAnatomy.java @@ -405,7 +405,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String associatedPathophysiology; @@ -474,6 +474,30 @@ protected SuperficialAnatomy(String associatedPathophysiology, AnatomicalStructu myRelatedTherapy = relatedTherapy; mySignificance = significance; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAssociatedPathophysiology != null ? myAssociatedPathophysiology.hashCode() : 0); + result = 31 * result + (myRelatedAnatomy != null ? myRelatedAnatomy.hashCode() : 0); + result = 31 * result + (myRelatedCondition != null ? myRelatedCondition.hashCode() : 0); + result = 31 * result + (myRelatedTherapy != null ? myRelatedTherapy.hashCode() : 0); + result = 31 * result + (mySignificance != null ? mySignificance.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SuperficialAnatomy superficialAnatomy = (SuperficialAnatomy) o; + if (!super.equals(o)) return false; + if (myAssociatedPathophysiology != null ? !myAssociatedPathophysiology.equals(superficialAnatomy.myAssociatedPathophysiology) : superficialAnatomy.myAssociatedPathophysiology != null) return false; + if (myRelatedAnatomy != null ? !myRelatedAnatomy.equals(superficialAnatomy.myRelatedAnatomy) : superficialAnatomy.myRelatedAnatomy != null) return false; + if (myRelatedCondition != null ? !myRelatedCondition.equals(superficialAnatomy.myRelatedCondition) : superficialAnatomy.myRelatedCondition != null) return false; + if (myRelatedTherapy != null ? !myRelatedTherapy.equals(superficialAnatomy.myRelatedTherapy) : superficialAnatomy.myRelatedTherapy != null) return false; + if (mySignificance != null ? !mySignificance.equals(superficialAnatomy.mySignificance) : superficialAnatomy.mySignificance != null) return false; + return true; + } + private String myAssociatedPathophysiology; private AnatomicalStructureOrAnatomicalSystem myRelatedAnatomy; private MedicalCondition myRelatedCondition; diff --git a/src/main/java/org/schema/Surgical.java b/src/main/java/org/schema/Surgical.java index 2c163e99..6a1ce055 100644 --- a/src/main/java/org/schema/Surgical.java +++ b/src/main/java/org/schema/Surgical.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Surgical() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Surgical surgical = (Surgical) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SurgicalProcedure.java b/src/main/java/org/schema/SurgicalProcedure.java index 011ad532..90f6f168 100644 --- a/src/main/java/org/schema/SurgicalProcedure.java +++ b/src/main/java/org/schema/SurgicalProcedure.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected SurgicalProcedure() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SurgicalProcedure surgicalProcedure = (SurgicalProcedure) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/SuspendAction.java b/src/main/java/org/schema/SuspendAction.java index 4bfa4f89..d75fc141 100644 --- a/src/main/java/org/schema/SuspendAction.java +++ b/src/main/java/org/schema/SuspendAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected SuspendAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SuspendAction suspendAction = (SuspendAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Suspended.java b/src/main/java/org/schema/Suspended.java index e98434f7..66d41df5 100644 --- a/src/main/java/org/schema/Suspended.java +++ b/src/main/java/org/schema/Suspended.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Suspended() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Suspended suspended = (Suspended) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Synagogue.java b/src/main/java/org/schema/Synagogue.java index b3ff6f3a..5f884edc 100644 --- a/src/main/java/org/schema/Synagogue.java +++ b/src/main/java/org/schema/Synagogue.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected Synagogue(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Synagogue synagogue = (Synagogue) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TVClip.java b/src/main/java/org/schema/TVClip.java index 27e9c727..e357d3c1 100644 --- a/src/main/java/org/schema/TVClip.java +++ b/src/main/java/org/schema/TVClip.java @@ -1236,7 +1236,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person actor; @@ -1472,4 +1472,18 @@ public interface Builder extends ThingBuilder { protected TVClip(Person actor, Position clipNumber, Person director, MusicGroupOrPerson musicBy, IsPartOf partOfEpisode, IsPartOf partOfSeason, IsPartOf partOfSeries, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(actor, clipNumber, director, musicBy, partOfEpisode, partOfSeason, partOfSeries, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TVClip tVClip = (TVClip) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TVEpisode.java b/src/main/java/org/schema/TVEpisode.java index f918efe2..23b38f1d 100644 --- a/src/main/java/org/schema/TVEpisode.java +++ b/src/main/java/org/schema/TVEpisode.java @@ -1296,7 +1296,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private LanguageOrString subtitleLanguage; @@ -1542,5 +1542,21 @@ protected TVEpisode(LanguageOrString subtitleLanguage, Person actor, Person dire super(actor, director, episodeNumber, musicBy, partOfSeason, partOfSeries, productionCompany, trailer, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); mySubtitleLanguage = subtitleLanguage; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (mySubtitleLanguage != null ? mySubtitleLanguage.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TVEpisode tVEpisode = (TVEpisode) o; + if (!super.equals(o)) return false; + if (mySubtitleLanguage != null ? !mySubtitleLanguage.equals(tVEpisode.mySubtitleLanguage) : tVEpisode.mySubtitleLanguage != null) return false; + return true; + } + private LanguageOrString mySubtitleLanguage; } diff --git a/src/main/java/org/schema/TVSeason.java b/src/main/java/org/schema/TVSeason.java index 255d51c8..72cd1f7f 100644 --- a/src/main/java/org/schema/TVSeason.java +++ b/src/main/java/org/schema/TVSeason.java @@ -1260,7 +1260,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person actor; @@ -1502,4 +1502,18 @@ public interface Builder extends ThingBuilder { protected TVSeason(Person actor, Person director, java.util.Date endDate, HasPart episode, Integer numberOfEpisodes, IsPartOf partOfSeries, Organization productionCompany, IntegerOrString seasonNumber, java.util.Date startDate, VideoObject trailer, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(actor, director, endDate, episode, numberOfEpisodes, partOfSeries, productionCompany, seasonNumber, startDate, trailer, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TVSeason tVSeason = (TVSeason) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TVSeries.java b/src/main/java/org/schema/TVSeries.java index 11a5b40e..b45bffd2 100644 --- a/src/main/java/org/schema/TVSeries.java +++ b/src/main/java/org/schema/TVSeries.java @@ -1334,7 +1334,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person actor; @@ -1589,6 +1589,38 @@ protected TVSeries(Person actor, Person director, HasPart episode, MusicGroupOrP myContainsSeason = containsSeason; myTrailer = trailer; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myActor != null ? myActor.hashCode() : 0); + result = 31 * result + (myDirector != null ? myDirector.hashCode() : 0); + result = 31 * result + (myEpisode != null ? myEpisode.hashCode() : 0); + result = 31 * result + (myMusicBy != null ? myMusicBy.hashCode() : 0); + result = 31 * result + (myNumberOfEpisodes != null ? myNumberOfEpisodes.hashCode() : 0); + result = 31 * result + (myNumberOfSeasons != null ? myNumberOfSeasons.hashCode() : 0); + result = 31 * result + (myProductionCompany != null ? myProductionCompany.hashCode() : 0); + result = 31 * result + (myContainsSeason != null ? myContainsSeason.hashCode() : 0); + result = 31 * result + (myTrailer != null ? myTrailer.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TVSeries tVSeries = (TVSeries) o; + if (!super.equals(o)) return false; + if (myActor != null ? !myActor.equals(tVSeries.myActor) : tVSeries.myActor != null) return false; + if (myDirector != null ? !myDirector.equals(tVSeries.myDirector) : tVSeries.myDirector != null) return false; + if (myEpisode != null ? !myEpisode.equals(tVSeries.myEpisode) : tVSeries.myEpisode != null) return false; + if (myMusicBy != null ? !myMusicBy.equals(tVSeries.myMusicBy) : tVSeries.myMusicBy != null) return false; + if (myNumberOfEpisodes != null ? !myNumberOfEpisodes.equals(tVSeries.myNumberOfEpisodes) : tVSeries.myNumberOfEpisodes != null) return false; + if (myNumberOfSeasons != null ? !myNumberOfSeasons.equals(tVSeries.myNumberOfSeasons) : tVSeries.myNumberOfSeasons != null) return false; + if (myProductionCompany != null ? !myProductionCompany.equals(tVSeries.myProductionCompany) : tVSeries.myProductionCompany != null) return false; + if (myContainsSeason != null ? !myContainsSeason.equals(tVSeries.myContainsSeason) : tVSeries.myContainsSeason != null) return false; + if (myTrailer != null ? !myTrailer.equals(tVSeries.myTrailer) : tVSeries.myTrailer != null) return false; + return true; + } + private Person myActor; private Person myDirector; private HasPart myEpisode; diff --git a/src/main/java/org/schema/Table.java b/src/main/java/org/schema/Table.java index c6904b05..50450a08 100644 --- a/src/main/java/org/schema/Table.java +++ b/src/main/java/org/schema/Table.java @@ -1146,7 +1146,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String schemaVersion; @@ -1363,4 +1363,18 @@ public interface Builder extends ThingBuilder { protected Table(String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Table table = (Table) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TakeAction.java b/src/main/java/org/schema/TakeAction.java index 14f48be2..a211839d 100644 --- a/src/main/java/org/schema/TakeAction.java +++ b/src/main/java/org/schema/TakeAction.java @@ -336,7 +336,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Place fromLocation; @@ -391,4 +391,18 @@ public interface Builder extends ThingBuilder { protected TakeAction(Place fromLocation, Place toLocation, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(fromLocation, toLocation, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TakeAction takeAction = (TakeAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TattooParlor.java b/src/main/java/org/schema/TattooParlor.java index 0bf70cff..b233a879 100644 --- a/src/main/java/org/schema/TattooParlor.java +++ b/src/main/java/org/schema/TattooParlor.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected TattooParlor(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TattooParlor tattooParlor = (TattooParlor) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Taxi.java b/src/main/java/org/schema/Taxi.java index 3f10252c..df25a05f 100644 --- a/src/main/java/org/schema/Taxi.java +++ b/src/main/java/org/schema/Taxi.java @@ -324,7 +324,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -377,4 +377,18 @@ public interface Builder extends ThingBuilder { protected Taxi(AggregateRating aggregateRating, ServiceChannel availableChannel, Thing serviceOutput, Review review, AdministrativeArea serviceArea, String serviceType, OrganizationOrPerson provider, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, availableChannel, serviceOutput, review, serviceArea, serviceType, provider, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Taxi taxi = (Taxi) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TaxiReservation.java b/src/main/java/org/schema/TaxiReservation.java index ba1eca07..50974c66 100644 --- a/src/main/java/org/schema/TaxiReservation.java +++ b/src/main/java/org/schema/TaxiReservation.java @@ -229,30 +229,40 @@ public TaxiReservation build() { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull Number number) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setNumber(number); + @NotNull public Builder totalPrice(@NotNull Integer integer) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setInteger(integer); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification priceSpecification) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setPriceSpecification(priceSpecification); + @NotNull public Builder totalPrice(@NotNull Long totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setLong(totalPrice); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification) { - return this.totalPrice(priceSpecification.build()); + @NotNull public Builder totalPrice(@NotNull Float totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setFloat(totalPrice); + return this; + } + /** + * The total price for the reservation or ticket, including applicable taxes, shipping, etc. + */ + @NotNull public Builder totalPrice(@NotNull Double totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setDouble(totalPrice); + return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ @NotNull public Builder totalPrice(@NotNull String totalPrice) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); + if (this.totalPrice == null) this.totalPrice = new Number(); this.totalPrice.setString(totalPrice); return this; } @@ -477,8 +487,10 @@ public Builder id(long id) { if ("modifiedTime".equals(key) && value instanceof java.util.Date) { modifiedTime((java.util.Date)value); continue; } if ("programMembershipUsed".equals(key) && value instanceof ProgramMembership) { programMembershipUsed((ProgramMembership)value); continue; } if ("reservedTicket".equals(key) && value instanceof Ticket) { reservedTicket((Ticket)value); continue; } - if ("totalPrice".equals(key) && value instanceof Number) { totalPrice((Number)value); continue; } - if ("totalPrice".equals(key) && value instanceof PriceSpecification) { totalPrice((PriceSpecification)value); continue; } + if ("totalPrice".equals(key) && value instanceof Integer) { totalPrice((Integer)value); continue; } + if ("totalPrice".equals(key) && value instanceof Long) { totalPrice((Long)value); continue; } + if ("totalPrice".equals(key) && value instanceof Float) { totalPrice((Float)value); continue; } + if ("totalPrice".equals(key) && value instanceof Double) { totalPrice((Double)value); continue; } if ("totalPrice".equals(key) && value instanceof String) { totalPrice((String)value); continue; } if ("priceCurrency".equals(key) && value instanceof String) { priceCurrency((String)value); continue; } if ("broker".equals(key) && value instanceof Organization) { broker((Organization)value); continue; } @@ -492,7 +504,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private IntegerOrQuantitativeValue partySize; @@ -507,7 +519,7 @@ public Builder id(long id) { private java.util.Date modifiedTime; private ProgramMembership programMembershipUsed; private Ticket reservedTicket; - private NumberOrPriceSpecificationOrString totalPrice; + private Number totalPrice; private String priceCurrency; private OrganizationOrPerson broker; private String additionalType; @@ -546,9 +558,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder programMembershipUsed(@NotNull ProgramMembership.Builder programMembership); @NotNull Builder reservedTicket(@NotNull Ticket ticket); @NotNull Builder reservedTicket(@NotNull Ticket.Builder ticket); - @NotNull Builder totalPrice(@NotNull Number number); - @NotNull Builder totalPrice(@NotNull PriceSpecification priceSpecification); - @NotNull Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(@NotNull Integer integer); + @NotNull Builder totalPrice(@NotNull Long totalPrice); + @NotNull Builder totalPrice(@NotNull Float totalPrice); + @NotNull Builder totalPrice(@NotNull Double totalPrice); @NotNull Builder totalPrice(@NotNull String totalPrice); @NotNull Builder priceCurrency(@NotNull String priceCurrency); @NotNull Builder broker(@NotNull Organization organization); @@ -569,12 +582,32 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected TaxiReservation(IntegerOrQuantitativeValue partySize, Place pickupLocation, java.util.Date pickupTime, String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, NumberOrPriceSpecificationOrString totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected TaxiReservation(IntegerOrQuantitativeValue partySize, Place pickupLocation, java.util.Date pickupTime, String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, Number totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(reservationId, reservationStatus, reservationFor, underName, provider, bookingTime, modifiedTime, programMembershipUsed, reservedTicket, totalPrice, priceCurrency, broker, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myPartySize = partySize; myPickupLocation = pickupLocation; myPickupTime = pickupTime; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myPartySize != null ? myPartySize.hashCode() : 0); + result = 31 * result + (myPickupLocation != null ? myPickupLocation.hashCode() : 0); + result = 31 * result + (myPickupTime != null ? myPickupTime.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TaxiReservation taxiReservation = (TaxiReservation) o; + if (!super.equals(o)) return false; + if (myPartySize != null ? !myPartySize.equals(taxiReservation.myPartySize) : taxiReservation.myPartySize != null) return false; + if (myPickupLocation != null ? !myPickupLocation.equals(taxiReservation.myPickupLocation) : taxiReservation.myPickupLocation != null) return false; + if (myPickupTime != null ? !myPickupTime.equals(taxiReservation.myPickupTime) : taxiReservation.myPickupTime != null) return false; + return true; + } + private IntegerOrQuantitativeValue myPartySize; private Place myPickupLocation; private java.util.Date myPickupTime; diff --git a/src/main/java/org/schema/TaxiService.java b/src/main/java/org/schema/TaxiService.java index 3930c49e..c555ee9c 100644 --- a/src/main/java/org/schema/TaxiService.java +++ b/src/main/java/org/schema/TaxiService.java @@ -324,7 +324,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -377,4 +377,18 @@ public interface Builder extends ThingBuilder { protected TaxiService(AggregateRating aggregateRating, ServiceChannel availableChannel, Thing serviceOutput, Review review, AdministrativeArea serviceArea, String serviceType, OrganizationOrPerson provider, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, availableChannel, serviceOutput, review, serviceArea, serviceType, provider, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TaxiService taxiService = (TaxiService) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TaxiStand.java b/src/main/java/org/schema/TaxiStand.java index 37310794..439dc56c 100644 --- a/src/main/java/org/schema/TaxiStand.java +++ b/src/main/java/org/schema/TaxiStand.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected TaxiStand(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TaxiStand taxiStand = (TaxiStand) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TaxiVehicleUsage.java b/src/main/java/org/schema/TaxiVehicleUsage.java index 03cc1d8f..036649d6 100644 --- a/src/main/java/org/schema/TaxiVehicleUsage.java +++ b/src/main/java/org/schema/TaxiVehicleUsage.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected TaxiVehicleUsage() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TaxiVehicleUsage taxiVehicleUsage = (TaxiVehicleUsage) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TechArticle.java b/src/main/java/org/schema/TechArticle.java index 04ed12eb..660fd462 100644 --- a/src/main/java/org/schema/TechArticle.java +++ b/src/main/java/org/schema/TechArticle.java @@ -1242,7 +1242,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String dependencies; @@ -1479,6 +1479,24 @@ protected TechArticle(String dependencies, String proficiencyLevel, String artic myDependencies = dependencies; myProficiencyLevel = proficiencyLevel; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDependencies != null ? myDependencies.hashCode() : 0); + result = 31 * result + (myProficiencyLevel != null ? myProficiencyLevel.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TechArticle techArticle = (TechArticle) o; + if (!super.equals(o)) return false; + if (myDependencies != null ? !myDependencies.equals(techArticle.myDependencies) : techArticle.myDependencies != null) return false; + if (myProficiencyLevel != null ? !myProficiencyLevel.equals(techArticle.myProficiencyLevel) : techArticle.myProficiencyLevel != null) return false; + return true; + } + private String myDependencies; private String myProficiencyLevel; } diff --git a/src/main/java/org/schema/TelevisionChannel.java b/src/main/java/org/schema/TelevisionChannel.java index 4a7e7551..71bd01ed 100644 --- a/src/main/java/org/schema/TelevisionChannel.java +++ b/src/main/java/org/schema/TelevisionChannel.java @@ -260,7 +260,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String broadcastChannelId; @@ -301,4 +301,18 @@ public interface Builder extends ThingBuilder { protected TelevisionChannel(String broadcastChannelId, CableOrSatelliteService inBroadcastLineup, String broadcastServiceTier, BroadcastService providesBroadcastService, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(broadcastChannelId, inBroadcastLineup, broadcastServiceTier, providesBroadcastService, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TelevisionChannel televisionChannel = (TelevisionChannel) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TelevisionStation.java b/src/main/java/org/schema/TelevisionStation.java index 0d6dbecf..12eb56df 100644 --- a/src/main/java/org/schema/TelevisionStation.java +++ b/src/main/java/org/schema/TelevisionStation.java @@ -520,7 +520,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String videoFormat; @@ -612,5 +612,21 @@ protected TelevisionStation(String videoFormat, Organization parentOrganization, super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myVideoFormat = videoFormat; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myVideoFormat != null ? myVideoFormat.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TelevisionStation televisionStation = (TelevisionStation) o; + if (!super.equals(o)) return false; + if (myVideoFormat != null ? !myVideoFormat.equals(televisionStation.myVideoFormat) : televisionStation.myVideoFormat != null) return false; + return true; + } + private String myVideoFormat; } diff --git a/src/main/java/org/schema/TennisComplex.java b/src/main/java/org/schema/TennisComplex.java index 1ffe05fc..5bd2b661 100644 --- a/src/main/java/org/schema/TennisComplex.java +++ b/src/main/java/org/schema/TennisComplex.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected TennisComplex(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TennisComplex tennisComplex = (TennisComplex) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Terminated.java b/src/main/java/org/schema/Terminated.java index 3858b075..3bbfdc52 100644 --- a/src/main/java/org/schema/Terminated.java +++ b/src/main/java/org/schema/Terminated.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Terminated() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Terminated terminated = (Terminated) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TheaterEvent.java b/src/main/java/org/schema/TheaterEvent.java index cd19d5a2..6736bbf6 100644 --- a/src/main/java/org/schema/TheaterEvent.java +++ b/src/main/java/org/schema/TheaterEvent.java @@ -496,7 +496,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -583,4 +583,18 @@ public interface Builder extends ThingBuilder { protected TheaterEvent(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TheaterEvent theaterEvent = (TheaterEvent) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TheaterGroup.java b/src/main/java/org/schema/TheaterGroup.java index bda73885..bfae8349 100644 --- a/src/main/java/org/schema/TheaterGroup.java +++ b/src/main/java/org/schema/TheaterGroup.java @@ -660,7 +660,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -783,4 +783,18 @@ public interface Builder extends ThingBuilder { protected TheaterGroup(PostalAddress address, AggregateRating aggregateRating, String award, BrandOrOrganization brand, ContactPoint contactPoint, Organization department, String duns, String email, Person employee, Event event, String faxNumber, Person founder, java.util.Date dissolutionDate, java.util.Date foundingDate, String globalLocationNumber, Place hasPOS, String isicV4, String legalName, ImageObjectOrString logo, Offer makesOffer, OrganizationOrPerson member, OrganizationOrProgramMembership memberOf, String naics, QuantitativeValue numberOfEmployees, OwnershipInfoOrProduct owns, Review review, Demand seeks, Organization subOrganization, String taxID, String telephone, String vatID, Place foundingLocation, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, award, brand, contactPoint, department, duns, email, employee, event, faxNumber, founder, dissolutionDate, foundingDate, globalLocationNumber, hasPOS, isicV4, legalName, logo, makesOffer, member, memberOf, naics, numberOfEmployees, owns, review, seeks, subOrganization, taxID, telephone, vatID, foundingLocation, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TheaterGroup theaterGroup = (TheaterGroup) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Therapeutic.java b/src/main/java/org/schema/Therapeutic.java index 77a3ed0c..f232f841 100644 --- a/src/main/java/org/schema/Therapeutic.java +++ b/src/main/java/org/schema/Therapeutic.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Therapeutic() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Therapeutic therapeutic = (Therapeutic) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TherapeuticProcedure.java b/src/main/java/org/schema/TherapeuticProcedure.java index bc36d060..e56f149f 100644 --- a/src/main/java/org/schema/TherapeuticProcedure.java +++ b/src/main/java/org/schema/TherapeuticProcedure.java @@ -371,7 +371,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalEntity adverseOutcome; @@ -435,4 +435,18 @@ public interface Builder extends ThingBuilder { protected TherapeuticProcedure(MedicalEntity adverseOutcome, MedicalContraindication contraindication, MedicalTherapy duplicateTherapy, MedicalIndication indication, MedicalEntity seriousAdverseOutcome, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(adverseOutcome, contraindication, duplicateTherapy, indication, seriousAdverseOutcome, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TherapeuticProcedure therapeuticProcedure = (TherapeuticProcedure) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Thing.java b/src/main/java/org/schema/Thing.java index 4c8e43bd..beecc4d8 100644 --- a/src/main/java/org/schema/Thing.java +++ b/src/main/java/org/schema/Thing.java @@ -306,7 +306,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String additionalType; @@ -345,6 +345,37 @@ protected Thing(String additionalType, String alternateName, String description, myPotentialAction = potentialAction; myId = id; } + + @Override public int hashCode() { + int result = 0; + result = 31 * result + (myAdditionalType != null ? myAdditionalType.hashCode() : 0); + result = 31 * result + (myAlternateName != null ? myAlternateName.hashCode() : 0); + result = 31 * result + (myDescription != null ? myDescription.hashCode() : 0); + result = 31 * result + (myMainEntityOfPage != null ? myMainEntityOfPage.hashCode() : 0); + result = 31 * result + (myName != null ? myName.hashCode() : 0); + result = 31 * result + (mySameAs != null ? mySameAs.hashCode() : 0); + result = 31 * result + (myUrl != null ? myUrl.hashCode() : 0); + result = 31 * result + (myPotentialAction != null ? myPotentialAction.hashCode() : 0); + result = 31 * result + (myId != null ? myId.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Thing thing = (Thing) o; + if (myAdditionalType != null ? !myAdditionalType.equals(thing.myAdditionalType) : thing.myAdditionalType != null) return false; + if (myAlternateName != null ? !myAlternateName.equals(thing.myAlternateName) : thing.myAlternateName != null) return false; + if (myDescription != null ? !myDescription.equals(thing.myDescription) : thing.myDescription != null) return false; + if (myMainEntityOfPage != null ? !myMainEntityOfPage.equals(thing.myMainEntityOfPage) : thing.myMainEntityOfPage != null) return false; + if (myName != null ? !myName.equals(thing.myName) : thing.myName != null) return false; + if (mySameAs != null ? !mySameAs.equals(thing.mySameAs) : thing.mySameAs != null) return false; + if (myUrl != null ? !myUrl.equals(thing.myUrl) : thing.myUrl != null) return false; + if (myPotentialAction != null ? !myPotentialAction.equals(thing.myPotentialAction) : thing.myPotentialAction != null) return false; + if (myId != null ? !myId.equals(thing.myId) : thing.myId != null) return false; + return true; + } + private String myAdditionalType; private String myAlternateName; private String myDescription; diff --git a/src/main/java/org/schema/ThingDeserializer.java b/src/main/java/org/schema/ThingDeserializer.java index 7a4a57b6..905d33f5 100644 --- a/src/main/java/org/schema/ThingDeserializer.java +++ b/src/main/java/org/schema/ThingDeserializer.java @@ -23,15 +23,20 @@ import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonDeserializer; import org.jetbrains.annotations.Nullable; +import com.fasterxml.jackson.databind.util.ISO8601DateFormat; import java.io.IOException; -import java.util.HashMap; +import java.util.Date; import java.util.Map; +import java.util.HashMap; +import java.text.*; /** * Typed deserializer for {@link org.schema.Thing} */ class ThingDeserializer extends JsonDeserializer { + private static final DateFormat dateFormat = new ISO8601DateFormat(); + @Override public Thing deserialize(JsonParser p, DeserializationContext ctx) throws IOException { return fromMap(p.>readValueAs(new TypeReference>() { @@ -54,6 +59,16 @@ static Thing fromMap(Map result) { return null; } + for (Map.Entry entry : result.entrySet()) { + if (entry.getValue() instanceof String) { + try { + final Date date = dateFormat.parse((String) entry.getValue()); + result.put(entry.getKey(), date); + } catch (ParseException ignored) { + } + } + } + builder.fromMap(result); return (Thing) builder.build(); } diff --git a/src/main/java/org/schema/Throat.java b/src/main/java/org/schema/Throat.java index 55e0e682..eec6dfda 100644 --- a/src/main/java/org/schema/Throat.java +++ b/src/main/java/org/schema/Throat.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Throat() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Throat throat = (Throat) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Ticket.java b/src/main/java/org/schema/Ticket.java index 35a6daee..23096b25 100644 --- a/src/main/java/org/schema/Ticket.java +++ b/src/main/java/org/schema/Ticket.java @@ -35,7 +35,7 @@ public OrganizationOrPerson getUnderName() { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public NumberOrPriceSpecificationOrString getTotalPrice() { + public Number getTotalPrice() { return myTotalPrice; } /** @@ -116,30 +116,40 @@ public Ticket build() { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull Number number) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setNumber(number); + @NotNull public Builder totalPrice(@NotNull Integer integer) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setInteger(integer); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification priceSpecification) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setPriceSpecification(priceSpecification); + @NotNull public Builder totalPrice(@NotNull Long totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setLong(totalPrice); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification) { - return this.totalPrice(priceSpecification.build()); + @NotNull public Builder totalPrice(@NotNull Float totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setFloat(totalPrice); + return this; + } + /** + * The total price for the reservation or ticket, including applicable taxes, shipping, etc. + */ + @NotNull public Builder totalPrice(@NotNull Double totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setDouble(totalPrice); + return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ @NotNull public Builder totalPrice(@NotNull String totalPrice) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); + if (this.totalPrice == null) this.totalPrice = new Number(); this.totalPrice.setString(totalPrice); return this; } @@ -370,8 +380,10 @@ public Builder id(long id) { if (value instanceof java.util.Map) { value = ThingDeserializer.fromMap((java.util.Map)value); } if ("underName".equals(key) && value instanceof Organization) { underName((Organization)value); continue; } if ("underName".equals(key) && value instanceof Person) { underName((Person)value); continue; } - if ("totalPrice".equals(key) && value instanceof Number) { totalPrice((Number)value); continue; } - if ("totalPrice".equals(key) && value instanceof PriceSpecification) { totalPrice((PriceSpecification)value); continue; } + if ("totalPrice".equals(key) && value instanceof Integer) { totalPrice((Integer)value); continue; } + if ("totalPrice".equals(key) && value instanceof Long) { totalPrice((Long)value); continue; } + if ("totalPrice".equals(key) && value instanceof Float) { totalPrice((Float)value); continue; } + if ("totalPrice".equals(key) && value instanceof Double) { totalPrice((Double)value); continue; } if ("totalPrice".equals(key) && value instanceof String) { totalPrice((String)value); continue; } if ("priceCurrency".equals(key) && value instanceof String) { priceCurrency((String)value); continue; } if ("issuedBy".equals(key) && value instanceof Organization) { issuedBy((Organization)value); continue; } @@ -388,11 +400,11 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson underName; - private NumberOrPriceSpecificationOrString totalPrice; + private Number totalPrice; private String priceCurrency; private Organization issuedBy; private java.util.Date dateIssued; @@ -414,9 +426,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder underName(@NotNull Organization.Builder organization); @NotNull Builder underName(@NotNull Person person); @NotNull Builder underName(@NotNull Person.Builder person); - @NotNull Builder totalPrice(@NotNull Number number); - @NotNull Builder totalPrice(@NotNull PriceSpecification priceSpecification); - @NotNull Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(@NotNull Integer integer); + @NotNull Builder totalPrice(@NotNull Long totalPrice); + @NotNull Builder totalPrice(@NotNull Float totalPrice); + @NotNull Builder totalPrice(@NotNull Double totalPrice); @NotNull Builder totalPrice(@NotNull String totalPrice); @NotNull Builder priceCurrency(@NotNull String priceCurrency); @NotNull Builder issuedBy(@NotNull Organization organization); @@ -440,7 +453,7 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected Ticket(OrganizationOrPerson underName, NumberOrPriceSpecificationOrString totalPrice, String priceCurrency, Organization issuedBy, java.util.Date dateIssued, Seat ticketedSeat, String ticketNumber, String ticketToken, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected Ticket(OrganizationOrPerson underName, Number totalPrice, String priceCurrency, Organization issuedBy, java.util.Date dateIssued, Seat ticketedSeat, String ticketNumber, String ticketToken, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myUnderName = underName; myTotalPrice = totalPrice; @@ -451,8 +464,38 @@ protected Ticket(OrganizationOrPerson underName, NumberOrPriceSpecificationOrStr myTicketNumber = ticketNumber; myTicketToken = ticketToken; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myUnderName != null ? myUnderName.hashCode() : 0); + result = 31 * result + (myTotalPrice != null ? myTotalPrice.hashCode() : 0); + result = 31 * result + (myPriceCurrency != null ? myPriceCurrency.hashCode() : 0); + result = 31 * result + (myIssuedBy != null ? myIssuedBy.hashCode() : 0); + result = 31 * result + (myDateIssued != null ? myDateIssued.hashCode() : 0); + result = 31 * result + (myTicketedSeat != null ? myTicketedSeat.hashCode() : 0); + result = 31 * result + (myTicketNumber != null ? myTicketNumber.hashCode() : 0); + result = 31 * result + (myTicketToken != null ? myTicketToken.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Ticket ticket = (Ticket) o; + if (!super.equals(o)) return false; + if (myUnderName != null ? !myUnderName.equals(ticket.myUnderName) : ticket.myUnderName != null) return false; + if (myTotalPrice != null ? !myTotalPrice.equals(ticket.myTotalPrice) : ticket.myTotalPrice != null) return false; + if (myPriceCurrency != null ? !myPriceCurrency.equals(ticket.myPriceCurrency) : ticket.myPriceCurrency != null) return false; + if (myIssuedBy != null ? !myIssuedBy.equals(ticket.myIssuedBy) : ticket.myIssuedBy != null) return false; + if (myDateIssued != null ? !myDateIssued.equals(ticket.myDateIssued) : ticket.myDateIssued != null) return false; + if (myTicketedSeat != null ? !myTicketedSeat.equals(ticket.myTicketedSeat) : ticket.myTicketedSeat != null) return false; + if (myTicketNumber != null ? !myTicketNumber.equals(ticket.myTicketNumber) : ticket.myTicketNumber != null) return false; + if (myTicketToken != null ? !myTicketToken.equals(ticket.myTicketToken) : ticket.myTicketToken != null) return false; + return true; + } + private OrganizationOrPerson myUnderName; - private NumberOrPriceSpecificationOrString myTotalPrice; + private Number myTotalPrice; private String myPriceCurrency; private Organization myIssuedBy; private java.util.Date myDateIssued; diff --git a/src/main/java/org/schema/TieAction.java b/src/main/java/org/schema/TieAction.java index e8f22972..7b68ccd7 100644 --- a/src/main/java/org/schema/TieAction.java +++ b/src/main/java/org/schema/TieAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected TieAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TieAction tieAction = (TieAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TipAction.java b/src/main/java/org/schema/TipAction.java index cd4239e5..dad35705 100644 --- a/src/main/java/org/schema/TipAction.java +++ b/src/main/java/org/schema/TipAction.java @@ -107,9 +107,93 @@ public TipAction build() { */ - @NotNull public Builder price(@NotNull Number number) { - if (this.price == null) this.price = new NumberOrString(); - this.price.setNumber(number); + @NotNull public Builder price(@NotNull Integer integer) { + if (this.price == null) this.price = new Number(); + this.price.setInteger(integer); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Long price) { + if (this.price == null) this.price = new Number(); + this.price.setLong(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Float price) { + if (this.price == null) this.price = new Number(); + this.price.setFloat(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Double price) { + if (this.price == null) this.price = new Number(); + this.price.setDouble(price); return this; } /** @@ -136,7 +220,7 @@ public TipAction build() { */ @NotNull public Builder price(@NotNull String price) { - if (this.price == null) this.price = new NumberOrString(); + if (this.price == null) this.price = new Number(); this.price.setString(price); return this; } @@ -412,7 +496,10 @@ public Builder id(long id) { if ("recipient".equals(key) && value instanceof Audience) { recipient((Audience)value); continue; } if ("recipient".equals(key) && value instanceof Organization) { recipient((Organization)value); continue; } if ("recipient".equals(key) && value instanceof Person) { recipient((Person)value); continue; } - if ("price".equals(key) && value instanceof Number) { price((Number)value); continue; } + if ("price".equals(key) && value instanceof Integer) { price((Integer)value); continue; } + if ("price".equals(key) && value instanceof Long) { price((Long)value); continue; } + if ("price".equals(key) && value instanceof Float) { price((Float)value); continue; } + if ("price".equals(key) && value instanceof Double) { price((Double)value); continue; } if ("price".equals(key) && value instanceof String) { price((String)value); continue; } if ("priceSpecification".equals(key) && value instanceof PriceSpecification) { priceSpecification((PriceSpecification)value); continue; } if ("agent".equals(key) && value instanceof Organization) { agent((Organization)value); continue; } @@ -431,11 +518,11 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AudienceOrOrganizationOrPerson recipient; - private NumberOrString price; + private Number price; private PriceSpecification priceSpecification; private OrganizationOrPerson agent; private java.util.Date endTime; @@ -460,7 +547,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder recipient(@NotNull Organization.Builder organization); @NotNull Builder recipient(@NotNull Person person); @NotNull Builder recipient(@NotNull Person.Builder person); - @NotNull Builder price(@NotNull Number number); + @NotNull Builder price(@NotNull Integer integer); + @NotNull Builder price(@NotNull Long price); + @NotNull Builder price(@NotNull Float price); + @NotNull Builder price(@NotNull Double price); @NotNull Builder price(@NotNull String price); @NotNull Builder priceSpecification(@NotNull PriceSpecification priceSpecification); @NotNull Builder priceSpecification(@NotNull PriceSpecification.Builder priceSpecification); @@ -490,9 +580,25 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected TipAction(AudienceOrOrganizationOrPerson recipient, NumberOrString price, PriceSpecification priceSpecification, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected TipAction(AudienceOrOrganizationOrPerson recipient, Number price, PriceSpecification priceSpecification, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(price, priceSpecification, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myRecipient = recipient; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myRecipient != null ? myRecipient.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TipAction tipAction = (TipAction) o; + if (!super.equals(o)) return false; + if (myRecipient != null ? !myRecipient.equals(tipAction.myRecipient) : tipAction.myRecipient != null) return false; + return true; + } + private AudienceOrOrganizationOrPerson myRecipient; } diff --git a/src/main/java/org/schema/TireShop.java b/src/main/java/org/schema/TireShop.java index 3f397d23..c15597be 100644 --- a/src/main/java/org/schema/TireShop.java +++ b/src/main/java/org/schema/TireShop.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected TireShop(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TireShop tireShop = (TireShop) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TollFree.java b/src/main/java/org/schema/TollFree.java index ad4b7e6f..17fed6d5 100644 --- a/src/main/java/org/schema/TollFree.java +++ b/src/main/java/org/schema/TollFree.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected TollFree() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TollFree tollFree = (TollFree) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TouristAttraction.java b/src/main/java/org/schema/TouristAttraction.java index 199f0079..6b26bdb5 100644 --- a/src/main/java/org/schema/TouristAttraction.java +++ b/src/main/java/org/schema/TouristAttraction.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected TouristAttraction(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TouristAttraction touristAttraction = (TouristAttraction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TouristInformationCenter.java b/src/main/java/org/schema/TouristInformationCenter.java index 0528889e..a27ef18a 100644 --- a/src/main/java/org/schema/TouristInformationCenter.java +++ b/src/main/java/org/schema/TouristInformationCenter.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected TouristInformationCenter(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TouristInformationCenter touristInformationCenter = (TouristInformationCenter) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Toxicologic.java b/src/main/java/org/schema/Toxicologic.java index cdd3bfba..23e727c6 100644 --- a/src/main/java/org/schema/Toxicologic.java +++ b/src/main/java/org/schema/Toxicologic.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Toxicologic() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Toxicologic toxicologic = (Toxicologic) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ToyStore.java b/src/main/java/org/schema/ToyStore.java index 1b6f1fac..0421c39b 100644 --- a/src/main/java/org/schema/ToyStore.java +++ b/src/main/java/org/schema/ToyStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected ToyStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ToyStore toyStore = (ToyStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TrackAction.java b/src/main/java/org/schema/TrackAction.java index a077e393..1903e67b 100644 --- a/src/main/java/org/schema/TrackAction.java +++ b/src/main/java/org/schema/TrackAction.java @@ -328,7 +328,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private DeliveryMethod deliveryMethod; @@ -381,5 +381,21 @@ protected TrackAction(DeliveryMethod deliveryMethod, OrganizationOrPerson agent, super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myDeliveryMethod = deliveryMethod; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDeliveryMethod != null ? myDeliveryMethod.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TrackAction trackAction = (TrackAction) o; + if (!super.equals(o)) return false; + if (myDeliveryMethod != null ? !myDeliveryMethod.equals(trackAction.myDeliveryMethod) : trackAction.myDeliveryMethod != null) return false; + return true; + } + private DeliveryMethod myDeliveryMethod; } diff --git a/src/main/java/org/schema/TradeAction.java b/src/main/java/org/schema/TradeAction.java index 3c80ef74..87032152 100644 --- a/src/main/java/org/schema/TradeAction.java +++ b/src/main/java/org/schema/TradeAction.java @@ -49,7 +49,7 @@ public class TradeAction extends Action { */ - public NumberOrString getPrice() { + public Number getPrice() { return myPrice; } /** @@ -91,9 +91,93 @@ public TradeAction build() { */ - @NotNull public Builder price(@NotNull Number number) { - if (this.price == null) this.price = new NumberOrString(); - this.price.setNumber(number); + @NotNull public Builder price(@NotNull Integer integer) { + if (this.price == null) this.price = new Number(); + this.price.setInteger(integer); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Long price) { + if (this.price == null) this.price = new Number(); + this.price.setLong(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Float price) { + if (this.price == null) this.price = new Number(); + this.price.setFloat(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Double price) { + if (this.price == null) this.price = new Number(); + this.price.setDouble(price); return this; } /** @@ -120,7 +204,7 @@ public TradeAction build() { */ @NotNull public Builder price(@NotNull String price) { - if (this.price == null) this.price = new NumberOrString(); + if (this.price == null) this.price = new Number(); this.price.setString(price); return this; } @@ -393,7 +477,10 @@ public Builder id(long id) { final String key = entry.getKey(); Object value = entry.getValue(); if (value instanceof java.util.Map) { value = ThingDeserializer.fromMap((java.util.Map)value); } - if ("price".equals(key) && value instanceof Number) { price((Number)value); continue; } + if ("price".equals(key) && value instanceof Integer) { price((Integer)value); continue; } + if ("price".equals(key) && value instanceof Long) { price((Long)value); continue; } + if ("price".equals(key) && value instanceof Float) { price((Float)value); continue; } + if ("price".equals(key) && value instanceof Double) { price((Double)value); continue; } if ("price".equals(key) && value instanceof String) { price((String)value); continue; } if ("priceSpecification".equals(key) && value instanceof PriceSpecification) { priceSpecification((PriceSpecification)value); continue; } if ("agent".equals(key) && value instanceof Organization) { agent((Organization)value); continue; } @@ -412,10 +499,10 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } - private NumberOrString price; + private Number price; private PriceSpecification priceSpecification; private OrganizationOrPerson agent; private java.util.Date endTime; @@ -434,7 +521,10 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - @NotNull Builder price(@NotNull Number number); + @NotNull Builder price(@NotNull Integer integer); + @NotNull Builder price(@NotNull Long price); + @NotNull Builder price(@NotNull Float price); + @NotNull Builder price(@NotNull Double price); @NotNull Builder price(@NotNull String price); @NotNull Builder priceSpecification(@NotNull PriceSpecification priceSpecification); @NotNull Builder priceSpecification(@NotNull PriceSpecification.Builder priceSpecification); @@ -464,11 +554,29 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected TradeAction(NumberOrString price, PriceSpecification priceSpecification, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected TradeAction(Number price, PriceSpecification priceSpecification, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myPrice = price; myPriceSpecification = priceSpecification; } - private NumberOrString myPrice; + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myPrice != null ? myPrice.hashCode() : 0); + result = 31 * result + (myPriceSpecification != null ? myPriceSpecification.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TradeAction tradeAction = (TradeAction) o; + if (!super.equals(o)) return false; + if (myPrice != null ? !myPrice.equals(tradeAction.myPrice) : tradeAction.myPrice != null) return false; + if (myPriceSpecification != null ? !myPriceSpecification.equals(tradeAction.myPriceSpecification) : tradeAction.myPriceSpecification != null) return false; + return true; + } + + private Number myPrice; private PriceSpecification myPriceSpecification; } diff --git a/src/main/java/org/schema/TraditionalChinese.java b/src/main/java/org/schema/TraditionalChinese.java index 8203b647..7c8e1bd7 100644 --- a/src/main/java/org/schema/TraditionalChinese.java +++ b/src/main/java/org/schema/TraditionalChinese.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected TraditionalChinese() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TraditionalChinese traditionalChinese = (TraditionalChinese) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TrainReservation.java b/src/main/java/org/schema/TrainReservation.java index 05c0ac85..d446dbe5 100644 --- a/src/main/java/org/schema/TrainReservation.java +++ b/src/main/java/org/schema/TrainReservation.java @@ -168,30 +168,40 @@ public TrainReservation build() { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull Number number) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setNumber(number); + @NotNull public Builder totalPrice(@NotNull Integer integer) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setInteger(integer); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification priceSpecification) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); - this.totalPrice.setPriceSpecification(priceSpecification); + @NotNull public Builder totalPrice(@NotNull Long totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setLong(totalPrice); return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - @NotNull public Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification) { - return this.totalPrice(priceSpecification.build()); + @NotNull public Builder totalPrice(@NotNull Float totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setFloat(totalPrice); + return this; + } + /** + * The total price for the reservation or ticket, including applicable taxes, shipping, etc. + */ + @NotNull public Builder totalPrice(@NotNull Double totalPrice) { + if (this.totalPrice == null) this.totalPrice = new Number(); + this.totalPrice.setDouble(totalPrice); + return this; } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ @NotNull public Builder totalPrice(@NotNull String totalPrice) { - if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); + if (this.totalPrice == null) this.totalPrice = new Number(); this.totalPrice.setString(totalPrice); return this; } @@ -412,8 +422,10 @@ public Builder id(long id) { if ("modifiedTime".equals(key) && value instanceof java.util.Date) { modifiedTime((java.util.Date)value); continue; } if ("programMembershipUsed".equals(key) && value instanceof ProgramMembership) { programMembershipUsed((ProgramMembership)value); continue; } if ("reservedTicket".equals(key) && value instanceof Ticket) { reservedTicket((Ticket)value); continue; } - if ("totalPrice".equals(key) && value instanceof Number) { totalPrice((Number)value); continue; } - if ("totalPrice".equals(key) && value instanceof PriceSpecification) { totalPrice((PriceSpecification)value); continue; } + if ("totalPrice".equals(key) && value instanceof Integer) { totalPrice((Integer)value); continue; } + if ("totalPrice".equals(key) && value instanceof Long) { totalPrice((Long)value); continue; } + if ("totalPrice".equals(key) && value instanceof Float) { totalPrice((Float)value); continue; } + if ("totalPrice".equals(key) && value instanceof Double) { totalPrice((Double)value); continue; } if ("totalPrice".equals(key) && value instanceof String) { totalPrice((String)value); continue; } if ("priceCurrency".equals(key) && value instanceof String) { priceCurrency((String)value); continue; } if ("broker".equals(key) && value instanceof Organization) { broker((Organization)value); continue; } @@ -427,7 +439,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String reservationId; @@ -439,7 +451,7 @@ public Builder id(long id) { private java.util.Date modifiedTime; private ProgramMembership programMembershipUsed; private Ticket reservedTicket; - private NumberOrPriceSpecificationOrString totalPrice; + private Number totalPrice; private String priceCurrency; private OrganizationOrPerson broker; private String additionalType; @@ -472,9 +484,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder programMembershipUsed(@NotNull ProgramMembership.Builder programMembership); @NotNull Builder reservedTicket(@NotNull Ticket ticket); @NotNull Builder reservedTicket(@NotNull Ticket.Builder ticket); - @NotNull Builder totalPrice(@NotNull Number number); - @NotNull Builder totalPrice(@NotNull PriceSpecification priceSpecification); - @NotNull Builder totalPrice(@NotNull PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(@NotNull Integer integer); + @NotNull Builder totalPrice(@NotNull Long totalPrice); + @NotNull Builder totalPrice(@NotNull Float totalPrice); + @NotNull Builder totalPrice(@NotNull Double totalPrice); @NotNull Builder totalPrice(@NotNull String totalPrice); @NotNull Builder priceCurrency(@NotNull String priceCurrency); @NotNull Builder broker(@NotNull Organization organization); @@ -495,7 +508,21 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected TrainReservation(String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, NumberOrPriceSpecificationOrString totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected TrainReservation(String reservationId, ReservationStatusType reservationStatus, Thing reservationFor, OrganizationOrPerson underName, OrganizationOrPerson provider, java.util.Date bookingTime, java.util.Date modifiedTime, ProgramMembership programMembershipUsed, Ticket reservedTicket, Number totalPrice, String priceCurrency, OrganizationOrPerson broker, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(reservationId, reservationStatus, reservationFor, underName, provider, bookingTime, modifiedTime, programMembershipUsed, reservedTicket, totalPrice, priceCurrency, broker, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TrainReservation trainReservation = (TrainReservation) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TrainStation.java b/src/main/java/org/schema/TrainStation.java index c39b963f..a9596768 100644 --- a/src/main/java/org/schema/TrainStation.java +++ b/src/main/java/org/schema/TrainStation.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected TrainStation(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TrainStation trainStation = (TrainStation) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TrainTrip.java b/src/main/java/org/schema/TrainTrip.java index 9958689b..4650ea97 100644 --- a/src/main/java/org/schema/TrainTrip.java +++ b/src/main/java/org/schema/TrainTrip.java @@ -378,7 +378,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson provider; @@ -441,6 +441,38 @@ protected TrainTrip(OrganizationOrPerson provider, java.util.Date departureTime, myDeparturePlatform = departurePlatform; myArrivalPlatform = arrivalPlatform; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myProvider != null ? myProvider.hashCode() : 0); + result = 31 * result + (myDepartureTime != null ? myDepartureTime.hashCode() : 0); + result = 31 * result + (myArrivalTime != null ? myArrivalTime.hashCode() : 0); + result = 31 * result + (myTrainNumber != null ? myTrainNumber.hashCode() : 0); + result = 31 * result + (myTrainName != null ? myTrainName.hashCode() : 0); + result = 31 * result + (myDepartureStation != null ? myDepartureStation.hashCode() : 0); + result = 31 * result + (myArrivalStation != null ? myArrivalStation.hashCode() : 0); + result = 31 * result + (myDeparturePlatform != null ? myDeparturePlatform.hashCode() : 0); + result = 31 * result + (myArrivalPlatform != null ? myArrivalPlatform.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TrainTrip trainTrip = (TrainTrip) o; + if (!super.equals(o)) return false; + if (myProvider != null ? !myProvider.equals(trainTrip.myProvider) : trainTrip.myProvider != null) return false; + if (myDepartureTime != null ? !myDepartureTime.equals(trainTrip.myDepartureTime) : trainTrip.myDepartureTime != null) return false; + if (myArrivalTime != null ? !myArrivalTime.equals(trainTrip.myArrivalTime) : trainTrip.myArrivalTime != null) return false; + if (myTrainNumber != null ? !myTrainNumber.equals(trainTrip.myTrainNumber) : trainTrip.myTrainNumber != null) return false; + if (myTrainName != null ? !myTrainName.equals(trainTrip.myTrainName) : trainTrip.myTrainName != null) return false; + if (myDepartureStation != null ? !myDepartureStation.equals(trainTrip.myDepartureStation) : trainTrip.myDepartureStation != null) return false; + if (myArrivalStation != null ? !myArrivalStation.equals(trainTrip.myArrivalStation) : trainTrip.myArrivalStation != null) return false; + if (myDeparturePlatform != null ? !myDeparturePlatform.equals(trainTrip.myDeparturePlatform) : trainTrip.myDeparturePlatform != null) return false; + if (myArrivalPlatform != null ? !myArrivalPlatform.equals(trainTrip.myArrivalPlatform) : trainTrip.myArrivalPlatform != null) return false; + return true; + } + private OrganizationOrPerson myProvider; private java.util.Date myDepartureTime; private java.util.Date myArrivalTime; diff --git a/src/main/java/org/schema/TransferAction.java b/src/main/java/org/schema/TransferAction.java index 5355ae11..38e8d6c2 100644 --- a/src/main/java/org/schema/TransferAction.java +++ b/src/main/java/org/schema/TransferAction.java @@ -348,7 +348,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Place fromLocation; @@ -405,6 +405,24 @@ protected TransferAction(Place fromLocation, Place toLocation, OrganizationOrPer myFromLocation = fromLocation; myToLocation = toLocation; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myFromLocation != null ? myFromLocation.hashCode() : 0); + result = 31 * result + (myToLocation != null ? myToLocation.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TransferAction transferAction = (TransferAction) o; + if (!super.equals(o)) return false; + if (myFromLocation != null ? !myFromLocation.equals(transferAction.myFromLocation) : transferAction.myFromLocation != null) return false; + if (myToLocation != null ? !myToLocation.equals(transferAction.myToLocation) : transferAction.myToLocation != null) return false; + return true; + } + private Place myFromLocation; private Place myToLocation; } diff --git a/src/main/java/org/schema/TransitMap.java b/src/main/java/org/schema/TransitMap.java index 3d340f56..5816d0e8 100644 --- a/src/main/java/org/schema/TransitMap.java +++ b/src/main/java/org/schema/TransitMap.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected TransitMap() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TransitMap transitMap = (TransitMap) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TravelAction.java b/src/main/java/org/schema/TravelAction.java index f5b569b7..fec844c9 100644 --- a/src/main/java/org/schema/TravelAction.java +++ b/src/main/java/org/schema/TravelAction.java @@ -356,7 +356,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Distance distance; @@ -415,5 +415,21 @@ protected TravelAction(Distance distance, Place fromLocation, Place toLocation, super(fromLocation, toLocation, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myDistance = distance; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDistance != null ? myDistance.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TravelAction travelAction = (TravelAction) o; + if (!super.equals(o)) return false; + if (myDistance != null ? !myDistance.equals(travelAction.myDistance) : travelAction.myDistance != null) return false; + return true; + } + private Distance myDistance; } diff --git a/src/main/java/org/schema/TravelAgency.java b/src/main/java/org/schema/TravelAgency.java index e6403052..92185eba 100644 --- a/src/main/java/org/schema/TravelAgency.java +++ b/src/main/java/org/schema/TravelAgency.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected TravelAgency(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TravelAgency travelAgency = (TravelAgency) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TreatmentIndication.java b/src/main/java/org/schema/TreatmentIndication.java index db327353..ff5b4e25 100644 --- a/src/main/java/org/schema/TreatmentIndication.java +++ b/src/main/java/org/schema/TreatmentIndication.java @@ -301,7 +301,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private MedicalCode code; @@ -350,4 +350,18 @@ public interface Builder extends ThingBuilder { protected TreatmentIndication(MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TreatmentIndication treatmentIndication = (TreatmentIndication) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TripleBlindedTrial.java b/src/main/java/org/schema/TripleBlindedTrial.java index 36de7eb1..4f23dede 100644 --- a/src/main/java/org/schema/TripleBlindedTrial.java +++ b/src/main/java/org/schema/TripleBlindedTrial.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected TripleBlindedTrial() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TripleBlindedTrial tripleBlindedTrial = (TripleBlindedTrial) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/TypeAndQuantityNode.java b/src/main/java/org/schema/TypeAndQuantityNode.java index 615e0436..978c8574 100644 --- a/src/main/java/org/schema/TypeAndQuantityNode.java +++ b/src/main/java/org/schema/TypeAndQuantityNode.java @@ -338,7 +338,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Number amountOfThisGood; @@ -390,6 +390,30 @@ protected TypeAndQuantityNode(Number amountOfThisGood, BusinessFunction business myUnitCode = unitCode; myUnitText = unitText; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myAmountOfThisGood != null ? myAmountOfThisGood.hashCode() : 0); + result = 31 * result + (myBusinessFunction != null ? myBusinessFunction.hashCode() : 0); + result = 31 * result + (myTypeOfGood != null ? myTypeOfGood.hashCode() : 0); + result = 31 * result + (myUnitCode != null ? myUnitCode.hashCode() : 0); + result = 31 * result + (myUnitText != null ? myUnitText.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + TypeAndQuantityNode typeAndQuantityNode = (TypeAndQuantityNode) o; + if (!super.equals(o)) return false; + if (myAmountOfThisGood != null ? !myAmountOfThisGood.equals(typeAndQuantityNode.myAmountOfThisGood) : typeAndQuantityNode.myAmountOfThisGood != null) return false; + if (myBusinessFunction != null ? !myBusinessFunction.equals(typeAndQuantityNode.myBusinessFunction) : typeAndQuantityNode.myBusinessFunction != null) return false; + if (myTypeOfGood != null ? !myTypeOfGood.equals(typeAndQuantityNode.myTypeOfGood) : typeAndQuantityNode.myTypeOfGood != null) return false; + if (myUnitCode != null ? !myUnitCode.equals(typeAndQuantityNode.myUnitCode) : typeAndQuantityNode.myUnitCode != null) return false; + if (myUnitText != null ? !myUnitText.equals(typeAndQuantityNode.myUnitText) : typeAndQuantityNode.myUnitText != null) return false; + return true; + } + private Number myAmountOfThisGood; private BusinessFunction myBusinessFunction; private Product myTypeOfGood; diff --git a/src/main/java/org/schema/Ultrasound.java b/src/main/java/org/schema/Ultrasound.java index 26a37fd1..cf0390dd 100644 --- a/src/main/java/org/schema/Ultrasound.java +++ b/src/main/java/org/schema/Ultrasound.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Ultrasound() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Ultrasound ultrasound = (Ultrasound) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/UnRegisterAction.java b/src/main/java/org/schema/UnRegisterAction.java index c9640727..ba679997 100644 --- a/src/main/java/org/schema/UnRegisterAction.java +++ b/src/main/java/org/schema/UnRegisterAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected UnRegisterAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UnRegisterAction unRegisterAction = (UnRegisterAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/UnitPriceSpecification.java b/src/main/java/org/schema/UnitPriceSpecification.java index 6b457bed..b8e30ec0 100644 --- a/src/main/java/org/schema/UnitPriceSpecification.java +++ b/src/main/java/org/schema/UnitPriceSpecification.java @@ -253,9 +253,93 @@ public UnitPriceSpecification build() { */ - @NotNull public Builder price(@NotNull Number number) { - if (this.price == null) this.price = new NumberOrString(); - this.price.setNumber(number); + @NotNull public Builder price(@NotNull Integer integer) { + if (this.price == null) this.price = new Number(); + this.price.setInteger(integer); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Long price) { + if (this.price == null) this.price = new Number(); + this.price.setLong(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Float price) { + if (this.price == null) this.price = new Number(); + this.price.setFloat(price); + return this; + } + /** + * The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes. +
+
+ Usage guidelines: +
+
    +
  • Use the priceCurrency property (with ISO 4217 codes e.g. "USD") instead of + including ambiguous symbols such as '$' in the value. +
  • +
  • + Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator. +
  • +
  • + Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values + alongside more human-friendly formatting. +
  • +
  • + Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols. +
  • +
+ + */ + @NotNull public Builder price(@NotNull Double price) { + if (this.price == null) this.price = new Number(); + this.price.setDouble(price); return this; } /** @@ -282,7 +366,7 @@ public UnitPriceSpecification build() { */ @NotNull public Builder price(@NotNull String price) { - if (this.price == null) this.price = new NumberOrString(); + if (this.price == null) this.price = new Number(); this.price.setString(price); return this; } @@ -505,7 +589,10 @@ public Builder id(long id) { if ("minPrice".equals(key) && value instanceof Float) { minPrice((Float)value); continue; } if ("minPrice".equals(key) && value instanceof Double) { minPrice((Double)value); continue; } if ("minPrice".equals(key) && value instanceof String) { minPrice((String)value); continue; } - if ("price".equals(key) && value instanceof Number) { price((Number)value); continue; } + if ("price".equals(key) && value instanceof Integer) { price((Integer)value); continue; } + if ("price".equals(key) && value instanceof Long) { price((Long)value); continue; } + if ("price".equals(key) && value instanceof Float) { price((Float)value); continue; } + if ("price".equals(key) && value instanceof Double) { price((Double)value); continue; } if ("price".equals(key) && value instanceof String) { price((String)value); continue; } if ("validFrom".equals(key) && value instanceof java.util.Date) { validFrom((java.util.Date)value); continue; } if ("validThrough".equals(key) && value instanceof java.util.Date) { validThrough((java.util.Date)value); continue; } @@ -520,7 +607,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Number billingIncrement; @@ -531,7 +618,7 @@ public Builder id(long id) { private PriceSpecification eligibleTransactionVolume; private Number maxPrice; private Number minPrice; - private NumberOrString price; + private Number price; private java.util.Date validFrom; private java.util.Date validThrough; private Boolean valueAddedTaxIncluded; @@ -569,7 +656,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder minPrice(@NotNull Float minPrice); @NotNull Builder minPrice(@NotNull Double minPrice); @NotNull Builder minPrice(@NotNull String minPrice); - @NotNull Builder price(@NotNull Number number); + @NotNull Builder price(@NotNull Integer integer); + @NotNull Builder price(@NotNull Long price); + @NotNull Builder price(@NotNull Float price); + @NotNull Builder price(@NotNull Double price); @NotNull Builder price(@NotNull String price); @NotNull Builder validFrom(@NotNull java.util.Date date); @NotNull Builder validThrough(@NotNull java.util.Date date); @@ -589,13 +679,35 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected UnitPriceSpecification(Number billingIncrement, String priceType, String unitCode, String unitText, QuantitativeValue eligibleQuantity, PriceSpecification eligibleTransactionVolume, Number maxPrice, Number minPrice, NumberOrString price, java.util.Date validFrom, java.util.Date validThrough, Boolean valueAddedTaxIncluded, String priceCurrency, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected UnitPriceSpecification(Number billingIncrement, String priceType, String unitCode, String unitText, QuantitativeValue eligibleQuantity, PriceSpecification eligibleTransactionVolume, Number maxPrice, Number minPrice, Number price, java.util.Date validFrom, java.util.Date validThrough, Boolean valueAddedTaxIncluded, String priceCurrency, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(eligibleQuantity, eligibleTransactionVolume, maxPrice, minPrice, price, validFrom, validThrough, valueAddedTaxIncluded, priceCurrency, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myBillingIncrement = billingIncrement; myPriceType = priceType; myUnitCode = unitCode; myUnitText = unitText; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBillingIncrement != null ? myBillingIncrement.hashCode() : 0); + result = 31 * result + (myPriceType != null ? myPriceType.hashCode() : 0); + result = 31 * result + (myUnitCode != null ? myUnitCode.hashCode() : 0); + result = 31 * result + (myUnitText != null ? myUnitText.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UnitPriceSpecification unitPriceSpecification = (UnitPriceSpecification) o; + if (!super.equals(o)) return false; + if (myBillingIncrement != null ? !myBillingIncrement.equals(unitPriceSpecification.myBillingIncrement) : unitPriceSpecification.myBillingIncrement != null) return false; + if (myPriceType != null ? !myPriceType.equals(unitPriceSpecification.myPriceType) : unitPriceSpecification.myPriceType != null) return false; + if (myUnitCode != null ? !myUnitCode.equals(unitPriceSpecification.myUnitCode) : unitPriceSpecification.myUnitCode != null) return false; + if (myUnitText != null ? !myUnitText.equals(unitPriceSpecification.myUnitText) : unitPriceSpecification.myUnitText != null) return false; + return true; + } + private Number myBillingIncrement; private String myPriceType; private String myUnitCode; diff --git a/src/main/java/org/schema/UpdateAction.java b/src/main/java/org/schema/UpdateAction.java index e209a0d4..f8b54010 100644 --- a/src/main/java/org/schema/UpdateAction.java +++ b/src/main/java/org/schema/UpdateAction.java @@ -328,7 +328,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Thing targetCollection; @@ -381,5 +381,21 @@ protected UpdateAction(Thing targetCollection, OrganizationOrPerson agent, java. super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myTargetCollection = targetCollection; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myTargetCollection != null ? myTargetCollection.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UpdateAction updateAction = (UpdateAction) o; + if (!super.equals(o)) return false; + if (myTargetCollection != null ? !myTargetCollection.equals(updateAction.myTargetCollection) : updateAction.myTargetCollection != null) return false; + return true; + } + private Thing myTargetCollection; } diff --git a/src/main/java/org/schema/Urologic.java b/src/main/java/org/schema/Urologic.java index 4abebc4a..e4983e74 100644 --- a/src/main/java/org/schema/Urologic.java +++ b/src/main/java/org/schema/Urologic.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Urologic() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Urologic urologic = (Urologic) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/UseAction.java b/src/main/java/org/schema/UseAction.java index cec73dfa..3203fb00 100644 --- a/src/main/java/org/schema/UseAction.java +++ b/src/main/java/org/schema/UseAction.java @@ -322,7 +322,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Offer expectsAcceptanceOf; @@ -374,4 +374,18 @@ public interface Builder extends ThingBuilder { protected UseAction(Offer expectsAcceptanceOf, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(expectsAcceptanceOf, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UseAction useAction = (UseAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/UsedCondition.java b/src/main/java/org/schema/UsedCondition.java index 41e9bce1..7e0156b2 100644 --- a/src/main/java/org/schema/UsedCondition.java +++ b/src/main/java/org/schema/UsedCondition.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected UsedCondition() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UsedCondition usedCondition = (UsedCondition) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/UserBlocks.java b/src/main/java/org/schema/UserBlocks.java index 59b4e28d..047d47d6 100644 --- a/src/main/java/org/schema/UserBlocks.java +++ b/src/main/java/org/schema/UserBlocks.java @@ -498,7 +498,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -585,4 +585,18 @@ public interface Builder extends ThingBuilder { protected UserBlocks(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UserBlocks userBlocks = (UserBlocks) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/UserCheckins.java b/src/main/java/org/schema/UserCheckins.java index 7e7cd0d4..fc22742b 100644 --- a/src/main/java/org/schema/UserCheckins.java +++ b/src/main/java/org/schema/UserCheckins.java @@ -498,7 +498,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -585,4 +585,18 @@ public interface Builder extends ThingBuilder { protected UserCheckins(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UserCheckins userCheckins = (UserCheckins) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/UserComments.java b/src/main/java/org/schema/UserComments.java index ffb4af9c..3502bc0d 100644 --- a/src/main/java/org/schema/UserComments.java +++ b/src/main/java/org/schema/UserComments.java @@ -598,7 +598,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String commentText; @@ -704,6 +704,30 @@ protected UserComments(String commentText, java.util.Date commentTime, Organizat myDiscusses = discusses; myReplyToUrl = replyToUrl; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myCommentText != null ? myCommentText.hashCode() : 0); + result = 31 * result + (myCommentTime != null ? myCommentTime.hashCode() : 0); + result = 31 * result + (myCreator != null ? myCreator.hashCode() : 0); + result = 31 * result + (myDiscusses != null ? myDiscusses.hashCode() : 0); + result = 31 * result + (myReplyToUrl != null ? myReplyToUrl.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UserComments userComments = (UserComments) o; + if (!super.equals(o)) return false; + if (myCommentText != null ? !myCommentText.equals(userComments.myCommentText) : userComments.myCommentText != null) return false; + if (myCommentTime != null ? !myCommentTime.equals(userComments.myCommentTime) : userComments.myCommentTime != null) return false; + if (myCreator != null ? !myCreator.equals(userComments.myCreator) : userComments.myCreator != null) return false; + if (myDiscusses != null ? !myDiscusses.equals(userComments.myDiscusses) : userComments.myDiscusses != null) return false; + if (myReplyToUrl != null ? !myReplyToUrl.equals(userComments.myReplyToUrl) : userComments.myReplyToUrl != null) return false; + return true; + } + private String myCommentText; private java.util.Date myCommentTime; private OrganizationOrPerson myCreator; diff --git a/src/main/java/org/schema/UserDownloads.java b/src/main/java/org/schema/UserDownloads.java index bf6c7e8a..b8cad827 100644 --- a/src/main/java/org/schema/UserDownloads.java +++ b/src/main/java/org/schema/UserDownloads.java @@ -498,7 +498,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -585,4 +585,18 @@ public interface Builder extends ThingBuilder { protected UserDownloads(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UserDownloads userDownloads = (UserDownloads) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/UserInteraction.java b/src/main/java/org/schema/UserInteraction.java index d2b86730..422c4677 100644 --- a/src/main/java/org/schema/UserInteraction.java +++ b/src/main/java/org/schema/UserInteraction.java @@ -498,7 +498,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -585,4 +585,18 @@ public interface Builder extends ThingBuilder { protected UserInteraction(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UserInteraction userInteraction = (UserInteraction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/UserLikes.java b/src/main/java/org/schema/UserLikes.java index bdd74b05..39537e79 100644 --- a/src/main/java/org/schema/UserLikes.java +++ b/src/main/java/org/schema/UserLikes.java @@ -498,7 +498,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -585,4 +585,18 @@ public interface Builder extends ThingBuilder { protected UserLikes(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UserLikes userLikes = (UserLikes) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/UserPageVisits.java b/src/main/java/org/schema/UserPageVisits.java index 44014c5a..39df03fe 100644 --- a/src/main/java/org/schema/UserPageVisits.java +++ b/src/main/java/org/schema/UserPageVisits.java @@ -498,7 +498,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -585,4 +585,18 @@ public interface Builder extends ThingBuilder { protected UserPageVisits(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UserPageVisits userPageVisits = (UserPageVisits) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/UserPlays.java b/src/main/java/org/schema/UserPlays.java index c7358970..00603293 100644 --- a/src/main/java/org/schema/UserPlays.java +++ b/src/main/java/org/schema/UserPlays.java @@ -498,7 +498,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -585,4 +585,18 @@ public interface Builder extends ThingBuilder { protected UserPlays(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UserPlays userPlays = (UserPlays) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/UserPlusOnes.java b/src/main/java/org/schema/UserPlusOnes.java index b7d01cba..7611f391 100644 --- a/src/main/java/org/schema/UserPlusOnes.java +++ b/src/main/java/org/schema/UserPlusOnes.java @@ -498,7 +498,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -585,4 +585,18 @@ public interface Builder extends ThingBuilder { protected UserPlusOnes(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UserPlusOnes userPlusOnes = (UserPlusOnes) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/UserTweets.java b/src/main/java/org/schema/UserTweets.java index dabc8d35..ba28568f 100644 --- a/src/main/java/org/schema/UserTweets.java +++ b/src/main/java/org/schema/UserTweets.java @@ -498,7 +498,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -585,4 +585,18 @@ public interface Builder extends ThingBuilder { protected UserTweets(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + UserTweets userTweets = (UserTweets) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Vehicle.java b/src/main/java/org/schema/Vehicle.java index 13dc56b0..0e3095d9 100644 --- a/src/main/java/org/schema/Vehicle.java +++ b/src/main/java/org/schema/Vehicle.java @@ -36,7 +36,7 @@ public NumberOrQuantitativeValue getNumberOfDoors() { /** * The number or type of airbags in the vehicle. */ - public NumberOrString getNumberOfAirbags() { + public Number getNumberOfAirbags() { return myNumberOfAirbags; } /** @@ -229,16 +229,40 @@ Typical unit code(s): C62 /** * The number or type of airbags in the vehicle. */ - @NotNull public Builder numberOfAirbags(@NotNull Number number) { - if (this.numberOfAirbags == null) this.numberOfAirbags = new NumberOrString(); - this.numberOfAirbags.setNumber(number); + @NotNull public Builder numberOfAirbags(@NotNull Integer integer) { + if (this.numberOfAirbags == null) this.numberOfAirbags = new Number(); + this.numberOfAirbags.setInteger(integer); + return this; + } + /** + * The number or type of airbags in the vehicle. + */ + @NotNull public Builder numberOfAirbags(@NotNull Long numberOfAirbags) { + if (this.numberOfAirbags == null) this.numberOfAirbags = new Number(); + this.numberOfAirbags.setLong(numberOfAirbags); + return this; + } + /** + * The number or type of airbags in the vehicle. + */ + @NotNull public Builder numberOfAirbags(@NotNull Float numberOfAirbags) { + if (this.numberOfAirbags == null) this.numberOfAirbags = new Number(); + this.numberOfAirbags.setFloat(numberOfAirbags); + return this; + } + /** + * The number or type of airbags in the vehicle. + */ + @NotNull public Builder numberOfAirbags(@NotNull Double numberOfAirbags) { + if (this.numberOfAirbags == null) this.numberOfAirbags = new Number(); + this.numberOfAirbags.setDouble(numberOfAirbags); return this; } /** * The number or type of airbags in the vehicle. */ @NotNull public Builder numberOfAirbags(@NotNull String numberOfAirbags) { - if (this.numberOfAirbags == null) this.numberOfAirbags = new NumberOrString(); + if (this.numberOfAirbags == null) this.numberOfAirbags = new Number(); this.numberOfAirbags.setString(numberOfAirbags); return this; } @@ -1170,7 +1194,10 @@ public Builder id(long id) { if (value instanceof java.util.Map) { value = ThingDeserializer.fromMap((java.util.Map)value); } if ("numberOfDoors".equals(key) && value instanceof Number) { numberOfDoors((Number)value); continue; } if ("numberOfDoors".equals(key) && value instanceof QuantitativeValue) { numberOfDoors((QuantitativeValue)value); continue; } - if ("numberOfAirbags".equals(key) && value instanceof Number) { numberOfAirbags((Number)value); continue; } + if ("numberOfAirbags".equals(key) && value instanceof Integer) { numberOfAirbags((Integer)value); continue; } + if ("numberOfAirbags".equals(key) && value instanceof Long) { numberOfAirbags((Long)value); continue; } + if ("numberOfAirbags".equals(key) && value instanceof Float) { numberOfAirbags((Float)value); continue; } + if ("numberOfAirbags".equals(key) && value instanceof Double) { numberOfAirbags((Double)value); continue; } if ("numberOfAirbags".equals(key) && value instanceof String) { numberOfAirbags((String)value); continue; } if ("numberOfAxles".equals(key) && value instanceof Number) { numberOfAxles((Number)value); continue; } if ("numberOfAxles".equals(key) && value instanceof QuantitativeValue) { numberOfAxles((QuantitativeValue)value); continue; } @@ -1247,11 +1274,11 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private NumberOrQuantitativeValue numberOfDoors; - private NumberOrString numberOfAirbags; + private Number numberOfAirbags; private NumberOrQuantitativeValue numberOfAxles; private EngineSpecification vehicleEngine; private QuantitativeValue fuelConsumption; @@ -1317,7 +1344,10 @@ public interface Builder extends ThingBuilder { @NotNull Builder numberOfDoors(@NotNull Number number); @NotNull Builder numberOfDoors(@NotNull QuantitativeValue quantitativeValue); @NotNull Builder numberOfDoors(@NotNull QuantitativeValue.Builder quantitativeValue); - @NotNull Builder numberOfAirbags(@NotNull Number number); + @NotNull Builder numberOfAirbags(@NotNull Integer integer); + @NotNull Builder numberOfAirbags(@NotNull Long numberOfAirbags); + @NotNull Builder numberOfAirbags(@NotNull Float numberOfAirbags); + @NotNull Builder numberOfAirbags(@NotNull Double numberOfAirbags); @NotNull Builder numberOfAirbags(@NotNull String numberOfAirbags); @NotNull Builder numberOfAxles(@NotNull Number number); @NotNull Builder numberOfAxles(@NotNull QuantitativeValue quantitativeValue); @@ -1436,7 +1466,7 @@ public interface Builder extends ThingBuilder { @NotNull Builder id(@NotNull String id); } - protected Vehicle(NumberOrQuantitativeValue numberOfDoors, NumberOrString numberOfAirbags, NumberOrQuantitativeValue numberOfAxles, EngineSpecification vehicleEngine, QuantitativeValue fuelConsumption, QuantitativeValue fuelEfficiency, NumberOrQuantitativeValue numberOfForwardGears, String vin, QuantitativeValue cargoVolume, String vehicleConfiguration, String knownVehicleDamages, java.util.Date dateVehicleFirstRegistered, DriveWheelConfigurationValueOrString driveWheelConfiguration, QualitativeValueOrString fuelType, String vehicleInteriorColor, String vehicleInteriorType, QuantitativeValue mileageFromOdometer, java.util.Date vehicleModelDate, NumberOrQuantitativeValue numberOfPreviousOwners, java.util.Date productionDate, java.util.Date purchaseDate, NumberOrQuantitativeValue vehicleSeatingCapacity, QualitativeValueOrString vehicleTransmission, SteeringPositionValue steeringPosition, AggregateRating aggregateRating, Audience audience, String award, BrandOrOrganization brand, PhysicalActivityCategoryOrStringOrThing category, String color, DistanceOrQuantitativeValue depth, String gtin12, String gtin13, String gtin14, String gtin8, DistanceOrQuantitativeValue height, Product isAccessoryOrSparePartFor, Product isConsumableFor, Product isRelatedTo, Product isSimilarTo, OfferItemCondition itemCondition, ImageObjectOrString logo, Organization manufacturer, ProductModelOrString model, String mpn, Offer offers, String productID, java.util.Date releaseDate, Review review, String sku, QuantitativeValue weight, DistanceOrQuantitativeValue width, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected Vehicle(NumberOrQuantitativeValue numberOfDoors, Number numberOfAirbags, NumberOrQuantitativeValue numberOfAxles, EngineSpecification vehicleEngine, QuantitativeValue fuelConsumption, QuantitativeValue fuelEfficiency, NumberOrQuantitativeValue numberOfForwardGears, String vin, QuantitativeValue cargoVolume, String vehicleConfiguration, String knownVehicleDamages, java.util.Date dateVehicleFirstRegistered, DriveWheelConfigurationValueOrString driveWheelConfiguration, QualitativeValueOrString fuelType, String vehicleInteriorColor, String vehicleInteriorType, QuantitativeValue mileageFromOdometer, java.util.Date vehicleModelDate, NumberOrQuantitativeValue numberOfPreviousOwners, java.util.Date productionDate, java.util.Date purchaseDate, NumberOrQuantitativeValue vehicleSeatingCapacity, QualitativeValueOrString vehicleTransmission, SteeringPositionValue steeringPosition, AggregateRating aggregateRating, Audience audience, String award, BrandOrOrganization brand, PhysicalActivityCategoryOrStringOrThing category, String color, DistanceOrQuantitativeValue depth, String gtin12, String gtin13, String gtin14, String gtin8, DistanceOrQuantitativeValue height, Product isAccessoryOrSparePartFor, Product isConsumableFor, Product isRelatedTo, Product isSimilarTo, OfferItemCondition itemCondition, ImageObjectOrString logo, Organization manufacturer, ProductModelOrString model, String mpn, Offer offers, String productID, java.util.Date releaseDate, Review review, String sku, QuantitativeValue weight, DistanceOrQuantitativeValue width, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, audience, award, brand, category, color, depth, gtin12, gtin13, gtin14, gtin8, height, isAccessoryOrSparePartFor, isConsumableFor, isRelatedTo, isSimilarTo, itemCondition, logo, manufacturer, model, mpn, offers, productID, releaseDate, review, sku, weight, width, additionalProperty, productionDate, purchaseDate, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myNumberOfDoors = numberOfDoors; myNumberOfAirbags = numberOfAirbags; @@ -1463,8 +1493,70 @@ protected Vehicle(NumberOrQuantitativeValue numberOfDoors, NumberOrString number myVehicleTransmission = vehicleTransmission; mySteeringPosition = steeringPosition; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myNumberOfDoors != null ? myNumberOfDoors.hashCode() : 0); + result = 31 * result + (myNumberOfAirbags != null ? myNumberOfAirbags.hashCode() : 0); + result = 31 * result + (myNumberOfAxles != null ? myNumberOfAxles.hashCode() : 0); + result = 31 * result + (myVehicleEngine != null ? myVehicleEngine.hashCode() : 0); + result = 31 * result + (myFuelConsumption != null ? myFuelConsumption.hashCode() : 0); + result = 31 * result + (myFuelEfficiency != null ? myFuelEfficiency.hashCode() : 0); + result = 31 * result + (myNumberOfForwardGears != null ? myNumberOfForwardGears.hashCode() : 0); + result = 31 * result + (myVin != null ? myVin.hashCode() : 0); + result = 31 * result + (myCargoVolume != null ? myCargoVolume.hashCode() : 0); + result = 31 * result + (myVehicleConfiguration != null ? myVehicleConfiguration.hashCode() : 0); + result = 31 * result + (myKnownVehicleDamages != null ? myKnownVehicleDamages.hashCode() : 0); + result = 31 * result + (myDateVehicleFirstRegistered != null ? myDateVehicleFirstRegistered.hashCode() : 0); + result = 31 * result + (myDriveWheelConfiguration != null ? myDriveWheelConfiguration.hashCode() : 0); + result = 31 * result + (myFuelType != null ? myFuelType.hashCode() : 0); + result = 31 * result + (myVehicleInteriorColor != null ? myVehicleInteriorColor.hashCode() : 0); + result = 31 * result + (myVehicleInteriorType != null ? myVehicleInteriorType.hashCode() : 0); + result = 31 * result + (myMileageFromOdometer != null ? myMileageFromOdometer.hashCode() : 0); + result = 31 * result + (myVehicleModelDate != null ? myVehicleModelDate.hashCode() : 0); + result = 31 * result + (myNumberOfPreviousOwners != null ? myNumberOfPreviousOwners.hashCode() : 0); + result = 31 * result + (myProductionDate != null ? myProductionDate.hashCode() : 0); + result = 31 * result + (myPurchaseDate != null ? myPurchaseDate.hashCode() : 0); + result = 31 * result + (myVehicleSeatingCapacity != null ? myVehicleSeatingCapacity.hashCode() : 0); + result = 31 * result + (myVehicleTransmission != null ? myVehicleTransmission.hashCode() : 0); + result = 31 * result + (mySteeringPosition != null ? mySteeringPosition.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Vehicle vehicle = (Vehicle) o; + if (!super.equals(o)) return false; + if (myNumberOfDoors != null ? !myNumberOfDoors.equals(vehicle.myNumberOfDoors) : vehicle.myNumberOfDoors != null) return false; + if (myNumberOfAirbags != null ? !myNumberOfAirbags.equals(vehicle.myNumberOfAirbags) : vehicle.myNumberOfAirbags != null) return false; + if (myNumberOfAxles != null ? !myNumberOfAxles.equals(vehicle.myNumberOfAxles) : vehicle.myNumberOfAxles != null) return false; + if (myVehicleEngine != null ? !myVehicleEngine.equals(vehicle.myVehicleEngine) : vehicle.myVehicleEngine != null) return false; + if (myFuelConsumption != null ? !myFuelConsumption.equals(vehicle.myFuelConsumption) : vehicle.myFuelConsumption != null) return false; + if (myFuelEfficiency != null ? !myFuelEfficiency.equals(vehicle.myFuelEfficiency) : vehicle.myFuelEfficiency != null) return false; + if (myNumberOfForwardGears != null ? !myNumberOfForwardGears.equals(vehicle.myNumberOfForwardGears) : vehicle.myNumberOfForwardGears != null) return false; + if (myVin != null ? !myVin.equals(vehicle.myVin) : vehicle.myVin != null) return false; + if (myCargoVolume != null ? !myCargoVolume.equals(vehicle.myCargoVolume) : vehicle.myCargoVolume != null) return false; + if (myVehicleConfiguration != null ? !myVehicleConfiguration.equals(vehicle.myVehicleConfiguration) : vehicle.myVehicleConfiguration != null) return false; + if (myKnownVehicleDamages != null ? !myKnownVehicleDamages.equals(vehicle.myKnownVehicleDamages) : vehicle.myKnownVehicleDamages != null) return false; + if (myDateVehicleFirstRegistered != null ? !myDateVehicleFirstRegistered.equals(vehicle.myDateVehicleFirstRegistered) : vehicle.myDateVehicleFirstRegistered != null) return false; + if (myDriveWheelConfiguration != null ? !myDriveWheelConfiguration.equals(vehicle.myDriveWheelConfiguration) : vehicle.myDriveWheelConfiguration != null) return false; + if (myFuelType != null ? !myFuelType.equals(vehicle.myFuelType) : vehicle.myFuelType != null) return false; + if (myVehicleInteriorColor != null ? !myVehicleInteriorColor.equals(vehicle.myVehicleInteriorColor) : vehicle.myVehicleInteriorColor != null) return false; + if (myVehicleInteriorType != null ? !myVehicleInteriorType.equals(vehicle.myVehicleInteriorType) : vehicle.myVehicleInteriorType != null) return false; + if (myMileageFromOdometer != null ? !myMileageFromOdometer.equals(vehicle.myMileageFromOdometer) : vehicle.myMileageFromOdometer != null) return false; + if (myVehicleModelDate != null ? !myVehicleModelDate.equals(vehicle.myVehicleModelDate) : vehicle.myVehicleModelDate != null) return false; + if (myNumberOfPreviousOwners != null ? !myNumberOfPreviousOwners.equals(vehicle.myNumberOfPreviousOwners) : vehicle.myNumberOfPreviousOwners != null) return false; + if (myProductionDate != null ? !myProductionDate.equals(vehicle.myProductionDate) : vehicle.myProductionDate != null) return false; + if (myPurchaseDate != null ? !myPurchaseDate.equals(vehicle.myPurchaseDate) : vehicle.myPurchaseDate != null) return false; + if (myVehicleSeatingCapacity != null ? !myVehicleSeatingCapacity.equals(vehicle.myVehicleSeatingCapacity) : vehicle.myVehicleSeatingCapacity != null) return false; + if (myVehicleTransmission != null ? !myVehicleTransmission.equals(vehicle.myVehicleTransmission) : vehicle.myVehicleTransmission != null) return false; + if (mySteeringPosition != null ? !mySteeringPosition.equals(vehicle.mySteeringPosition) : vehicle.mySteeringPosition != null) return false; + return true; + } + private NumberOrQuantitativeValue myNumberOfDoors; - private NumberOrString myNumberOfAirbags; + private Number myNumberOfAirbags; private NumberOrQuantitativeValue myNumberOfAxles; private EngineSpecification myVehicleEngine; private QuantitativeValue myFuelConsumption; diff --git a/src/main/java/org/schema/VehicleSpecialUsage.java b/src/main/java/org/schema/VehicleSpecialUsage.java index a209d60d..24f2515d 100644 --- a/src/main/java/org/schema/VehicleSpecialUsage.java +++ b/src/main/java/org/schema/VehicleSpecialUsage.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected VehicleSpecialUsage() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + VehicleSpecialUsage vehicleSpecialUsage = (VehicleSpecialUsage) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Vein.java b/src/main/java/org/schema/Vein.java index d8e2861c..515b037e 100644 --- a/src/main/java/org/schema/Vein.java +++ b/src/main/java/org/schema/Vein.java @@ -479,7 +479,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Vessel drainsTo; @@ -565,6 +565,26 @@ protected Vein(Vessel drainsTo, AnatomicalStructureOrAnatomicalSystem regionDrai myRegionDrained = regionDrained; myTributary = tributary; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDrainsTo != null ? myDrainsTo.hashCode() : 0); + result = 31 * result + (myRegionDrained != null ? myRegionDrained.hashCode() : 0); + result = 31 * result + (myTributary != null ? myTributary.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Vein vein = (Vein) o; + if (!super.equals(o)) return false; + if (myDrainsTo != null ? !myDrainsTo.equals(vein.myDrainsTo) : vein.myDrainsTo != null) return false; + if (myRegionDrained != null ? !myRegionDrained.equals(vein.myRegionDrained) : vein.myRegionDrained != null) return false; + if (myTributary != null ? !myTributary.equals(vein.myTributary) : vein.myTributary != null) return false; + return true; + } + private Vessel myDrainsTo; private AnatomicalStructureOrAnatomicalSystem myRegionDrained; private AnatomicalStructure myTributary; diff --git a/src/main/java/org/schema/VenueMap.java b/src/main/java/org/schema/VenueMap.java index 7baf593e..5ee8c4e9 100644 --- a/src/main/java/org/schema/VenueMap.java +++ b/src/main/java/org/schema/VenueMap.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected VenueMap() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + VenueMap venueMap = (VenueMap) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Vessel.java b/src/main/java/org/schema/Vessel.java index 48f9ec52..42a5b321 100644 --- a/src/main/java/org/schema/Vessel.java +++ b/src/main/java/org/schema/Vessel.java @@ -403,7 +403,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String associatedPathophysiology; @@ -475,4 +475,18 @@ public interface Builder extends ThingBuilder { protected Vessel(String associatedPathophysiology, String bodyLocation, AnatomicalStructure connectedTo, ImageObject diagram, String function, IsPartOf partOfSystem, MedicalCondition relatedCondition, MedicalTherapy relatedTherapy, AnatomicalStructure subStructure, MedicalCode code, MedicalGuideline guideline, MedicineSystem medicineSystem, Organization recognizingAuthority, MedicalSpecialty relevantSpecialty, MedicalStudy study, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(associatedPathophysiology, bodyLocation, connectedTo, diagram, function, partOfSystem, relatedCondition, relatedTherapy, subStructure, code, guideline, medicineSystem, recognizingAuthority, relevantSpecialty, study, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Vessel vessel = (Vessel) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/VeterinaryCare.java b/src/main/java/org/schema/VeterinaryCare.java index 6b8ae26d..e154e827 100644 --- a/src/main/java/org/schema/VeterinaryCare.java +++ b/src/main/java/org/schema/VeterinaryCare.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected VeterinaryCare(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + VeterinaryCare veterinaryCare = (VeterinaryCare) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/VideoGallery.java b/src/main/java/org/schema/VideoGallery.java index d66934d6..34ef3e48 100644 --- a/src/main/java/org/schema/VideoGallery.java +++ b/src/main/java/org/schema/VideoGallery.java @@ -1266,7 +1266,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BreadcrumbListOrString breadcrumb; @@ -1507,4 +1507,18 @@ public interface Builder extends ThingBuilder { protected VideoGallery(BreadcrumbListOrString breadcrumb, java.util.Date lastReviewed, WebPageElement mainContentOfPage, ImageObject primaryImageOfPage, String relatedLink, OrganizationOrPerson reviewedBy, String significantLink, Specialty specialty, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(breadcrumb, lastReviewed, mainContentOfPage, primaryImageOfPage, relatedLink, reviewedBy, significantLink, specialty, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + VideoGallery videoGallery = (VideoGallery) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/VideoGame.java b/src/main/java/org/schema/VideoGame.java index 29aa1a42..645310a4 100644 --- a/src/main/java/org/schema/VideoGame.java +++ b/src/main/java/org/schema/VideoGame.java @@ -1427,7 +1427,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person director; @@ -1697,6 +1697,36 @@ protected VideoGame(Person director, MusicGroupOrPerson musicBy, VideoObject tra myGamePlatform = gamePlatform; myGameServer = gameServer; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDirector != null ? myDirector.hashCode() : 0); + result = 31 * result + (myMusicBy != null ? myMusicBy.hashCode() : 0); + result = 31 * result + (myTrailer != null ? myTrailer.hashCode() : 0); + result = 31 * result + (myPlayMode != null ? myPlayMode.hashCode() : 0); + result = 31 * result + (myCheatCode != null ? myCheatCode.hashCode() : 0); + result = 31 * result + (myGameTip != null ? myGameTip.hashCode() : 0); + result = 31 * result + (myGamePlatform != null ? myGamePlatform.hashCode() : 0); + result = 31 * result + (myGameServer != null ? myGameServer.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + VideoGame videoGame = (VideoGame) o; + if (!super.equals(o)) return false; + if (myDirector != null ? !myDirector.equals(videoGame.myDirector) : videoGame.myDirector != null) return false; + if (myMusicBy != null ? !myMusicBy.equals(videoGame.myMusicBy) : videoGame.myMusicBy != null) return false; + if (myTrailer != null ? !myTrailer.equals(videoGame.myTrailer) : videoGame.myTrailer != null) return false; + if (myPlayMode != null ? !myPlayMode.equals(videoGame.myPlayMode) : videoGame.myPlayMode != null) return false; + if (myCheatCode != null ? !myCheatCode.equals(videoGame.myCheatCode) : videoGame.myCheatCode != null) return false; + if (myGameTip != null ? !myGameTip.equals(videoGame.myGameTip) : videoGame.myGameTip != null) return false; + if (myGamePlatform != null ? !myGamePlatform.equals(videoGame.myGamePlatform) : videoGame.myGamePlatform != null) return false; + if (myGameServer != null ? !myGameServer.equals(videoGame.myGameServer) : videoGame.myGameServer != null) return false; + return true; + } + private Person myDirector; private MusicGroupOrPerson myMusicBy; private VideoObject myTrailer; diff --git a/src/main/java/org/schema/VideoGameClip.java b/src/main/java/org/schema/VideoGameClip.java index 31eadc27..544da3e9 100644 --- a/src/main/java/org/schema/VideoGameClip.java +++ b/src/main/java/org/schema/VideoGameClip.java @@ -1236,7 +1236,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person actor; @@ -1472,4 +1472,18 @@ public interface Builder extends ThingBuilder { protected VideoGameClip(Person actor, Position clipNumber, Person director, MusicGroupOrPerson musicBy, IsPartOf partOfEpisode, IsPartOf partOfSeason, IsPartOf partOfSeries, String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(actor, clipNumber, director, musicBy, partOfEpisode, partOfSeason, partOfSeries, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + VideoGameClip videoGameClip = (VideoGameClip) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/VideoGameSeries.java b/src/main/java/org/schema/VideoGameSeries.java index 456fd3a3..26cf5cbd 100644 --- a/src/main/java/org/schema/VideoGameSeries.java +++ b/src/main/java/org/schema/VideoGameSeries.java @@ -1529,7 +1529,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person actor; @@ -1820,6 +1820,54 @@ protected VideoGameSeries(Person actor, Person director, HasPart episode, MusicG myGamePlatform = gamePlatform; myGameLocation = gameLocation; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myActor != null ? myActor.hashCode() : 0); + result = 31 * result + (myDirector != null ? myDirector.hashCode() : 0); + result = 31 * result + (myEpisode != null ? myEpisode.hashCode() : 0); + result = 31 * result + (myMusicBy != null ? myMusicBy.hashCode() : 0); + result = 31 * result + (myNumberOfEpisodes != null ? myNumberOfEpisodes.hashCode() : 0); + result = 31 * result + (myNumberOfSeasons != null ? myNumberOfSeasons.hashCode() : 0); + result = 31 * result + (myProductionCompany != null ? myProductionCompany.hashCode() : 0); + result = 31 * result + (myContainsSeason != null ? myContainsSeason.hashCode() : 0); + result = 31 * result + (myTrailer != null ? myTrailer.hashCode() : 0); + result = 31 * result + (myNumberOfPlayers != null ? myNumberOfPlayers.hashCode() : 0); + result = 31 * result + (myQuest != null ? myQuest.hashCode() : 0); + result = 31 * result + (myGameItem != null ? myGameItem.hashCode() : 0); + result = 31 * result + (myCharacterAttribute != null ? myCharacterAttribute.hashCode() : 0); + result = 31 * result + (myPlayMode != null ? myPlayMode.hashCode() : 0); + result = 31 * result + (myCheatCode != null ? myCheatCode.hashCode() : 0); + result = 31 * result + (myGamePlatform != null ? myGamePlatform.hashCode() : 0); + result = 31 * result + (myGameLocation != null ? myGameLocation.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + VideoGameSeries videoGameSeries = (VideoGameSeries) o; + if (!super.equals(o)) return false; + if (myActor != null ? !myActor.equals(videoGameSeries.myActor) : videoGameSeries.myActor != null) return false; + if (myDirector != null ? !myDirector.equals(videoGameSeries.myDirector) : videoGameSeries.myDirector != null) return false; + if (myEpisode != null ? !myEpisode.equals(videoGameSeries.myEpisode) : videoGameSeries.myEpisode != null) return false; + if (myMusicBy != null ? !myMusicBy.equals(videoGameSeries.myMusicBy) : videoGameSeries.myMusicBy != null) return false; + if (myNumberOfEpisodes != null ? !myNumberOfEpisodes.equals(videoGameSeries.myNumberOfEpisodes) : videoGameSeries.myNumberOfEpisodes != null) return false; + if (myNumberOfSeasons != null ? !myNumberOfSeasons.equals(videoGameSeries.myNumberOfSeasons) : videoGameSeries.myNumberOfSeasons != null) return false; + if (myProductionCompany != null ? !myProductionCompany.equals(videoGameSeries.myProductionCompany) : videoGameSeries.myProductionCompany != null) return false; + if (myContainsSeason != null ? !myContainsSeason.equals(videoGameSeries.myContainsSeason) : videoGameSeries.myContainsSeason != null) return false; + if (myTrailer != null ? !myTrailer.equals(videoGameSeries.myTrailer) : videoGameSeries.myTrailer != null) return false; + if (myNumberOfPlayers != null ? !myNumberOfPlayers.equals(videoGameSeries.myNumberOfPlayers) : videoGameSeries.myNumberOfPlayers != null) return false; + if (myQuest != null ? !myQuest.equals(videoGameSeries.myQuest) : videoGameSeries.myQuest != null) return false; + if (myGameItem != null ? !myGameItem.equals(videoGameSeries.myGameItem) : videoGameSeries.myGameItem != null) return false; + if (myCharacterAttribute != null ? !myCharacterAttribute.equals(videoGameSeries.myCharacterAttribute) : videoGameSeries.myCharacterAttribute != null) return false; + if (myPlayMode != null ? !myPlayMode.equals(videoGameSeries.myPlayMode) : videoGameSeries.myPlayMode != null) return false; + if (myCheatCode != null ? !myCheatCode.equals(videoGameSeries.myCheatCode) : videoGameSeries.myCheatCode != null) return false; + if (myGamePlatform != null ? !myGamePlatform.equals(videoGameSeries.myGamePlatform) : videoGameSeries.myGamePlatform != null) return false; + if (myGameLocation != null ? !myGameLocation.equals(videoGameSeries.myGameLocation) : videoGameSeries.myGameLocation != null) return false; + return true; + } + private Person myActor; private Person myDirector; private HasPart myEpisode; diff --git a/src/main/java/org/schema/VideoObject.java b/src/main/java/org/schema/VideoObject.java index 22ff9c2f..1e78c47d 100644 --- a/src/main/java/org/schema/VideoObject.java +++ b/src/main/java/org/schema/VideoObject.java @@ -1501,7 +1501,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person actor; @@ -1791,6 +1791,36 @@ protected VideoObject(Person actor, String caption, Person director, MusicGroupO myVideoFrameSize = videoFrameSize; myVideoQuality = videoQuality; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myActor != null ? myActor.hashCode() : 0); + result = 31 * result + (myCaption != null ? myCaption.hashCode() : 0); + result = 31 * result + (myDirector != null ? myDirector.hashCode() : 0); + result = 31 * result + (myMusicBy != null ? myMusicBy.hashCode() : 0); + result = 31 * result + (myThumbnail != null ? myThumbnail.hashCode() : 0); + result = 31 * result + (myTranscript != null ? myTranscript.hashCode() : 0); + result = 31 * result + (myVideoFrameSize != null ? myVideoFrameSize.hashCode() : 0); + result = 31 * result + (myVideoQuality != null ? myVideoQuality.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + VideoObject videoObject = (VideoObject) o; + if (!super.equals(o)) return false; + if (myActor != null ? !myActor.equals(videoObject.myActor) : videoObject.myActor != null) return false; + if (myCaption != null ? !myCaption.equals(videoObject.myCaption) : videoObject.myCaption != null) return false; + if (myDirector != null ? !myDirector.equals(videoObject.myDirector) : videoObject.myDirector != null) return false; + if (myMusicBy != null ? !myMusicBy.equals(videoObject.myMusicBy) : videoObject.myMusicBy != null) return false; + if (myThumbnail != null ? !myThumbnail.equals(videoObject.myThumbnail) : videoObject.myThumbnail != null) return false; + if (myTranscript != null ? !myTranscript.equals(videoObject.myTranscript) : videoObject.myTranscript != null) return false; + if (myVideoFrameSize != null ? !myVideoFrameSize.equals(videoObject.myVideoFrameSize) : videoObject.myVideoFrameSize != null) return false; + if (myVideoQuality != null ? !myVideoQuality.equals(videoObject.myVideoQuality) : videoObject.myVideoQuality != null) return false; + return true; + } + private Person myActor; private String myCaption; private Person myDirector; diff --git a/src/main/java/org/schema/ViewAction.java b/src/main/java/org/schema/ViewAction.java index b15589fa..0516439a 100644 --- a/src/main/java/org/schema/ViewAction.java +++ b/src/main/java/org/schema/ViewAction.java @@ -322,7 +322,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Offer expectsAcceptanceOf; @@ -374,4 +374,18 @@ public interface Builder extends ThingBuilder { protected ViewAction(Offer expectsAcceptanceOf, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(expectsAcceptanceOf, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ViewAction viewAction = (ViewAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/VinylFormat.java b/src/main/java/org/schema/VinylFormat.java index e25ebf63..fbe1b299 100644 --- a/src/main/java/org/schema/VinylFormat.java +++ b/src/main/java/org/schema/VinylFormat.java @@ -53,4 +53,18 @@ public interface Builder extends ThingBuilder { protected VinylFormat() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + VinylFormat vinylFormat = (VinylFormat) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Virus.java b/src/main/java/org/schema/Virus.java index ffa87984..1c4c6e74 100644 --- a/src/main/java/org/schema/Virus.java +++ b/src/main/java/org/schema/Virus.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Virus() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Virus virus = (Virus) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/VisualArtsEvent.java b/src/main/java/org/schema/VisualArtsEvent.java index 83599b5a..150b6179 100644 --- a/src/main/java/org/schema/VisualArtsEvent.java +++ b/src/main/java/org/schema/VisualArtsEvent.java @@ -496,7 +496,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private AggregateRating aggregateRating; @@ -583,4 +583,18 @@ public interface Builder extends ThingBuilder { protected VisualArtsEvent(AggregateRating aggregateRating, OrganizationOrPerson organizer, OrganizationOrPerson attendee, java.util.Date doorTime, Duration duration, java.util.Date endDate, EventStatusType eventStatus, LanguageOrString inLanguage, Offer offers, OrganizationOrPerson performer, java.util.Date previousStartDate, CreativeWork recordedIn, Review review, java.util.Date startDate, Event subEvent, Event superEvent, String typicalAgeRange, CreativeWork workPerformed, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(aggregateRating, organizer, attendee, doorTime, duration, endDate, eventStatus, inLanguage, offers, performer, previousStartDate, recordedIn, review, startDate, subEvent, superEvent, typicalAgeRange, workPerformed, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + VisualArtsEvent visualArtsEvent = (VisualArtsEvent) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/VisualArtwork.java b/src/main/java/org/schema/VisualArtwork.java index 267f9a93..3d891b22 100644 --- a/src/main/java/org/schema/VisualArtwork.java +++ b/src/main/java/org/schema/VisualArtwork.java @@ -1321,7 +1321,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String artform; @@ -1569,6 +1569,34 @@ protected VisualArtwork(String artform, String artMedium, String artworkSurface, myDepth = depth; myArtEdition = artEdition; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myArtform != null ? myArtform.hashCode() : 0); + result = 31 * result + (myArtMedium != null ? myArtMedium.hashCode() : 0); + result = 31 * result + (myArtworkSurface != null ? myArtworkSurface.hashCode() : 0); + result = 31 * result + (myWidth != null ? myWidth.hashCode() : 0); + result = 31 * result + (myHeight != null ? myHeight.hashCode() : 0); + result = 31 * result + (myDepth != null ? myDepth.hashCode() : 0); + result = 31 * result + (myArtEdition != null ? myArtEdition.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + VisualArtwork visualArtwork = (VisualArtwork) o; + if (!super.equals(o)) return false; + if (myArtform != null ? !myArtform.equals(visualArtwork.myArtform) : visualArtwork.myArtform != null) return false; + if (myArtMedium != null ? !myArtMedium.equals(visualArtwork.myArtMedium) : visualArtwork.myArtMedium != null) return false; + if (myArtworkSurface != null ? !myArtworkSurface.equals(visualArtwork.myArtworkSurface) : visualArtwork.myArtworkSurface != null) return false; + if (myWidth != null ? !myWidth.equals(visualArtwork.myWidth) : visualArtwork.myWidth != null) return false; + if (myHeight != null ? !myHeight.equals(visualArtwork.myHeight) : visualArtwork.myHeight != null) return false; + if (myDepth != null ? !myDepth.equals(visualArtwork.myDepth) : visualArtwork.myDepth != null) return false; + if (myArtEdition != null ? !myArtEdition.equals(visualArtwork.myArtEdition) : visualArtwork.myArtEdition != null) return false; + return true; + } + private String myArtform; private String myArtMedium; private String myArtworkSurface; diff --git a/src/main/java/org/schema/VitalSign.java b/src/main/java/org/schema/VitalSign.java index 4236ab9f..1324fdcc 100644 --- a/src/main/java/org/schema/VitalSign.java +++ b/src/main/java/org/schema/VitalSign.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected VitalSign() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + VitalSign vitalSign = (VitalSign) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Volcano.java b/src/main/java/org/schema/Volcano.java index 95d6b3e3..3fd64471 100644 --- a/src/main/java/org/schema/Volcano.java +++ b/src/main/java/org/schema/Volcano.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected Volcano(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Volcano volcano = (Volcano) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/VoteAction.java b/src/main/java/org/schema/VoteAction.java index daf5ed7a..3a465163 100644 --- a/src/main/java/org/schema/VoteAction.java +++ b/src/main/java/org/schema/VoteAction.java @@ -352,7 +352,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person candidate; @@ -409,5 +409,21 @@ protected VoteAction(Person candidate, StringOrThing actionOption, OrganizationO super(actionOption, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myCandidate = candidate; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myCandidate != null ? myCandidate.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + VoteAction voteAction = (VoteAction) o; + if (!super.equals(o)) return false; + if (myCandidate != null ? !myCandidate.equals(voteAction.myCandidate) : voteAction.myCandidate != null) return false; + return true; + } + private Person myCandidate; } diff --git a/src/main/java/org/schema/WPAdBlock.java b/src/main/java/org/schema/WPAdBlock.java index ab052e49..7378120f 100644 --- a/src/main/java/org/schema/WPAdBlock.java +++ b/src/main/java/org/schema/WPAdBlock.java @@ -1146,7 +1146,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String schemaVersion; @@ -1363,4 +1363,18 @@ public interface Builder extends ThingBuilder { protected WPAdBlock(String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WPAdBlock wPAdBlock = (WPAdBlock) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/WPFooter.java b/src/main/java/org/schema/WPFooter.java index 6c06be31..0b41c493 100644 --- a/src/main/java/org/schema/WPFooter.java +++ b/src/main/java/org/schema/WPFooter.java @@ -1146,7 +1146,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String schemaVersion; @@ -1363,4 +1363,18 @@ public interface Builder extends ThingBuilder { protected WPFooter(String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WPFooter wPFooter = (WPFooter) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/WPHeader.java b/src/main/java/org/schema/WPHeader.java index 57ee5474..340f861a 100644 --- a/src/main/java/org/schema/WPHeader.java +++ b/src/main/java/org/schema/WPHeader.java @@ -1146,7 +1146,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String schemaVersion; @@ -1363,4 +1363,18 @@ public interface Builder extends ThingBuilder { protected WPHeader(String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WPHeader wPHeader = (WPHeader) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/WPSideBar.java b/src/main/java/org/schema/WPSideBar.java index ccb22fa0..a24e45a9 100644 --- a/src/main/java/org/schema/WPSideBar.java +++ b/src/main/java/org/schema/WPSideBar.java @@ -1146,7 +1146,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String schemaVersion; @@ -1363,4 +1363,18 @@ public interface Builder extends ThingBuilder { protected WPSideBar(String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WPSideBar wPSideBar = (WPSideBar) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/WantAction.java b/src/main/java/org/schema/WantAction.java index ff4af06a..381fd926 100644 --- a/src/main/java/org/schema/WantAction.java +++ b/src/main/java/org/schema/WantAction.java @@ -308,7 +308,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private OrganizationOrPerson agent; @@ -357,4 +357,18 @@ public interface Builder extends ThingBuilder { protected WantAction(OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WantAction wantAction = (WantAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/WarrantyPromise.java b/src/main/java/org/schema/WarrantyPromise.java index 93cc6d2d..3aaa756c 100644 --- a/src/main/java/org/schema/WarrantyPromise.java +++ b/src/main/java/org/schema/WarrantyPromise.java @@ -257,7 +257,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private QuantitativeValue durationOfWarranty; @@ -296,6 +296,24 @@ protected WarrantyPromise(QuantitativeValue durationOfWarranty, WarrantyScope wa myDurationOfWarranty = durationOfWarranty; myWarrantyScope = warrantyScope; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myDurationOfWarranty != null ? myDurationOfWarranty.hashCode() : 0); + result = 31 * result + (myWarrantyScope != null ? myWarrantyScope.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WarrantyPromise warrantyPromise = (WarrantyPromise) o; + if (!super.equals(o)) return false; + if (myDurationOfWarranty != null ? !myDurationOfWarranty.equals(warrantyPromise.myDurationOfWarranty) : warrantyPromise.myDurationOfWarranty != null) return false; + if (myWarrantyScope != null ? !myWarrantyScope.equals(warrantyPromise.myWarrantyScope) : warrantyPromise.myWarrantyScope != null) return false; + return true; + } + private QuantitativeValue myDurationOfWarranty; private WarrantyScope myWarrantyScope; } diff --git a/src/main/java/org/schema/WarrantyScope.java b/src/main/java/org/schema/WarrantyScope.java index 6fd93a85..7353f827 100644 --- a/src/main/java/org/schema/WarrantyScope.java +++ b/src/main/java/org/schema/WarrantyScope.java @@ -254,7 +254,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private EnumerationOrProperty supersededBy; @@ -290,4 +290,18 @@ public interface Builder extends ThingBuilder { protected WarrantyScope(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(supersededBy, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WarrantyScope warrantyScope = (WarrantyScope) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/WatchAction.java b/src/main/java/org/schema/WatchAction.java index 844e1016..ae9b96cc 100644 --- a/src/main/java/org/schema/WatchAction.java +++ b/src/main/java/org/schema/WatchAction.java @@ -322,7 +322,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Offer expectsAcceptanceOf; @@ -374,4 +374,18 @@ public interface Builder extends ThingBuilder { protected WatchAction(Offer expectsAcceptanceOf, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(expectsAcceptanceOf, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WatchAction watchAction = (WatchAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Waterfall.java b/src/main/java/org/schema/Waterfall.java index 3594b48c..f421443c 100644 --- a/src/main/java/org/schema/Waterfall.java +++ b/src/main/java/org/schema/Waterfall.java @@ -460,7 +460,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private PostalAddress address; @@ -538,4 +538,18 @@ public interface Builder extends ThingBuilder { protected Waterfall(PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Waterfall waterfall = (Waterfall) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/WearAction.java b/src/main/java/org/schema/WearAction.java index 3c864071..8890ad93 100644 --- a/src/main/java/org/schema/WearAction.java +++ b/src/main/java/org/schema/WearAction.java @@ -322,7 +322,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Offer expectsAcceptanceOf; @@ -374,4 +374,18 @@ public interface Builder extends ThingBuilder { protected WearAction(Offer expectsAcceptanceOf, OrganizationOrPerson agent, java.util.Date endTime, java.util.Date startTime, ActionStatusType actionStatus, Thing error, EntryPoint target, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(expectsAcceptanceOf, agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WearAction wearAction = (WearAction) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/WebApplication.java b/src/main/java/org/schema/WebApplication.java index 9a127a44..bd8deecc 100644 --- a/src/main/java/org/schema/WebApplication.java +++ b/src/main/java/org/schema/WebApplication.java @@ -1364,7 +1364,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String browserRequirements; @@ -1632,5 +1632,21 @@ protected WebApplication(String browserRequirements, String applicationCategory, super(applicationCategory, applicationSubCategory, applicationSuite, countriesNotSupported, countriesSupported, availableOnDevice, downloadUrl, featureList, fileFormat, fileSize, installUrl, memoryRequirements, operatingSystem, permissions, processorRequirements, releaseNotes, softwareRequirements, screenshot, softwareVersion, storageRequirements, softwareAddOn, softwareHelp, schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myBrowserRequirements = browserRequirements; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBrowserRequirements != null ? myBrowserRequirements.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WebApplication webApplication = (WebApplication) o; + if (!super.equals(o)) return false; + if (myBrowserRequirements != null ? !myBrowserRequirements.equals(webApplication.myBrowserRequirements) : webApplication.myBrowserRequirements != null) return false; + return true; + } + private String myBrowserRequirements; } diff --git a/src/main/java/org/schema/WebPage.java b/src/main/java/org/schema/WebPage.java index 5aea8fdf..95c287ee 100644 --- a/src/main/java/org/schema/WebPage.java +++ b/src/main/java/org/schema/WebPage.java @@ -1315,7 +1315,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BreadcrumbListOrString breadcrumb; @@ -1564,6 +1564,36 @@ protected WebPage(BreadcrumbListOrString breadcrumb, java.util.Date lastReviewed mySignificantLink = significantLink; mySpecialty = specialty; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myBreadcrumb != null ? myBreadcrumb.hashCode() : 0); + result = 31 * result + (myLastReviewed != null ? myLastReviewed.hashCode() : 0); + result = 31 * result + (myMainContentOfPage != null ? myMainContentOfPage.hashCode() : 0); + result = 31 * result + (myPrimaryImageOfPage != null ? myPrimaryImageOfPage.hashCode() : 0); + result = 31 * result + (myRelatedLink != null ? myRelatedLink.hashCode() : 0); + result = 31 * result + (myReviewedBy != null ? myReviewedBy.hashCode() : 0); + result = 31 * result + (mySignificantLink != null ? mySignificantLink.hashCode() : 0); + result = 31 * result + (mySpecialty != null ? mySpecialty.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WebPage webPage = (WebPage) o; + if (!super.equals(o)) return false; + if (myBreadcrumb != null ? !myBreadcrumb.equals(webPage.myBreadcrumb) : webPage.myBreadcrumb != null) return false; + if (myLastReviewed != null ? !myLastReviewed.equals(webPage.myLastReviewed) : webPage.myLastReviewed != null) return false; + if (myMainContentOfPage != null ? !myMainContentOfPage.equals(webPage.myMainContentOfPage) : webPage.myMainContentOfPage != null) return false; + if (myPrimaryImageOfPage != null ? !myPrimaryImageOfPage.equals(webPage.myPrimaryImageOfPage) : webPage.myPrimaryImageOfPage != null) return false; + if (myRelatedLink != null ? !myRelatedLink.equals(webPage.myRelatedLink) : webPage.myRelatedLink != null) return false; + if (myReviewedBy != null ? !myReviewedBy.equals(webPage.myReviewedBy) : webPage.myReviewedBy != null) return false; + if (mySignificantLink != null ? !mySignificantLink.equals(webPage.mySignificantLink) : webPage.mySignificantLink != null) return false; + if (mySpecialty != null ? !mySpecialty.equals(webPage.mySpecialty) : webPage.mySpecialty != null) return false; + return true; + } + private BreadcrumbListOrString myBreadcrumb; private java.util.Date myLastReviewed; private WebPageElement myMainContentOfPage; diff --git a/src/main/java/org/schema/WebPageElement.java b/src/main/java/org/schema/WebPageElement.java index a6b8430f..b2f0f9fa 100644 --- a/src/main/java/org/schema/WebPageElement.java +++ b/src/main/java/org/schema/WebPageElement.java @@ -1146,7 +1146,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String schemaVersion; @@ -1363,4 +1363,18 @@ public interface Builder extends ThingBuilder { protected WebPageElement(String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WebPageElement webPageElement = (WebPageElement) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/WebSite.java b/src/main/java/org/schema/WebSite.java index 1b60f1fd..9428571e 100644 --- a/src/main/java/org/schema/WebSite.java +++ b/src/main/java/org/schema/WebSite.java @@ -1146,7 +1146,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String schemaVersion; @@ -1363,4 +1363,18 @@ public interface Builder extends ThingBuilder { protected WebSite(String schemaVersion, Thing about, String accessibilityAPI, String accessibilityControl, String accessibilityFeature, String accessibilityHazard, Person accountablePerson, AggregateRating aggregateRating, String alternativeHeadline, MediaObject associatedMedia, Audience audience, AudioObject audio, OrganizationOrPerson author, String award, CreativeWorkOrString citation, Comment comment, Place contentLocation, String contentRating, OrganizationOrPerson contributor, OrganizationOrPerson copyrightHolder, Number copyrightYear, OrganizationOrPerson creator, java.util.Date dateCreated, java.util.Date dateModified, java.util.Date datePublished, String discussionUrl, Person editor, AlignmentObject educationalAlignment, String educationalUse, MediaObject encoding, String genre, String headline, LanguageOrString inLanguage, String interactivityType, String isBasedOnUrl, Boolean isFamilyFriendly, String keywords, CreativeWorkOrString license, String learningResourceType, Thing mainEntity, Thing mentions, Offer offers, OrganizationOrPerson producer, PublicationEvent publication, Organization publisher, String publishingPrinciples, Event recordedAt, Review review, Organization sourceOrganization, String text, String thumbnailUrl, Duration timeRequired, String typicalAgeRange, Number version, VideoObject video, OrganizationOrPerson provider, Integer commentCount, HasPart hasPart, CreativeWork workExample, CreativeWork exampleOfWork, Person character, OrganizationOrPerson translator, PublicationEvent releasedEvent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(schemaVersion, about, accessibilityAPI, accessibilityControl, accessibilityFeature, accessibilityHazard, accountablePerson, aggregateRating, alternativeHeadline, associatedMedia, audience, audio, author, award, citation, comment, contentLocation, contentRating, contributor, copyrightHolder, copyrightYear, creator, dateCreated, dateModified, datePublished, discussionUrl, editor, educationalAlignment, educationalUse, encoding, genre, headline, inLanguage, interactivityType, isBasedOnUrl, isFamilyFriendly, keywords, license, learningResourceType, mainEntity, mentions, offers, producer, publication, publisher, publishingPrinciples, recordedAt, review, sourceOrganization, text, thumbnailUrl, timeRequired, typicalAgeRange, version, video, provider, commentCount, hasPart, workExample, exampleOfWork, character, translator, releasedEvent, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WebSite webSite = (WebSite) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/WesternConventional.java b/src/main/java/org/schema/WesternConventional.java index 0544c2e2..aa69b09b 100644 --- a/src/main/java/org/schema/WesternConventional.java +++ b/src/main/java/org/schema/WesternConventional.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected WesternConventional() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WesternConventional westernConventional = (WesternConventional) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Wholesale.java b/src/main/java/org/schema/Wholesale.java index 7c6288e3..38a325e0 100644 --- a/src/main/java/org/schema/Wholesale.java +++ b/src/main/java/org/schema/Wholesale.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Wholesale() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Wholesale wholesale = (Wholesale) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/WholesaleStore.java b/src/main/java/org/schema/WholesaleStore.java index 142b0948..10a1ba2e 100644 --- a/src/main/java/org/schema/WholesaleStore.java +++ b/src/main/java/org/schema/WholesaleStore.java @@ -506,7 +506,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Organization parentOrganization; @@ -595,4 +595,18 @@ public interface Builder extends ThingBuilder { protected WholesaleStore(Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WholesaleStore wholesaleStore = (WholesaleStore) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/WikiDoc.java b/src/main/java/org/schema/WikiDoc.java index c21c1b3a..86d6c975 100644 --- a/src/main/java/org/schema/WikiDoc.java +++ b/src/main/java/org/schema/WikiDoc.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected WikiDoc() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WikiDoc wikiDoc = (WikiDoc) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/WinAction.java b/src/main/java/org/schema/WinAction.java index a1b3ea16..a1e4beb4 100644 --- a/src/main/java/org/schema/WinAction.java +++ b/src/main/java/org/schema/WinAction.java @@ -328,7 +328,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private Person loser; @@ -381,5 +381,21 @@ protected WinAction(Person loser, OrganizationOrPerson agent, java.util.Date end super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myLoser = loser; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myLoser != null ? myLoser.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WinAction winAction = (WinAction) o; + if (!super.equals(o)) return false; + if (myLoser != null ? !myLoser.equals(winAction.myLoser) : winAction.myLoser != null) return false; + return true; + } + private Person myLoser; } diff --git a/src/main/java/org/schema/Winery.java b/src/main/java/org/schema/Winery.java index 414f414f..efb9e437 100644 --- a/src/main/java/org/schema/Winery.java +++ b/src/main/java/org/schema/Winery.java @@ -540,7 +540,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private BooleanOrString acceptsReservations; @@ -636,4 +636,18 @@ public interface Builder extends ThingBuilder { protected Winery(BooleanOrString acceptsReservations, String menu, String servesCuisine, Organization parentOrganization, String currenciesAccepted, String openingHours, String paymentAccepted, String priceRange, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(acceptsReservations, menu, servesCuisine, parentOrganization, currenciesAccepted, openingHours, paymentAccepted, priceRange, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Winery winery = (Winery) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Withdrawn.java b/src/main/java/org/schema/Withdrawn.java index ee562616..ee61eae1 100644 --- a/src/main/java/org/schema/Withdrawn.java +++ b/src/main/java/org/schema/Withdrawn.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected Withdrawn() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Withdrawn withdrawn = (Withdrawn) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/WriteAction.java b/src/main/java/org/schema/WriteAction.java index 5ba8d985..5c0ba61b 100644 --- a/src/main/java/org/schema/WriteAction.java +++ b/src/main/java/org/schema/WriteAction.java @@ -338,7 +338,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private LanguageOrString inLanguage; @@ -392,5 +392,21 @@ protected WriteAction(LanguageOrString inLanguage, OrganizationOrPerson agent, j super(agent, endTime, startTime, actionStatus, error, target, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myInLanguage = inLanguage; } + + @Override public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (myInLanguage != null ? myInLanguage.hashCode() : 0); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + WriteAction writeAction = (WriteAction) o; + if (!super.equals(o)) return false; + if (myInLanguage != null ? !myInLanguage.equals(writeAction.myInLanguage) : writeAction.myInLanguage != null) return false; + return true; + } + private LanguageOrString myInLanguage; } diff --git a/src/main/java/org/schema/XRay.java b/src/main/java/org/schema/XRay.java index 23b608d9..d516a6a8 100644 --- a/src/main/java/org/schema/XRay.java +++ b/src/main/java/org/schema/XRay.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected XRay() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + XRay xRay = (XRay) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/ZoneBoardingPolicy.java b/src/main/java/org/schema/ZoneBoardingPolicy.java index 87e31631..e0d994f2 100644 --- a/src/main/java/org/schema/ZoneBoardingPolicy.java +++ b/src/main/java/org/schema/ZoneBoardingPolicy.java @@ -52,4 +52,18 @@ public interface Builder extends ThingBuilder { protected ZoneBoardingPolicy() { } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ZoneBoardingPolicy zoneBoardingPolicy = (ZoneBoardingPolicy) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/src/main/java/org/schema/Zoo.java b/src/main/java/org/schema/Zoo.java index ef5da36d..74c58943 100644 --- a/src/main/java/org/schema/Zoo.java +++ b/src/main/java/org/schema/Zoo.java @@ -468,7 +468,7 @@ public Builder id(long id) { if ("sameAs".equals(key) && value instanceof String) { sameAs((String)value); continue; } if ("url".equals(key) && value instanceof String) { url((String)value); continue; } if ("potentialAction".equals(key) && value instanceof Action) { potentialAction((Action)value); continue; } - if ("id".equals(key) && value instanceof String) { id((String)value); continue; } + if ("@id".equals(key) && value instanceof String) { id((String)value); continue; } } } private String openingHours; @@ -548,4 +548,18 @@ public interface Builder extends ThingBuilder { protected Zoo(String openingHours, PostalAddress address, AggregateRating aggregateRating, Place containedIn, Event event, String faxNumber, GeoCoordinatesOrGeoShape geo, String globalLocationNumber, String isicV4, ImageObjectOrString logo, MapOrString hasMap, OpeningHoursSpecification openingHoursSpecification, ImageObjectOrPhotograph photo, Review review, String telephone, PropertyValue additionalProperty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { super(openingHours, address, aggregateRating, containedIn, event, faxNumber, geo, globalLocationNumber, isicV4, logo, hasMap, openingHoursSpecification, photo, review, telephone, additionalProperty, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); } + + @Override public int hashCode() { + int result = super.hashCode(); + return result; + } + + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Zoo zoo = (Zoo) o; + if (!super.equals(o)) return false; + return true; + } + } diff --git a/test/main/java/org/schema/SmokeTest.java b/test/main/java/org/schema/SmokeTest.java new file mode 100644 index 00000000..e3fc2d75 --- /dev/null +++ b/test/main/java/org/schema/SmokeTest.java @@ -0,0 +1,13311 @@ +/* + * Copyright 2015-2016 JetBrains s.r.o. + * + * 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. + * + * This is auto-generated file. Do not edit. + */ + +package org.schema; + +import java.io.IOException; +import org.junit.Test; +import java.util.Date; +import static org.junit.Assert.assertEquals; + +public class SmokeTest { + private static final Date NOW = new Date(1234567890000L); + @Test public void testLymphaticVessel() throws IOException { + final LymphaticVessel lymphaticVessel = SchemaOrg.lymphaticVessel() + .associatedPathophysiology("Test String") + .bodyLocation("Test String") + .function("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(lymphaticVessel)); + assertEquals(lymphaticVessel, thing); + } + @Test public void testConfirmAction() throws IOException { + final ConfirmAction confirmAction = SchemaOrg.confirmAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(confirmAction)); + assertEquals(confirmAction, thing); + } + @Test public void testListItem() throws IOException { + final ListItem listItem = SchemaOrg.listItem() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(listItem)); + assertEquals(listItem, thing); + } + @Test public void testTVSeries() throws IOException { + final TVSeries tVSeries = SchemaOrg.tVSeries() + .numberOfEpisodes(42) + .numberOfSeasons(42) + .endDate(NOW) + .startDate(NOW) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(tVSeries)); + assertEquals(tVSeries, thing); + } + @Test public void testVisualArtwork() throws IOException { + final VisualArtwork visualArtwork = SchemaOrg.visualArtwork() + .artform("Test String") + .artMedium("Test String") + .artworkSurface("Test String") + .artEdition(42) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(visualArtwork)); + assertEquals(visualArtwork, thing); + } + @Test public void testDriveWheelConfigurationValue() throws IOException { + final DriveWheelConfigurationValue driveWheelConfigurationValue = SchemaOrg.driveWheelConfigurationValue() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(driveWheelConfigurationValue)); + assertEquals(driveWheelConfigurationValue, thing); + } + @Test public void testService() throws IOException { + final Service service = SchemaOrg.service() + .serviceType("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(service)); + assertEquals(service, thing); + } + @Test public void testAlignmentObject() throws IOException { + final AlignmentObject alignmentObject = SchemaOrg.alignmentObject() + .alignmentType("Test String") + .educationalFramework("Test String") + .targetDescription("Test String") + .targetName("Test String") + .targetUrl("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(alignmentObject)); + assertEquals(alignmentObject, thing); + } + @Test public void testAnimalShelter() throws IOException { + final AnimalShelter animalShelter = SchemaOrg.animalShelter() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(animalShelter)); + assertEquals(animalShelter, thing); + } + @Test public void testFastFoodRestaurant() throws IOException { + final FastFoodRestaurant fastFoodRestaurant = SchemaOrg.fastFoodRestaurant() + .acceptsReservations(true) + .menu("Test String") + .servesCuisine("Test String") + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(fastFoodRestaurant)); + assertEquals(fastFoodRestaurant, thing); + } + @Test public void testAmusementPark() throws IOException { + final AmusementPark amusementPark = SchemaOrg.amusementPark() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(amusementPark)); + assertEquals(amusementPark, thing); + } + @Test public void testAddAction() throws IOException { + final AddAction addAction = SchemaOrg.addAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(addAction)); + assertEquals(addAction, thing); + } + @Test public void testPeopleAudience() throws IOException { + final PeopleAudience peopleAudience = SchemaOrg.peopleAudience() + .requiredGender("Test String") + .requiredMaxAge(42) + .requiredMinAge(42) + .suggestedGender("Test String") + .suggestedMaxAge(42) + .suggestedMinAge(42) + .audienceType("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(peopleAudience)); + assertEquals(peopleAudience, thing); + } + @Test public void testBarOrPub() throws IOException { + final BarOrPub barOrPub = SchemaOrg.barOrPub() + .acceptsReservations(true) + .menu("Test String") + .servesCuisine("Test String") + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(barOrPub)); + assertEquals(barOrPub, thing); + } + @Test public void testTVSeason() throws IOException { + final TVSeason tVSeason = SchemaOrg.tVSeason() + .endDate(NOW) + .numberOfEpisodes(42) + .seasonNumber(42) + .startDate(NOW) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(tVSeason)); + assertEquals(tVSeason, thing); + } + @Test public void testMedicalRiskCalculator() throws IOException { + final MedicalRiskCalculator medicalRiskCalculator = SchemaOrg.medicalRiskCalculator() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalRiskCalculator)); + assertEquals(medicalRiskCalculator, thing); + } + @Test public void testCommentAction() throws IOException { + final CommentAction commentAction = SchemaOrg.commentAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(commentAction)); + assertEquals(commentAction, thing); + } + @Test public void testCreateAction() throws IOException { + final CreateAction createAction = SchemaOrg.createAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(createAction)); + assertEquals(createAction, thing); + } + @Test public void testPermit() throws IOException { + final Permit permit = SchemaOrg.permit() + .validFrom(NOW) + .validUntil(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(permit)); + assertEquals(permit, thing); + } + @Test public void testRejectAction() throws IOException { + final RejectAction rejectAction = SchemaOrg.rejectAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(rejectAction)); + assertEquals(rejectAction, thing); + } + @Test public void testAppendAction() throws IOException { + final AppendAction appendAction = SchemaOrg.appendAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(appendAction)); + assertEquals(appendAction, thing); + } + @Test public void testDuration() throws IOException { + final Duration duration = SchemaOrg.duration() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(duration)); + assertEquals(duration, thing); + } + @Test public void testInsuranceAgency() throws IOException { + final InsuranceAgency insuranceAgency = SchemaOrg.insuranceAgency() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(insuranceAgency)); + assertEquals(insuranceAgency, thing); + } + @Test public void testTieAction() throws IOException { + final TieAction tieAction = SchemaOrg.tieAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(tieAction)); + assertEquals(tieAction, thing); + } + @Test public void testGeoCoordinates() throws IOException { + final GeoCoordinates geoCoordinates = SchemaOrg.geoCoordinates() + .elevation(42) + .latitude(42) + .longitude(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(geoCoordinates)); + assertEquals(geoCoordinates, thing); + } + @Test public void testJoint() throws IOException { + final Joint joint = SchemaOrg.joint() + .biomechnicalClass("Test String") + .functionalClass("Test String") + .structuralClass("Test String") + .associatedPathophysiology("Test String") + .bodyLocation("Test String") + .function("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(joint)); + assertEquals(joint, thing); + } + @Test public void testGardenStore() throws IOException { + final GardenStore gardenStore = SchemaOrg.gardenStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(gardenStore)); + assertEquals(gardenStore, thing); + } + @Test public void testChildrensEvent() throws IOException { + final ChildrensEvent childrensEvent = SchemaOrg.childrensEvent() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(childrensEvent)); + assertEquals(childrensEvent, thing); + } + @Test public void testMedicalTest() throws IOException { + final MedicalTest medicalTest = SchemaOrg.medicalTest() + .normalRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalTest)); + assertEquals(medicalTest, thing); + } + @Test public void testQualitativeValue() throws IOException { + final QualitativeValue qualitativeValue = SchemaOrg.qualitativeValue() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(qualitativeValue)); + assertEquals(qualitativeValue, thing); + } + @Test public void testTouristAttraction() throws IOException { + final TouristAttraction touristAttraction = SchemaOrg.touristAttraction() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(touristAttraction)); + assertEquals(touristAttraction, thing); + } + @Test public void testBookmarkAction() throws IOException { + final BookmarkAction bookmarkAction = SchemaOrg.bookmarkAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(bookmarkAction)); + assertEquals(bookmarkAction, thing); + } + @Test public void testDrugPregnancyCategory() throws IOException { + final DrugPregnancyCategory drugPregnancyCategory = SchemaOrg.drugPregnancyCategory() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(drugPregnancyCategory)); + assertEquals(drugPregnancyCategory, thing); + } + @Test public void testBroadcastChannel() throws IOException { + final BroadcastChannel broadcastChannel = SchemaOrg.broadcastChannel() + .broadcastChannelId("Test String") + .broadcastServiceTier("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(broadcastChannel)); + assertEquals(broadcastChannel, thing); + } + @Test public void testUnRegisterAction() throws IOException { + final UnRegisterAction unRegisterAction = SchemaOrg.unRegisterAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(unRegisterAction)); + assertEquals(unRegisterAction, thing); + } + @Test public void testContinent() throws IOException { + final Continent continent = SchemaOrg.continent() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(continent)); + assertEquals(continent, thing); + } + @Test public void testDeleteAction() throws IOException { + final DeleteAction deleteAction = SchemaOrg.deleteAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(deleteAction)); + assertEquals(deleteAction, thing); + } + @Test public void testWebPage() throws IOException { + final WebPage webPage = SchemaOrg.webPage() + .lastReviewed(NOW) + .relatedLink("Test String") + .significantLink("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(webPage)); + assertEquals(webPage, thing); + } + @Test public void testBusStation() throws IOException { + final BusStation busStation = SchemaOrg.busStation() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(busStation)); + assertEquals(busStation, thing); + } + @Test public void testTaxi() throws IOException { + final Taxi taxi = SchemaOrg.taxi() + .serviceType("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(taxi)); + assertEquals(taxi, thing); + } + @Test public void testBookFormatType() throws IOException { + final BookFormatType bookFormatType = SchemaOrg.bookFormatType() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(bookFormatType)); + assertEquals(bookFormatType, thing); + } + @Test public void testResumeAction() throws IOException { + final ResumeAction resumeAction = SchemaOrg.resumeAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(resumeAction)); + assertEquals(resumeAction, thing); + } + @Test public void testAnatomicalSystem() throws IOException { + final AnatomicalSystem anatomicalSystem = SchemaOrg.anatomicalSystem() + .associatedPathophysiology("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(anatomicalSystem)); + assertEquals(anatomicalSystem, thing); + } + @Test public void testEatAction() throws IOException { + final EatAction eatAction = SchemaOrg.eatAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(eatAction)); + assertEquals(eatAction, thing); + } + @Test public void testCommunicateAction() throws IOException { + final CommunicateAction communicateAction = SchemaOrg.communicateAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(communicateAction)); + assertEquals(communicateAction, thing); + } + @Test public void testPeriodical() throws IOException { + final Periodical periodical = SchemaOrg.periodical() + .issn("Test String") + .endDate(NOW) + .startDate(NOW) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(periodical)); + assertEquals(periodical, thing); + } + @Test public void testAirport() throws IOException { + final Airport airport = SchemaOrg.airport() + .iataCode("Test String") + .iacoCode("Test String") + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(airport)); + assertEquals(airport, thing); + } + @Test public void testGroceryStore() throws IOException { + final GroceryStore groceryStore = SchemaOrg.groceryStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(groceryStore)); + assertEquals(groceryStore, thing); + } + @Test public void testEndorseAction() throws IOException { + final EndorseAction endorseAction = SchemaOrg.endorseAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(endorseAction)); + assertEquals(endorseAction, thing); + } + @Test public void testPostalAddress() throws IOException { + final PostalAddress postalAddress = SchemaOrg.postalAddress() + .addressLocality("Test String") + .addressRegion("Test String") + .postalCode("Test String") + .postOfficeBoxNumber("Test String") + .streetAddress("Test String") + .contactType("Test String") + .email("Test String") + .faxNumber("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(postalAddress)); + assertEquals(postalAddress, thing); + } + @Test public void testTravelAgency() throws IOException { + final TravelAgency travelAgency = SchemaOrg.travelAgency() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(travelAgency)); + assertEquals(travelAgency, thing); + } + @Test public void testProfilePage() throws IOException { + final ProfilePage profilePage = SchemaOrg.profilePage() + .lastReviewed(NOW) + .relatedLink("Test String") + .significantLink("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(profilePage)); + assertEquals(profilePage, thing); + } + @Test public void testRoofingContractor() throws IOException { + final RoofingContractor roofingContractor = SchemaOrg.roofingContractor() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(roofingContractor)); + assertEquals(roofingContractor, thing); + } + @Test public void testParkingFacility() throws IOException { + final ParkingFacility parkingFacility = SchemaOrg.parkingFacility() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(parkingFacility)); + assertEquals(parkingFacility, thing); + } + @Test public void testCasino() throws IOException { + final Casino casino = SchemaOrg.casino() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(casino)); + assertEquals(casino, thing); + } + @Test public void testImageObject() throws IOException { + final ImageObject imageObject = SchemaOrg.imageObject() + .caption("Test String") + .representativeOfPage(true) + .bitrate("Test String") + .contentSize("Test String") + .contentUrl("Test String") + .embedUrl("Test String") + .encodingFormat("Test String") + .expires(NOW) + .playerType("Test String") + .requiresSubscription(true) + .uploadDate(NOW) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(imageObject)); + assertEquals(imageObject, thing); + } + @Test public void testBusReservation() throws IOException { + final BusReservation busReservation = SchemaOrg.busReservation() + .reservationId("Test String") + .bookingTime(NOW) + .modifiedTime(NOW) + .totalPrice(42) + .priceCurrency("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(busReservation)); + assertEquals(busReservation, thing); + } + @Test public void testPond() throws IOException { + final Pond pond = SchemaOrg.pond() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(pond)); + assertEquals(pond, thing); + } + @Test public void testSeaBodyOfWater() throws IOException { + final SeaBodyOfWater seaBodyOfWater = SchemaOrg.seaBodyOfWater() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(seaBodyOfWater)); + assertEquals(seaBodyOfWater, thing); + } + @Test public void testFlightReservation() throws IOException { + final FlightReservation flightReservation = SchemaOrg.flightReservation() + .boardingGroup("Test String") + .passengerSequenceNumber("Test String") + .securityScreening("Test String") + .reservationId("Test String") + .bookingTime(NOW) + .modifiedTime(NOW) + .totalPrice(42) + .priceCurrency("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(flightReservation)); + assertEquals(flightReservation, thing); + } + @Test public void testClothingStore() throws IOException { + final ClothingStore clothingStore = SchemaOrg.clothingStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(clothingStore)); + assertEquals(clothingStore, thing); + } + @Test public void testAutoWash() throws IOException { + final AutoWash autoWash = SchemaOrg.autoWash() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(autoWash)); + assertEquals(autoWash, thing); + } + @Test public void testComputerStore() throws IOException { + final ComputerStore computerStore = SchemaOrg.computerStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(computerStore)); + assertEquals(computerStore, thing); + } + @Test public void testCode() throws IOException { + final Code code = SchemaOrg.code() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(code)); + assertEquals(code, thing); + } + @Test public void testMountain() throws IOException { + final Mountain mountain = SchemaOrg.mountain() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(mountain)); + assertEquals(mountain, thing); + } + @Test public void testMusicRecording() throws IOException { + final MusicRecording musicRecording = SchemaOrg.musicRecording() + .isrcCode("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(musicRecording)); + assertEquals(musicRecording, thing); + } + @Test public void testInsertAction() throws IOException { + final InsertAction insertAction = SchemaOrg.insertAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(insertAction)); + assertEquals(insertAction, thing); + } + @Test public void testTakeAction() throws IOException { + final TakeAction takeAction = SchemaOrg.takeAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(takeAction)); + assertEquals(takeAction, thing); + } + @Test public void testMusicVideoObject() throws IOException { + final MusicVideoObject musicVideoObject = SchemaOrg.musicVideoObject() + .bitrate("Test String") + .contentSize("Test String") + .contentUrl("Test String") + .embedUrl("Test String") + .encodingFormat("Test String") + .expires(NOW) + .playerType("Test String") + .requiresSubscription(true) + .uploadDate(NOW) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(musicVideoObject)); + assertEquals(musicVideoObject, thing); + } + @Test public void testTrainReservation() throws IOException { + final TrainReservation trainReservation = SchemaOrg.trainReservation() + .reservationId("Test String") + .bookingTime(NOW) + .modifiedTime(NOW) + .totalPrice(42) + .priceCurrency("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(trainReservation)); + assertEquals(trainReservation, thing); + } + @Test public void testWatchAction() throws IOException { + final WatchAction watchAction = SchemaOrg.watchAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(watchAction)); + assertEquals(watchAction, thing); + } + @Test public void testPostOffice() throws IOException { + final PostOffice postOffice = SchemaOrg.postOffice() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(postOffice)); + assertEquals(postOffice, thing); + } + @Test public void testPublicationIssue() throws IOException { + final PublicationIssue publicationIssue = SchemaOrg.publicationIssue() + .issueNumber(42) + .pageEnd(42) + .pageStart(42) + .pagination("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(publicationIssue)); + assertEquals(publicationIssue, thing); + } + @Test public void testLanguage() throws IOException { + final Language language = SchemaOrg.language() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(language)); + assertEquals(language, thing); + } + @Test public void testCountry() throws IOException { + final Country country = SchemaOrg.country() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(country)); + assertEquals(country, thing); + } + @Test public void testDoseSchedule() throws IOException { + final DoseSchedule doseSchedule = SchemaOrg.doseSchedule() + .doseUnit("Test String") + .doseValue(42) + .frequency("Test String") + .targetPopulation("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(doseSchedule)); + assertEquals(doseSchedule, thing); + } + @Test public void testAdministrativeArea() throws IOException { + final AdministrativeArea administrativeArea = SchemaOrg.administrativeArea() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(administrativeArea)); + assertEquals(administrativeArea, thing); + } + @Test public void testSellAction() throws IOException { + final SellAction sellAction = SchemaOrg.sellAction() + .price(42) + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(sellAction)); + assertEquals(sellAction, thing); + } + @Test public void testPreventionIndication() throws IOException { + final PreventionIndication preventionIndication = SchemaOrg.preventionIndication() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(preventionIndication)); + assertEquals(preventionIndication, thing); + } + @Test public void testUserDownloads() throws IOException { + final UserDownloads userDownloads = SchemaOrg.userDownloads() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(userDownloads)); + assertEquals(userDownloads, thing); + } + @Test public void testBreadcrumbList() throws IOException { + final BreadcrumbList breadcrumbList = SchemaOrg.breadcrumbList() + .numberOfItems(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(breadcrumbList)); + assertEquals(breadcrumbList, thing); + } + @Test public void testDataCatalog() throws IOException { + final DataCatalog dataCatalog = SchemaOrg.dataCatalog() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(dataCatalog)); + assertEquals(dataCatalog, thing); + } + @Test public void testOrderAction() throws IOException { + final OrderAction orderAction = SchemaOrg.orderAction() + .price(42) + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(orderAction)); + assertEquals(orderAction, thing); + } + @Test public void testEventReservation() throws IOException { + final EventReservation eventReservation = SchemaOrg.eventReservation() + .reservationId("Test String") + .bookingTime(NOW) + .modifiedTime(NOW) + .totalPrice(42) + .priceCurrency("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(eventReservation)); + assertEquals(eventReservation, thing); + } + @Test public void testMusicGroup() throws IOException { + final MusicGroup musicGroup = SchemaOrg.musicGroup() + .genre("Test String") + .award("Test String") + .duns("Test String") + .email("Test String") + .faxNumber("Test String") + .dissolutionDate(NOW) + .foundingDate(NOW) + .globalLocationNumber("Test String") + .isicV4("Test String") + .legalName("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(musicGroup)); + assertEquals(musicGroup, thing); + } + @Test public void testLodgingReservation() throws IOException { + final LodgingReservation lodgingReservation = SchemaOrg.lodgingReservation() + .checkinTime(NOW) + .checkoutTime(NOW) + .lodgingUnitDescription("Test String") + .numAdults(42) + .numChildren(42) + .reservationId("Test String") + .bookingTime(NOW) + .modifiedTime(NOW) + .totalPrice(42) + .priceCurrency("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(lodgingReservation)); + assertEquals(lodgingReservation, thing); + } + @Test public void testUserComments() throws IOException { + final UserComments userComments = SchemaOrg.userComments() + .commentText("Test String") + .commentTime(NOW) + .replyToUrl("Test String") + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(userComments)); + assertEquals(userComments, thing); + } + @Test public void testUnitPriceSpecification() throws IOException { + final UnitPriceSpecification unitPriceSpecification = SchemaOrg.unitPriceSpecification() + .billingIncrement(42) + .priceType("Test String") + .unitCode("Test String") + .unitText("Test String") + .maxPrice(42) + .minPrice(42) + .price(42) + .validFrom(NOW) + .validThrough(NOW) + .valueAddedTaxIncluded(true) + .priceCurrency("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(unitPriceSpecification)); + assertEquals(unitPriceSpecification, thing); + } + @Test public void testSteeringPositionValue() throws IOException { + final SteeringPositionValue steeringPositionValue = SchemaOrg.steeringPositionValue() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(steeringPositionValue)); + assertEquals(steeringPositionValue, thing); + } + @Test public void testAcceptAction() throws IOException { + final AcceptAction acceptAction = SchemaOrg.acceptAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(acceptAction)); + assertEquals(acceptAction, thing); + } + @Test public void testMuseum() throws IOException { + final Museum museum = SchemaOrg.museum() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(museum)); + assertEquals(museum, thing); + } + @Test public void testSocialEvent() throws IOException { + final SocialEvent socialEvent = SchemaOrg.socialEvent() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(socialEvent)); + assertEquals(socialEvent, thing); + } + @Test public void testLiteraryEvent() throws IOException { + final LiteraryEvent literaryEvent = SchemaOrg.literaryEvent() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(literaryEvent)); + assertEquals(literaryEvent, thing); + } + @Test public void testHomeGoodsStore() throws IOException { + final HomeGoodsStore homeGoodsStore = SchemaOrg.homeGoodsStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(homeGoodsStore)); + assertEquals(homeGoodsStore, thing); + } + @Test public void testAllocateAction() throws IOException { + final AllocateAction allocateAction = SchemaOrg.allocateAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(allocateAction)); + assertEquals(allocateAction, thing); + } + @Test public void testWPSideBar() throws IOException { + final WPSideBar wPSideBar = SchemaOrg.wPSideBar() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(wPSideBar)); + assertEquals(wPSideBar, thing); + } + @Test public void testSchool() throws IOException { + final School school = SchemaOrg.school() + .award("Test String") + .duns("Test String") + .email("Test String") + .faxNumber("Test String") + .dissolutionDate(NOW) + .foundingDate(NOW) + .globalLocationNumber("Test String") + .isicV4("Test String") + .legalName("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(school)); + assertEquals(school, thing); + } + @Test public void testCreativeWorkSeries() throws IOException { + final CreativeWorkSeries creativeWorkSeries = SchemaOrg.creativeWorkSeries() + .endDate(NOW) + .startDate(NOW) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(creativeWorkSeries)); + assertEquals(creativeWorkSeries, thing); + } + @Test public void testDayOfWeek() throws IOException { + final DayOfWeek dayOfWeek = SchemaOrg.dayOfWeek() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(dayOfWeek)); + assertEquals(dayOfWeek, thing); + } + @Test public void testTreatmentIndication() throws IOException { + final TreatmentIndication treatmentIndication = SchemaOrg.treatmentIndication() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(treatmentIndication)); + assertEquals(treatmentIndication, thing); + } + @Test public void testTrainTrip() throws IOException { + final TrainTrip trainTrip = SchemaOrg.trainTrip() + .departureTime(NOW) + .arrivalTime(NOW) + .trainNumber("Test String") + .trainName("Test String") + .departurePlatform("Test String") + .arrivalPlatform("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(trainTrip)); + assertEquals(trainTrip, thing); + } + @Test public void testHardwareStore() throws IOException { + final HardwareStore hardwareStore = SchemaOrg.hardwareStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(hardwareStore)); + assertEquals(hardwareStore, thing); + } + @Test public void testScreeningEvent() throws IOException { + final ScreeningEvent screeningEvent = SchemaOrg.screeningEvent() + .videoFormat("Test String") + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(screeningEvent)); + assertEquals(screeningEvent, thing); + } + @Test public void testMusicRelease() throws IOException { + final MusicRelease musicRelease = SchemaOrg.musicRelease() + .catalogNumber("Test String") + .numTracks(42) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(musicRelease)); + assertEquals(musicRelease, thing); + } + @Test public void testElectrician() throws IOException { + final Electrician electrician = SchemaOrg.electrician() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(electrician)); + assertEquals(electrician, thing); + } + @Test public void testBeach() throws IOException { + final Beach beach = SchemaOrg.beach() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(beach)); + assertEquals(beach, thing); + } + @Test public void testWebApplication() throws IOException { + final WebApplication webApplication = SchemaOrg.webApplication() + .browserRequirements("Test String") + .applicationCategory("Test String") + .applicationSubCategory("Test String") + .applicationSuite("Test String") + .countriesNotSupported("Test String") + .countriesSupported("Test String") + .availableOnDevice("Test String") + .downloadUrl("Test String") + .featureList("Test String") + .fileFormat("Test String") + .fileSize(42) + .installUrl("Test String") + .memoryRequirements("Test String") + .operatingSystem("Test String") + .permissions("Test String") + .processorRequirements("Test String") + .releaseNotes("Test String") + .softwareRequirements("Test String") + .softwareVersion("Test String") + .storageRequirements("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(webApplication)); + assertEquals(webApplication, thing); + } + @Test public void testPropertyValueSpecification() throws IOException { + final PropertyValueSpecification propertyValueSpecification = SchemaOrg.propertyValueSpecification() + .minValue(42) + .valueName("Test String") + .valueRequired(true) + .defaultValue("Test String") + .readonlyValue(true) + .multipleValues(true) + .valueMinLength(42) + .valueMaxLength(42) + .valuePattern("Test String") + .stepValue(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(propertyValueSpecification)); + assertEquals(propertyValueSpecification, thing); + } + @Test public void testAutomatedTeller() throws IOException { + final AutomatedTeller automatedTeller = SchemaOrg.automatedTeller() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(automatedTeller)); + assertEquals(automatedTeller, thing); + } + @Test public void testBusTrip() throws IOException { + final BusTrip busTrip = SchemaOrg.busTrip() + .departureTime(NOW) + .arrivalTime(NOW) + .busNumber("Test String") + .busName("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(busTrip)); + assertEquals(busTrip, thing); + } + @Test public void testPriceSpecification() throws IOException { + final PriceSpecification priceSpecification = SchemaOrg.priceSpecification() + .maxPrice(42) + .minPrice(42) + .price(42) + .validFrom(NOW) + .validThrough(NOW) + .valueAddedTaxIncluded(true) + .priceCurrency("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(priceSpecification)); + assertEquals(priceSpecification, thing); + } + @Test public void testDislikeAction() throws IOException { + final DislikeAction dislikeAction = SchemaOrg.dislikeAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(dislikeAction)); + assertEquals(dislikeAction, thing); + } + @Test public void testOceanBodyOfWater() throws IOException { + final OceanBodyOfWater oceanBodyOfWater = SchemaOrg.oceanBodyOfWater() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(oceanBodyOfWater)); + assertEquals(oceanBodyOfWater, thing); + } + @Test public void testApartmentComplex() throws IOException { + final ApartmentComplex apartmentComplex = SchemaOrg.apartmentComplex() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(apartmentComplex)); + assertEquals(apartmentComplex, thing); + } + @Test public void testMedicalTrial() throws IOException { + final MedicalTrial medicalTrial = SchemaOrg.medicalTrial() + .phase("Test String") + .outcome("Test String") + .population("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalTrial)); + assertEquals(medicalTrial, thing); + } + @Test public void testTattooParlor() throws IOException { + final TattooParlor tattooParlor = SchemaOrg.tattooParlor() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(tattooParlor)); + assertEquals(tattooParlor, thing); + } + @Test public void testUserBlocks() throws IOException { + final UserBlocks userBlocks = SchemaOrg.userBlocks() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(userBlocks)); + assertEquals(userBlocks, thing); + } + @Test public void testQAPage() throws IOException { + final QAPage qAPage = SchemaOrg.qAPage() + .lastReviewed(NOW) + .relatedLink("Test String") + .significantLink("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(qAPage)); + assertEquals(qAPage, thing); + } + @Test public void testHobbyShop() throws IOException { + final HobbyShop hobbyShop = SchemaOrg.hobbyShop() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(hobbyShop)); + assertEquals(hobbyShop, thing); + } + @Test public void testGeoShape() throws IOException { + final GeoShape geoShape = SchemaOrg.geoShape() + .box("Test String") + .circle("Test String") + .elevation(42) + .line("Test String") + .polygon("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(geoShape)); + assertEquals(geoShape, thing); + } + @Test public void testFilmAction() throws IOException { + final FilmAction filmAction = SchemaOrg.filmAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(filmAction)); + assertEquals(filmAction, thing); + } + @Test public void testTherapeuticProcedure() throws IOException { + final TherapeuticProcedure therapeuticProcedure = SchemaOrg.therapeuticProcedure() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(therapeuticProcedure)); + assertEquals(therapeuticProcedure, thing); + } + @Test public void testFireStation() throws IOException { + final FireStation fireStation = SchemaOrg.fireStation() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(fireStation)); + assertEquals(fireStation, thing); + } + @Test public void testTelevisionStation() throws IOException { + final TelevisionStation televisionStation = SchemaOrg.televisionStation() + .videoFormat("Test String") + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(televisionStation)); + assertEquals(televisionStation, thing); + } + @Test public void testMedicalCause() throws IOException { + final MedicalCause medicalCause = SchemaOrg.medicalCause() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalCause)); + assertEquals(medicalCause, thing); + } + @Test public void testEvent() throws IOException { + final Event event = SchemaOrg.event() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(event)); + assertEquals(event, thing); + } + @Test public void testPaymentMethod() throws IOException { + final PaymentMethod paymentMethod = SchemaOrg.paymentMethod() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(paymentMethod)); + assertEquals(paymentMethod, thing); + } + @Test public void testElementarySchool() throws IOException { + final ElementarySchool elementarySchool = SchemaOrg.elementarySchool() + .award("Test String") + .duns("Test String") + .email("Test String") + .faxNumber("Test String") + .dissolutionDate(NOW) + .foundingDate(NOW) + .globalLocationNumber("Test String") + .isicV4("Test String") + .legalName("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(elementarySchool)); + assertEquals(elementarySchool, thing); + } + @Test public void testEventStatusType() throws IOException { + final EventStatusType eventStatusType = SchemaOrg.eventStatusType() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(eventStatusType)); + assertEquals(eventStatusType, thing); + } + @Test public void testImageGallery() throws IOException { + final ImageGallery imageGallery = SchemaOrg.imageGallery() + .lastReviewed(NOW) + .relatedLink("Test String") + .significantLink("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(imageGallery)); + assertEquals(imageGallery, thing); + } + @Test public void testAuthorizeAction() throws IOException { + final AuthorizeAction authorizeAction = SchemaOrg.authorizeAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(authorizeAction)); + assertEquals(authorizeAction, thing); + } + @Test public void testWPFooter() throws IOException { + final WPFooter wPFooter = SchemaOrg.wPFooter() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(wPFooter)); + assertEquals(wPFooter, thing); + } + @Test public void testOutletStore() throws IOException { + final OutletStore outletStore = SchemaOrg.outletStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(outletStore)); + assertEquals(outletStore, thing); + } + @Test public void testBikeStore() throws IOException { + final BikeStore bikeStore = SchemaOrg.bikeStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(bikeStore)); + assertEquals(bikeStore, thing); + } + @Test public void testArtery() throws IOException { + final Artery artery = SchemaOrg.artery() + .associatedPathophysiology("Test String") + .bodyLocation("Test String") + .function("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(artery)); + assertEquals(artery, thing); + } + @Test public void testNotary() throws IOException { + final Notary notary = SchemaOrg.notary() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(notary)); + assertEquals(notary, thing); + } + @Test public void testMass() throws IOException { + final Mass mass = SchemaOrg.mass() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(mass)); + assertEquals(mass, thing); + } + @Test public void testDemand() throws IOException { + final Demand demand = SchemaOrg.demand() + .availabilityEnds(NOW) + .availabilityStarts(NOW) + .gtin12("Test String") + .gtin13("Test String") + .gtin14("Test String") + .gtin8("Test String") + .mpn("Test String") + .sku("Test String") + .validFrom(NOW) + .validThrough(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(demand)); + assertEquals(demand, thing); + } + @Test public void testFoodEstablishmentReservation() throws IOException { + final FoodEstablishmentReservation foodEstablishmentReservation = SchemaOrg.foodEstablishmentReservation() + .startTime(NOW) + .partySize(42) + .reservationId("Test String") + .bookingTime(NOW) + .modifiedTime(NOW) + .totalPrice(42) + .priceCurrency("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(foodEstablishmentReservation)); + assertEquals(foodEstablishmentReservation, thing); + } + @Test public void testBusinessFunction() throws IOException { + final BusinessFunction businessFunction = SchemaOrg.businessFunction() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(businessFunction)); + assertEquals(businessFunction, thing); + } + @Test public void testDanceGroup() throws IOException { + final DanceGroup danceGroup = SchemaOrg.danceGroup() + .award("Test String") + .duns("Test String") + .email("Test String") + .faxNumber("Test String") + .dissolutionDate(NOW) + .foundingDate(NOW) + .globalLocationNumber("Test String") + .isicV4("Test String") + .legalName("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(danceGroup)); + assertEquals(danceGroup, thing); + } + @Test public void testDDxElement() throws IOException { + final DDxElement dDxElement = SchemaOrg.dDxElement() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(dDxElement)); + assertEquals(dDxElement, thing); + } + @Test public void testCollectionPage() throws IOException { + final CollectionPage collectionPage = SchemaOrg.collectionPage() + .lastReviewed(NOW) + .relatedLink("Test String") + .significantLink("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(collectionPage)); + assertEquals(collectionPage, thing); + } + @Test public void testMosque() throws IOException { + final Mosque mosque = SchemaOrg.mosque() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(mosque)); + assertEquals(mosque, thing); + } + @Test public void testIntangible() throws IOException { + final Intangible intangible = SchemaOrg.intangible() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(intangible)); + assertEquals(intangible, thing); + } + @Test public void testEpisode() throws IOException { + final Episode episode = SchemaOrg.episode() + .episodeNumber(42) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(episode)); + assertEquals(episode, thing); + } + @Test public void testInvoice() throws IOException { + final Invoice invoice = SchemaOrg.invoice() + .confirmationNumber("Test String") + .paymentDue(NOW) + .paymentMethodId("Test String") + .accountId("Test String") + .scheduledPaymentDate(NOW) + .paymentStatus("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(invoice)); + assertEquals(invoice, thing); + } + @Test public void testProject() throws IOException { + final Project project = SchemaOrg.project() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(project)); + assertEquals(project, thing); + } + @Test public void testRecyclingCenter() throws IOException { + final RecyclingCenter recyclingCenter = SchemaOrg.recyclingCenter() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(recyclingCenter)); + assertEquals(recyclingCenter, thing); + } + @Test public void testMaximumDoseSchedule() throws IOException { + final MaximumDoseSchedule maximumDoseSchedule = SchemaOrg.maximumDoseSchedule() + .doseUnit("Test String") + .doseValue(42) + .frequency("Test String") + .targetPopulation("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(maximumDoseSchedule)); + assertEquals(maximumDoseSchedule, thing); + } + @Test public void testMobileApplication() throws IOException { + final MobileApplication mobileApplication = SchemaOrg.mobileApplication() + .carrierRequirements("Test String") + .applicationCategory("Test String") + .applicationSubCategory("Test String") + .applicationSuite("Test String") + .countriesNotSupported("Test String") + .countriesSupported("Test String") + .availableOnDevice("Test String") + .downloadUrl("Test String") + .featureList("Test String") + .fileFormat("Test String") + .fileSize(42) + .installUrl("Test String") + .memoryRequirements("Test String") + .operatingSystem("Test String") + .permissions("Test String") + .processorRequirements("Test String") + .releaseNotes("Test String") + .softwareRequirements("Test String") + .softwareVersion("Test String") + .storageRequirements("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(mobileApplication)); + assertEquals(mobileApplication, thing); + } + @Test public void testSoftwareApplication() throws IOException { + final SoftwareApplication softwareApplication = SchemaOrg.softwareApplication() + .applicationCategory("Test String") + .applicationSubCategory("Test String") + .applicationSuite("Test String") + .countriesNotSupported("Test String") + .countriesSupported("Test String") + .availableOnDevice("Test String") + .downloadUrl("Test String") + .featureList("Test String") + .fileFormat("Test String") + .fileSize(42) + .installUrl("Test String") + .memoryRequirements("Test String") + .operatingSystem("Test String") + .permissions("Test String") + .processorRequirements("Test String") + .releaseNotes("Test String") + .softwareRequirements("Test String") + .softwareVersion("Test String") + .storageRequirements("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(softwareApplication)); + assertEquals(softwareApplication, thing); + } + @Test public void testControlAction() throws IOException { + final ControlAction controlAction = SchemaOrg.controlAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(controlAction)); + assertEquals(controlAction, thing); + } + @Test public void testRadioChannel() throws IOException { + final RadioChannel radioChannel = SchemaOrg.radioChannel() + .broadcastChannelId("Test String") + .broadcastServiceTier("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(radioChannel)); + assertEquals(radioChannel, thing); + } + @Test public void testCableOrSatelliteService() throws IOException { + final CableOrSatelliteService cableOrSatelliteService = SchemaOrg.cableOrSatelliteService() + .serviceType("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(cableOrSatelliteService)); + assertEquals(cableOrSatelliteService, thing); + } + @Test public void testProperty() throws IOException { + final Property property = SchemaOrg.property() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(property)); + assertEquals(property, thing); + } + @Test public void testCafeOrCoffeeShop() throws IOException { + final CafeOrCoffeeShop cafeOrCoffeeShop = SchemaOrg.cafeOrCoffeeShop() + .acceptsReservations(true) + .menu("Test String") + .servesCuisine("Test String") + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(cafeOrCoffeeShop)); + assertEquals(cafeOrCoffeeShop, thing); + } + @Test public void testLibrary() throws IOException { + final Library library = SchemaOrg.library() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(library)); + assertEquals(library, thing); + } + @Test public void testMedicalObservationalStudyDesign() throws IOException { + final MedicalObservationalStudyDesign medicalObservationalStudyDesign = SchemaOrg.medicalObservationalStudyDesign() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalObservationalStudyDesign)); + assertEquals(medicalObservationalStudyDesign, thing); + } + @Test public void testFindAction() throws IOException { + final FindAction findAction = SchemaOrg.findAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(findAction)); + assertEquals(findAction, thing); + } + @Test public void testPrependAction() throws IOException { + final PrependAction prependAction = SchemaOrg.prependAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(prependAction)); + assertEquals(prependAction, thing); + } + @Test public void testBloodTest() throws IOException { + final BloodTest bloodTest = SchemaOrg.bloodTest() + .normalRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(bloodTest)); + assertEquals(bloodTest, thing); + } + @Test public void testLikeAction() throws IOException { + final LikeAction likeAction = SchemaOrg.likeAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(likeAction)); + assertEquals(likeAction, thing); + } + @Test public void testBeautySalon() throws IOException { + final BeautySalon beautySalon = SchemaOrg.beautySalon() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(beautySalon)); + assertEquals(beautySalon, thing); + } + @Test public void testGovernmentOrganization() throws IOException { + final GovernmentOrganization governmentOrganization = SchemaOrg.governmentOrganization() + .award("Test String") + .duns("Test String") + .email("Test String") + .faxNumber("Test String") + .dissolutionDate(NOW) + .foundingDate(NOW) + .globalLocationNumber("Test String") + .isicV4("Test String") + .legalName("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(governmentOrganization)); + assertEquals(governmentOrganization, thing); + } + @Test public void testRsvpResponseType() throws IOException { + final RsvpResponseType rsvpResponseType = SchemaOrg.rsvpResponseType() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(rsvpResponseType)); + assertEquals(rsvpResponseType, thing); + } + @Test public void testBrainStructure() throws IOException { + final BrainStructure brainStructure = SchemaOrg.brainStructure() + .associatedPathophysiology("Test String") + .bodyLocation("Test String") + .function("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(brainStructure)); + assertEquals(brainStructure, thing); + } + @Test public void testEmployeeRole() throws IOException { + final EmployeeRole employeeRole = SchemaOrg.employeeRole() + .salaryCurrency("Test String") + .numberedPosition(42) + .startDate(NOW) + .roleName("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(employeeRole)); + assertEquals(employeeRole, thing); + } + @Test public void testMedicalAudience() throws IOException { + final MedicalAudience medicalAudience = SchemaOrg.medicalAudience() + .requiredGender("Test String") + .requiredMaxAge(42) + .requiredMinAge(42) + .suggestedGender("Test String") + .suggestedMaxAge(42) + .suggestedMinAge(42) + .audienceType("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalAudience)); + assertEquals(medicalAudience, thing); + } + @Test public void testMovieRentalStore() throws IOException { + final MovieRentalStore movieRentalStore = SchemaOrg.movieRentalStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(movieRentalStore)); + assertEquals(movieRentalStore, thing); + } + @Test public void testGameServer() throws IOException { + final GameServer gameServer = SchemaOrg.gameServer() + .playersOnline(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(gameServer)); + assertEquals(gameServer, thing); + } + @Test public void testCar() throws IOException { + final Car car = SchemaOrg.car() + .numberOfAirbags(42) + .vin("Test String") + .vehicleConfiguration("Test String") + .knownVehicleDamages("Test String") + .dateVehicleFirstRegistered(NOW) + .vehicleInteriorColor("Test String") + .vehicleInteriorType("Test String") + .vehicleModelDate(NOW) + .productionDate(NOW) + .purchaseDate(NOW) + .award("Test String") + .color("Test String") + .gtin12("Test String") + .gtin13("Test String") + .gtin14("Test String") + .gtin8("Test String") + .mpn("Test String") + .productID("Test String") + .releaseDate(NOW) + .sku("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(car)); + assertEquals(car, thing); + } + @Test public void testCrematorium() throws IOException { + final Crematorium crematorium = SchemaOrg.crematorium() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(crematorium)); + assertEquals(crematorium, thing); + } + @Test public void testBankOrCreditUnion() throws IOException { + final BankOrCreditUnion bankOrCreditUnion = SchemaOrg.bankOrCreditUnion() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(bankOrCreditUnion)); + assertEquals(bankOrCreditUnion, thing); + } + @Test public void testQuoteAction() throws IOException { + final QuoteAction quoteAction = SchemaOrg.quoteAction() + .price(42) + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(quoteAction)); + assertEquals(quoteAction, thing); + } + @Test public void testSendAction() throws IOException { + final SendAction sendAction = SchemaOrg.sendAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(sendAction)); + assertEquals(sendAction, thing); + } + @Test public void testPhysician() throws IOException { + final Physician physician = SchemaOrg.physician() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(physician)); + assertEquals(physician, thing); + } + @Test public void testNerve() throws IOException { + final Nerve nerve = SchemaOrg.nerve() + .associatedPathophysiology("Test String") + .bodyLocation("Test String") + .function("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(nerve)); + assertEquals(nerve, thing); + } + @Test public void testAttorney() throws IOException { + final Attorney attorney = SchemaOrg.attorney() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(attorney)); + assertEquals(attorney, thing); + } + @Test public void testImagingTest() throws IOException { + final ImagingTest imagingTest = SchemaOrg.imagingTest() + .normalRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(imagingTest)); + assertEquals(imagingTest, thing); + } + @Test public void testOnDemandEvent() throws IOException { + final OnDemandEvent onDemandEvent = SchemaOrg.onDemandEvent() + .isAccessibleForFree(true) + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(onDemandEvent)); + assertEquals(onDemandEvent, thing); + } + @Test public void testMedicalEntity() throws IOException { + final MedicalEntity medicalEntity = SchemaOrg.medicalEntity() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalEntity)); + assertEquals(medicalEntity, thing); + } + @Test public void testGolfCourse() throws IOException { + final GolfCourse golfCourse = SchemaOrg.golfCourse() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(golfCourse)); + assertEquals(golfCourse, thing); + } + @Test public void testRentAction() throws IOException { + final RentAction rentAction = SchemaOrg.rentAction() + .price(42) + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(rentAction)); + assertEquals(rentAction, thing); + } + @Test public void testReportedDoseSchedule() throws IOException { + final ReportedDoseSchedule reportedDoseSchedule = SchemaOrg.reportedDoseSchedule() + .doseUnit("Test String") + .doseValue(42) + .frequency("Test String") + .targetPopulation("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(reportedDoseSchedule)); + assertEquals(reportedDoseSchedule, thing); + } + @Test public void testEnumeration() throws IOException { + final Enumeration enumeration = SchemaOrg.enumeration() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(enumeration)); + assertEquals(enumeration, thing); + } + @Test public void testHospital() throws IOException { + final Hospital hospital = SchemaOrg.hospital() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(hospital)); + assertEquals(hospital, thing); + } + @Test public void testFurnitureStore() throws IOException { + final FurnitureStore furnitureStore = SchemaOrg.furnitureStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(furnitureStore)); + assertEquals(furnitureStore, thing); + } + @Test public void testVisualArtsEvent() throws IOException { + final VisualArtsEvent visualArtsEvent = SchemaOrg.visualArtsEvent() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(visualArtsEvent)); + assertEquals(visualArtsEvent, thing); + } + @Test public void testChooseAction() throws IOException { + final ChooseAction chooseAction = SchemaOrg.chooseAction() + .actionOption("Test String") + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(chooseAction)); + assertEquals(chooseAction, thing); + } + @Test public void testSportingGoodsStore() throws IOException { + final SportingGoodsStore sportingGoodsStore = SchemaOrg.sportingGoodsStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(sportingGoodsStore)); + assertEquals(sportingGoodsStore, thing); + } + @Test public void testMedicalDevice() throws IOException { + final MedicalDevice medicalDevice = SchemaOrg.medicalDevice() + .postOp("Test String") + .preOp("Test String") + .procedure("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalDevice)); + assertEquals(medicalDevice, thing); + } + @Test public void testNGO() throws IOException { + final NGO nGO = SchemaOrg.nGO() + .award("Test String") + .duns("Test String") + .email("Test String") + .faxNumber("Test String") + .dissolutionDate(NOW) + .foundingDate(NOW) + .globalLocationNumber("Test String") + .isicV4("Test String") + .legalName("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(nGO)); + assertEquals(nGO, thing); + } + @Test public void testBlogPosting() throws IOException { + final BlogPosting blogPosting = SchemaOrg.blogPosting() + .articleBody("Test String") + .articleSection("Test String") + .wordCount(42) + .pageEnd(42) + .pageStart(42) + .pagination("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(blogPosting)); + assertEquals(blogPosting, thing); + } + @Test public void testReservoir() throws IOException { + final Reservoir reservoir = SchemaOrg.reservoir() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(reservoir)); + assertEquals(reservoir, thing); + } + @Test public void testAutomotiveBusiness() throws IOException { + final AutomotiveBusiness automotiveBusiness = SchemaOrg.automotiveBusiness() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(automotiveBusiness)); + assertEquals(automotiveBusiness, thing); + } + @Test public void testAutoRental() throws IOException { + final AutoRental autoRental = SchemaOrg.autoRental() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(autoRental)); + assertEquals(autoRental, thing); + } + @Test public void testWPAdBlock() throws IOException { + final WPAdBlock wPAdBlock = SchemaOrg.wPAdBlock() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(wPAdBlock)); + assertEquals(wPAdBlock, thing); + } + @Test public void testOrganizeAction() throws IOException { + final OrganizeAction organizeAction = SchemaOrg.organizeAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(organizeAction)); + assertEquals(organizeAction, thing); + } + @Test public void testBedAndBreakfast() throws IOException { + final BedAndBreakfast bedAndBreakfast = SchemaOrg.bedAndBreakfast() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(bedAndBreakfast)); + assertEquals(bedAndBreakfast, thing); + } + @Test public void testPlayAction() throws IOException { + final PlayAction playAction = SchemaOrg.playAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(playAction)); + assertEquals(playAction, thing); + } + @Test public void testLifestyleModification() throws IOException { + final LifestyleModification lifestyleModification = SchemaOrg.lifestyleModification() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(lifestyleModification)); + assertEquals(lifestyleModification, thing); + } + @Test public void testUserPageVisits() throws IOException { + final UserPageVisits userPageVisits = SchemaOrg.userPageVisits() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(userPageVisits)); + assertEquals(userPageVisits, thing); + } + @Test public void testAdultEntertainment() throws IOException { + final AdultEntertainment adultEntertainment = SchemaOrg.adultEntertainment() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(adultEntertainment)); + assertEquals(adultEntertainment, thing); + } + @Test public void testCookAction() throws IOException { + final CookAction cookAction = SchemaOrg.cookAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(cookAction)); + assertEquals(cookAction, thing); + } + @Test public void testAquarium() throws IOException { + final Aquarium aquarium = SchemaOrg.aquarium() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(aquarium)); + assertEquals(aquarium, thing); + } + @Test public void testHotel() throws IOException { + final Hotel hotel = SchemaOrg.hotel() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(hotel)); + assertEquals(hotel, thing); + } + @Test public void testEmergencyService() throws IOException { + final EmergencyService emergencyService = SchemaOrg.emergencyService() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(emergencyService)); + assertEquals(emergencyService, thing); + } + @Test public void testMap() throws IOException { + final Map map = SchemaOrg.map() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(map)); + assertEquals(map, thing); + } + @Test public void testOrderStatus() throws IOException { + final OrderStatus orderStatus = SchemaOrg.orderStatus() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(orderStatus)); + assertEquals(orderStatus, thing); + } + @Test public void testTypeAndQuantityNode() throws IOException { + final TypeAndQuantityNode typeAndQuantityNode = SchemaOrg.typeAndQuantityNode() + .amountOfThisGood(42) + .unitCode("Test String") + .unitText("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(typeAndQuantityNode)); + assertEquals(typeAndQuantityNode, thing); + } + @Test public void testCarUsageType() throws IOException { + final CarUsageType carUsageType = SchemaOrg.carUsageType() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(carUsageType)); + assertEquals(carUsageType, thing); + } + @Test public void testVideoGallery() throws IOException { + final VideoGallery videoGallery = SchemaOrg.videoGallery() + .lastReviewed(NOW) + .relatedLink("Test String") + .significantLink("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(videoGallery)); + assertEquals(videoGallery, thing); + } + @Test public void testPhotograph() throws IOException { + final Photograph photograph = SchemaOrg.photograph() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(photograph)); + assertEquals(photograph, thing); + } + @Test public void testDataset() throws IOException { + final Dataset dataset = SchemaOrg.dataset() + .datasetTimeInterval(NOW) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(dataset)); + assertEquals(dataset, thing); + } + @Test public void testAutoBodyShop() throws IOException { + final AutoBodyShop autoBodyShop = SchemaOrg.autoBodyShop() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(autoBodyShop)); + assertEquals(autoBodyShop, thing); + } + @Test public void testAutoPartsStore() throws IOException { + final AutoPartsStore autoPartsStore = SchemaOrg.autoPartsStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(autoPartsStore)); + assertEquals(autoPartsStore, thing); + } + @Test public void testHealthAndBeautyBusiness() throws IOException { + final HealthAndBeautyBusiness healthAndBeautyBusiness = SchemaOrg.healthAndBeautyBusiness() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(healthAndBeautyBusiness)); + assertEquals(healthAndBeautyBusiness, thing); + } + @Test public void testPhotographAction() throws IOException { + final PhotographAction photographAction = SchemaOrg.photographAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(photographAction)); + assertEquals(photographAction, thing); + } + @Test public void testCheckoutPage() throws IOException { + final CheckoutPage checkoutPage = SchemaOrg.checkoutPage() + .lastReviewed(NOW) + .relatedLink("Test String") + .significantLink("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(checkoutPage)); + assertEquals(checkoutPage, thing); + } + @Test public void testMedicalStudyStatus() throws IOException { + final MedicalStudyStatus medicalStudyStatus = SchemaOrg.medicalStudyStatus() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalStudyStatus)); + assertEquals(medicalStudyStatus, thing); + } + @Test public void testZoo() throws IOException { + final Zoo zoo = SchemaOrg.zoo() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(zoo)); + assertEquals(zoo, thing); + } + @Test public void testPlaceOfWorship() throws IOException { + final PlaceOfWorship placeOfWorship = SchemaOrg.placeOfWorship() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(placeOfWorship)); + assertEquals(placeOfWorship, thing); + } + @Test public void testMapCategoryType() throws IOException { + final MapCategoryType mapCategoryType = SchemaOrg.mapCategoryType() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(mapCategoryType)); + assertEquals(mapCategoryType, thing); + } + @Test public void testFollowAction() throws IOException { + final FollowAction followAction = SchemaOrg.followAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(followAction)); + assertEquals(followAction, thing); + } + @Test public void testInformAction() throws IOException { + final InformAction informAction = SchemaOrg.informAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(informAction)); + assertEquals(informAction, thing); + } + @Test public void testResidence() throws IOException { + final Residence residence = SchemaOrg.residence() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(residence)); + assertEquals(residence, thing); + } + @Test public void testMusicEvent() throws IOException { + final MusicEvent musicEvent = SchemaOrg.musicEvent() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(musicEvent)); + assertEquals(musicEvent, thing); + } + @Test public void testConsumeAction() throws IOException { + final ConsumeAction consumeAction = SchemaOrg.consumeAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(consumeAction)); + assertEquals(consumeAction, thing); + } + @Test public void testAudioObject() throws IOException { + final AudioObject audioObject = SchemaOrg.audioObject() + .transcript("Test String") + .bitrate("Test String") + .contentSize("Test String") + .contentUrl("Test String") + .embedUrl("Test String") + .encodingFormat("Test String") + .expires(NOW) + .playerType("Test String") + .requiresSubscription(true) + .uploadDate(NOW) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(audioObject)); + assertEquals(audioObject, thing); + } + @Test public void testTaxiService() throws IOException { + final TaxiService taxiService = SchemaOrg.taxiService() + .serviceType("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(taxiService)); + assertEquals(taxiService, thing); + } + @Test public void testWantAction() throws IOException { + final WantAction wantAction = SchemaOrg.wantAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(wantAction)); + assertEquals(wantAction, thing); + } + @Test public void testState() throws IOException { + final State state = SchemaOrg.state() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(state)); + assertEquals(state, thing); + } + @Test public void testOwnershipInfo() throws IOException { + final OwnershipInfo ownershipInfo = SchemaOrg.ownershipInfo() + .ownedFrom(NOW) + .ownedThrough(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(ownershipInfo)); + assertEquals(ownershipInfo, thing); + } + @Test public void testAnatomicalStructure() throws IOException { + final AnatomicalStructure anatomicalStructure = SchemaOrg.anatomicalStructure() + .associatedPathophysiology("Test String") + .bodyLocation("Test String") + .function("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(anatomicalStructure)); + assertEquals(anatomicalStructure, thing); + } + @Test public void testLendAction() throws IOException { + final LendAction lendAction = SchemaOrg.lendAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(lendAction)); + assertEquals(lendAction, thing); + } + @Test public void testAirline() throws IOException { + final Airline airline = SchemaOrg.airline() + .iataCode("Test String") + .award("Test String") + .duns("Test String") + .email("Test String") + .faxNumber("Test String") + .dissolutionDate(NOW) + .foundingDate(NOW) + .globalLocationNumber("Test String") + .isicV4("Test String") + .legalName("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(airline)); + assertEquals(airline, thing); + } + @Test public void testNewsArticle() throws IOException { + final NewsArticle newsArticle = SchemaOrg.newsArticle() + .dateline("Test String") + .printColumn("Test String") + .printEdition("Test String") + .printPage("Test String") + .printSection("Test String") + .articleBody("Test String") + .articleSection("Test String") + .wordCount(42) + .pageEnd(42) + .pageStart(42) + .pagination("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(newsArticle)); + assertEquals(newsArticle, thing); + } + @Test public void testMiddleSchool() throws IOException { + final MiddleSchool middleSchool = SchemaOrg.middleSchool() + .award("Test String") + .duns("Test String") + .email("Test String") + .faxNumber("Test String") + .dissolutionDate(NOW) + .foundingDate(NOW) + .globalLocationNumber("Test String") + .isicV4("Test String") + .legalName("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(middleSchool)); + assertEquals(middleSchool, thing); + } + @Test public void testMusicAlbumReleaseType() throws IOException { + final MusicAlbumReleaseType musicAlbumReleaseType = SchemaOrg.musicAlbumReleaseType() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(musicAlbumReleaseType)); + assertEquals(musicAlbumReleaseType, thing); + } + @Test public void testTVEpisode() throws IOException { + final TVEpisode tVEpisode = SchemaOrg.tVEpisode() + .episodeNumber(42) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(tVEpisode)); + assertEquals(tVEpisode, thing); + } + @Test public void testStadiumOrArena() throws IOException { + final StadiumOrArena stadiumOrArena = SchemaOrg.stadiumOrArena() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(stadiumOrArena)); + assertEquals(stadiumOrArena, thing); + } + @Test public void testMedicalGuidelineContraindication() throws IOException { + final MedicalGuidelineContraindication medicalGuidelineContraindication = SchemaOrg.medicalGuidelineContraindication() + .evidenceOrigin("Test String") + .guidelineDate(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalGuidelineContraindication)); + assertEquals(medicalGuidelineContraindication, thing); + } + @Test public void testMedicalIntangible() throws IOException { + final MedicalIntangible medicalIntangible = SchemaOrg.medicalIntangible() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalIntangible)); + assertEquals(medicalIntangible, thing); + } + @Test public void testSpecialty() throws IOException { + final Specialty specialty = SchemaOrg.specialty() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(specialty)); + assertEquals(specialty, thing); + } + @Test public void testVessel() throws IOException { + final Vessel vessel = SchemaOrg.vessel() + .associatedPathophysiology("Test String") + .bodyLocation("Test String") + .function("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(vessel)); + assertEquals(vessel, thing); + } + @Test public void testSportsOrganization() throws IOException { + final SportsOrganization sportsOrganization = SchemaOrg.sportsOrganization() + .sport("Test String") + .award("Test String") + .duns("Test String") + .email("Test String") + .faxNumber("Test String") + .dissolutionDate(NOW) + .foundingDate(NOW) + .globalLocationNumber("Test String") + .isicV4("Test String") + .legalName("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(sportsOrganization)); + assertEquals(sportsOrganization, thing); + } + @Test public void testIgnoreAction() throws IOException { + final IgnoreAction ignoreAction = SchemaOrg.ignoreAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(ignoreAction)); + assertEquals(ignoreAction, thing); + } + @Test public void testUserCheckins() throws IOException { + final UserCheckins userCheckins = SchemaOrg.userCheckins() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(userCheckins)); + assertEquals(userCheckins, thing); + } + @Test public void testRole() throws IOException { + final Role role = SchemaOrg.role() + .startDate(NOW) + .roleName("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(role)); + assertEquals(role, thing); + } + @Test public void testFoodEvent() throws IOException { + final FoodEvent foodEvent = SchemaOrg.foodEvent() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(foodEvent)); + assertEquals(foodEvent, thing); + } + @Test public void testTravelAction() throws IOException { + final TravelAction travelAction = SchemaOrg.travelAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(travelAction)); + assertEquals(travelAction, thing); + } + @Test public void testSubscribeAction() throws IOException { + final SubscribeAction subscribeAction = SchemaOrg.subscribeAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(subscribeAction)); + assertEquals(subscribeAction, thing); + } + @Test public void testRadioClip() throws IOException { + final RadioClip radioClip = SchemaOrg.radioClip() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(radioClip)); + assertEquals(radioClip, thing); + } + @Test public void testBrand() throws IOException { + final Brand brand = SchemaOrg.brand() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(brand)); + assertEquals(brand, thing); + } + @Test public void testItemList() throws IOException { + final ItemList itemList = SchemaOrg.itemList() + .numberOfItems(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(itemList)); + assertEquals(itemList, thing); + } + @Test public void testSkiResort() throws IOException { + final SkiResort skiResort = SchemaOrg.skiResort() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(skiResort)); + assertEquals(skiResort, thing); + } + @Test public void testContactPoint() throws IOException { + final ContactPoint contactPoint = SchemaOrg.contactPoint() + .contactType("Test String") + .email("Test String") + .faxNumber("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(contactPoint)); + assertEquals(contactPoint, thing); + } + @Test public void testDonateAction() throws IOException { + final DonateAction donateAction = SchemaOrg.donateAction() + .price(42) + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(donateAction)); + assertEquals(donateAction, thing); + } + @Test public void testIndividualProduct() throws IOException { + final IndividualProduct individualProduct = SchemaOrg.individualProduct() + .award("Test String") + .color("Test String") + .gtin12("Test String") + .gtin13("Test String") + .gtin14("Test String") + .gtin8("Test String") + .mpn("Test String") + .productID("Test String") + .releaseDate(NOW) + .sku("Test String") + .productionDate(NOW) + .purchaseDate(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(individualProduct)); + assertEquals(individualProduct, thing); + } + @Test public void testMobilePhoneStore() throws IOException { + final MobilePhoneStore mobilePhoneStore = SchemaOrg.mobilePhoneStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(mobilePhoneStore)); + assertEquals(mobilePhoneStore, thing); + } + @Test public void testGovernmentBuilding() throws IOException { + final GovernmentBuilding governmentBuilding = SchemaOrg.governmentBuilding() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(governmentBuilding)); + assertEquals(governmentBuilding, thing); + } + @Test public void testWearAction() throws IOException { + final WearAction wearAction = SchemaOrg.wearAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(wearAction)); + assertEquals(wearAction, thing); + } + @Test public void testPhysicalActivity() throws IOException { + final PhysicalActivity physicalActivity = SchemaOrg.physicalActivity() + .epidemiology("Test String") + .pathophysiology("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(physicalActivity)); + assertEquals(physicalActivity, thing); + } + @Test public void testUserTweets() throws IOException { + final UserTweets userTweets = SchemaOrg.userTweets() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(userTweets)); + assertEquals(userTweets, thing); + } + @Test public void testAction() throws IOException { + final Action action = SchemaOrg.action() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(action)); + assertEquals(action, thing); + } + @Test public void testPaymentChargeSpecification() throws IOException { + final PaymentChargeSpecification paymentChargeSpecification = SchemaOrg.paymentChargeSpecification() + .maxPrice(42) + .minPrice(42) + .price(42) + .validFrom(NOW) + .validThrough(NOW) + .valueAddedTaxIncluded(true) + .priceCurrency("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(paymentChargeSpecification)); + assertEquals(paymentChargeSpecification, thing); + } + @Test public void testMedicalObservationalStudy() throws IOException { + final MedicalObservationalStudy medicalObservationalStudy = SchemaOrg.medicalObservationalStudy() + .outcome("Test String") + .population("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalObservationalStudy)); + assertEquals(medicalObservationalStudy, thing); + } + @Test public void testDisagreeAction() throws IOException { + final DisagreeAction disagreeAction = SchemaOrg.disagreeAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(disagreeAction)); + assertEquals(disagreeAction, thing); + } + @Test public void testCheckInAction() throws IOException { + final CheckInAction checkInAction = SchemaOrg.checkInAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(checkInAction)); + assertEquals(checkInAction, thing); + } + @Test public void testSiteNavigationElement() throws IOException { + final SiteNavigationElement siteNavigationElement = SchemaOrg.siteNavigationElement() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(siteNavigationElement)); + assertEquals(siteNavigationElement, thing); + } + @Test public void testLoseAction() throws IOException { + final LoseAction loseAction = SchemaOrg.loseAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(loseAction)); + assertEquals(loseAction, thing); + } + @Test public void testPerson() throws IOException { + final Person person = SchemaOrg.person() + .additionalName("Test String") + .award("Test String") + .birthDate(NOW) + .deathDate(NOW) + .duns("Test String") + .email("Test String") + .familyName("Test String") + .faxNumber("Test String") + .gender("Test String") + .givenName("Test String") + .globalLocationNumber("Test String") + .honorificPrefix("Test String") + .honorificSuffix("Test String") + .isicV4("Test String") + .jobTitle("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(person)); + assertEquals(person, thing); + } + @Test public void testArticle() throws IOException { + final Article article = SchemaOrg.article() + .articleBody("Test String") + .articleSection("Test String") + .wordCount(42) + .pageEnd(42) + .pageStart(42) + .pagination("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(article)); + assertEquals(article, thing); + } + @Test public void testLiquorStore() throws IOException { + final LiquorStore liquorStore = SchemaOrg.liquorStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(liquorStore)); + assertEquals(liquorStore, thing); + } + @Test public void testMedicalCode() throws IOException { + final MedicalCode medicalCode = SchemaOrg.medicalCode() + .codeValue("Test String") + .codingSystem("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalCode)); + assertEquals(medicalCode, thing); + } + @Test public void testVideoGameClip() throws IOException { + final VideoGameClip videoGameClip = SchemaOrg.videoGameClip() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(videoGameClip)); + assertEquals(videoGameClip, thing); + } + @Test public void testRVPark() throws IOException { + final RVPark rVPark = SchemaOrg.rVPark() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(rVPark)); + assertEquals(rVPark, thing); + } + @Test public void testJoinAction() throws IOException { + final JoinAction joinAction = SchemaOrg.joinAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(joinAction)); + assertEquals(joinAction, thing); + } + @Test public void testCancelAction() throws IOException { + final CancelAction cancelAction = SchemaOrg.cancelAction() + .scheduledTime(NOW) + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(cancelAction)); + assertEquals(cancelAction, thing); + } + @Test public void testAboutPage() throws IOException { + final AboutPage aboutPage = SchemaOrg.aboutPage() + .lastReviewed(NOW) + .relatedLink("Test String") + .significantLink("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(aboutPage)); + assertEquals(aboutPage, thing); + } + @Test public void testPropertyValue() throws IOException { + final PropertyValue propertyValue = SchemaOrg.propertyValue() + .minValue(42) + .unitCode("Test String") + .value(42) + .unitText("Test String") + .propertyID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(propertyValue)); + assertEquals(propertyValue, thing); + } + @Test public void testPainting() throws IOException { + final Painting painting = SchemaOrg.painting() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(painting)); + assertEquals(painting, thing); + } + @Test public void testShoppingCenter() throws IOException { + final ShoppingCenter shoppingCenter = SchemaOrg.shoppingCenter() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(shoppingCenter)); + assertEquals(shoppingCenter, thing); + } + @Test public void testIceCreamShop() throws IOException { + final IceCreamShop iceCreamShop = SchemaOrg.iceCreamShop() + .acceptsReservations(true) + .menu("Test String") + .servesCuisine("Test String") + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(iceCreamShop)); + assertEquals(iceCreamShop, thing); + } + @Test public void testHinduTemple() throws IOException { + final HinduTemple hinduTemple = SchemaOrg.hinduTemple() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(hinduTemple)); + assertEquals(hinduTemple, thing); + } + @Test public void testVoteAction() throws IOException { + final VoteAction voteAction = SchemaOrg.voteAction() + .actionOption("Test String") + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(voteAction)); + assertEquals(voteAction, thing); + } + @Test public void testSelfStorage() throws IOException { + final SelfStorage selfStorage = SchemaOrg.selfStorage() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(selfStorage)); + assertEquals(selfStorage, thing); + } + @Test public void testJobPosting() throws IOException { + final JobPosting jobPosting = SchemaOrg.jobPosting() + .baseSalary(42) + .jobBenefits("Test String") + .datePosted(NOW) + .educationRequirements("Test String") + .employmentType("Test String") + .experienceRequirements("Test String") + .incentiveCompensation("Test String") + .industry("Test String") + .occupationalCategory("Test String") + .qualifications("Test String") + .responsibilities("Test String") + .salaryCurrency("Test String") + .skills("Test String") + .specialCommitments("Test String") + .title("Test String") + .workHours("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(jobPosting)); + assertEquals(jobPosting, thing); + } + @Test public void testTaxiStand() throws IOException { + final TaxiStand taxiStand = SchemaOrg.taxiStand() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(taxiStand)); + assertEquals(taxiStand, thing); + } + @Test public void testPalliativeProcedure() throws IOException { + final PalliativeProcedure palliativeProcedure = SchemaOrg.palliativeProcedure() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(palliativeProcedure)); + assertEquals(palliativeProcedure, thing); + } + @Test public void testConvenienceStore() throws IOException { + final ConvenienceStore convenienceStore = SchemaOrg.convenienceStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(convenienceStore)); + assertEquals(convenienceStore, thing); + } + @Test public void testWaterfall() throws IOException { + final Waterfall waterfall = SchemaOrg.waterfall() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(waterfall)); + assertEquals(waterfall, thing); + } + @Test public void testTheaterGroup() throws IOException { + final TheaterGroup theaterGroup = SchemaOrg.theaterGroup() + .award("Test String") + .duns("Test String") + .email("Test String") + .faxNumber("Test String") + .dissolutionDate(NOW) + .foundingDate(NOW) + .globalLocationNumber("Test String") + .isicV4("Test String") + .legalName("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(theaterGroup)); + assertEquals(theaterGroup, thing); + } + @Test public void testBowlingAlley() throws IOException { + final BowlingAlley bowlingAlley = SchemaOrg.bowlingAlley() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(bowlingAlley)); + assertEquals(bowlingAlley, thing); + } + @Test public void testMedicalSign() throws IOException { + final MedicalSign medicalSign = SchemaOrg.medicalSign() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalSign)); + assertEquals(medicalSign, thing); + } + @Test public void testHairSalon() throws IOException { + final HairSalon hairSalon = SchemaOrg.hairSalon() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(hairSalon)); + assertEquals(hairSalon, thing); + } + @Test public void testPoliceStation() throws IOException { + final PoliceStation policeStation = SchemaOrg.policeStation() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(policeStation)); + assertEquals(policeStation, thing); + } + @Test public void testGatedResidenceCommunity() throws IOException { + final GatedResidenceCommunity gatedResidenceCommunity = SchemaOrg.gatedResidenceCommunity() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(gatedResidenceCommunity)); + assertEquals(gatedResidenceCommunity, thing); + } + @Test public void testGameServerStatus() throws IOException { + final GameServerStatus gameServerStatus = SchemaOrg.gameServerStatus() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(gameServerStatus)); + assertEquals(gameServerStatus, thing); + } + @Test public void testLandmarksOrHistoricalBuildings() throws IOException { + final LandmarksOrHistoricalBuildings landmarksOrHistoricalBuildings = SchemaOrg.landmarksOrHistoricalBuildings() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(landmarksOrHistoricalBuildings)); + assertEquals(landmarksOrHistoricalBuildings, thing); + } + @Test public void testDryCleaningOrLaundry() throws IOException { + final DryCleaningOrLaundry dryCleaningOrLaundry = SchemaOrg.dryCleaningOrLaundry() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(dryCleaningOrLaundry)); + assertEquals(dryCleaningOrLaundry, thing); + } + @Test public void testInviteAction() throws IOException { + final InviteAction inviteAction = SchemaOrg.inviteAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(inviteAction)); + assertEquals(inviteAction, thing); + } + @Test public void testDanceEvent() throws IOException { + final DanceEvent danceEvent = SchemaOrg.danceEvent() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(danceEvent)); + assertEquals(danceEvent, thing); + } + @Test public void testOfficeEquipmentStore() throws IOException { + final OfficeEquipmentStore officeEquipmentStore = SchemaOrg.officeEquipmentStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(officeEquipmentStore)); + assertEquals(officeEquipmentStore, thing); + } + @Test public void testRadioSeason() throws IOException { + final RadioSeason radioSeason = SchemaOrg.radioSeason() + .endDate(NOW) + .numberOfEpisodes(42) + .seasonNumber(42) + .startDate(NOW) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(radioSeason)); + assertEquals(radioSeason, thing); + } + @Test public void testPharmacy() throws IOException { + final Pharmacy pharmacy = SchemaOrg.pharmacy() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(pharmacy)); + assertEquals(pharmacy, thing); + } + @Test public void testCatholicChurch() throws IOException { + final CatholicChurch catholicChurch = SchemaOrg.catholicChurch() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(catholicChurch)); + assertEquals(catholicChurch, thing); + } + @Test public void testSuspendAction() throws IOException { + final SuspendAction suspendAction = SchemaOrg.suspendAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(suspendAction)); + assertEquals(suspendAction, thing); + } + @Test public void testReturnAction() throws IOException { + final ReturnAction returnAction = SchemaOrg.returnAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(returnAction)); + assertEquals(returnAction, thing); + } + @Test public void testExerciseGym() throws IOException { + final ExerciseGym exerciseGym = SchemaOrg.exerciseGym() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(exerciseGym)); + assertEquals(exerciseGym, thing); + } + @Test public void testAggregateRating() throws IOException { + final AggregateRating aggregateRating = SchemaOrg.aggregateRating() + .ratingCount(42) + .reviewCount(42) + .bestRating(42) + .ratingValue("Test String") + .worstRating(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(aggregateRating)); + assertEquals(aggregateRating, thing); + } + @Test public void testDepartAction() throws IOException { + final DepartAction departAction = SchemaOrg.departAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(departAction)); + assertEquals(departAction, thing); + } + @Test public void testEducationEvent() throws IOException { + final EducationEvent educationEvent = SchemaOrg.educationEvent() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(educationEvent)); + assertEquals(educationEvent, thing); + } + @Test public void testItemAvailability() throws IOException { + final ItemAvailability itemAvailability = SchemaOrg.itemAvailability() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(itemAvailability)); + assertEquals(itemAvailability, thing); + } + @Test public void testEntryPoint() throws IOException { + final EntryPoint entryPoint = SchemaOrg.entryPoint() + .httpMethod("Test String") + .encodingType("Test String") + .contentType("Test String") + .urlTemplate("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(entryPoint)); + assertEquals(entryPoint, thing); + } + @Test public void testProgramMembership() throws IOException { + final ProgramMembership programMembership = SchemaOrg.programMembership() + .membershipNumber("Test String") + .programName("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(programMembership)); + assertEquals(programMembership, thing); + } + @Test public void testPathologyTest() throws IOException { + final PathologyTest pathologyTest = SchemaOrg.pathologyTest() + .tissueSample("Test String") + .normalRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(pathologyTest)); + assertEquals(pathologyTest, thing); + } + @Test public void testReservationStatusType() throws IOException { + final ReservationStatusType reservationStatusType = SchemaOrg.reservationStatusType() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(reservationStatusType)); + assertEquals(reservationStatusType, thing); + } + @Test public void testGame() throws IOException { + final Game game = SchemaOrg.game() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(game)); + assertEquals(game, thing); + } + @Test public void testProfessionalService() throws IOException { + final ProfessionalService professionalService = SchemaOrg.professionalService() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(professionalService)); + assertEquals(professionalService, thing); + } + @Test public void testVein() throws IOException { + final Vein vein = SchemaOrg.vein() + .associatedPathophysiology("Test String") + .bodyLocation("Test String") + .function("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(vein)); + assertEquals(vein, thing); + } + @Test public void testMedicalTrialDesign() throws IOException { + final MedicalTrialDesign medicalTrialDesign = SchemaOrg.medicalTrialDesign() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalTrialDesign)); + assertEquals(medicalTrialDesign, thing); + } + @Test public void testUpdateAction() throws IOException { + final UpdateAction updateAction = SchemaOrg.updateAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(updateAction)); + assertEquals(updateAction, thing); + } + @Test public void testWarrantyScope() throws IOException { + final WarrantyScope warrantyScope = SchemaOrg.warrantyScope() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(warrantyScope)); + assertEquals(warrantyScope, thing); + } + @Test public void testPlumber() throws IOException { + final Plumber plumber = SchemaOrg.plumber() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(plumber)); + assertEquals(plumber, thing); + } + @Test public void testBakery() throws IOException { + final Bakery bakery = SchemaOrg.bakery() + .acceptsReservations(true) + .menu("Test String") + .servesCuisine("Test String") + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(bakery)); + assertEquals(bakery, thing); + } + @Test public void testPublicationVolume() throws IOException { + final PublicationVolume publicationVolume = SchemaOrg.publicationVolume() + .pageEnd(42) + .pageStart(42) + .pagination("Test String") + .volumeNumber(42) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(publicationVolume)); + assertEquals(publicationVolume, thing); + } + @Test public void testBuyAction() throws IOException { + final BuyAction buyAction = SchemaOrg.buyAction() + .price(42) + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(buyAction)); + assertEquals(buyAction, thing); + } + @Test public void testWebSite() throws IOException { + final WebSite webSite = SchemaOrg.webSite() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(webSite)); + assertEquals(webSite, thing); + } + @Test public void testMensClothingStore() throws IOException { + final MensClothingStore mensClothingStore = SchemaOrg.mensClothingStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(mensClothingStore)); + assertEquals(mensClothingStore, thing); + } + @Test public void testLocksmith() throws IOException { + final Locksmith locksmith = SchemaOrg.locksmith() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(locksmith)); + assertEquals(locksmith, thing); + } + @Test public void testMusicAlbum() throws IOException { + final MusicAlbum musicAlbum = SchemaOrg.musicAlbum() + .numTracks(42) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(musicAlbum)); + assertEquals(musicAlbum, thing); + } + @Test public void testCorporation() throws IOException { + final Corporation corporation = SchemaOrg.corporation() + .tickerSymbol("Test String") + .award("Test String") + .duns("Test String") + .email("Test String") + .faxNumber("Test String") + .dissolutionDate(NOW) + .foundingDate(NOW) + .globalLocationNumber("Test String") + .isicV4("Test String") + .legalName("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(corporation)); + assertEquals(corporation, thing); + } + @Test public void testBodyOfWater() throws IOException { + final BodyOfWater bodyOfWater = SchemaOrg.bodyOfWater() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(bodyOfWater)); + assertEquals(bodyOfWater, thing); + } + @Test public void testRealEstateAgent() throws IOException { + final RealEstateAgent realEstateAgent = SchemaOrg.realEstateAgent() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(realEstateAgent)); + assertEquals(realEstateAgent, thing); + } + @Test public void testDrugLegalStatus() throws IOException { + final DrugLegalStatus drugLegalStatus = SchemaOrg.drugLegalStatus() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(drugLegalStatus)); + assertEquals(drugLegalStatus, thing); + } + @Test public void testMedicalTestPanel() throws IOException { + final MedicalTestPanel medicalTestPanel = SchemaOrg.medicalTestPanel() + .normalRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalTestPanel)); + assertEquals(medicalTestPanel, thing); + } + @Test public void testTennisComplex() throws IOException { + final TennisComplex tennisComplex = SchemaOrg.tennisComplex() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(tennisComplex)); + assertEquals(tennisComplex, thing); + } + @Test public void testMusicVenue() throws IOException { + final MusicVenue musicVenue = SchemaOrg.musicVenue() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(musicVenue)); + assertEquals(musicVenue, thing); + } + @Test public void testWholesaleStore() throws IOException { + final WholesaleStore wholesaleStore = SchemaOrg.wholesaleStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(wholesaleStore)); + assertEquals(wholesaleStore, thing); + } + @Test public void testMedicalClinic() throws IOException { + final MedicalClinic medicalClinic = SchemaOrg.medicalClinic() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalClinic)); + assertEquals(medicalClinic, thing); + } + @Test public void testDrugStrength() throws IOException { + final DrugStrength drugStrength = SchemaOrg.drugStrength() + .activeIngredient("Test String") + .strengthUnit("Test String") + .strengthValue(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(drugStrength)); + assertEquals(drugStrength, thing); + } + @Test public void testShareAction() throws IOException { + final ShareAction shareAction = SchemaOrg.shareAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(shareAction)); + assertEquals(shareAction, thing); + } + @Test public void testSportsActivityLocation() throws IOException { + final SportsActivityLocation sportsActivityLocation = SchemaOrg.sportsActivityLocation() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(sportsActivityLocation)); + assertEquals(sportsActivityLocation, thing); + } + @Test public void testEmailMessage() throws IOException { + final EmailMessage emailMessage = SchemaOrg.emailMessage() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(emailMessage)); + assertEquals(emailMessage, thing); + } + @Test public void testParentAudience() throws IOException { + final ParentAudience parentAudience = SchemaOrg.parentAudience() + .childMaxAge(42) + .childMinAge(42) + .requiredGender("Test String") + .requiredMaxAge(42) + .requiredMinAge(42) + .suggestedGender("Test String") + .suggestedMaxAge(42) + .suggestedMinAge(42) + .audienceType("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(parentAudience)); + assertEquals(parentAudience, thing); + } + @Test public void testRadioEpisode() throws IOException { + final RadioEpisode radioEpisode = SchemaOrg.radioEpisode() + .episodeNumber(42) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(radioEpisode)); + assertEquals(radioEpisode, thing); + } + @Test public void testPublicationEvent() throws IOException { + final PublicationEvent publicationEvent = SchemaOrg.publicationEvent() + .isAccessibleForFree(true) + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(publicationEvent)); + assertEquals(publicationEvent, thing); + } + @Test public void testOrganization() throws IOException { + final Organization organization = SchemaOrg.organization() + .award("Test String") + .duns("Test String") + .email("Test String") + .faxNumber("Test String") + .dissolutionDate(NOW) + .foundingDate(NOW) + .globalLocationNumber("Test String") + .isicV4("Test String") + .legalName("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(organization)); + assertEquals(organization, thing); + } + @Test public void testOrder() throws IOException { + final Order order = SchemaOrg.order() + .confirmationNumber("Test String") + .discount(42) + .discountCode("Test String") + .discountCurrency("Test String") + .isGift(true) + .orderDate(NOW) + .orderNumber("Test String") + .paymentDue(NOW) + .paymentMethodId("Test String") + .paymentUrl("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(order)); + assertEquals(order, thing); + } + @Test public void testViewAction() throws IOException { + final ViewAction viewAction = SchemaOrg.viewAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(viewAction)); + assertEquals(viewAction, thing); + } + @Test public void testClip() throws IOException { + final Clip clip = SchemaOrg.clip() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(clip)); + assertEquals(clip, thing); + } + @Test public void testComment() throws IOException { + final Comment comment = SchemaOrg.comment() + .upvoteCount(42) + .downvoteCount(42) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(comment)); + assertEquals(comment, thing); + } + @Test public void testApplyAction() throws IOException { + final ApplyAction applyAction = SchemaOrg.applyAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(applyAction)); + assertEquals(applyAction, thing); + } + @Test public void testPerformingArtsTheater() throws IOException { + final PerformingArtsTheater performingArtsTheater = SchemaOrg.performingArtsTheater() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(performingArtsTheater)); + assertEquals(performingArtsTheater, thing); + } + @Test public void testDeliveryEvent() throws IOException { + final DeliveryEvent deliveryEvent = SchemaOrg.deliveryEvent() + .accessCode("Test String") + .availableFrom(NOW) + .availableThrough(NOW) + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(deliveryEvent)); + assertEquals(deliveryEvent, thing); + } + @Test public void testSoftwareApplicationBuild() throws IOException { + final SoftwareApplicationBuild softwareApplicationBuild = SchemaOrg.softwareApplicationBuild() + .applicationCategory("Test String") + .applicationSubCategory("Test String") + .applicationSuite("Test String") + .countriesNotSupported("Test String") + .countriesSupported("Test String") + .availableOnDevice("Test String") + .downloadUrl("Test String") + .featureList("Test String") + .fileFormat("Test String") + .fileSize(42) + .installUrl("Test String") + .memoryRequirements("Test String") + .operatingSystem("Test String") + .permissions("Test String") + .processorRequirements("Test String") + .releaseNotes("Test String") + .softwareRequirements("Test String") + .softwareVersion("Test String") + .storageRequirements("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(softwareApplicationBuild)); + assertEquals(softwareApplicationBuild, thing); + } + @Test public void testCampground() throws IOException { + final Campground campground = SchemaOrg.campground() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(campground)); + assertEquals(campground, thing); + } + @Test public void testTelevisionChannel() throws IOException { + final TelevisionChannel televisionChannel = SchemaOrg.televisionChannel() + .broadcastChannelId("Test String") + .broadcastServiceTier("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(televisionChannel)); + assertEquals(televisionChannel, thing); + } + @Test public void testHousePainter() throws IOException { + final HousePainter housePainter = SchemaOrg.housePainter() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(housePainter)); + assertEquals(housePainter, thing); + } + @Test public void testStructuredValue() throws IOException { + final StructuredValue structuredValue = SchemaOrg.structuredValue() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(structuredValue)); + assertEquals(structuredValue, thing); + } + @Test public void testMedicalProcedureType() throws IOException { + final MedicalProcedureType medicalProcedureType = SchemaOrg.medicalProcedureType() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalProcedureType)); + assertEquals(medicalProcedureType, thing); + } + @Test public void testCemetery() throws IOException { + final Cemetery cemetery = SchemaOrg.cemetery() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(cemetery)); + assertEquals(cemetery, thing); + } + @Test public void testSeat() throws IOException { + final Seat seat = SchemaOrg.seat() + .seatNumber("Test String") + .seatRow("Test String") + .seatSection("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(seat)); + assertEquals(seat, thing); + } + @Test public void testMovie() throws IOException { + final Movie movie = SchemaOrg.movie() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(movie)); + assertEquals(movie, thing); + } + @Test public void testHostel() throws IOException { + final Hostel hostel = SchemaOrg.hostel() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(hostel)); + assertEquals(hostel, thing); + } + @Test public void testDrawAction() throws IOException { + final DrawAction drawAction = SchemaOrg.drawAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(drawAction)); + assertEquals(drawAction, thing); + } + @Test public void testTradeAction() throws IOException { + final TradeAction tradeAction = SchemaOrg.tradeAction() + .price(42) + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(tradeAction)); + assertEquals(tradeAction, thing); + } + @Test public void testExerciseAction() throws IOException { + final ExerciseAction exerciseAction = SchemaOrg.exerciseAction() + .exerciseType("Test String") + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(exerciseAction)); + assertEquals(exerciseAction, thing); + } + @Test public void testMedicalWebPage() throws IOException { + final MedicalWebPage medicalWebPage = SchemaOrg.medicalWebPage() + .aspect("Test String") + .lastReviewed(NOW) + .relatedLink("Test String") + .significantLink("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalWebPage)); + assertEquals(medicalWebPage, thing); + } + @Test public void testActivateAction() throws IOException { + final ActivateAction activateAction = SchemaOrg.activateAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(activateAction)); + assertEquals(activateAction, thing); + } + @Test public void testGasStation() throws IOException { + final GasStation gasStation = SchemaOrg.gasStation() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(gasStation)); + assertEquals(gasStation, thing); + } + @Test public void testDeliveryMethod() throws IOException { + final DeliveryMethod deliveryMethod = SchemaOrg.deliveryMethod() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(deliveryMethod)); + assertEquals(deliveryMethod, thing); + } + @Test public void testFlight() throws IOException { + final Flight flight = SchemaOrg.flight() + .flightNumber("Test String") + .departureTime(NOW) + .arrivalTime(NOW) + .departureGate("Test String") + .arrivalGate("Test String") + .departureTerminal("Test String") + .arrivalTerminal("Test String") + .aircraft("Test String") + .mealService("Test String") + .webCheckinTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(flight)); + assertEquals(flight, thing); + } + @Test public void testInstallAction() throws IOException { + final InstallAction installAction = SchemaOrg.installAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(installAction)); + assertEquals(installAction, thing); + } + @Test public void testMedicalRiskScore() throws IOException { + final MedicalRiskScore medicalRiskScore = SchemaOrg.medicalRiskScore() + .algorithm("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalRiskScore)); + assertEquals(medicalRiskScore, thing); + } + @Test public void testUserPlays() throws IOException { + final UserPlays userPlays = SchemaOrg.userPlays() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(userPlays)); + assertEquals(userPlays, thing); + } + @Test public void testArtGallery() throws IOException { + final ArtGallery artGallery = SchemaOrg.artGallery() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(artGallery)); + assertEquals(artGallery, thing); + } + @Test public void testAskAction() throws IOException { + final AskAction askAction = SchemaOrg.askAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(askAction)); + assertEquals(askAction, thing); + } + @Test public void testRegisterAction() throws IOException { + final RegisterAction registerAction = SchemaOrg.registerAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(registerAction)); + assertEquals(registerAction, thing); + } + @Test public void testAssessAction() throws IOException { + final AssessAction assessAction = SchemaOrg.assessAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(assessAction)); + assertEquals(assessAction, thing); + } + @Test public void testApprovedIndication() throws IOException { + final ApprovedIndication approvedIndication = SchemaOrg.approvedIndication() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(approvedIndication)); + assertEquals(approvedIndication, thing); + } + @Test public void testFestival() throws IOException { + final Festival festival = SchemaOrg.festival() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(festival)); + assertEquals(festival, thing); + } + @Test public void testGeneralContractor() throws IOException { + final GeneralContractor generalContractor = SchemaOrg.generalContractor() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(generalContractor)); + assertEquals(generalContractor, thing); + } + @Test public void testNailSalon() throws IOException { + final NailSalon nailSalon = SchemaOrg.nailSalon() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(nailSalon)); + assertEquals(nailSalon, thing); + } + @Test public void testSeries() throws IOException { + final Series series = SchemaOrg.series() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(series)); + assertEquals(series, thing); + } + @Test public void testPark() throws IOException { + final Park park = SchemaOrg.park() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(park)); + assertEquals(park, thing); + } + @Test public void testBorrowAction() throws IOException { + final BorrowAction borrowAction = SchemaOrg.borrowAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(borrowAction)); + assertEquals(borrowAction, thing); + } + @Test public void testBoardingPolicyType() throws IOException { + final BoardingPolicyType boardingPolicyType = SchemaOrg.boardingPolicyType() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(boardingPolicyType)); + assertEquals(boardingPolicyType, thing); + } + @Test public void testDentist() throws IOException { + final Dentist dentist = SchemaOrg.dentist() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(dentist)); + assertEquals(dentist, thing); + } + @Test public void testPhysicalTherapy() throws IOException { + final PhysicalTherapy physicalTherapy = SchemaOrg.physicalTherapy() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(physicalTherapy)); + assertEquals(physicalTherapy, thing); + } + @Test public void testWebPageElement() throws IOException { + final WebPageElement webPageElement = SchemaOrg.webPageElement() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(webPageElement)); + assertEquals(webPageElement, thing); + } + @Test public void testMusicPlaylist() throws IOException { + final MusicPlaylist musicPlaylist = SchemaOrg.musicPlaylist() + .numTracks(42) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(musicPlaylist)); + assertEquals(musicPlaylist, thing); + } + @Test public void testCheckOutAction() throws IOException { + final CheckOutAction checkOutAction = SchemaOrg.checkOutAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(checkOutAction)); + assertEquals(checkOutAction, thing); + } + @Test public void testItemListOrderType() throws IOException { + final ItemListOrderType itemListOrderType = SchemaOrg.itemListOrderType() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(itemListOrderType)); + assertEquals(itemListOrderType, thing); + } + @Test public void testStore() throws IOException { + final Store store = SchemaOrg.store() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(store)); + assertEquals(store, thing); + } + @Test public void testSearchAction() throws IOException { + final SearchAction searchAction = SchemaOrg.searchAction() + .query("Test String") + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(searchAction)); + assertEquals(searchAction, thing); + } + @Test public void testMovieClip() throws IOException { + final MovieClip movieClip = SchemaOrg.movieClip() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(movieClip)); + assertEquals(movieClip, thing); + } + @Test public void testEmbassy() throws IOException { + final Embassy embassy = SchemaOrg.embassy() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(embassy)); + assertEquals(embassy, thing); + } + @Test public void testEducationalOrganization() throws IOException { + final EducationalOrganization educationalOrganization = SchemaOrg.educationalOrganization() + .award("Test String") + .duns("Test String") + .email("Test String") + .faxNumber("Test String") + .dissolutionDate(NOW) + .foundingDate(NOW) + .globalLocationNumber("Test String") + .isicV4("Test String") + .legalName("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(educationalOrganization)); + assertEquals(educationalOrganization, thing); + } + @Test public void testParcelService() throws IOException { + final ParcelService parcelService = SchemaOrg.parcelService() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(parcelService)); + assertEquals(parcelService, thing); + } + @Test public void testMedicalOrganization() throws IOException { + final MedicalOrganization medicalOrganization = SchemaOrg.medicalOrganization() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalOrganization)); + assertEquals(medicalOrganization, thing); + } + @Test public void testCollegeOrUniversity() throws IOException { + final CollegeOrUniversity collegeOrUniversity = SchemaOrg.collegeOrUniversity() + .award("Test String") + .duns("Test String") + .email("Test String") + .faxNumber("Test String") + .dissolutionDate(NOW) + .foundingDate(NOW) + .globalLocationNumber("Test String") + .isicV4("Test String") + .legalName("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(collegeOrUniversity)); + assertEquals(collegeOrUniversity, thing); + } + @Test public void testBefriendAction() throws IOException { + final BefriendAction befriendAction = SchemaOrg.befriendAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(befriendAction)); + assertEquals(befriendAction, thing); + } + @Test public void testDrinkAction() throws IOException { + final DrinkAction drinkAction = SchemaOrg.drinkAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(drinkAction)); + assertEquals(drinkAction, thing); + } + @Test public void testMusicReleaseFormatType() throws IOException { + final MusicReleaseFormatType musicReleaseFormatType = SchemaOrg.musicReleaseFormatType() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(musicReleaseFormatType)); + assertEquals(musicReleaseFormatType, thing); + } + @Test public void testMedicalProcedure() throws IOException { + final MedicalProcedure medicalProcedure = SchemaOrg.medicalProcedure() + .followup("Test String") + .howPerformed("Test String") + .preparation("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalProcedure)); + assertEquals(medicalProcedure, thing); + } + @Test public void testGovernmentPermit() throws IOException { + final GovernmentPermit governmentPermit = SchemaOrg.governmentPermit() + .validFrom(NOW) + .validUntil(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(governmentPermit)); + assertEquals(governmentPermit, thing); + } + @Test public void testBookSeries() throws IOException { + final BookSeries bookSeries = SchemaOrg.bookSeries() + .endDate(NOW) + .startDate(NOW) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(bookSeries)); + assertEquals(bookSeries, thing); + } + @Test public void testSportsClub() throws IOException { + final SportsClub sportsClub = SchemaOrg.sportsClub() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(sportsClub)); + assertEquals(sportsClub, thing); + } + @Test public void testDrugClass() throws IOException { + final DrugClass drugClass = SchemaOrg.drugClass() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(drugClass)); + assertEquals(drugClass, thing); + } + @Test public void testRentalCarReservation() throws IOException { + final RentalCarReservation rentalCarReservation = SchemaOrg.rentalCarReservation() + .pickupTime(NOW) + .dropoffTime(NOW) + .reservationId("Test String") + .bookingTime(NOW) + .modifiedTime(NOW) + .totalPrice(42) + .priceCurrency("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(rentalCarReservation)); + assertEquals(rentalCarReservation, thing); + } + @Test public void testPublicSwimmingPool() throws IOException { + final PublicSwimmingPool publicSwimmingPool = SchemaOrg.publicSwimmingPool() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(publicSwimmingPool)); + assertEquals(publicSwimmingPool, thing); + } + @Test public void testQuantity() throws IOException { + final Quantity quantity = SchemaOrg.quantity() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(quantity)); + assertEquals(quantity, thing); + } + @Test public void testUserLikes() throws IOException { + final UserLikes userLikes = SchemaOrg.userLikes() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(userLikes)); + assertEquals(userLikes, thing); + } + @Test public void testMuscle() throws IOException { + final Muscle muscle = SchemaOrg.muscle() + .muscleAction("Test String") + .associatedPathophysiology("Test String") + .bodyLocation("Test String") + .function("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(muscle)); + assertEquals(muscle, thing); + } + @Test public void testEmploymentAgency() throws IOException { + final EmploymentAgency employmentAgency = SchemaOrg.employmentAgency() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(employmentAgency)); + assertEquals(employmentAgency, thing); + } + @Test public void testWinAction() throws IOException { + final WinAction winAction = SchemaOrg.winAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(winAction)); + assertEquals(winAction, thing); + } + @Test public void testBookStore() throws IOException { + final BookStore bookStore = SchemaOrg.bookStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(bookStore)); + assertEquals(bookStore, thing); + } + @Test public void testSeason() throws IOException { + final Season season = SchemaOrg.season() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(season)); + assertEquals(season, thing); + } + @Test public void testReservation() throws IOException { + final Reservation reservation = SchemaOrg.reservation() + .reservationId("Test String") + .bookingTime(NOW) + .modifiedTime(NOW) + .totalPrice(42) + .priceCurrency("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(reservation)); + assertEquals(reservation, thing); + } + @Test public void testActionStatusType() throws IOException { + final ActionStatusType actionStatusType = SchemaOrg.actionStatusType() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(actionStatusType)); + assertEquals(actionStatusType, thing); + } + @Test public void testOpeningHoursSpecification() throws IOException { + final OpeningHoursSpecification openingHoursSpecification = SchemaOrg.openingHoursSpecification() + .closes(NOW) + .opens(NOW) + .validFrom(NOW) + .validThrough(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(openingHoursSpecification)); + assertEquals(openingHoursSpecification, thing); + } + @Test public void testMedicalIndication() throws IOException { + final MedicalIndication medicalIndication = SchemaOrg.medicalIndication() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalIndication)); + assertEquals(medicalIndication, thing); + } + @Test public void testAggregateOffer() throws IOException { + final AggregateOffer aggregateOffer = SchemaOrg.aggregateOffer() + .highPrice(42) + .lowPrice(42) + .offerCount(42) + .availabilityEnds(NOW) + .availabilityStarts(NOW) + .gtin12("Test String") + .gtin13("Test String") + .gtin14("Test String") + .gtin8("Test String") + .mpn("Test String") + .price(42) + .priceValidUntil(NOW) + .sku("Test String") + .validFrom(NOW) + .validThrough(NOW) + .priceCurrency("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(aggregateOffer)); + assertEquals(aggregateOffer, thing); + } + @Test public void testDepartmentStore() throws IOException { + final DepartmentStore departmentStore = SchemaOrg.departmentStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(departmentStore)); + assertEquals(departmentStore, thing); + } + @Test public void testTipAction() throws IOException { + final TipAction tipAction = SchemaOrg.tipAction() + .price(42) + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(tipAction)); + assertEquals(tipAction, thing); + } + @Test public void testMedicineSystem() throws IOException { + final MedicineSystem medicineSystem = SchemaOrg.medicineSystem() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicineSystem)); + assertEquals(medicineSystem, thing); + } + @Test public void testBook() throws IOException { + final Book book = SchemaOrg.book() + .bookEdition("Test String") + .isbn("Test String") + .numberOfPages(42) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(book)); + assertEquals(book, thing); + } + @Test public void testBrewery() throws IOException { + final Brewery brewery = SchemaOrg.brewery() + .acceptsReservations(true) + .menu("Test String") + .servesCuisine("Test String") + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(brewery)); + assertEquals(brewery, thing); + } + @Test public void testMedicalEvidenceLevel() throws IOException { + final MedicalEvidenceLevel medicalEvidenceLevel = SchemaOrg.medicalEvidenceLevel() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalEvidenceLevel)); + assertEquals(medicalEvidenceLevel, thing); + } + @Test public void testMedicalSignOrSymptom() throws IOException { + final MedicalSignOrSymptom medicalSignOrSymptom = SchemaOrg.medicalSignOrSymptom() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalSignOrSymptom)); + assertEquals(medicalSignOrSymptom, thing); + } + @Test public void testRecommendedDoseSchedule() throws IOException { + final RecommendedDoseSchedule recommendedDoseSchedule = SchemaOrg.recommendedDoseSchedule() + .doseUnit("Test String") + .doseValue(42) + .frequency("Test String") + .targetPopulation("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(recommendedDoseSchedule)); + assertEquals(recommendedDoseSchedule, thing); + } + @Test public void testScholarlyArticle() throws IOException { + final ScholarlyArticle scholarlyArticle = SchemaOrg.scholarlyArticle() + .articleBody("Test String") + .articleSection("Test String") + .wordCount(42) + .pageEnd(42) + .pageStart(42) + .pagination("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(scholarlyArticle)); + assertEquals(scholarlyArticle, thing); + } + @Test public void testBusinessEvent() throws IOException { + final BusinessEvent businessEvent = SchemaOrg.businessEvent() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(businessEvent)); + assertEquals(businessEvent, thing); + } + @Test public void testBone() throws IOException { + final Bone bone = SchemaOrg.bone() + .associatedPathophysiology("Test String") + .bodyLocation("Test String") + .function("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(bone)); + assertEquals(bone, thing); + } + @Test public void testInternetCafe() throws IOException { + final InternetCafe internetCafe = SchemaOrg.internetCafe() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(internetCafe)); + assertEquals(internetCafe, thing); + } + @Test public void testReserveAction() throws IOException { + final ReserveAction reserveAction = SchemaOrg.reserveAction() + .scheduledTime(NOW) + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(reserveAction)); + assertEquals(reserveAction, thing); + } + @Test public void testBusStop() throws IOException { + final BusStop busStop = SchemaOrg.busStop() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(busStop)); + assertEquals(busStop, thing); + } + @Test public void testSomeProducts() throws IOException { + final SomeProducts someProducts = SchemaOrg.someProducts() + .award("Test String") + .color("Test String") + .gtin12("Test String") + .gtin13("Test String") + .gtin14("Test String") + .gtin8("Test String") + .mpn("Test String") + .productID("Test String") + .releaseDate(NOW) + .sku("Test String") + .productionDate(NOW) + .purchaseDate(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(someProducts)); + assertEquals(someProducts, thing); + } + @Test public void testEntertainmentBusiness() throws IOException { + final EntertainmentBusiness entertainmentBusiness = SchemaOrg.entertainmentBusiness() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(entertainmentBusiness)); + assertEquals(entertainmentBusiness, thing); + } + @Test public void testItemPage() throws IOException { + final ItemPage itemPage = SchemaOrg.itemPage() + .lastReviewed(NOW) + .relatedLink("Test String") + .significantLink("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(itemPage)); + assertEquals(itemPage, thing); + } + @Test public void testAPIReference() throws IOException { + final APIReference aPIReference = SchemaOrg.aPIReference() + .executableLibraryName("Test String") + .assemblyVersion("Test String") + .programmingModel("Test String") + .targetPlatform("Test String") + .dependencies("Test String") + .proficiencyLevel("Test String") + .articleBody("Test String") + .articleSection("Test String") + .wordCount(42) + .pageEnd(42) + .pageStart(42) + .pagination("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(aPIReference)); + assertEquals(aPIReference, thing); + } + @Test public void testPerformingGroup() throws IOException { + final PerformingGroup performingGroup = SchemaOrg.performingGroup() + .award("Test String") + .duns("Test String") + .email("Test String") + .faxNumber("Test String") + .dissolutionDate(NOW) + .foundingDate(NOW) + .globalLocationNumber("Test String") + .isicV4("Test String") + .legalName("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(performingGroup)); + assertEquals(performingGroup, thing); + } + @Test public void testDiet() throws IOException { + final Diet diet = SchemaOrg.diet() + .dietFeatures("Test String") + .expertConsiderations("Test String") + .overview("Test String") + .physiologicalBenefits("Test String") + .proprietaryName("Test String") + .risks("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(diet)); + assertEquals(diet, thing); + } + @Test public void testUserPlusOnes() throws IOException { + final UserPlusOnes userPlusOnes = SchemaOrg.userPlusOnes() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(userPlusOnes)); + assertEquals(userPlusOnes, thing); + } + @Test public void testMedicalContraindication() throws IOException { + final MedicalContraindication medicalContraindication = SchemaOrg.medicalContraindication() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalContraindication)); + assertEquals(medicalContraindication, thing); + } + @Test public void testSynagogue() throws IOException { + final Synagogue synagogue = SchemaOrg.synagogue() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(synagogue)); + assertEquals(synagogue, thing); + } + @Test public void testLandform() throws IOException { + final Landform landform = SchemaOrg.landform() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(landform)); + assertEquals(landform, thing); + } + @Test public void testRestaurant() throws IOException { + final Restaurant restaurant = SchemaOrg.restaurant() + .acceptsReservations(true) + .menu("Test String") + .servesCuisine("Test String") + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(restaurant)); + assertEquals(restaurant, thing); + } + @Test public void testHighSchool() throws IOException { + final HighSchool highSchool = SchemaOrg.highSchool() + .award("Test String") + .duns("Test String") + .email("Test String") + .faxNumber("Test String") + .dissolutionDate(NOW) + .foundingDate(NOW) + .globalLocationNumber("Test String") + .isicV4("Test String") + .legalName("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(highSchool)); + assertEquals(highSchool, thing); + } + @Test public void testPerformanceRole() throws IOException { + final PerformanceRole performanceRole = SchemaOrg.performanceRole() + .characterName("Test String") + .startDate(NOW) + .roleName("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(performanceRole)); + assertEquals(performanceRole, thing); + } + @Test public void testChildCare() throws IOException { + final ChildCare childCare = SchemaOrg.childCare() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(childCare)); + assertEquals(childCare, thing); + } + @Test public void testSoftwareSourceCode() throws IOException { + final SoftwareSourceCode softwareSourceCode = SchemaOrg.softwareSourceCode() + .codeRepository("Test String") + .runtimePlatform("Test String") + .codeSampleType("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(softwareSourceCode)); + assertEquals(softwareSourceCode, thing); + } + @Test public void testLakeBodyOfWater() throws IOException { + final LakeBodyOfWater lakeBodyOfWater = SchemaOrg.lakeBodyOfWater() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(lakeBodyOfWater)); + assertEquals(lakeBodyOfWater, thing); + } + @Test public void testDiagnosticProcedure() throws IOException { + final DiagnosticProcedure diagnosticProcedure = SchemaOrg.diagnosticProcedure() + .normalRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(diagnosticProcedure)); + assertEquals(diagnosticProcedure, thing); + } + @Test public void testContactPointOption() throws IOException { + final ContactPointOption contactPointOption = SchemaOrg.contactPointOption() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(contactPointOption)); + assertEquals(contactPointOption, thing); + } + @Test public void testPhysicalExam() throws IOException { + final PhysicalExam physicalExam = SchemaOrg.physicalExam() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(physicalExam)); + assertEquals(physicalExam, thing); + } + @Test public void testVeterinaryCare() throws IOException { + final VeterinaryCare veterinaryCare = SchemaOrg.veterinaryCare() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(veterinaryCare)); + assertEquals(veterinaryCare, thing); + } + @Test public void testRadioStation() throws IOException { + final RadioStation radioStation = SchemaOrg.radioStation() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(radioStation)); + assertEquals(radioStation, thing); + } + @Test public void testDistance() throws IOException { + final Distance distance = SchemaOrg.distance() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(distance)); + assertEquals(distance, thing); + } + @Test public void testReservationPackage() throws IOException { + final ReservationPackage reservationPackage = SchemaOrg.reservationPackage() + .reservationId("Test String") + .bookingTime(NOW) + .modifiedTime(NOW) + .totalPrice(42) + .priceCurrency("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(reservationPackage)); + assertEquals(reservationPackage, thing); + } + @Test public void testNightClub() throws IOException { + final NightClub nightClub = SchemaOrg.nightClub() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(nightClub)); + assertEquals(nightClub, thing); + } + @Test public void testVolcano() throws IOException { + final Volcano volcano = SchemaOrg.volcano() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(volcano)); + assertEquals(volcano, thing); + } + @Test public void testAgreeAction() throws IOException { + final AgreeAction agreeAction = SchemaOrg.agreeAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(agreeAction)); + assertEquals(agreeAction, thing); + } + @Test public void testOrderItem() throws IOException { + final OrderItem orderItem = SchemaOrg.orderItem() + .orderQuantity(42) + .orderItemNumber("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(orderItem)); + assertEquals(orderItem, thing); + } + @Test public void testCreativeWorkSeason() throws IOException { + final CreativeWorkSeason creativeWorkSeason = SchemaOrg.creativeWorkSeason() + .endDate(NOW) + .numberOfEpisodes(42) + .seasonNumber(42) + .startDate(NOW) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(creativeWorkSeason)); + assertEquals(creativeWorkSeason, thing); + } + @Test public void testContactPage() throws IOException { + final ContactPage contactPage = SchemaOrg.contactPage() + .lastReviewed(NOW) + .relatedLink("Test String") + .significantLink("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(contactPage)); + assertEquals(contactPage, thing); + } + @Test public void testDataDownload() throws IOException { + final DataDownload dataDownload = SchemaOrg.dataDownload() + .bitrate("Test String") + .contentSize("Test String") + .contentUrl("Test String") + .embedUrl("Test String") + .encodingFormat("Test String") + .expires(NOW) + .playerType("Test String") + .requiresSubscription(true) + .uploadDate(NOW) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(dataDownload)); + assertEquals(dataDownload, thing); + } + @Test public void testBusinessAudience() throws IOException { + final BusinessAudience businessAudience = SchemaOrg.businessAudience() + .audienceType("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(businessAudience)); + assertEquals(businessAudience, thing); + } + @Test public void testCheckAction() throws IOException { + final CheckAction checkAction = SchemaOrg.checkAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(checkAction)); + assertEquals(checkAction, thing); + } + @Test public void testBuddhistTemple() throws IOException { + final BuddhistTemple buddhistTemple = SchemaOrg.buddhistTemple() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(buddhistTemple)); + assertEquals(buddhistTemple, thing); + } + @Test public void testMedicalStudy() throws IOException { + final MedicalStudy medicalStudy = SchemaOrg.medicalStudy() + .outcome("Test String") + .population("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalStudy)); + assertEquals(medicalStudy, thing); + } + @Test public void testElectronicsStore() throws IOException { + final ElectronicsStore electronicsStore = SchemaOrg.electronicsStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(electronicsStore)); + assertEquals(electronicsStore, thing); + } + @Test public void testOffer() throws IOException { + final Offer offer = SchemaOrg.offer() + .availabilityEnds(NOW) + .availabilityStarts(NOW) + .gtin12("Test String") + .gtin13("Test String") + .gtin14("Test String") + .gtin8("Test String") + .mpn("Test String") + .price(42) + .priceValidUntil(NOW) + .sku("Test String") + .validFrom(NOW) + .validThrough(NOW) + .priceCurrency("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(offer)); + assertEquals(offer, thing); + } + @Test public void testMedicalSpecialty() throws IOException { + final MedicalSpecialty medicalSpecialty = SchemaOrg.medicalSpecialty() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalSpecialty)); + assertEquals(medicalSpecialty, thing); + } + @Test public void testScheduleAction() throws IOException { + final ScheduleAction scheduleAction = SchemaOrg.scheduleAction() + .scheduledTime(NOW) + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(scheduleAction)); + assertEquals(scheduleAction, thing); + } + @Test public void testPaintAction() throws IOException { + final PaintAction paintAction = SchemaOrg.paintAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(paintAction)); + assertEquals(paintAction, thing); + } + @Test public void testVehicle() throws IOException { + final Vehicle vehicle = SchemaOrg.vehicle() + .numberOfAirbags(42) + .vin("Test String") + .vehicleConfiguration("Test String") + .knownVehicleDamages("Test String") + .dateVehicleFirstRegistered(NOW) + .vehicleInteriorColor("Test String") + .vehicleInteriorType("Test String") + .vehicleModelDate(NOW) + .productionDate(NOW) + .purchaseDate(NOW) + .award("Test String") + .color("Test String") + .gtin12("Test String") + .gtin13("Test String") + .gtin14("Test String") + .gtin8("Test String") + .mpn("Test String") + .productID("Test String") + .releaseDate(NOW) + .sku("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(vehicle)); + assertEquals(vehicle, thing); + } + @Test public void testSportsTeam() throws IOException { + final SportsTeam sportsTeam = SchemaOrg.sportsTeam() + .sport("Test String") + .award("Test String") + .duns("Test String") + .email("Test String") + .faxNumber("Test String") + .dissolutionDate(NOW) + .foundingDate(NOW) + .globalLocationNumber("Test String") + .isicV4("Test String") + .legalName("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(sportsTeam)); + assertEquals(sportsTeam, thing); + } + @Test public void testDrugPrescriptionStatus() throws IOException { + final DrugPrescriptionStatus drugPrescriptionStatus = SchemaOrg.drugPrescriptionStatus() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(drugPrescriptionStatus)); + assertEquals(drugPrescriptionStatus, thing); + } + @Test public void testWriteAction() throws IOException { + final WriteAction writeAction = SchemaOrg.writeAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(writeAction)); + assertEquals(writeAction, thing); + } + @Test public void testCivicStructure() throws IOException { + final CivicStructure civicStructure = SchemaOrg.civicStructure() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(civicStructure)); + assertEquals(civicStructure, thing); + } + @Test public void testUserInteraction() throws IOException { + final UserInteraction userInteraction = SchemaOrg.userInteraction() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(userInteraction)); + assertEquals(userInteraction, thing); + } + @Test public void testShoeStore() throws IOException { + final ShoeStore shoeStore = SchemaOrg.shoeStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(shoeStore)); + assertEquals(shoeStore, thing); + } + @Test public void testUseAction() throws IOException { + final UseAction useAction = SchemaOrg.useAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(useAction)); + assertEquals(useAction, thing); + } + @Test public void testAutoRepair() throws IOException { + final AutoRepair autoRepair = SchemaOrg.autoRepair() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(autoRepair)); + assertEquals(autoRepair, thing); + } + @Test public void testAnswer() throws IOException { + final Answer answer = SchemaOrg.answer() + .upvoteCount(42) + .downvoteCount(42) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(answer)); + assertEquals(answer, thing); + } + @Test public void testDaySpa() throws IOException { + final DaySpa daySpa = SchemaOrg.daySpa() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(daySpa)); + assertEquals(daySpa, thing); + } + @Test public void testDrug() throws IOException { + final Drug drug = SchemaOrg.drug() + .activeIngredient("Test String") + .administrationRoute("Test String") + .alcoholWarning("Test String") + .breastfeedingWarning("Test String") + .clinicalPharmacology("Test String") + .dosageForm("Test String") + .foodWarning("Test String") + .isAvailableGenerically(true) + .isProprietary(true) + .labelDetails("Test String") + .mechanismOfAction("Test String") + .nonProprietaryName("Test String") + .overdosage("Test String") + .pregnancyWarning("Test String") + .prescribingInfo("Test String") + .warning("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(drug)); + assertEquals(drug, thing); + } + @Test public void testReplaceAction() throws IOException { + final ReplaceAction replaceAction = SchemaOrg.replaceAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(replaceAction)); + assertEquals(replaceAction, thing); + } + @Test public void testWinery() throws IOException { + final Winery winery = SchemaOrg.winery() + .acceptsReservations(true) + .menu("Test String") + .servesCuisine("Test String") + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(winery)); + assertEquals(winery, thing); + } + @Test public void testPsychologicalTreatment() throws IOException { + final PsychologicalTreatment psychologicalTreatment = SchemaOrg.psychologicalTreatment() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(psychologicalTreatment)); + assertEquals(psychologicalTreatment, thing); + } + @Test public void testToyStore() throws IOException { + final ToyStore toyStore = SchemaOrg.toyStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(toyStore)); + assertEquals(toyStore, thing); + } + @Test public void testPawnShop() throws IOException { + final PawnShop pawnShop = SchemaOrg.pawnShop() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(pawnShop)); + assertEquals(pawnShop, thing); + } + @Test public void testTrainStation() throws IOException { + final TrainStation trainStation = SchemaOrg.trainStation() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(trainStation)); + assertEquals(trainStation, thing); + } + @Test public void testEngineSpecification() throws IOException { + final EngineSpecification engineSpecification = SchemaOrg.engineSpecification() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(engineSpecification)); + assertEquals(engineSpecification, thing); + } + @Test public void testWPHeader() throws IOException { + final WPHeader wPHeader = SchemaOrg.wPHeader() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(wPHeader)); + assertEquals(wPHeader, thing); + } + @Test public void testFinancialService() throws IOException { + final FinancialService financialService = SchemaOrg.financialService() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(financialService)); + assertEquals(financialService, thing); + } + @Test public void testMotorcycleRepair() throws IOException { + final MotorcycleRepair motorcycleRepair = SchemaOrg.motorcycleRepair() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(motorcycleRepair)); + assertEquals(motorcycleRepair, thing); + } + @Test public void testVideoObject() throws IOException { + final VideoObject videoObject = SchemaOrg.videoObject() + .caption("Test String") + .transcript("Test String") + .videoFrameSize("Test String") + .videoQuality("Test String") + .bitrate("Test String") + .contentSize("Test String") + .contentUrl("Test String") + .embedUrl("Test String") + .encodingFormat("Test String") + .expires(NOW) + .playerType("Test String") + .requiresSubscription(true) + .uploadDate(NOW) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(videoObject)); + assertEquals(videoObject, thing); + } + @Test public void testGovernmentOffice() throws IOException { + final GovernmentOffice governmentOffice = SchemaOrg.governmentOffice() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(governmentOffice)); + assertEquals(governmentOffice, thing); + } + @Test public void testDefenceEstablishment() throws IOException { + final DefenceEstablishment defenceEstablishment = SchemaOrg.defenceEstablishment() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(defenceEstablishment)); + assertEquals(defenceEstablishment, thing); + } + @Test public void testMoveAction() throws IOException { + final MoveAction moveAction = SchemaOrg.moveAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(moveAction)); + assertEquals(moveAction, thing); + } + @Test public void testDrugCostCategory() throws IOException { + final DrugCostCategory drugCostCategory = SchemaOrg.drugCostCategory() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(drugCostCategory)); + assertEquals(drugCostCategory, thing); + } + @Test public void testPayAction() throws IOException { + final PayAction payAction = SchemaOrg.payAction() + .price(42) + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(payAction)); + assertEquals(payAction, thing); + } + @Test public void testJewelryStore() throws IOException { + final JewelryStore jewelryStore = SchemaOrg.jewelryStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(jewelryStore)); + assertEquals(jewelryStore, thing); + } + @Test public void testTechArticle() throws IOException { + final TechArticle techArticle = SchemaOrg.techArticle() + .dependencies("Test String") + .proficiencyLevel("Test String") + .articleBody("Test String") + .articleSection("Test String") + .wordCount(42) + .pageEnd(42) + .pageStart(42) + .pagination("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(techArticle)); + assertEquals(techArticle, thing); + } + @Test public void testReactAction() throws IOException { + final ReactAction reactAction = SchemaOrg.reactAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(reactAction)); + assertEquals(reactAction, thing); + } + @Test public void testDownloadAction() throws IOException { + final DownloadAction downloadAction = SchemaOrg.downloadAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(downloadAction)); + assertEquals(downloadAction, thing); + } + @Test public void testInfectiousDisease() throws IOException { + final InfectiousDisease infectiousDisease = SchemaOrg.infectiousDisease() + .infectiousAgent("Test String") + .transmissionMethod("Test String") + .epidemiology("Test String") + .expectedPrognosis("Test String") + .naturalProgression("Test String") + .pathophysiology("Test String") + .possibleComplication("Test String") + .subtype("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(infectiousDisease)); + assertEquals(infectiousDisease, thing); + } + @Test public void testCreativeWork() throws IOException { + final CreativeWork creativeWork = SchemaOrg.creativeWork() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(creativeWork)); + assertEquals(creativeWork, thing); + } + @Test public void testInfectiousAgentClass() throws IOException { + final InfectiousAgentClass infectiousAgentClass = SchemaOrg.infectiousAgentClass() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(infectiousAgentClass)); + assertEquals(infectiousAgentClass, thing); + } + @Test public void testBroadcastEvent() throws IOException { + final BroadcastEvent broadcastEvent = SchemaOrg.broadcastEvent() + .isLiveBroadcast(true) + .isAccessibleForFree(true) + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(broadcastEvent)); + assertEquals(broadcastEvent, thing); + } + @Test public void testReviewAction() throws IOException { + final ReviewAction reviewAction = SchemaOrg.reviewAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(reviewAction)); + assertEquals(reviewAction, thing); + } + @Test public void testLeaveAction() throws IOException { + final LeaveAction leaveAction = SchemaOrg.leaveAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(leaveAction)); + assertEquals(leaveAction, thing); + } + @Test public void testLockerDelivery() throws IOException { + final LockerDelivery lockerDelivery = SchemaOrg.lockerDelivery() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(lockerDelivery)); + assertEquals(lockerDelivery, thing); + } + @Test public void testMediaObject() throws IOException { + final MediaObject mediaObject = SchemaOrg.mediaObject() + .bitrate("Test String") + .contentSize("Test String") + .contentUrl("Test String") + .embedUrl("Test String") + .encodingFormat("Test String") + .expires(NOW) + .playerType("Test String") + .requiresSubscription(true) + .uploadDate(NOW) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(mediaObject)); + assertEquals(mediaObject, thing); + } + @Test public void testAudience() throws IOException { + final Audience audience = SchemaOrg.audience() + .audienceType("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(audience)); + assertEquals(audience, thing); + } + @Test public void testSearchResultsPage() throws IOException { + final SearchResultsPage searchResultsPage = SchemaOrg.searchResultsPage() + .lastReviewed(NOW) + .relatedLink("Test String") + .significantLink("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(searchResultsPage)); + assertEquals(searchResultsPage, thing); + } + @Test public void testMovieTheater() throws IOException { + final MovieTheater movieTheater = SchemaOrg.movieTheater() + .screenCount(42) + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(movieTheater)); + assertEquals(movieTheater, thing); + } + @Test public void testPlace() throws IOException { + final Place place = SchemaOrg.place() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(place)); + assertEquals(place, thing); + } + @Test public void testTaxiReservation() throws IOException { + final TaxiReservation taxiReservation = SchemaOrg.taxiReservation() + .partySize(42) + .pickupTime(NOW) + .reservationId("Test String") + .bookingTime(NOW) + .modifiedTime(NOW) + .totalPrice(42) + .priceCurrency("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(taxiReservation)); + assertEquals(taxiReservation, thing); + } + @Test public void testAssignAction() throws IOException { + final AssignAction assignAction = SchemaOrg.assignAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(assignAction)); + assertEquals(assignAction, thing); + } + @Test public void testTouristInformationCenter() throws IOException { + final TouristInformationCenter touristInformationCenter = SchemaOrg.touristInformationCenter() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(touristInformationCenter)); + assertEquals(touristInformationCenter, thing); + } + @Test public void testFoodEstablishment() throws IOException { + final FoodEstablishment foodEstablishment = SchemaOrg.foodEstablishment() + .acceptsReservations(true) + .menu("Test String") + .servesCuisine("Test String") + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(foodEstablishment)); + assertEquals(foodEstablishment, thing); + } + @Test public void testTrackAction() throws IOException { + final TrackAction trackAction = SchemaOrg.trackAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(trackAction)); + assertEquals(trackAction, thing); + } + @Test public void testNutritionInformation() throws IOException { + final NutritionInformation nutritionInformation = SchemaOrg.nutritionInformation() + .servingSize("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(nutritionInformation)); + assertEquals(nutritionInformation, thing); + } + @Test public void testMotel() throws IOException { + final Motel motel = SchemaOrg.motel() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(motel)); + assertEquals(motel, thing); + } + @Test public void testTicket() throws IOException { + final Ticket ticket = SchemaOrg.ticket() + .totalPrice(42) + .priceCurrency("Test String") + .dateIssued(NOW) + .ticketNumber("Test String") + .ticketToken("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(ticket)); + assertEquals(ticket, thing); + } + @Test public void testTVClip() throws IOException { + final TVClip tVClip = SchemaOrg.tVClip() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(tVClip)); + assertEquals(tVClip, thing); + } + @Test public void testReadAction() throws IOException { + final ReadAction readAction = SchemaOrg.readAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(readAction)); + assertEquals(readAction, thing); + } + @Test public void testDiagnosticLab() throws IOException { + final DiagnosticLab diagnosticLab = SchemaOrg.diagnosticLab() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(diagnosticLab)); + assertEquals(diagnosticLab, thing); + } + @Test public void testListenAction() throws IOException { + final ListenAction listenAction = SchemaOrg.listenAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(listenAction)); + assertEquals(listenAction, thing); + } + @Test public void testPreschool() throws IOException { + final Preschool preschool = SchemaOrg.preschool() + .award("Test String") + .duns("Test String") + .email("Test String") + .faxNumber("Test String") + .dissolutionDate(NOW) + .foundingDate(NOW) + .globalLocationNumber("Test String") + .isicV4("Test String") + .legalName("Test String") + .naics("Test String") + .taxID("Test String") + .telephone("Test String") + .vatID("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(preschool)); + assertEquals(preschool, thing); + } + @Test public void testLocalBusiness() throws IOException { + final LocalBusiness localBusiness = SchemaOrg.localBusiness() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(localBusiness)); + assertEquals(localBusiness, thing); + } + @Test public void testRadiationTherapy() throws IOException { + final RadiationTherapy radiationTherapy = SchemaOrg.radiationTherapy() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(radiationTherapy)); + assertEquals(radiationTherapy, thing); + } + @Test public void testVideoGameSeries() throws IOException { + final VideoGameSeries videoGameSeries = SchemaOrg.videoGameSeries() + .numberOfEpisodes(42) + .numberOfSeasons(42) + .gamePlatform("Test String") + .endDate(NOW) + .startDate(NOW) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(videoGameSeries)); + assertEquals(videoGameSeries, thing); + } + @Test public void testMedicalRiskEstimator() throws IOException { + final MedicalRiskEstimator medicalRiskEstimator = SchemaOrg.medicalRiskEstimator() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalRiskEstimator)); + assertEquals(medicalRiskEstimator, thing); + } + @Test public void testGovernmentService() throws IOException { + final GovernmentService governmentService = SchemaOrg.governmentService() + .serviceType("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(governmentService)); + assertEquals(governmentService, thing); + } + @Test public void testOrganizationRole() throws IOException { + final OrganizationRole organizationRole = SchemaOrg.organizationRole() + .numberedPosition(42) + .startDate(NOW) + .roleName("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(organizationRole)); + assertEquals(organizationRole, thing); + } + @Test public void testProduct() throws IOException { + final Product product = SchemaOrg.product() + .award("Test String") + .color("Test String") + .gtin12("Test String") + .gtin13("Test String") + .gtin14("Test String") + .gtin8("Test String") + .mpn("Test String") + .productID("Test String") + .releaseDate(NOW) + .sku("Test String") + .productionDate(NOW) + .purchaseDate(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(product)); + assertEquals(product, thing); + } + @Test public void testFlorist() throws IOException { + final Florist florist = SchemaOrg.florist() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(florist)); + assertEquals(florist, thing); + } + @Test public void testProductModel() throws IOException { + final ProductModel productModel = SchemaOrg.productModel() + .award("Test String") + .color("Test String") + .gtin12("Test String") + .gtin13("Test String") + .gtin14("Test String") + .gtin8("Test String") + .mpn("Test String") + .productID("Test String") + .releaseDate(NOW) + .sku("Test String") + .productionDate(NOW) + .purchaseDate(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(productModel)); + assertEquals(productModel, thing); + } + @Test public void testHealthClub() throws IOException { + final HealthClub healthClub = SchemaOrg.healthClub() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(healthClub)); + assertEquals(healthClub, thing); + } + @Test public void testBroadcastService() throws IOException { + final BroadcastService broadcastService = SchemaOrg.broadcastService() + .broadcastDisplayName("Test String") + .timezone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(broadcastService)); + assertEquals(broadcastService, thing); + } + @Test public void testMedicalTherapy() throws IOException { + final MedicalTherapy medicalTherapy = SchemaOrg.medicalTherapy() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalTherapy)); + assertEquals(medicalTherapy, thing); + } + @Test public void testDatedMoneySpecification() throws IOException { + final DatedMoneySpecification datedMoneySpecification = SchemaOrg.datedMoneySpecification() + .amount(42) + .currency("Test String") + .startDate(NOW) + .endDate(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(datedMoneySpecification)); + assertEquals(datedMoneySpecification, thing); + } + @Test public void testDeactivateAction() throws IOException { + final DeactivateAction deactivateAction = SchemaOrg.deactivateAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(deactivateAction)); + assertEquals(deactivateAction, thing); + } + @Test public void testMarryAction() throws IOException { + final MarryAction marryAction = SchemaOrg.marryAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(marryAction)); + assertEquals(marryAction, thing); + } + @Test public void testDrugCost() throws IOException { + final DrugCost drugCost = SchemaOrg.drugCost() + .costCurrency("Test String") + .costOrigin("Test String") + .costPerUnit(42) + .drugUnit("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(drugCost)); + assertEquals(drugCost, thing); + } + @Test public void testLigament() throws IOException { + final Ligament ligament = SchemaOrg.ligament() + .associatedPathophysiology("Test String") + .bodyLocation("Test String") + .function("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(ligament)); + assertEquals(ligament, thing); + } + @Test public void testLodgingBusiness() throws IOException { + final LodgingBusiness lodgingBusiness = SchemaOrg.lodgingBusiness() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(lodgingBusiness)); + assertEquals(lodgingBusiness, thing); + } + @Test public void testMusicAlbumProductionType() throws IOException { + final MusicAlbumProductionType musicAlbumProductionType = SchemaOrg.musicAlbumProductionType() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(musicAlbumProductionType)); + assertEquals(musicAlbumProductionType, thing); + } + @Test public void testDiscoverAction() throws IOException { + final DiscoverAction discoverAction = SchemaOrg.discoverAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(discoverAction)); + assertEquals(discoverAction, thing); + } + @Test public void testSportsEvent() throws IOException { + final SportsEvent sportsEvent = SchemaOrg.sportsEvent() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(sportsEvent)); + assertEquals(sportsEvent, thing); + } + @Test public void testCourthouse() throws IOException { + final Courthouse courthouse = SchemaOrg.courthouse() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(courthouse)); + assertEquals(courthouse, thing); + } + @Test public void testRecipe() throws IOException { + final Recipe recipe = SchemaOrg.recipe() + .cookingMethod("Test String") + .recipeIngredient("Test String") + .recipeCategory("Test String") + .recipeCuisine("Test String") + .recipeYield("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(recipe)); + assertEquals(recipe, thing); + } + @Test public void testServiceChannel() throws IOException { + final ServiceChannel serviceChannel = SchemaOrg.serviceChannel() + .serviceUrl("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(serviceChannel)); + assertEquals(serviceChannel, thing); + } + @Test public void testLegislativeBuilding() throws IOException { + final LegislativeBuilding legislativeBuilding = SchemaOrg.legislativeBuilding() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(legislativeBuilding)); + assertEquals(legislativeBuilding, thing); + } + @Test public void testSuperficialAnatomy() throws IOException { + final SuperficialAnatomy superficialAnatomy = SchemaOrg.superficialAnatomy() + .associatedPathophysiology("Test String") + .significance("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(superficialAnatomy)); + assertEquals(superficialAnatomy, thing); + } + @Test public void testGamePlayMode() throws IOException { + final GamePlayMode gamePlayMode = SchemaOrg.gamePlayMode() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(gamePlayMode)); + assertEquals(gamePlayMode, thing); + } + @Test public void testRating() throws IOException { + final Rating rating = SchemaOrg.rating() + .bestRating(42) + .ratingValue("Test String") + .worstRating(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(rating)); + assertEquals(rating, thing); + } + @Test public void testMovingCompany() throws IOException { + final MovingCompany movingCompany = SchemaOrg.movingCompany() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(movingCompany)); + assertEquals(movingCompany, thing); + } + @Test public void testMedicalGuideline() throws IOException { + final MedicalGuideline medicalGuideline = SchemaOrg.medicalGuideline() + .evidenceOrigin("Test String") + .guidelineDate(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalGuideline)); + assertEquals(medicalGuideline, thing); + } + @Test public void testMedicalSymptom() throws IOException { + final MedicalSymptom medicalSymptom = SchemaOrg.medicalSymptom() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalSymptom)); + assertEquals(medicalSymptom, thing); + } + @Test public void testPetStore() throws IOException { + final PetStore petStore = SchemaOrg.petStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(petStore)); + assertEquals(petStore, thing); + } + @Test public void testHomeAndConstructionBusiness() throws IOException { + final HomeAndConstructionBusiness homeAndConstructionBusiness = SchemaOrg.homeAndConstructionBusiness() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(homeAndConstructionBusiness)); + assertEquals(homeAndConstructionBusiness, thing); + } + @Test public void testReplyAction() throws IOException { + final ReplyAction replyAction = SchemaOrg.replyAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(replyAction)); + assertEquals(replyAction, thing); + } + @Test public void testQuantitativeValue() throws IOException { + final QuantitativeValue quantitativeValue = SchemaOrg.quantitativeValue() + .maxValue(42) + .minValue(42) + .unitCode("Test String") + .value(42) + .unitText("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(quantitativeValue)); + assertEquals(quantitativeValue, thing); + } + @Test public void testMedicalImagingTechnique() throws IOException { + final MedicalImagingTechnique medicalImagingTechnique = SchemaOrg.medicalImagingTechnique() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalImagingTechnique)); + assertEquals(medicalImagingTechnique, thing); + } + @Test public void testPerformAction() throws IOException { + final PerformAction performAction = SchemaOrg.performAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(performAction)); + assertEquals(performAction, thing); + } + @Test public void testTheaterEvent() throws IOException { + final TheaterEvent theaterEvent = SchemaOrg.theaterEvent() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(theaterEvent)); + assertEquals(theaterEvent, thing); + } + @Test public void testCanal() throws IOException { + final Canal canal = SchemaOrg.canal() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(canal)); + assertEquals(canal, thing); + } + @Test public void testMedicalEnumeration() throws IOException { + final MedicalEnumeration medicalEnumeration = SchemaOrg.medicalEnumeration() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalEnumeration)); + assertEquals(medicalEnumeration, thing); + } + @Test public void testEnergy() throws IOException { + final Energy energy = SchemaOrg.energy() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(energy)); + assertEquals(energy, thing); + } + @Test public void testBlog() throws IOException { + final Blog blog = SchemaOrg.blog() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(blog)); + assertEquals(blog, thing); + } + @Test public void testSculpture() throws IOException { + final Sculpture sculpture = SchemaOrg.sculpture() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(sculpture)); + assertEquals(sculpture, thing); + } + @Test public void testBusinessEntityType() throws IOException { + final BusinessEntityType businessEntityType = SchemaOrg.businessEntityType() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(businessEntityType)); + assertEquals(businessEntityType, thing); + } + @Test public void testEventVenue() throws IOException { + final EventVenue eventVenue = SchemaOrg.eventVenue() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(eventVenue)); + assertEquals(eventVenue, thing); + } + @Test public void testArriveAction() throws IOException { + final ArriveAction arriveAction = SchemaOrg.arriveAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(arriveAction)); + assertEquals(arriveAction, thing); + } + @Test public void testMedicalCondition() throws IOException { + final MedicalCondition medicalCondition = SchemaOrg.medicalCondition() + .epidemiology("Test String") + .expectedPrognosis("Test String") + .naturalProgression("Test String") + .pathophysiology("Test String") + .possibleComplication("Test String") + .subtype("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalCondition)); + assertEquals(medicalCondition, thing); + } + @Test public void testSubwayStation() throws IOException { + final SubwayStation subwayStation = SchemaOrg.subwayStation() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(subwayStation)); + assertEquals(subwayStation, thing); + } + @Test public void testMedicalGuidelineRecommendation() throws IOException { + final MedicalGuidelineRecommendation medicalGuidelineRecommendation = SchemaOrg.medicalGuidelineRecommendation() + .recommendationStrength("Test String") + .evidenceOrigin("Test String") + .guidelineDate(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalGuidelineRecommendation)); + assertEquals(medicalGuidelineRecommendation, thing); + } + @Test public void testRiverBodyOfWater() throws IOException { + final RiverBodyOfWater riverBodyOfWater = SchemaOrg.riverBodyOfWater() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(riverBodyOfWater)); + assertEquals(riverBodyOfWater, thing); + } + @Test public void testQuestion() throws IOException { + final Question question = SchemaOrg.question() + .upvoteCount(42) + .downvoteCount(42) + .answerCount(42) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(question)); + assertEquals(question, thing); + } + @Test public void testPhysicalActivityCategory() throws IOException { + final PhysicalActivityCategory physicalActivityCategory = SchemaOrg.physicalActivityCategory() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(physicalActivityCategory)); + assertEquals(physicalActivityCategory, thing); + } + @Test public void testRsvpAction() throws IOException { + final RsvpAction rsvpAction = SchemaOrg.rsvpAction() + .additionalNumberOfGuests(42) + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(rsvpAction)); + assertEquals(rsvpAction, thing); + } + @Test public void testEducationalAudience() throws IOException { + final EducationalAudience educationalAudience = SchemaOrg.educationalAudience() + .educationalRole("Test String") + .audienceType("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(educationalAudience)); + assertEquals(educationalAudience, thing); + } + @Test public void testAutoDealer() throws IOException { + final AutoDealer autoDealer = SchemaOrg.autoDealer() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(autoDealer)); + assertEquals(autoDealer, thing); + } + @Test public void testMedicalScholarlyArticle() throws IOException { + final MedicalScholarlyArticle medicalScholarlyArticle = SchemaOrg.medicalScholarlyArticle() + .publicationType("Test String") + .articleBody("Test String") + .articleSection("Test String") + .wordCount(42) + .pageEnd(42) + .pageStart(42) + .pagination("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalScholarlyArticle)); + assertEquals(medicalScholarlyArticle, thing); + } + @Test public void testTable() throws IOException { + final Table table = SchemaOrg.table() + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(table)); + assertEquals(table, thing); + } + @Test public void testInteractAction() throws IOException { + final InteractAction interactAction = SchemaOrg.interactAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(interactAction)); + assertEquals(interactAction, thing); + } + @Test public void testTireShop() throws IOException { + final TireShop tireShop = SchemaOrg.tireShop() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(tireShop)); + assertEquals(tireShop, thing); + } + @Test public void testCityHall() throws IOException { + final CityHall cityHall = SchemaOrg.cityHall() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(cityHall)); + assertEquals(cityHall, thing); + } + @Test public void testMovieSeries() throws IOException { + final MovieSeries movieSeries = SchemaOrg.movieSeries() + .endDate(NOW) + .startDate(NOW) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(movieSeries)); + assertEquals(movieSeries, thing); + } + @Test public void testAccountingService() throws IOException { + final AccountingService accountingService = SchemaOrg.accountingService() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(accountingService)); + assertEquals(accountingService, thing); + } + @Test public void testDietarySupplement() throws IOException { + final DietarySupplement dietarySupplement = SchemaOrg.dietarySupplement() + .activeIngredient("Test String") + .background("Test String") + .dosageForm("Test String") + .isProprietary(true) + .mechanismOfAction("Test String") + .nonProprietaryName("Test String") + .safetyConsideration("Test String") + .targetPopulation("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(dietarySupplement)); + assertEquals(dietarySupplement, thing); + } + @Test public void testDeliveryChargeSpecification() throws IOException { + final DeliveryChargeSpecification deliveryChargeSpecification = SchemaOrg.deliveryChargeSpecification() + .maxPrice(42) + .minPrice(42) + .price(42) + .validFrom(NOW) + .validThrough(NOW) + .valueAddedTaxIncluded(true) + .priceCurrency("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(deliveryChargeSpecification)); + assertEquals(deliveryChargeSpecification, thing); + } + @Test public void testSaleEvent() throws IOException { + final SaleEvent saleEvent = SchemaOrg.saleEvent() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(saleEvent)); + assertEquals(saleEvent, thing); + } + @Test public void testMedicalRiskFactor() throws IOException { + final MedicalRiskFactor medicalRiskFactor = SchemaOrg.medicalRiskFactor() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalRiskFactor)); + assertEquals(medicalRiskFactor, thing); + } + @Test public void testReceiveAction() throws IOException { + final ReceiveAction receiveAction = SchemaOrg.receiveAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(receiveAction)); + assertEquals(receiveAction, thing); + } + @Test public void testPlanAction() throws IOException { + final PlanAction planAction = SchemaOrg.planAction() + .scheduledTime(NOW) + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(planAction)); + assertEquals(planAction, thing); + } + @Test public void testChurch() throws IOException { + final Church church = SchemaOrg.church() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(church)); + assertEquals(church, thing); + } + @Test public void testMusicStore() throws IOException { + final MusicStore musicStore = SchemaOrg.musicStore() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(musicStore)); + assertEquals(musicStore, thing); + } + @Test public void testAchieveAction() throws IOException { + final AchieveAction achieveAction = SchemaOrg.achieveAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(achieveAction)); + assertEquals(achieveAction, thing); + } + @Test public void testComedyClub() throws IOException { + final ComedyClub comedyClub = SchemaOrg.comedyClub() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(comedyClub)); + assertEquals(comedyClub, thing); + } + @Test public void testOptician() throws IOException { + final Optician optician = SchemaOrg.optician() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(optician)); + assertEquals(optician, thing); + } + @Test public void testMusicComposition() throws IOException { + final MusicComposition musicComposition = SchemaOrg.musicComposition() + .iswcCode("Test String") + .musicCompositionForm("Test String") + .musicalKey("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(musicComposition)); + assertEquals(musicComposition, thing); + } + @Test public void testGiveAction() throws IOException { + final GiveAction giveAction = SchemaOrg.giveAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(giveAction)); + assertEquals(giveAction, thing); + } + @Test public void testPlayground() throws IOException { + final Playground playground = SchemaOrg.playground() + .openingHours("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(playground)); + assertEquals(playground, thing); + } + @Test public void testExercisePlan() throws IOException { + final ExercisePlan exercisePlan = SchemaOrg.exercisePlan() + .activityFrequency("Test String") + .additionalVariable("Test String") + .exerciseType("Test String") + .intensity("Test String") + .repetitions(42) + .restPeriods("Test String") + .epidemiology("Test String") + .pathophysiology("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(exercisePlan)); + assertEquals(exercisePlan, thing); + } + @Test public void testParcelDelivery() throws IOException { + final ParcelDelivery parcelDelivery = SchemaOrg.parcelDelivery() + .expectedArrivalFrom(NOW) + .expectedArrivalUntil(NOW) + .trackingNumber("Test String") + .trackingUrl("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(parcelDelivery)); + assertEquals(parcelDelivery, thing); + } + @Test public void testMedicalConditionStage() throws IOException { + final MedicalConditionStage medicalConditionStage = SchemaOrg.medicalConditionStage() + .stageAsNumber(42) + .subStageSuffix("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalConditionStage)); + assertEquals(medicalConditionStage, thing); + } + @Test public void testOfferItemCondition() throws IOException { + final OfferItemCondition offerItemCondition = SchemaOrg.offerItemCondition() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(offerItemCondition)); + assertEquals(offerItemCondition, thing); + } + @Test public void testTransferAction() throws IOException { + final TransferAction transferAction = SchemaOrg.transferAction() + .endTime(NOW) + .startTime(NOW) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(transferAction)); + assertEquals(transferAction, thing); + } + @Test public void testComedyEvent() throws IOException { + final ComedyEvent comedyEvent = SchemaOrg.comedyEvent() + .doorTime(NOW) + .endDate(NOW) + .previousStartDate(NOW) + .startDate(NOW) + .typicalAgeRange("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(comedyEvent)); + assertEquals(comedyEvent, thing); + } + @Test public void testHVACBusiness() throws IOException { + final HVACBusiness hVACBusiness = SchemaOrg.hVACBusiness() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(hVACBusiness)); + assertEquals(hVACBusiness, thing); + } + @Test public void testCity() throws IOException { + final City city = SchemaOrg.city() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(city)); + assertEquals(city, thing); + } + @Test public void testSingleFamilyResidence() throws IOException { + final SingleFamilyResidence singleFamilyResidence = SchemaOrg.singleFamilyResidence() + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(singleFamilyResidence)); + assertEquals(singleFamilyResidence, thing); + } + @Test public void testMedicalDevicePurpose() throws IOException { + final MedicalDevicePurpose medicalDevicePurpose = SchemaOrg.medicalDevicePurpose() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(medicalDevicePurpose)); + assertEquals(medicalDevicePurpose, thing); + } + @Test public void testReview() throws IOException { + final Review review = SchemaOrg.review() + .reviewBody("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(review)); + assertEquals(review, thing); + } + @Test public void testMotorcycleDealer() throws IOException { + final MotorcycleDealer motorcycleDealer = SchemaOrg.motorcycleDealer() + .currenciesAccepted("Test String") + .openingHours("Test String") + .paymentAccepted("Test String") + .priceRange("Test String") + .faxNumber("Test String") + .globalLocationNumber("Test String") + .isicV4("Test String") + .telephone("Test String") + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(motorcycleDealer)); + assertEquals(motorcycleDealer, thing); + } + @Test public void testVideoGame() throws IOException { + final VideoGame videoGame = SchemaOrg.videoGame() + .gamePlatform("Test String") + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(videoGame)); + assertEquals(videoGame, thing); + } + @Test public void testWarrantyPromise() throws IOException { + final WarrantyPromise warrantyPromise = SchemaOrg.warrantyPromise() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(warrantyPromise)); + assertEquals(warrantyPromise, thing); + } + @Test public void testRadioSeries() throws IOException { + final RadioSeries radioSeries = SchemaOrg.radioSeries() + .numberOfEpisodes(42) + .numberOfSeasons(42) + .endDate(NOW) + .startDate(NOW) + .schemaVersion("Test String") + .accessibilityAPI("Test String") + .accessibilityControl("Test String") + .accessibilityFeature("Test String") + .accessibilityHazard("Test String") + .alternativeHeadline("Test String") + .award("Test String") + .contentRating("Test String") + .copyrightYear(42) + .dateCreated(NOW) + .dateModified(NOW) + .datePublished(NOW) + .discussionUrl("Test String") + .educationalUse("Test String") + .genre("Test String") + .headline("Test String") + .interactivityType("Test String") + .isBasedOnUrl("Test String") + .isFamilyFriendly(true) + .keywords("Test String") + .learningResourceType("Test String") + .publishingPrinciples("Test String") + .text("Test String") + .thumbnailUrl("Test String") + .typicalAgeRange("Test String") + .version(42) + .commentCount(42) + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(radioSeries)); + assertEquals(radioSeries, thing); + } + @Test public void testCreditCard() throws IOException { + final CreditCard creditCard = SchemaOrg.creditCard() + .additionalType("Test String") + .alternateName("Test String") + .description("Test String") + .name("Test String") + .sameAs("Test String") + .url("Test String") + .id("Test String") + .build(); + final Thing thing = SchemaOrg.readJson(SchemaOrg.writeJson(creditCard)); + assertEquals(creditCard, thing); + } +}